MESCC is my project of a C compiler for the CP/M operating system and the Z80 cpu.
As it is written in MESCC, it can compile itself.
It is based on the version 1.7 (Oct. 1985) of Small C by Ron Cain, Mike Bernson's and John Hill.
MESCC outputs Z80 assembler code that can be assembled with ZSM/Z80ASMUK (supplied with MESCC), in order to build an HEX file.
The HEX file can be converted to an executable COM file with LOAD (supplied with CP/M 2), HEXCOM (supplied with CP/M 3) or HEXTOCOM (supplied with MESCC).
Also is supplied CCOPT, a peephole optimizer.
I use MESCC for nearly all my software projects.
Usage: cc name[.typ] [options]
-PRG Out normal file ---- Type=ZSM
-LIB Out library file --- Type=LIB
-ASM Out assembler file - Type=ZSM
-O:name[.typ] File name for output
-Cflag C source as comments?
-Eflag Pause on errors?
-Sflag Default type for char is signed?
-E:number Max. number of errors to abort
-L:letnum Letter and start number for labels
-S:size Mininum stack size
Default options are: (flag is + for YES, - for NO)
-PRG -C- -E+ -S+ -E:50 -L:A0 -S:512
Input file type is .c
Output file name is the same as input
The compiler will show you a help text if it is executed without arguments.
MESCC is supplied with a bunch of libraries: