Classic Computer Magazine Archive START VOL. 3 NO. 3 / OCTOBER 1988



BASICs for the ST Revisited

Updates, References and More!

by Dave Plotkin

See these BASlCs in action for yourself! The benchmarks for this article are in the file BENCHBAS.ARC.

In the Summer 1987 issue of START, I wrote a comparison of BASIC languages for the Atari ST. In the last year, there have been many significant developments in this language--the release of GFA BASIC probably being the most important. In the Summer 1988 issue START published a chart summarizing the features of the current BASICs on the market. This issue, I'll describe updates to the programs I reviewed last year, take a look at the new BASIC released and discuss support materials. It's not the purpose of this article to repeat the information presented in last summer's article; you'll find most of that information still accurate.

At the end of this article is a table that presents benchmark results on the BASICs we tested. These benchmarks are on your START disk in the file BENCHBAS.ARC. The purpose of the benchmarks is to test the speed of various functions important to BASIC programmers--string handling, writing to disk, calculations, calling subroutines and looping. Since the benchmarks were written to have similar code, they should be used as indicators of a language's speed, rather than as an absolute measure of how fast the language can perform a function. In your own programs, you would use special functions unique to a particular language for optimization.

ST BASIC Version 2.0

ST BASIC is the language bundled with the ST by Atari. It has decent string handling capabilities, rudimentary graphics and sound, low-level GEM support, good loop structuring and debugging tools. Since its introduction in Version 1.0, it has had quite a bit of bad press because it uses a distracting number of windows and is quite slow. Now in Version 2.0, the notoriously inaccurate floating point math package has been considerably improved and many of the functions are faster (see the benchmarks). Unfortunately, some of the functions are a little slower. The cumbersome DEF SEG command has been replaced by multiple-byte PEEKs and POKEs.

Atari has corrected some of the bugs, but has introduced others. For example, there are no benchmarks listed for string handling and writing to disk because ST BASIC stopped at line 770 with a "System Error #1" (this benchmark ran fine under Version 1.0). All attempts to edit line 770 resulted in a spectacular two-bomb crash to the Desktop. No other significant improvements have been made to the language and ST BASIC has fallen somewhat into disfavor among ST owners, even as a language for printed listings. As an added inconvenience, ST BASIC programs created with 1.0 will not always run under 2.0.

IDW BASIC Compiler Version 2.0

The LDW BASIC Compiler (LDW) includes a shell program, compiler, linker and necessary libraries. It started out with one function--to compile ST BASIC into standalone.PRG files. With Version 2.0, however, this function became just a small part of what LDW does. All the GEM bindings included with the onginal package still work, but about 50 new commands lift it head-and-shoulders above ST BASIC as far as GEM support is concerned. The shell program makes Version 2.0 easier to use than Version 1.0. It is fully menu-driven, uses two windows and lets you set and save options for compiling and storing files. There are a multitude of other options, including the ability to turn line numbers off and on, choose various error-checking protocols and either compile directly to binary code or create assembly source. Unfortunately, it's more difficult to set up batch files than it should be because the documentation for using them is poor.

New commands include support for menus, mouse position and button status, multiple windows and event messaging. Further, an event can trigger LDW to jump to a subroutine even while it is doing something else. Moving and resizing windows is handled automatically; LDW will tell you if a window needs to be redrawn and the REDRAW command lets you do it using the buffers which LDW maintains. You can call simulated dialog boxes and LDW will return the button selected or any text entered in a field. LDW now predefines the arrays required for using the GEM bindings so you don't have to PEEK and POKE the values. You can now use an ELSEIF/ELSE/ENDIF construction, as well as multi-byte PEEKs and POKEs. You can include another BASIC program in your current one and LDW has new functions for drawing filled shapes--but the manual's explanation of these is worthless.

The LDW manual is a disastrous collage of sections. Each new section details changes from the previous version; a separate index even details only the changes. The organization is poor; for example, the reference section for the new--commands is located in the back and instructions on how to modify your batch files (which should be the first thing you do) are in Chapter 4. Further, the printed GEM bindings do not match the ones included on the disk. Overall, the manual needs a complete rewrite.


