PAGE 6 #14 / MARCH 1985 / PAGE 34 

English Software’s
E.S. FORTH

reviewed by Steven Burke

FORTH is an increasingly popular language, and E.S. FORTH is one of several versions available for ATARI computers. It will run on 400, 800 and XL models having at least 32K. Cassette and disc versions are available, and both are very good value.

Operations are carried out in FORTH by executing commands known as “words”. Every version of FORTH contains a “dictionary” of these words. A FORTH program is written by defining new words, which are added to the dictionary, to perform new functions. This is done by writing chunks (or “screens”) of source code containing the definitions, which are then compiled into the dictionary.

FORTH is a structured language, in that the program flow is not controlled by jumping between numbered program lines, as in BASIC. This forces the programmer to think more carefully before he starts writing his program, and results in the program being much better organised. It also means that it is much easier to keep lots of different program utilities which are loaded in at will without worrying about conflicts between line numbers.

FORTH is claimed to have a number of advantages over BASIC, especially that of speed. It is indeed much faster than BASIC, but this does not mean that you can use FORTH to write arcade-quality programs with the same ease as ordinary BASIC programs. If neccessary though you can speed things up further by using machine code routines. FORTH is much more versatile than BASIC, and allows the user far more control over what is happening inside the computer. For this reason I find it a much more pleasing and interesting language to use.

E.S. FORTH is based on a standard called fig-FORTH, but claims to have been internally optimised for speed and efficiency. I tried a few crude bench tests and found that it did indeed run noticeably faster than two other fig-FORTH based ATARI languages. The version of E.S FORTH I tried was cassette based. This reduces costs when compared with cartridges, and renders it available to those users who do not have disc driven. However, like all RAM based languages a program crash often means switching off the computer and starting again from scratch, which can be time consuming when you have to load the language off a cassette.

An area of RAM is set aside to simulate a disc and contains a number of screens into which the user can write source code for his FORTH program. The size of the area (and hence the number of screens) is set by the user at the start of a programming session. Screens are written using the ATARI screen editor, as in BASIC, except that the user must remember when altering a line to insert “P” between the line number and the line’s text. Otherwise strange things happen, Other editing facilities are also provided, these are standard FORTH editing commands, although in E.S. FORTH they are permanently resident and operational, which is not usual.

Once the screens have been written they can be stored individually or as a set on a cassette, and can be compiled into the language’s dictionary to enable the program to be run. Five screens can be simultaneously stored in a 32 K system and still leave room for a complex compiled program. More screens can be accomodated by sacrificing display and/or dictionary memory. However this is not necessary if you are willing to write your program in separate sections which are successively retrieved from cassette and compiled which with a little thought, could be done automatically.

The basic dictionary of E.S. FORTH contains nearly all the standard fig-FORTH commands. Those that are missing relate mainly to the use of discs. It should be noted that one of the beauties of FORTH is that in principle adding new words, for example to make up for omissions in the basic dictionary, should not present problems, so long as the functions of the words are understood.

The E.S. FORTH dictionary is also well-stocked with commands specifically for the ATARI. These are mostly like corresponding BASIC commands. They include I/O words such as OPEN, CLOSE, PUT, GET graphics words such as GRAPHICS, COLOR, PLOT, DRAW, as well as other types of words, eg, STICK, SOUND, etc. There are however a number of commands which do not have BASIC counterparts. There is for example a very useful PLAY command, which is like SOUND except that it has a time parameter, so that the sound stops after a preset duration. Processing continues while the sound is playing.

There are also commands to make it much easier to design and use custom character sets, but the most useful of these extra commands are the Player-Missile utilities. A single command sets up the registers and allocates screen memory. Other commands are provided, e.g. for defining and switching between player shapes (to permit animation), for moving the players and missiles, setting their colours and widths, etc. Controlling player movement in response to a joystick is made particularly easy Anyone who has tried writing even simple Player-Missile routines in BASIC will know how tedious this can be, especially if you have to resort to clever little programming tricks to get the players to move quickly enough. Having a language that can handle this for you makes a very pleasant change, and for this reason alone I would recommend E.S. FORTH.

