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
Cover of the Lightspeed C Development System manual for the 8-bit Atari, priced at $39.95, listing over 100 standard C and Atari functions and a Sieve of Eratosthenes timing table, by Ralph E. Walden for Clearstar Softechnologies

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, POKE and GRAPHICS, a full printf that includes floating point, standard file I/O, and a graphics manager with mbox, mfill and circle. A DCOPY utility 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