CURRENT NOTES JUL/AUG 1987 L I G H T S P E E D C O N T H E 1 3 0 X E An Outstanding, Cost Effective, Programming Tool Review by Walter W. Jones To begin, a comment about the Atari 600, 800, 800XL and 130XE series computers (hereafter referred to as the 130) is appropriate. The lack of a commercial high-level language has, obviously, prohibited its extensive use on Atari's 8-bit line. But, the easiest way to get new programs is to port them from another system and fix the few machine-dependent pieces. The cost of porting a program to a new computer is only about 10 per cent of the original development cost, assuming that a comparable language exists on the target computer. Basic is too slow to do serious work and not very compatible anyhow. Action!, although a vast improvement over Basic, is not directly compatible with any other language. Two features which are indispensible for a development language are compact coding and linkable modules. The former is necessary so that writing all of the necessary but simple routines does not take an inordinate amount of time, while the resultant object code is reasonably fast. The second feature is the ability to code and debug modules. This is the only way to make them quickly and without having to reinvent the necessary low-level stuff each time. For this reason, "programmer friendly" languages have libraries and means to combine modules. They emphasises the concepts of local and hidden over global and public. Otherwise, the scaffolding necessary to debug the code is impossible to build, and the time for translation becomes tedious. The first requirement has sent all serious development over to Action! However, the second requirement suggests that little will be developed for the 130. Until now, that is. Clearstar Softechnologies has brought a product to the market which solves both of these problems in a very nice way. There are still some difficulties and shortcomings, but the primary impediment to software development and portability on these "low level" computers is removed. The compiler is for a C Language. C is a popular language for many conputer systems. Most of that is historical. It was the first language to be used widely in systems development work which was a significant step above assenbly language. C was a step up in that it was possible to write compact code which was still fast. Many dialects of C have developed. Lightspeed C incorporates one of the more common variations and is a subset of the standard Ritchie and Kernigan specification. What this all means is that programs developed on the ST can be ported to the 130 and vice-versa. Obviously there will be some differences, especially in graphics. But much of the translation and recoding problems disappear. To prove the point, I wrote a simple fractal generator in C and ran it on the Atari 130XE, my IBM AT (yes folks, the IBM world does exist and is used for things besides word ____________________________________________________________________ XL - 1 - XE CURRENT NOTES JUL/AUG 1987 processing), and an Apollo workstation. In each case, I wrote each module separately, compiled, tested and stored it on a disk file. With the allowance for differences in graphics, all tests performed the same way. The 130 is slower than the Aplllo. On the other hand, the latter cost one hundred times as much. Unfortunately, I do not have access to an ST so that comparison is not possible. The Lightspeed C development system comes as two disks, or four sides of our single-sided floppy disks. Effectively, there are only two sides required and these are contained on sides one and two of the first disk. What the authors have done to further enhance development is to include many of the special functions within ther own operating system. To aid use and distribution, the second disk contains alternate compilers and linkers which do not depend on their specialized DOS being present. Libraries are provided for most of these fuctions. The combination is a very nice touch and should be appreciated by anyone doing development for the Atari 130XE. The mechanics of using the system will be familiar to anyone who has done development work on a large system. There is a full-screen editor, a compiler and a linker. The editor serves both for writing the program and for looking at errors during compile. This is where I sorely miss a hard disk on my 130. There is a fair bit of code swapping which takes place. Once again to the credit of Clearstar, all the necessary modules fit on a single disk, or ramdisk, with room left for pieces of code. Actually, it is not hard to have the source on one disk, say a floppy and the compiler, linker and editor in ramdisk. Load time for the compiler, linker and editor then become miniscule. To facilitate such usage, a batch file processor is provided which automates the setup procedure. There is another feature well worth mentioning. A library of Action! entry points, including the floating point routines, is part of the distribution. This makes it possible to start with Action! and convert to C. Names are unique, or perform equivalent tasks. For anyone considering a move from the 8-bit to the 16-bit world, this feature is truly outstanding. Naturally, it is possible to reverse the process and convert to Action! Since conmpiled Action! code is somewhat faster than the equivalent compiled C code, this is worthwhile for that last little bit of speed necessary for good simulations. This crosswalk between systems (ST, 130, ...) provides the continuity lacking in the Atari Corporation offerings. Finally, there are a number of modules to aid in code development and debugging, i.e. for code compaction and optimization. Also included are several sample programs in C and in Action!, just to get started. As might be expected, the product is not perfect. C is not a friendly language. It is a compiled language with a very strict syntax. This compiler does not improve on that in that the pointer for errors, as well as the error message themselves can be misleading. Two additional faults stand out. The first is that the editor is not easy to use in screen mode. It is too much like the Basic editor. Perhaps it utilizes the hooks in the ROM, but the Action! editor is certainly better. Of course, one can use the Action! editor, or even ones's favorite word ____________________________________________________________________ XL - 2 - XE CURRENT NOTES JUL/AUG 1987 processing package. But this negates some of the usefulness in the tight coupling between the compiler and the editor. The second point is that the floating point routines are difficult to use, just as in Action! And there is no floating point type. Since other types are defined, it would have been a good place to include them. After all, 6-byte floating point is not intrinsically different than a string, or a two-byte integer. The machines still have an 8-bit buss. The worst failing, however, is the manual which is atrocious. Besides being a hodgepodge of information, the important facts are well hidden. Why then is this such a good product? Well, it is a reasonable subset of the "standard". It makes it possible to port programs to the ATARI 130 from other systems, so we obtain good value, while the cost to the developer is minimized. This fact translates into more and better programs being ported. Also, it follows the form of compilers and editors on larger machines and so makes an ideal training tool for anyone wanting to trade up. In the end, work which is done on the 130 can be utilized on other, presumably larger, computers, always a question when considering new hardware and software. At a retail cost of $39.95, Lightspeed C is an outstanding product, and very cost effective. For the 8-bit Atari, this should prove a boon in the addition of new releases. I would anticipate that revisions of the Lightspeed system can and will solve the relatively minor problems. ____________________________________________________________________ XL - 3 - XE __________ XL - 4 - XE ler operates at a fairly fast speed and allows the user th