Some versions of FORTH are provided with an assembler, which enables new words to be defined in machine code to increase speed, but unfortunately E.S. FORTH does not have one. Instead it is possible to run the language with the ATARI ASSEMBLER/EDITOR cartridge in place, and switch control between FORTH and the cartridge. This is useful in some situations, but makes saving and loading FORTH programs written partly in assembly language awkward. However, some public domain assemblers have been written in FORTH, and the interested user should be able to get hold of a source listing without too much difficulty.

A more serious omission is the lack of any command to allow the FORTH dictionary (including any new words which the user has defined) to be saved on cassette. This means that every time you wish to run a program or utility, you have to load the language itself and then load in and compile the source code (i.e. the screens), which could take a considerable time, particularly if you have several different utilities which you want to use together. The experienced user would find a way to solve this problem, but for the beginner it could be a real nuisance.

The documentation supplied with E.S. FORTH is not and does not claim to be, adequate for the beginner. No attempt is made to teach FORTH, and as this language is so different from BASIC, especially in its “backward” looking syntax, the novice would need to buy a suitable book. As E.S. FORTH is so cheap, this is not unreasonable. Much of the book supplied with E.S. FORTH is taken up with a reproduction of literature issued by the FORTH Interest Group, including a glossary of fig-FORTH words and a “model” which explains in detail the inner workings of the language and which would be useful (and comprehensible) only to the very experienced user. The rest of the book contains enough to explain those features specific to E.S. FORTH, and includes short programs to demonstrate the Player-Missile utilities.

Anyone who likes programming but only knows BASIC doesn’t know what he’s missing. Even ignoring the usefulness of the FORTH language, just learning how to use it and what it can do is fascinating. If you are interested in computing, rather than simply playing games you have bought, then you can’t fail to get excellent value by buying ES FORTH.

PAGE 6 #25 / JANUARY 1987 / PAGE 14 

GO-FORTH AND MULTI-TASK

Bignose Software S.E.C.S. £24.99

reviewed by Peter Coates

Unlike the new ST series, there is a very limited choice of languages available for the older 8-bit Atari computers, Indeed, the main alternative to using the slow and unstructured BASIC is to resort to the complexities of Assembler - an unenviable choice!

Although considerable interest has been shown in the Forth language, and introductory articles have appeared in most computer magazines, it is surprising that so few programmers appear to have been converted to it. Disk drives are essential of course, and I would agree that it does take some effort to become familiar with its stack-based operation and the reverse Polish notation, but it is a fast, powerful language, and, once bitten, most users become Forth enthusiasts if not fanatics.

Most versions of Forth available for the Atari 8-bit computers in Britain have had some weaknesses or have been rather expensive. Go-Forth is a multi-tasking version, needing a minimum of 32k RAM, produced and marketed in the UK by S.E.C.S. Ltd. under licence from the quaintly-named Bignose Software. It is approved by Atari, claimed to provide features normally only found on mini- and main frame computers, and is on sale at a very reasonable price (£25). To see if this represents good value, we must look at the facilities provided.

First, I should perhaps remind you that a Forth system consists of a dictionary of compiled ’words’. A word is similar to a sub-routine; it carries out a particular function, and several may be combined together and given a descriptive name to define a more complex function. You can execute any function simply by entering its name from the keyboard. The language is usually provided in the form of a Forth nucleus, which is the part read into the computer on booting up, from the disk supplied, and several ’electives’, that is, sets of definitions of words you may choose to add to the nucleus in order to carry out specific tasks, The electives are stored on the disk in screens or blocks which can either be read into buffers in the computer for inspection and modification, or compiled directly into the dictionary.

