8-Bit Software
Back to Electron Games

FORTH

 

 

Professional, Originally Released On Cassette Only

 

Game Type          : Computer Language

Author             : Richard de Grandis-Harrison

Standalone Release(s)   : 1984: FORTH (Cassette), Acornsoft, £12.95

Compilation Release(s) : None

Stated compatibility    : Electron

Actual compatibility    : Electron, BBC B, B+ and Master 128

Supplier            : ACORNSOFT, 4A Market Hill, CAMBRIDGE CB2 3NJ

                    Tel: (0223) 316039

Disc compatibility     : CDFS E00, DFS E00

 

 

Instructions

This pack contains the Acornsoft FORTH system on cassette. Acornsoft FORTH is a complete implementation of the FORTH language, to the 1979 standard specification by the FORTH Interest Group in California, for the Acorn Electron. FORTH is a compiled language so programs run very fast (typically five times faster than BASIC). Learners and enthusiasts alike will find it an exciting addition to their software range.

 

The manual FORTH on the BBC Microcomputer (available separately) serves as a general introduction to FORTH and includes a full description of Acornsoft FORTH with a glossary defining the actions of all standard words. The chapters are illustrated by practical examples.

 

Contents

FORTH dictionary and compiler

 

Editor                                  |

FORTH Assembler                         }   These files can be loaded

High-Resolution Graphics Demonstration  |   from within FORTH

 

Loading Instructions

When loading is complete, a copyright message, and the heading:

   Acornsoft FORTH

   OK

will be displayed on the screen.

 

The Editor, Assembler and Graphics demonstration are loaded from within FORTH.

 

In FORTH, 'files' are not recognised as such, but are loaded as 'screens'. The screens are numbered in decimal on this pack - these are the filenames, as listed below - BUT they are identified on the cassette tape by their equivalent hexadecimal number; this means that while the screen(s) are being loaded, the appropriate hex number will be displayed and the user can confirm that the correct file is being loaded.

   Editor                      Screens  3-10         0003-000A (hex)

   Assembler                   Screens 12-18         000C-0012

   Graphics Demonstration      Screens 21-22         0015-0016

 

Examples:

The entire editor is loaded from within FORTH with the command

   3 LOAD [RETURN]

 

Normal cassette operating messages are displayed during loading, and the message OK on the screen confirms that loading is complete. Similarly, the Graphics Demonstration is loaded with the command

   21 LOAD [RETURN]

 

Once loaded, the Graphics Demonstration can be RUN with the command

   PLOT-IT [RETURN]

 

Refer to the manual FORTH on the BBC Microcomputer (available separately) for full details of programming in Acornsoft FORTH.

 

 

Instructions' Source   : FORTH (Acornsoft) Back and Inner Inlay

 

Review (Electron User)

FORTH was invented in 1969 by Charles H. Moore who worked on an IBM 1130 - a third generation computer. He believed his language to be the next step forward and considered it to be a fourth generation computer language. However, the language he was developing for the IBM 1130 only permitted five character identifiers so instead of being called Fourth it became Forth.


It has become the second most popular language on home micros after Basic. So if you have mastered the art of programming the Electron in Basic and are looking for something new then take a look at Acornsoft's Forth.


There are two main versions of this language - Forth-79 set out by the Forth Standards Team, and fig-Forth put forward by the Forth Interest Group in America. Acornsoft's version follows the Forth-79 standard. All the words in
the standard word set are present plus a few others added by Acornsoft such as >VDU to send a byte to the VDU drivers.


Forth is neither an interpreted language like Basic nor a true compiled language like Pascal. It's a sort of intermediate language, compiling the definitions to a code close to machine language which is then interpreted when the program is run. Forth is known as an interpretative threaded language - the instructions which make up the application are compiled to give a list of addresses which point to previously defined machine code routines. The result of this is that it runs quite fast as much of the interpretation has already been carried out.


The Electron takes more than 22 seconds to count from 0 to 30,000 in Basic using an ordinary variable and about 7.5 seconds using one of the resident integer variables as the loop counter. The same loop in Forth takes about four seconds, making it nearly twice as fast as Basic. Forth programs are usually, but not always, faster than their Basic equivalents. So if you are interested in fast arcade games and find Basic too slow or machine code incomprehensible, try Forth as an alternative. It might just have that extra bit of speed you are looking for.


The cassette has four programs. These include a Forth dictionary and compiler, an editor, a Forth assembler and a high resolution graphics demonstration. The dictionary and compiler take about 4.5 minutes to load and consist of several files which relocate when finished. A copyright message appears and the heading:

      Acornsoft FORTH

      OK

is printed. The OK is not a sort of "Jimmy rules OK" message but is one of the features of Forth - it simply means that the task set has been completed.


Modes 4, 5 and 6 are available and there is more than 6k of memory free for your application. Graphic displays are also possible in Modes 4 and 5.


The manual, which is available separately, shows how to draw triangles, rectangles and how to animate simple characters.


Acornsoft Forth does not support floating point arithmetic but this is not the great handicap it might at first seem. Floating point numbers are not needed all that often but when they are, Forth is such a flexible language that you can define your own words to handle them.


Since Forth applications - programs - are compiled as they are entered, the original form of the definitions are lost and only the compiled form remains. Acornsoft uses the standard Forth method of storing a copy of the source code in a number of screens. There are initially two screens on loading but this number can be increased - with a corresponding decrease in the memory left for the dictionary.


Each screen is divided into 16 lines of 64 characters and is identified by a number. A Forth application can use as many screens as it needs and interpretation continues with the next. Screens can be loaded, saved and edited with the editor supplied. The editor seems a bit complicated and a bit bewildering at first but is quite powerful and becomes easier to use with practice.


There are commands for putting text on to a line, deleting a line, inserting text, spreading lines, deleting text and many more. The manual with the cassette is actually Forth On The BBC Microcomputer but there is no difference between the two versions. The manual is an absolute necessity and pushes the total price of the package to more than £20. The manual is excellent, covering topics such as arithmetic (single and double precision), defining new words and vocabularies, loops, input and output, creating arrays, assembly language, graphics and sound. At the back is a glossary which lists all the Forth words in the dictionary and gives a brief description of their function.

 

To sum up then, Acornsoft's Forth is an excellent implementation of  the language. It is very powerful, encourages structured programming techniques and is faster than Basic for many applications. If you are interested in programming and want something different and are prepared to put a bit of effort in then Forth would be a good investment and would open up a whole new world that you never knew existed.


If, however, you are just interested in fast machine code games and zapping various nasties of assorted sizes and shapes, then I would not recommend it. But you would be missing out on something far more interesting and rewarding.

Roland Waddilove, ELECTRON USER 2. 1