Philip I. Nelson, Assistant Editor
The Best ST BASIC?
Quick-which high-level language for the ST is as easy to program as BASIC, yet offers full access to system features and an execution speed that rivals assembly language? If you answered Gfa BASIC, you may be correct on all counts. This exciting new ST language is already on the market in West Germany. It offers everything found in conventional BASICs, plus much, much more.
Cosmetically, a Gfa BASIC program resembles Modula-2 or Pascal code. Line numbers are eliminated in favor of meaningful labels, and subroutines take the form of procedures which are called by name. A procedure can accept parameters from the main program and can use local variables as well. Gfa BASIC also allows recursion (a procedure which calls itself). The language includes a host of new keywords:
ADD, ALERT, ARRAYFILL, ARRPTR, BASEPAGE, BGET, BIN$, BIOS, BITBLT, BMOVE, BOX, BPUT, C:, CHDIR, CHDRIVE, CLS, CRSCOL, CRSLIN, DEC, DEFFILL, DEFLINE, DEFLIST, DEFMARK, DEFMOUSE, DEFNUM, DEFTEXT, DFREE, DIM?, DIR$, DIV, DO-LOOP, DPEEK, DPOKE, DRAW, EVEN, EXEC, EXIST, EXIT IF, FALSE, FATAL, FILES, FILESELECT, FORM INPUT, FRAC, GEMDOS, GET, GRAPHMODE, HARDCOPY, HIDEM, HIMEM, IFELSE-ENDIF, INC, INFOW INKEY$, INP?, LOCAL, LPEEK, LPOKE, MAX, MENU menu$(), MENU KILL, MENU OFF, MENU(), MIN, MKDIR, MONITOR, MOUSE, MOUSEX, MOUSEY, MOUSEK, MUL, ODD, ON BREAK, ON MENU GOSUB, ON MENU BUTTON GOSUB, ON MENU KEY GOSUB, ON MENU MESSAGE GOSUB, ON MENU IBOX GOSUB, ON MENU OBOX GOSUB, ON MENU, OUT?, PAUSE, PBOX, PELLIPSE, PRBOX,PLOT, POINT, POLYLINE, POLYFILL, POLYMARK, PRINT AT, PROCEDURE, PUT, RANDOM, RBOX, RELSEEK, REPEAT-UNTIL, RESERVE, RMDIR, PSAVE, SEEK, SETCOLOR, SETTIME, SGET, SHOWM, SPOKE, SDPOKE, SLPOKE, SPRITE, SPUT, SUB, TEXT, TIME$, TITLEW, TRUE, TRUNC, TYPE, UPPER$, VAL?, VDIBASE, XBIOS
Note that these keywords are in addition to the keywords offered by ST BASIC. The various MENU commands let you handle GEM drop-down menus with ease and efficiency. New graphics commands (including BITBLT) are found in abundance, as are Unix-style DOS commands and many interesting functions. For system routines, XBIOS, BIOS, and GEMDOS are added to GEMSYS and VDISYS.
An Impressive Import System
Potentially most impressive are the new commands EXEC and C:. EXEC lets you load and execute a non-BASIC ST application from within a BASIC program. The C: command calls a routine written and compiled in C. Both commands purport to allow full parameter passing. Gfa BASIC also supports the unary * operator for C-style pointer operations. Together, these capabilities pave the way for an intriguing sort of program which efficiently blends BASIC code with program modules written in other languages.
Gfa BASIC consists of two programs: an interactive editor/interpreter, which you use to write and test programs, and a run-only interpreter, which runs only Gfa BASIC programs. Compiling is not a separate process, as in most compiled languages: To compile the program, you simply select Save from a menu in the editor/interpreter. The excellent, full-screen editor includes word processor-style features such as search and replace, block copy, move, delete, and so forth. A finished Gfa BASIC program can run only from within the editor/interpreter or the run-only interpreter. This inconvenience is compensated for by the fact that you can share the 40K run-only package freely. The editor/interpreter, by the way, is only about 55K.
What's The Catch?
Will Gfa BASIC take the ST world by storm? At this point, it's too early to tell. Written entirely in German, the user's manual is dated August 1986-scarcely six weeks old at this writing. I've been able to muddle through the manual aided by rusty college German and the fact that all Gfa BASIC keywords and menu titles are in English. But non-German speakers may want to wait for an English translation. Moreover, I haven't had Gfa BASIC long enough to evaluate its reliability. The demo programs (a graphics editor and a terminal program) are impressive, but you would expect demos to work well. Given the number of known bugs in GEM itself, it wouldn't be surprising to find a few bugs in Gfa BASIC.
Despite these reservations, Gfa BASIC is definitely worth notice, not only because it shows what BASIC can be on the ST, but also because it points the way to an entirely new sort of BASIC-one that's able to reach beyond its own confines and incorporate routines from other languages. By permitting a BASIC programmer to call C routines and even execute other ST applications, this BASIC stretches the definition of BASIC itself.
Am Hochhofen 108
D-4000 Dusseldorf 11