The nucleus provided in Go-Forth follows reasonably closely the Forth-79 standard, so if you copy code obeying this standard from another source into your system, it should compile without serious difficulties. The differences from the 79 standard are listed in the User Guide provided. The only one which might cause problems is the absence of the variable STATE, which indicates whether the system should compile or execute immediately the code presented to it. There are ways round this, but you need to know exactly what you are doing.

The electives include not one but two editors. I found the screen editor, which behaves rather like a text editor, particularly effective for entering new definitions. The line editor is of the conventional fig-Forth form, and more suited to the modification of existing screens. The block size in Go-Forth is 512 bytes, so each screen consists of 16 lines of 32 characters. It is more usual to have a block size of 1024 bytes (16 lines of 64 characters ), but the smaller size fits more efficiently on the Atari text screen.

If you are accustomed to 6502 machine code, you should have few problems with any Forth assembler, once you have adapted to the reverse notation. In fact, because high level control words such as IF .. ELSE .. THEN and BEGIN UNTIL are available, and you can break the code into small sections, each of which can be tested and debugged separately, assembler in Forth is actually rather easy. The Go-Forth assembler does not, however, make use of the check digit normally included to ensure that the control words are correctly paired. In my opinion, this is a definite weakness; the time saved while loading is minimal, and certain to be exceeded by that required in checking the code and finding the mistakes.

The debugging utilities allow new Forth words to be checked by stepping through the definition, with the contents of the stack and any important variables shown after each step. This is a much more useful facility than the de-compiling utility normally provided, which merely lists the words present in the definition. It would have saved me many hours of frustration and reams of paper in the past.

The multi-tasking routines are perhaps the most prominent feature of Go-Forth, and it’s unusual to find these features on an 8-bit micro. Some tasks are provided; one (TYPIST) enables you to continue using the computer while printing out long documents or listings. Another (TICKER) gives a digital clock on the GR.0 text screen, and supplements other time and date routines available whether you find the ability to run simultaneous tasks to be of great value depends very much on your applications. It is particularly useful for controlling external equipment - a sophisticated domestic control and burglar alarm system, for example.

Other electives cover disk and IO operations, and sound and graphics. These on the whole correspond to the facilities available in BASIC. No attempt has been made to provide words to cover player-missile graphics and display list interrupts.

On the whole the package is neatly and effectively done. There are some minor points I didn’t like; for example, the disk drives are, for no good reason, numbered 0 to 3 rather than the usual 1 to 4, Also, no warning is given if you define a word with the same name as one already present. This can be corrected by re-vectoring CREATE, but I feel that a warning should be the default option. There are no floating point routines; although the purist might claim that they are undesirable in Forth, which predominantly uses integer and fixed point arithmetic, I have found them very useful on occasion.

The one serious failing in Go-Forth is the documentation provided. The reader is assumed to be ’a competent Forth programmer experienced in the use of a standard 6502 assembly language’, A very small fraction of the potential customers will meet these requirements. Even if you do, the 80-page user guide is not well written or well organised, and some sections are heavy going indeed. It also has its fair share of errors; even the procedure on page 2 for backing up the system disk is faulty (the store word ’!’ has been replaced by a degree symbol). For a beginner, a copy of Brodie’s ’Starting Forth’ or of Winfield’s ’The Complete Forth’ is absolutely essential. These will cover the fundamentals, of course, and not the functions specific to Go-Forth.

To sum up, then, I would say that this is a very good version of Forth for the Atari, with some really useful extensions, even if you don’t make much use of the multi-tasking aspects. There are a few flaws which need correcting, and the documentation could be much improved; if you are a newcomer to Forth, you will certainly need an introductory text to get started, The price is very reasonable, and represents excellent value for money.

ATARI USER #42 / OCTOBER 1988 / PAGE 40 

Fig-Forth

COLIN BLACKBURN takes a look at a recently expanded version of Forth, formerly available only as a public domain program

EARLIER this year a computer magazine published a complete list of benchmark results covering a range of micros and languages. The Archimedes came out on top, but coming a close second was the ST. No real surprise there, but what language gave it this turn of speed, Fast Basic, Modula-2 or C? It was none of these. A public domain language called Fig-Forth took the honours.

