[net.micro] C on the 6502

palevich.NBS-VMS@BRL@sri-unix (07/16/82)

I've ported Ron Cain's Small-C Compiler to the 6502,
(to the Atari 800 Home Computer) and I remember that the
benchmarks (like the High-Level-Language Benchmark out of the
Sept. '81 Byte) placed its speed at six times faster than Atari
Basic, or about half the speed of the Atari Pascal compiler.  The
actual time was 440 seconds, I think, which isn't very fast. (see
p. 192 of the September 1981 Byte for other times)

The big problem is the 6502 architecture, which makes it impossible
to write compilers.  My implementation is yet another pseudo-code
interpreter.  Ah well, "the amazing thing is not that it compiles
quickly, but that it compiles at all."

On a related topic, my attempt to port Ron Cain's C to the TRS-16 was
foiled by the pathalogical stupidity of the TRS-DOS16 operating
system.  For reasons known only to the innermost circle of Tandy
systems "programmers", the 68000 assembler & editor use a new and
incompatible file format, and no format conversion program exists.

A warning to people bringing Small-C up under VMS -- the current
version of the VAX VMS C compiler can't store more than 7 bits of
information in a character (not even as negative numbers), so you
have to re-code all lines using "offset".