Regent Software has released LDW Structured Query Language (SQL) add-ons. SQL is the official American standard database language approved by ANSI (American National Standards Institute). This package adds database commands such as CREATE, DELETE, SORT, etc., making it easier for people to design and program relational databases. The package comes with a 36-page manual, including a 15-page tutorial.

Softworks BASIC

SoftWorks BASIC compiles programs to an intermediate code called p-code. It compiles faster than LDW, but the code it generates does not run as fast and requires a runtime package.

SoftWorks is fairly complete--it's missing WHILE, CASE and procedures, but includes mapped variables, substring operators, memory-moving routines and up to seven dimensional arrays. There is no support for graphics, windows, alerts, menus or mouse usage and the GEM support is at a very low level--you can only call subroutines which have the same names as C calls. However, the documentation does not help you use these. Since our original BASIC comparison, the company has made no substantial changes to the package, but has raised the price from $79.95 to $295.95. Their explanation is that they are now gearing the product toward the vertical development market rather than toward consumers.


This BASIC has more commands than any of the others, including commands for all GEM functions as well as for structured programming (procedures and functions), advanced loop and decisions (WHILE, CASE, REPEAT), system access, bit-blitting and double-precision variables. This BASIC is more sensitive to syntax errors than most--even a space in the wrong place can cause an error. A powerful editor allows up to 10 programs in memory at once.

The bugs I reported last summer have been cleaned up and all the keywords work. The language also manages to run all its demos without crashing. It is now available both in the original cartridge form and on disk; the manual is only sold with the disk version and you must be a registered owner to buy the cartridge. A runtime package is available (sold separately) so that you can distribute copies of your program to people who don't own the language. Eidersoft now supports the product and technical support has gone from nonexistent to good.

GFA BASIC Version 2.0

GFA BASIC from MichTron is a well-rounded BASIC that has become very popular, due both to its power and to MichTron's excellent support. It includes a text editor with block operations and automatic indenting. Loop and decision commands (DO/LOOP, REPEAT/ UNTIL, WHILE/WEND) make structured programming easy. GEM support includes menus, alert boxes, multiple windows and event detection, as well as graphics. GFA is very fast for many operations.

GFA BASIC Version 2.0 fixes some minor bugs and lets you use keywords in variables. The distribution disk now includes many more useful example programs.

About the manual: the original GFA BASIC manual was so poor, I took it upon myself to rewrite it for MichTron. As the ST community has been kind enough to tell me, it's regarded as an improvement, although I think I could still improve its organization. I corrected many of the typos of the original and the program examples now run on both color and monochrome monitors. The manual also has additional information on using GEM.

GFA BASIC's popularity has generated a market for support products:

  • MichTron has released the GFA Compiler, which is GEM-driven and very easy to use. As a result, ambitious programmers are now using GFA's inherent speed to write professional quality programs.

  • Regent Software's has an SQL add-on package (see LDW, above) for GFA BASIC.

  • MichTron is distributing Marathon Computer Press's GFA Companion, also currently in Version 2.0. This package provides the tools to build standard GEM menus, bottom-up menus and break-away menus (which can appear anywhere on the screen), as well as several types of "pseudo" dialog boxes complete with text, buttons and editable fields. The package will write the code for you, but cannot be used in programs for publication because the generated code is copyrighted. That may be just as well as the code is very inefficient. Certain aspects of the package are also not as flexible or friendly as they could be. For example, the routine to generate menus is TOS-based. It asks you a series of questions and if you make a mistake it's difficult to go back and edit your answers.

  • MichTron has released GFA Vector, a tool for generating 3-D images which you can include in your own programs. It works well and provides many options for three-dimensional work that is otherwise impossible in GFA BASIC. The editor even lets people use images who have trouble visualizing 3D objects.

  • Several books on GFA have been released and more are on the way. These include the GFA BASIC Book ($39.95 with disk), an intermediate guide which details such topics as GEMDOS, BIOS, XBIOS, AES and resource construction. Its complete and detailed example of using multiple windows is very useful. Also by MichTron is the GFA BASIC Training Reboot Camp ($19.95), a beginning tutorial book. It includes many more in-depth examples than the GFA BASIC manual and the sample programs use many of the BASIC commands.