Atari 8 bit owners will be pleased to know this fast and versatile language is now available for their machines. It may not be able to match the speed of the ST version but it can knock spots off Atari Basic.

Fig-Forth is one standard of the language Forth as defined by the American Forth Interest Group. Other standards include Forth-79, Forth-83 and polyForth, the former being implemented on the Atari as Go-Forth.

All are similar to each other in being very different to most other languages. Two features central to its design are the use of a stack and the idea of the word.

The stack is the route for all processing — it’s a last in first out data structure which will be familiar to machine code programmers. You can think of it as a pile of numbers with only the top one being accessed at any one time.

However, Forth provides various ways to add, remove, do arithmetic on and jiggle about these numbers very quickly. The word is the basic unit of instruction, the core words of a Forth system are normally defined in machine code but most other words are made up of words themselves.

A program in Forth is merely a word which performs the desired function and is built from words which in turn are built from other words which in turn — well perhaps you get the general drift. An example of a word is shown in Figure I. If used it should be added to one of the editor screens. It will automatically list the next screen to the one last listed.

This extensibility makes Forth very powerful, as it allows the user to build his or her own language to suit a particular set of tasks.

I have already mentioned that Fig-Forth is traditionally a public domain language, in fact versions are available in many PD libraries for just a couple of pounds. However, Pulsar Software is selling its implementation for £14.95. So what do you get for your money? A manual is the most obvious benefit, but there are also some useful extensions to the basic language such as a mouse handler for a standard ST mouse.

The language comes on a double-sided disc, the first containing the language kernel in an AUTORUN.SYS file and all the DOS 2.5 files you need. The second side contains 134 Forth screens, each taking up 1k. Most are empty but a few contain word definitions for the various extensions you require. Those of you with mathematical minds will have worked out that the disc is formatted in enhanced density. This is tough on 810 owners, myself included.

I initially thought this may just be a quirk of the review copy, but after borrowing a 1050 drive I realised the language was designed with that device in mind.

For instance, the disc copier, which is part of the extensions, copies 134 screens rather than the 90 which would be found on a single density disc.

This can be altered fairly easily, but it is short-sighted on Pulsar’s part as the disc will not even boot on an 810 drive. The A4 format manual is 45 sheets of duplicated typescript bound with one of those plastic slide-on spines. It hasn’t been written as a guide for the beginner, but is simply a systematic list of all the Forth words with a few appendices on error messages and the like.

Rather hard on beginners

I would have preferred a little more detail in some of the word descriptions, but the author has recommended a couple of excellent books which will help the novice get to grips with the language. I will repeat the recommendations for those of you who would rather read about the language in detail before buying. They are: The Complete Forth by Alan Winfield (Sigma Books) and Starting Forth by Leo Brodie (Prentice Hall Books).

Although Forth can be used in an interpretive way, directly entering new words at the keyboard, for any real applications the words need to be saved to disc thus allowing them to be compiled. This means an editor is required and one is provided as one of the extensions. It is fairly simple but will allow screens to be entered.

Unfortunately, the Forth words I and R are redefined by the editor; in practice this makes testing programs which use them difficult. The editor can be altered to get round this, and at the same time it can be improved by adding a few extra commands. But Pulsar should have provided a more comprehensive editor in the first place.

The screens I have mentioned are made up of 16 lines of 64 characters each. This 1k block conveniently fills a screen on an 80 column system, but the Atari’s 40 columns make full screens look untidy since the lines wrap around.

One solution is to restrict lines to 32 characters, but this means that half the disc space is wasted. Pulsar should have considered breaking with the Forth 1k tradition and had screens of 16 lines by 32 characters to save problems later.

Printer left out in the cold

The Forth system itself seems to be a complete Fig-Forth implementation with the necessary Atari-specific words added. Graphics, sound commands and disc I/O are all supported, but annoyingly there are no words for sending any output to a printer. The appropriate words could be added by anyone with some knowledge of IOCB commands, which are covered by the language, but a beginner may run into problems.


