Classic Computer Magazine Archive ANTIC VOL. 5, NO. 7 / NOVEMBER 1986

Reviewed by DAVID PLOTKIN

LDW COMPILED BASIC

Fast, full-featured ST language


The LDW BASIC Compiler (LBC) will compile most ST BASIC programs into blazing fast .PRG files of 68000 machine code which are self-contained (no runtime package required). LBC also includes some powerful programming enhancements of ST BASIC.

LBC seems to work well. Within the limits of my home system I was able to compile every ST BASIC program I tried. LBC comes on two single-sided disks containing the compiler, assembler, linker, EMACS editor and all the support files. You first create BASIC source code by using either the provided EMACS editor, a standard word processor such as 1ST Word, or the ST BASIC interpreter that came with your ST.

Next, you use the LDW BASIC overlays to create an assembler source code, which has the extension .S. Then assemble to object code, with a .0 extension, and link your file. Finally you modify it to make sure it is relocatable (RELMOD) and create the .PRG file. This all sounds harder than it is. Complete step-by-step instructions are given in the manual.

The manual carefully explains how to set up working disks. You don't actually use the disks included with the package because intermediate files must be written to the disks. Preparation of the working disks depends on whether your system has one disk drive, two drives, or a hard disk. The compile-assemble-link-RELMOD process is cumbersome, but not tough to follow.

The compiler uses drop-down menus, letting you specify various options (such as which drive to use for your source, object, and working files) and turn on such options as integer overflow and stack checking. If you are not yet sure what all these choices mean, don't panic. The assembler and linker should be familiar to ST programmers-they are much like Digital Research's programs in the Atari ST Developer's Package.

ENHANCED POWER

The only BASIC commands not supported by LBC are RESUME NEXT and RESUME 0, which are seldom used. And there's a good reason why they're not supported-which has to do with the previously mentioned enhancements of ST BASIC. LBC lets you write programs without line numbers, using only labels. And RESUME NEXT and RESUME 0 don't make sense without line numbers. Other BASIC enhancements include support of double precision (sacrificing speed for extra accuracy in calculations) and removal of many of ST BASIC'S limits on string size, number of lines and array size. Array subscript values are also much more flexible.

LBC does have some drawbacks. First, the process of turning a BASIC program into its final form is very slow. Several sizeable intermediate files must be written and read from disk during the process-partly because the package creates an intermediate assembler source code listing, which is likely to be useless to BASIC programmers. It would make more sense to compile direct to object code, and the manufacturer says that a future enhancement will provide this option. Compiling a 2.5K BASIC program took about 15 minutes, so you would not want to do too much debugging of the compiled program!

I'd say that the minimum system configuration you'd need to compile reasonably sized files would be two double-sided drives. A hard disk would be even better. Space is a problem because the source files and intermediate files must be written to the same disks that some of the LBC programs reside on. This is worsened by the fact that LBC is copy-protected using the "key disk" scheme, which means that you must tie up drive A with the original copy of the program. Compiling involves disk swapping, even on a two-drive system, plus exiting to the GEM desktop and rerunning a batch file. You can't just walk away for 15 minutes.

The manual is a strange combination of useful information and gibberish. It's complete, but is difficult to read because of the stilted language. Obviously the manual was translated from another language, and a better job could have been done.

The technical information at the back of the manual is incomprehensible, at least to me. There is also no index, and it is assumed that you know ST BASIC and GEM. On the other hand, the known bugs in ST BASIC are documented in a special section, and the technical support hot-line answers your questions quickly.

Logical Design's policy is that you must get a license from them to distribute any commercial programs compiled with this product. Their license cost is a sliding scale, depending on the retail price of your compiled software. For a product priced under $100, the fee is $300. However, the company assures me that no license payment is necessary if you use LDW BASIC to compile programs for the public domain, or for other limited uses such as magazine publication.

Despite the long compile time and the disk-intensive process, I can recommend the LDW BASIC Compiler as a serious programming tool. The final code is very fast, and the finished '.PRG" file is quite small as compiled programs go.


LDW BASIC COMPILER
Logical Design Works, Inc.
780 Montague Expressway
San Jose, CA 95131
(408) 435-1445
$69.95
CIRCLE 215 ON READER SERVICE CARD