I'm wondering about what choices we might have on the 6502 for compiling code on the machine itself... (so, not thinking of cc65 or WDC's C compiler or others which run on a modern machine to produce 6502 code.)
By compiler, I mean something which makes an effort to predigest a high level language for better runtime performance than a simple interpreter. By high level language, I mean something which offers more control than just branches or calls to labels, offers named functions or procedures with parameters, offers data types more interesting than just bytes.
So, I include compilers which compile down to an intermediate code which is interpreted.
In the land of Acorn's BBC Micro, there were several offerings from Acorn's own Acornsoft, usually on ROM (or multiple 16k ROMs) and needing the ROM for both compile-time and run-time: see
the catalogue here (PDF)ISO-Pascal - compiles to intermediate code; standalone generator also available
BCPL - compiles to intermediate code; standalone generator also available
FORTH (an indirect threaded implementation [ref])
(capitalisation from the price list there. Also offered are Logo, LISP, micro-PROLOG, and COMAL, all interpreters, I believe.)
There was also an offering from
Superior Software - Accelerator - which compiled BBC Basic to machine code via an intermediate G code. It hooked directly into routines from the Basic ROM at runtime and so was only compatible with one version of Basic.
According to
this file there were also several C compilers:
Quote:
Acornsoft 'C'
This version was designed for the Master series machines, and requires
two banks of SWR and shadow ram. If you Model 'B' has been expanded to
this level, then this version of 'C' is one of the two leaders.
Beebug 'C'
This version of C has more modest demands, and hence I highly
recommend its purchase if you wish to learn C on a BBC micro. It comprises
two roms, a disk, and a manual. A further bonus is that there is an
add-on, the Stand Alone Generator, which allows your programs to run
without the roms being present.
Mijas 'C'
This comprises a disk and several manuals which contains the Small C
and the 6502 development system. This version of C generates assembler
code which is then assembled to produce 6502 machine code. It is not as
comprehensive a C as either Acornsoft's or Beebug's, but it has the
advantage of compiling down to machine code. It is a much enhanced version
of the public domain version of C. This version requires 4 banks of SWR or
the rom images blown into eproms.
Brasscourt 'C'
This comprises a rom, a disk, and a manual. Comments as for Mijas C,
but is less comprehensive.
Public Domain Tiny C
This version of C is too restrictive for serious use, but it is never
the less a reasonable introduction to C.
The same document also mentions an APL (which might be an interpreter, although that tends not to hurt APL performance much) from I-APL Ltd ("the I-APL organization was at one time working on porting their free version of APL to the Apple II (and Commodore 64)."
[ref]), a FORTRAN from AJS Soft (which
turns out to be an interpreter) and HALCIEN which I would guess was an interpreter too.