: N
The colon begins all word definitions, N is its name.
1
The number one is put on the top of the stack.
SCR
This variable holds the current screen number. Executing a variable puts the memory address on the stack rather than the value of SCR.
+!
Adds 1 on to the address. For example: SCR=SCR+1
L
Lists the screen whose value is in SCR and is a word defined in the editor.
;
The semicolon ends the definition.
Figure 1: Example word used in Fig Forth

There are a few minor bugs in the language. Occasionally the system seized up when I deliberately tried to take the top number off an empty stack. When the stack is empty an error should result if attempts are made to remove a value from it. This doesn’t always happen with Fig-Forth. Also, screens with blank first lines don’t always compile. Both bugs should present no problems if good programming practice is followed.

Forth normally contains in-line assemblers for time critical definitions. Fig-Forth has the necessary words but contains no hint as to how the code should be entered. A small chapter in the manual would be very welcome since the textbooks on standard Forth are not usually machine specific.


Mouse or mice?

The most interesting extension to the core of the language is the inclusion of a mouse handler which can read the second joystick port when an ST mouse is plugged into it.

There are some restrictions on its use. Since it utilises the Pokey chip, sound channel 0 cannot be used if the mouse is enabled. Also the right mouse button is not read.

A simple sketch program is included on the disc and is a useful illustration of how to use the mouse. Unfortunately the documentation which accompanies it is a little sparse, and if you aren’t familiar with Forth you will have problems.

I found the mouse handler an interesting feature but £24.95 seems a lot to pay for it. However, if you buy Forth and the handler for £35 the package seems to give value for money.

If the documentation was clearer for a novice and showed in clearer detail how to use the mouse from within your own Basic programs, it would be a superb buy. As it is, I would say it is more for the seasoned programmer.


The disc includes several programs — an editor, two disc copiers, the sketch routines and additional words supporting player-missile graphics and some programming tools. They are of varying use, but can easily be dropped from the disc to make space for your own words.

The screens containing these words are scattered over the entire disc, and it would have been better to have them all clumped at the lower screen numbers, allowing the rest of the disc to be used more easily by the programmer.

Finally, the disc has some of the words necessary to turn the language into Forth-79. This is not complete and omits the word J, but again, words such as this are easy to add once you have got to grips with the language.

On balance perhaps not

So is Pulsar’s Fig-Forth worth buying? As a language Forth is certainly worthwhile. Its speed, versatility and extensibility make it an excellent language for many applications. However, there are other versions available for the 8-bit machines. The public domain Fig-Forth’s may not have manuals, but the discs tend to be crammed with documentation screens and useful — and not so useful — extensions.

On the other hand, commercial Forths are also available. Go-Forth is a 79 standard with numerous extras, including two advanced editors and a very technical manual costing around £20.

Pulsar’s Fig-Forth falls somewhere between these two at £14.95. However, a later revision with a more advanced editor, printer handler and availability of a single density disc version would offer excellent value for money.

Product: Fig-Forth disc
Price: £14.95 (£35 with an ST mouse)
Supplier: Pulsar Software, 4 Church Hill Road,
East Barnet, Herts EN4 8TB
Tel: 01-44 10799
CREATIVE COMPUTING V.9 N.5 / MAY 1983 / PAGE 94 
SOFTWARE PROFILE 
Name: ValForth 
Type: Language 
System: Atari 400/800, 24K minimum 
Format: Disk 
Summary: Excellent implementation 
of an interesting language. 
Price: $39.95 
Manufacturer: 
Valpar International 
3801 E. 34th St. 
Tucson, AZ 85713 
(800) 528-7070 

Going Forth

Thomas McNamee, 5055 Chesterfield Rd. #516, Arlington, VA 22206