GFA BASIC Programmers Reference Guide Vol. 1 ($29.95) is by George Miller, late of Compute!'s ST magazine. It is an advanced-level text (but still easy to read) with detailed information about graphics, animation, page flipping and sound. It also includes multiple appendices summarizing BIOS, XBIOS and GEMDOS functions. A second volume is planned. A Reference Card ($4.95) summarizes all the GFA commands in one easy-to-use form.

And finally, Abacus's GFA BASIC Quick Reference Guide gives a short description of each command without programming examples. The triple index (command, subject and alphabetical) is very useful.

GFA BASIC Version 3.0

MichTron's GFA BASIC Ver. 3.0 was not quite ready for distribution at press time, but George Miller, Director of Product Support at MichTron, was able to supply us with the benchmarks and a run-only package of version 3.0 to test them. This completely new implementation of the language will still run any 2.0 program, but adds more than 300 new commands. Features include Line A access, joystick input, object manipulation, the CASE command, bit manipulation, access to all AES functions (including dialog boxes) and changes to the editor to make it easier to use. The new version is also considerably faster. It is packaged with a Resource construction set and a compiler for Version 3.0 is currently under development.


True BASIC was released after we went to press with the original BASIC comparison. It is the brainchild of the inventors of BASIC, John Kemeny and Thomas Kurtz of Dartmouth. It is a massive and powerful language and is compiled to P-code, so that it is quite fast as well. The final code requires a runtime package if you don't own True BASIC.

The text editor is complete with menus and windows and is just short of a word processor. It uses block operations (cut and paste), Find and Replace, programmable function keys, script files and has the very best error messages I've ever seen. You can compile or run your program from the editor and there is also an immediate mode for debugging.

The BASIC language includes structured programming commands such as CASE, IF/THEN/ELSE and DO/LOOP Line numbers are optional. You can include subroutines in programs or store them in external libraries so that different applications can share them. No complex linking procedure is required; the libraries can be called simply by name. Programs are portable to the IBM PC, Amiga and Macintosh versions of True BASIC because it uses a graphics system which is independent of the machine. This takes a little getting used to, but is handy in the long run. You can even define your own coordinate limits and color palette. Graphics commands include BOX, CIRCLE, LINES and POINTS. Multiple windows (not GEM windows, but simply screen rectangles) can be handled automatically. Integer math is used whenever possible; there is no need to declare integer variables specifically. Floating point math is very accurate and matrix math operations are built-in.

Tracing and Cross-Referencing of variables is supported via DO files. Music is supported with the PLAY command, where you supply a string which contains notes of a tune. You can even play the tune in the background. Unfortunately, the archaic LET command for assigning variable values is required. Other features of True BASIC include program chaining, extensive math support (but not hyperbolic trig functions), sequential and random access files, dynamic resizable arrays, substring manipulation and sophisticated error handling.

True BASIC for the ST comes with two manuals--a generic manual which is the same for any version and an ST supplement. Extra functions include more graphics, push-button menus, system functions (PEEK, POKE, access to GEMDOS. XBIOS, BIOS, AES and VDI). Access to system functions are by their number, much as with ST BASIC, and there is no documentation on what the various functions do.

True BASIC has released a series of libraries you can link with your programs. An advanced String library provides a large assortment of extra string functions, including pattern matching, scanning expressions, parsing, text manipulation, date and time routines and conversions from Arabic to Roman numerals. It also contains functions to detect the union, intersection and difference between strings. The Mathematician's Toolkit provides access to advanced math functions such as imaginary and complex operations, solutions to quadratic equations, hyperbolic trig functions and unlimited precision numbers. Sorting and Searching includes bubble sorts, heapsorts, quick sorts and selection sorts.

