Lightspeed C
- Medium
- Disk
- Year
- 1986
- Publisher
- Clearstar Softechnologies (later also Omega Soft)
- Type
- Language
- Category
- C compiler, linker, optimiser and editor with its own DOS (disk)
- Developer
- Ralph E. Walden
- Language
- 6502 machine language
- Requirements
- Atari 400/800/XL/XE with 48K and one disk drive; RAM disk or hard disk recommended; RUNTIME.OBJ needed to run programs outside Lightspeed DOS
- Tags
- c, compiler, disk, clearstar, lightspeed-dos, programming
Overview
Lightspeed C was a late but capable C development system for the Atari 8-bit. Clearstar Softechnologies of Renton, Washington sold it for $39.95, and its author was Ralph E. Walden. The package includes a compiler, a linker, an optimiser called FASTER, its own editor CEDIT, and a small command-line operating system, Lightspeed DOS. Matthew Ratcliff reviewed it for Antic in November 1988, by which time he had been programming C on the ST, PC and mainframes. He called its integrated environment "among the most elegant" he had used and made it his own 8-bit language for utilities and graphics.
Features
When Antic listed it as a new product in December 1987, the headline features were:
- Over 100 C functions, including Atari-specific calls for player/missile graphics, joysticks and paddles, sound, DOS and the system clock, plus 16 floating-point functions.
- One-command compile, optimise, link and run.
- Support for the 130XE's extra memory and compatible upgrades, and for the Mosaic RAM board on the 800.
- Operation under most DOSes, in single or double density.
Ratcliff added more detail:
- CEDIT works like the editors in MAC/65 and BASIC XL. Lines carry reference numbers and there is an auto-entry mode, but CEDIT renumbers by itself when you insert lines. Pressing BREAK runs a syntax checker on what you just typed. It checks one physical line at a time, so an expression split across two lines can be wrongly flagged as unbalanced. From CEDIT you can save and compile, link and run in one step. On an error you return to the offending line with a diagnostic.
- The linker writes its own "make" information. Programs too big for memory can be split into modules that chain to one another.
- There are BASIC-like helpers for
PEEK,POKEandGRAPHICS, a fullprintfthat includes floating point, standard file I/O, and a graphics manager withmbox,mfillandcircle. ADCOPYutility is included too.
Limitations
Like other 8-bit C compilers of the time, Lightspeed C leaves out structures, unions and multi-dimensional arrays. The manual's Appendix A lists every difference from Kernighan and Ritchie, which Ratcliff praised as honest. Floating point is unusual. A number is held in a 6-byte character array and changed with function calls instead of operators, and there are no floating-point comparisons:
char x[6], y[6], z[6];
atof(x, "1.75"); /* ASCII to floating point */
atof(y, "3.45");
fmul(x, y, z); /* z = x * y */
printf("%f TIMES %f is %f\n", x, y, z);
Other quirks: the smallest runtime library is over 7K. You can't compile straight to memory as you can with Action! or MAC/65. Listing FASTER on the compile command line can make the linker overwrite FASTER itself, so Ratcliff ran the optimiser as a separate step.
Running programs
Under Lightspeed DOS the runtime is built in. Under SpartaDOS, Atari DOS 2.0/2.5 and others, RUNTIME.OBJ must sit on the same disk as your .COM file, and the linker reports memory use so you can check for clashes with LOMEM. Antic distributed RUNTIME.OBJ by permission on its November 1988 disk, with Ratcliff's Mandelbrot programs. Software was still being written in it in the 1990s. Ivo van Poorten wrote UnZip 1.13 for the Atari in Lightspeed C in 1993.
Using it today
The disks survive in community archives. Run them in Altirra or Atari800 with 48K or more, and use a RAM disk on D4: to speed things up. Lightspeed DOS handles only two drives plus that RAM disk and does not know the emulator's H: device, so moving files in and out needs an ATR tool or a second DOS. One known Altirra problem: with the built-in AltirraOS, Lightspeed DOS and CEDIT mangle screen listings, because they access an OS location directly. Altirra's author confirmed this in 2019. Switch to a real Atari OS ROM and the problem goes away.
Credits
- Picture: The Lightspeed C manual cover from Clearstar Softechnologies. — Manual cover scan from AtariMania (Lightspeed C, Clearstar Softechnologies) (© Clearstar Softechnologies — used for identification/commentary)
- Antic Vol. 7 No. 7 (November 1988) — Lightspeed C, Matthew Ratcliff — AtariMagazines.com (Kevin Savetz), 1988
- Antic Vol. 6 No. 8 (December 1987) — New Products: Lightspeed C — AtariMagazines.com (Kevin Savetz), 1987
- AtariMania — Lightspeed C (Clearstar Softechnologies; Omega Soft) — Manual cover scan from AtariMania (Lightspeed C, Clearstar Softechnologies) (© Clearstar Softechnologies — used for identification/commentary)
- AtariAge — Problem using Lightspeed C with Altirra (2019) — AtariAge forum members, 2019