The finest testimony I can give to Valpar International’s ValForth language is this: In 20 hours’ time I went from complete ignorance in the Forth language to writing my first Pong game, complete with player/missile graphics and sound. I owe it all to Valpar’s great documentation, a book they recommended, and of course, the fast and versatile Forth language.

I have been programming on various micros for two years — all in Basic and assembly language. I had heard of Forth through a friend who worked in a similar language, Stoic. Forth offered many advantages over the languages I was familiar with, but one look at a typical program listing scared me off. I remember thinking that the program looked as if the programmer had been making up the language as he went along. And that turned out to be the secret of Forth — you make it up as you go along.

Based on a set of more or less standardized commands, the programmer constructs his own words to meet his needs. This process builds on itself until the whole program can be run by executing just a few words. For example the word SANDWICH might be made up of the words GET-HAM and GET-CHEESE. These would be further defined as smaller and smaller words. Think of each word as a subroutine made up of ever-smaller subroutines.

I picked Pong for my maiden project because it used many of the features needed for most games — player/missile graphics with collision detection, full control over the standard Atari graphics, game controller interface, and sound. The game runs well, with speed far better than Basic, but only about half as fast as assembly language. The speed loss is barely noticeable, however.

The exciting thing is the composition time. Pong could easily have been written in an afternoon by someone who knew the language well. And the words I defined in Pong can be used in my next game if similar functions are needed. The Forth dictionary (really a library of commands) can be extended indefinitely.

I bought three modules from Valpar: ValForth ($39.95), General Utilities and Video Editor ($34.95) and a disk containing Player/Missile Graphics, a Character Set Editor and a Sound Editor ($39.95). The last two require ValForth to run, and are extensions of the dictionary. Time-critical routines are coded in assembly language for speed. The disks are unprotected, so backups for personal use are allowed, format and diskcopy commands are provided, as is a command to produce your own programs on auto-booting, protected disks. Valpar supports programmers wishing to write programs for publication using ValForth, and requires only that credit be given them in the documentation or on the media.

ValForth 1.1

The primary disk contains all the main routines, the interpreter and the operating system for Forth. It features a basic glossary of words and a figForth editor for creating your own source programs. Graphics, color and sound commands are available on this disk as extensions to the dictionary. Many of the graphics words from Atari Basic (DRAWTO, PLOT, etc.) have been copied here so that learning to use this section is easy.

As much as possible, Valpar has written this package so that what you already know about the Atari computer can be put to immediate use. The Atari operating system is supported with familiar words such as OPEN, CLOSE, put and get. There is a group of words used for debugging Forth code, and words for floating point arithmetic are provided.

For applications in which time is critical, this disk contains a powerful 6502 assembler designed to be used with the Forth system. Macros, conditional branching, and conditional loops are supported, and access to the rest of the Forth language is easy. The assembler itself is worth the price of the disk.

General Utilities and Video Editor

The General Utilities and Video Editor disk contains a fine selection of string utilities, array commands, and case statements, and a fascinating group of words called High Resolution Text. Many Basic words appear in the string commands, such as leftS, rightS and instr. There are provisions for comparison, sorting, and formatted output. The string commands are all very fast, since the address of the string is manipulated instead of the string itself. Time is not wasted in what Basic programmers call garbage collection.

CASE structures are a powerful group of commands permitting decision making similar to ON...GOSUB in Basic. The SEL structure allows the same-advantage for non-sequential numbers. The final word in this group is cond, which allows conditional execution based on true/false testing. High Resolution Text is a feature permitting text to be displayed in Graphics 8 mode. Words for superscript, subscript, and overstrike are supplied. Using a combination of backspacing, subscript and overstrike, underlining can be accomplished. Graphics can still be drawn in this mode, so displays of mixed text and graphics are very easy.

The ValForth video editor is a joy to use. Again, Valpar could have sold this all by itself and kept the price the same. It is used for entering Forth source code and has a powerful set of single-stroke commands for insertion, deletion, and buffer management. Each screen, of which there are 180 per disk, can be brought up and edited with ease.