3-Dimensional Graphics includes perspective and parallel projections, plotting function in three dimensions, scaling and moving view. Finally, the Developer's Toolkit makes GEM functions available on a high level. GEM VDI graphics and attributes, menus (change disable, check items) windows (set size, sliders, arrows, tide, info line, switching, scrolling), sound library, events (mouse key, window) and graphics (growbox, rubberbox, shrinkbox, etc.). The manual that comes with the Developer's Toolkit gives brief descriptions of how to use each function. While these are not exhaustive explanations, they are adequate to make use of the functions.

Come And Gone

A lot can happen in a year. DBASIC from DTack Grounded Systems was an extraordinanly fast language, which unfortunately used none of the tools that make the ST such an attractive machine. It even required its own operating system. Distributed through a strange giveaway/pay scheme (the software was free but you had to buy the manual), the language was not profitable and DTack Grounded is no more.

Editor's note: We were unable to obtain a copy of CCLs Real BASIC Version 1.3 in time for this review. A review of this language (and GFA BASIC 3.0) will appear in an upcoming issue of START.

Dave Plotkin is an engineer for Chevron US.A. and is a frequent contributor to START and Antic.

Products Mentioned

ST BASIC Ver. 2.0, shipped free with ST computers. Atari Corp., 1196 Borregas Ave., Sunnyvale, CA 94088, (408) 745-2000.

LDW BASIC Compiler Ver. 2.0, $89.95 (upgrade from Ver. 1.0 or 1.1 is $25 plus your original disk). Logical Design Works, 780 Momague Expwy, Suite 403, San Jose, CA 95131, (408) 435-1445.

SQL add-one for GFA and LDW, $30 each. Regent Software, P.O. Box 14628, Long Beach, CA 90803, (213) 439-9664.

Softworks BASIC, $295. Softworks Limited, 607 W Wellington, Chicago, IL 60657, (312) 975-4030.

Fast ST BASIC, $89.95; (cartridge is additional $59.95); runtime disk ($19.95). Computer Concepts, distributed by Eidersoft USA, PO. Box 288, Burgettstown, PA 15021, (800) 992-9198.

GFA BASIC Ver. 2.0, $59.95; Ver 3.0, $99.95 or $49.95 for the upgrade; GFA Compiler, $59.95; GFA Companion Ver. 2.0 (by Marathon Computer Press), $49.95; GFA Vector, $49.95; GFA BASIC Book, $39.95 with disk; GFA BASIC Training Reboot Camp, $19.95; GFA BASIC Programmer's Reference Guide, Vol. 1, $29.95; Reference Card, $4.95. MichTron, 576 S. Telegraph, Pontiac, MI 48053, (313) 334-5700.

GFA BASIC Quick Reference Guide, $14.95. Abacus, 5370 52nd St. SE, Grand Rapids, MI 49508, (616) 698-0330.

True BASIC, $99.95; libraries are $69.95. True BASIC, 39 South Main St., Hanover, NH 03755, (603) 643-3882.


Manufacturer         Atari
1.0         2.01
Design Wks
2.0       3.0
         Mega   520
(in seconds):
Value of Pi 4.20 - 3.08 - 2.58 1.02 2.70 1.10 .75 - .36 .72
Sum of Sines .30 - .53 - .43 .12 1.87 .12 .14 - .16 .42
Sum/SqRoots .25 - .33 - .28 .07 .98 .10 .10 - .10 .40
Real Count 11.52 - 7.6 - 6.35 1.08 4.23 2.75 1.10 - .47 1.04
Int. Count 9.55 - 5.7 - 4.73 .68 7.682 2.00 .39 - .24 .62
Gosub 1.85 - 1.3 - 1.12 .13 .55 .30 .21 - .13 .24
String Hndlg 1.57 - N/A - N/A .27 1.28 .35 .34 - .23 .54
DISK ACESS 21.52 - N/A - N/A 13.37 14.67 8.65 12.58 - 9.83 12.62
Compile/Link -- - -- - -- 9:08 0:15 -- -- - -- 3:90
1 The benchmark results for ST BASIC 2.0 were different on the Mega and 520ST we tested them on, so both results are given here.
2 Softworks Limited converts all integers back to floating point, so integer operations are slower.