REVIEWS COURTESY OF ZXSR

FORTH
by John Jones-Steele
Abersoft
1983
Your Computer Issue 10, Oct 1983   page(s) 84

Machine: Spectrum
Language: Forth
Company: Abersoft
Price: £14.95

Abersoft 48K Spectrum Forth - with graphics - impressed me almost as much as the Sinclair Forths. This loaded in just 70 seconds, including the editor. This is a Fig Forth Implementation with extensions to make best use of the Spectrum capabilities.

All the Forth standard words are included and a better selection of double-precision operators. The Spectrum specific extensions include graphics words such as Draw, Attr and At but apparently no Circle. All these words are the same as their Basic synonyms. Beep is not the same as Spectrum Basic Beep.

Its two parameters are related directly to the machine-code loops, allowing the sound to be more creative if less easy to use than Basic. User-defined graphics conversely are easier to construct.

There are two ways to Save definitions, both of them non-standard. The first of these is a routine to Save the Forth nucleus definitions and you definitions in the same for as the system is supplied in. This is non-standard but a good idea.

The other method involves 10 standard Forth screens. Each screen can be composed individually, but can only be transferred to and from tape as a group of 10 screens. Abersoft promises Microdrive file support in the near future. Hopefully this will allow the screens to be individually numbered and the filing operations to be carried out automatically.

The Forth screen editor is again a standard Forth editor. The presentation of the screens on the VDU is a little different. It is usual for a Forth screen which conventionally consists of 15 lines of 84 characters to be presented as 16 blank lines. This allow the whole Forth screen to be visible on the VDU screen. This editor initially presents each line as 84 question marks causing it to spread off the screen.

This is inconvenient but Forth is friendly and flexible - a dangerous word can be defined which puts a carriage return only onto each line.

Also included is a printed booklet which includes the usual introduction to Forth loading details and a glossary.


REVIEW BY: Fintan Culwin

Transcript by Chris Bourne

Your Spectrum Issue 1, Jan 1984   page(s) 21,22,25

COURTING COMPILERS

GO-FASTER!

FLIRTING WITH FORTH

Once the initial association with Sinclair Basic has run its course, Spectrum owners soon come to realise its limitations - especially with regard to speed of operation. Steve Mann checks out alternative routes - in particular the 'FP'and 'IS' compilers from Softek, and the Abersoft Forth package.

SHIFT INTO FORTH

Abersoft helps trash Basic speed limits.

The Forth language was originally developed by Charles Moore in the 1960s as a language for controlling radio telescopes. Since then it's been used for a wide variety of applications, including arcade video games. Unlike Basic, which is usually ROM-based, Forth is generally supplied on disk and, with its sudden surge in popularity over the past year or so. now on cassette too.

The newcomer to the language will notice two major differences between Forth and Basic Forth uses Reverse Polish Notation (ie. Basic's PRINT 2+2 is replaced by 2 2 + . ), and makes great use of the stack for virtually every operation.

There are now many versions of Forth available for the Spectrum - Abersoft's implementation is basically fig-FORTH (the modishly lower case 'fig' referring to the Forth Interest Group) with extensions to handle the machine-specific graphics and sound commands. Forth was originally designed for use on disk-based systems, and the Abersoft version emulates disk operation by setting aside an 11K chunk of memory and using this as a 'pretend' disk. Although 11K does not sound like an incredible amount of memory, the compactness of Forth allows some very complex programs to be developed.

The version looked at here has no provision for Microdrives, but it would be relatively simple to implement these, giving in effect a true (although slow) disk-based system. The 11 K of 'RAMdisk' is organised into pages of 1K, each containing 16 lines of 64 characters. This is hardly ideal for the Spectrum's 32-character display but is a Forth standard and, in fact, gives rise to no real problems in use.

HOW IT OPERATES

For those who are totally unfamiliar with the language, it should be said that Forth is used by defining words, using the basic building-blocks of the standard words in the dictionary. Each new word is treated as a new dictionary entry, and further words may be defined by using these. Thus, eventually, a complex program may be defined and run by the typing of a single word.

The stack assumes paramount importance, being used for almost every operation - even to the extent of passing values from word to word and doing the same job as a Basic variable. It is in fact a surprisingly easy language to gel to grips with, once the user has grasped Reverse Polish. Words may be defined direct from the keyboard - in which case the definitions go straight into the dictionary; or by using the editor - in which case they are not compiled immediately but wait until the blocks of text from the editor are LOADed.

For most of the machine-specific extensions, Abersoft has stuck to the familiar Basic names, but Reverse Polish means that parameters go before, rather than after, the keyword the Basic PLOT x,y becomes, for example, x y PLOT (note the absence of a comma). In some cases the familiar words have a slightly different meaning - the Basic DRAW, which uses relative coordinates (DRAW 50,50 would mean draw to a point 50 pixels horizontally and 50 pixels vertically away from the last plotted position) is replaced by absolute co-ordinates, with 50 50 DRAW meaning draw a line from the last point plotted to the screen coordinates 50,50. The CIRCLE routine in ROM could be called from Forth. The Basic BEEPcommand is omitted completely, which is a pity. However, the facility exists to insert machine code routines and so the CIRCLE becomes the Forth BLEEP, used in the format nl n2 BLEEP to produce a tone of duration n1 and pitch n2. User-defined graphics are fully supported, and the manual contains a routine to define any character by using the word UDG.

In addition to the Spectrum graphics and sound extensions, Abersoft Forth supports the Pascal-like CASE structure for handling multiple decisions, and the word FREE which - surprise, surprise! - tells you how many bytes remain free for use.

The Abersoft documentation makes no claims about the use of Forth, instead concentrating on the Spectrum-specific extensions and giving a glossary - with a few omissions - of the words in the dictionary. Unfortunately the glossary contains some misprints, but as the novice user will need a proper Forth instruction book, these should not be too troublesome. It's a good idea to supplement the Abersoft manual, and whatever book is decided on for teaching purposes, with the fig-Forth installation documentation; this costs a fiver and is well worth shelling-out for (the contact address is given at the end of this article).

All in all, then, Abersoft Forth is highly recommended for the beginner who wishes to learn more about this fascinating language. With an increase in speed of up to 5000 percent over Basic, Forth provides a good alternative to machine code for fast-running programs and speedy graphics and its use in arcade machines testifies to its success as a language for the programming of all-action games. It's impossible to give more than a rough idea of the language's capabilities in this short article - but hopefully, at least, your curiosity will provoke you into investigating Forth on your Spectrum.

Abersoft Forth costs £14.95 and is available from Abersoft, 7 Maes Afallen, Bow Street, Dyfed SY24 5BA.


REVIEW BY: Steve Mann

Blurb: "I agree it's quite remarkable that we can run the whole of BL on a Sinclair Spectrum - but do we really need 17,340 people to operate it?"

Blurb: GOOD READING The Complete Forth - Alan Winfield (Sigma Technical Press). Discover Forth - Thom Hogan Forth Programming - Leo Scanlon Forth installation documentation is available from Forth Interest Group UK, 15 St Albans Mansion, Kensington Court Place, London W8.

Transcript by Chris Bourne

All information in this page is provided by ZXSR instead of ZXDB