When the source code is finished, you LOAD the screens you want to run. As they load, each word is compiled into the dictionary. If an error occurs during compilation, the where command of the editor displays the screen on which the error occurred. The cursor is positioned over the word or character that caused the error.

A visible buffer to or from which lines can be copied appears at the bottom of the screen. The user can set the number of lines it holds. Seven single-stroke commands support line move, line copy, and buffer clear operations. In this way, sections of code can be moved or copied using the smove and copy commands. The whole editor design encourages the composition of easy-to-read source code.

Player/Missile Graphics and Friends

The Player/Missile Graphics disk contains an extremely useful set of commands that are a must for any game programmer. Memory allocation, memory clearing, player/missile design, and movement are all reduced to single words. All modes are supported. Player size, multicolor players, and fifth player features are easy to implement. P/M graphics are not destroyed when switching from one graphics mode to another.

Movement is accomplished in two ways. You can either put the player at an absolute X,Y location, or you can move the player relative to its present spot any number of locations.

Collision detection is also available in two ways: boundaries and the standard Atari collision registers. Boundaries can be set for any player or missile. The movement of that character will then be limited to that area. In addition, a variable can be checked to find out when a boundary has been reached and where it is. The direction of movement can then be changed. This is how I made the ball bounce in my Pong game.

Missile-to-playfield, player-to-playfield, missile-to-player and player-to-player collision detection are supported, and there is a general collision flag that is set when anything bumps anything else.

The character set editor allows for the creation of new character sets, as well as the words needed for switching and loading sets. These designs can easily be used in conjunction with player/missile graphics, since a command is available to change any player rapidly to another bit pattern.

The sound editor is a useful “audio pallete” for creating single sounds on any of the four channels. Using joysticks, you adjust the frequency by moving horizontally, and change the distortion by moving vertically. A readout at the bottom of the display shows the current values needed to re-create the sound. In addition, the AUDCTL register can be addressed to produce many interesting sound variations.

Documentation and Support

Each package comes with its own documentation, printed clearly on 8 1/2 x 11 paper and punched for a three-ring binder. All together, there are about 200 pages of information, as well as the source code for each disk. The documentation is excellent, and is very easy to use. It is not a tutorial of Forth, however. The functions common to the language are listed, but the language itself is not explained.

Valpar recommended Starting FORTH by Leo Brodie since I was a first time user, and it turned out to be great advice. I have read many technical works, but none as informative and enjoyable as Brodie’s. I never met the man but I like him a great deal.

The ValForth 1.1 documentation of the main disk begins with simple loading instructions and then, very appropriately, a good section on errors, recoveries, and crashes. The next section is on formatting and copying disks. I recommend that anyone who buys ValForth be sure to have a box of clean disks on hand. Backups are encouraged and very useful. After you have loaded all the features you are likely to use, you can create your own system disk. Forth requires a special disk format, so you will want three or four blanks to work on. Sections on graphics, editing and sound complete this package.

All of the ValForth documentation is written in a participatory style. You sit down and follow the instructions, and when the last page is turned, you know how it works. Technical jargon is kept to a minimum, but it is a good idea to keep Brodie’s book nearby.

Any command peculiar to the Atari, such as graphics and sound, is explained fully with examples. There are even example programs on the player/missile disk which are valuable references. Each package is accompanied by a stiff command reference card for quick word look-up.

Before buying this package, I spoke to Mike White at Valpar about support. He was knowledgeable and polite, and he assured me that I could write or call anytime with my problems, and I would get help. He was enthusiastic about ValForth, and seemed to represent a company that sells a good product and stands behind it.

ValForth is an excellent implementation of a fast, expandable language.

ROM V.1 N.1 / 1983-10 / PAGE 12 

JUMPING FORTH

By Peter Ellison

This section each issue will deal with programming in Forth, but for this first issue only two reviews are written about two packages from Valpar International just to give a short description of an excellent version of ’Forth’. All of the programs in this section will be written in ’Valforth’ but most versions of Forth are similar, making the programs in this section applicable to any Forth.

