Classic Computer Magazine Archive COMPUTE! ISSUE 25 / JUNE 1982 / PAGE 106

Review:
QS FORTH For Atari

Charles Brannon
Editorial Assistant

We'll have a review of two implementations of FORTH for PET and one for Apple and other Atari FORTHs in upcoming issues. For further information about this increasingly popular language, see The Forth Page elsewhere in this issue.

FORTH is now available for almost any computer, thanks to the distribution of public domain source code for the language by the FORTH Interest Group (FIG). Fig-FORTH is the group's implementation standard of FORTH for microcomputers.

QS FORTH was the first Atari implementation of fig-FORTH. It comes on a floppy disk with a padded vinyl manual. The manual is extensive and well-written, but does assume a basic familiarity with FORTH. An excellent resource for learning to program in FORTH is Starting FORTH by Leo Brodie (available from the FORTH Interest Group, P.O. Box 1105, San Carlos, CA 94070, $16.00).

The QS manual is divided into chapters devoted to various classifications of FORTH words (such as INPUT/OUTPUT, number-handling, compiler words, etc.). In the back of the book are some useful sample programs and an extensive FORTH glossary (vital to the FORTH programmer), with a solid explanation of every FORTH word in the vocabulary.

The Editor

An important consideration of a FORTH system is the Editor, since you'll be using it to prepare your program for saving onto disk (although you can also compile FORTH words "interactively"). The QS FORTH Editor is very well done. It is a page-oriented text editor which permits you to type your program in as if you were using a word processor. You can edit programs as large as the disk can hold, by paging forward and backward through your screens at the touch of a single key. One disadvantage is that QS FORTH screens are only half as large as standard fig-FORTH screens, (sixteen 32-character lines rather than 64 character lines).

This ease of editing lasts only while in the Edit mode, however. When in direct mode, you cannot move the cursor around the screen and edit, as you can in BASIC or with the Assembler Cartridge. You cannot clear the screen without invoking an error message.

Features

QS FORTH supports the full fig-FORTH vocabulary, so let's look at the "extras" available. QS FORTH offers a utility package that adds several useful programming tools, such as a simple CASE structure, memory DUMP, Stack Print (shows contents of a stack non-destructively), 2DUP (double DUP), and LOCATE, a handy word that will list the source screen of a word, if it was compiled from disk. Also included is an I/O package that supports printer, cassette, screen, and keyboard input/output, using an approach similar to BASIC with OPEN, PUT/GET, and CLOSE. There is also a printer toggle that can switch output to the printer or screen. Included in the I/O package is a set of words to access Atari graphics. The similarity to BASIC continues here as well with words like GRAPHICS, SETCOLOR, PLOT, DRAWTO, etc. Use of the Atari's four-voice sound is also supported, with SOUND and XSND. XSND is a useful word that shuts off all sound, a task usually accomplished with END in BASIC.

The Assembler

QS FORTH includes a powerful assembler. Like most FORTH assemblers, the code for the assembler is remarkably brief, yet it supports source code with labels, structured control statements such as IF/ENDIF and BEGIN/UNTIL, and multiple statements per line. This assembler lacks many 6502 FORTH assembler standards such as N, IP, W, and only supports one macro return – PUSHOA. Nevertheless, it is quite useable.

Disk I/O

QS FORTH, again like most FORTHs, does not use the standard Atari DOS. It simply formats the disk into screens, and accesses this data directly, rather than indirectly, via DOS. This makes more disk memory available, and simplifies I/O, but it creates a compatibility problem. FORTH cannot read files produced by BASIC or even machine language. Despite this, QS FORTH expects new disks to be formatted by DOS II. There are also words to COPY screens or duplicate the entire disk using a sector-by-sector copier.

FORTH is coming into its own as a language. In the latest APX catalog, for example, two very impressive programs were in FORTH.

QS FORTH
Quality Software
6660 Reseda Boulevard
Suite 105
Reseda, CA 91335
$79.95