Valforth - “One Heck of a Language”

Forth for those people who don’t know what it is, here is a definition. It is a stack oriented, high level language in which the user adds to the basic kernel of commands by defining words(commands) of his/her won. Forth is very fast because the Forth interpreter is only about 30 bytes compared to Pascal or Basic interpreters which are usually two thousand bytes long. Forth having such a small interpreter executes ten to twenty times faster than other interpreted languages. Machine code can be very easily incorporated into your program using the flexible 6502 assmbler built into Valforth.

Now that you know what Forth is I will now tell you some of the advantages Valforth has over the other Forth versions. Number one it is very easy to write software for sale because in the Valforth package there is a special defined word called AUTO. This word when used to save your program will run your program when the computer is booted up. No one will be able to get at your program. Another advantage is it supports all player/missile graphics as well as all the graphic modes. Another advantage of Valforth is that it has a choice of two different editors. The first being the regular Fig (Forth Interest Group) as well as the special Valforth 1.0 editor. The Valforth 1.0 editor is actually a stripped down version of the Valforth 1.1 editor which is available on one of the many other user supported disks available from Valpar International. Another excellent thing Valforth offers is the ability to save your favourite systern(s) on a disk which when booted up will have all your favourite systems loaded automatically.

The only bad thing that I can say about Valforth is the documentation. Some of the instructions are not made as clear as they could have been. One was the SAVE command. I had to experiment with that one a bit before I was clear on how it exactly worked. There are a few things different from fig-Forth but they are all qiven at the beginning of the manual supplied with Valforth. Before I bought Valforth I had never programmed in Forth but with the book ’Starting Forth’ by Leo Brodie I’ve been making my way through it quite easily. Its a bit harder than Basic but all the time I’ve spent on it so far has been worth the effort.

Player Missile & Sound Editor for Valforth

If you haven’t read the review of Valforth I suggest you do that before you get too confused by reading this. When I bought this disk for my Valforth I was really suprised how fast and easy it was to move a player around the screen. I nearly screamed because I had spent many hours learning how to make assembly language subroutines to speed up my player and then to find out how easy it was with this package for my Valforth.

To initialize a player all that is needed is a simple command of PMINIT. To draw a player! first you change it to BASE 2 (2 BASE!) for convenience, label it (LABEL PICT), and then draw your player with ones and zeros. Then change it back to base 10 by typing in DECIMAL. Next you must clear the player/missile memory by typing in PMCLR. This wont’t leave any junk on the screen if your starting a new player. Next you must turn on the players by typing in ON PLAYERS. Finally to get your player on the screen you type in PICT A B C N BLDPLY. This will build your player wherever you want. A=bytes long, B,C=the position the player is on the screen and, N=0-4 depending on what player you want.

You will now have a player on the screen at position (B,C). To move it is easier then making it, which was very simple. First you load in the stick utility from the disk and then type in the short program below:

: JOY 
  BEGIN 
  N STICK 
  N PLMV 
  ?TERMINAL 
  UNTIL ; 

Then type JOY<RTN> and you can use joystick number N to move it all around the screen. The PLMV command can be used to move a player in any direction. To make a multi-color player is very simple because one of the defined words is MCPLY. The way this is done is by combining two or more different players together.

This disk also has a Character Editor. It allows you to draw a character 8x8 using the joystick and call it back from the disk by using KLOAD. The disk also includes a very excellent sound editor. It allows you to experiment with the four different sound channels within your computer. Each of the four channels are interfaced to one of the four joystick ports. The joysticks allow the setting of the pitch (horizontal) and distortion (vertical) of their corresponding channel. You control the sound of each channel by pressing the button on the joystick. By pressing all four buttons at the same time one is able to find the perfect sound.

I recommend this disk just for the player/missile part. the rest is a bonus.

These two packages can be purchased from:

Valpar International
3801 E. 34th Street
Tucson, Arizona
85713