Skip to content

pzembrod/cc64

Repository files navigation

cc64

cc64 is a small-C compiler, written in Forth (here's why), targeting the 6502 CPU. It's hosted on the Commodore C64, on the C16 with 64k RAM and the Plus4, and on the new Commander X16, and runtime targets are also available for all 3 platforms, on each host, allowing cross-compilation.

See Usage for how to use cc64, including how to get curly braces in PETSCII.

cc64 language restrictions lists the subset of C that cc64 supports.

Code layout and library concept explains, among others, how to create a new target.

LibC Reference describes the LibC subset that comes with cc64, plus the lib's deviations from the standard.

Emulator and file formats describes the emulator setup I use for developing and testing.

Design is a first stab at documenting the compiler's inner structure.

History

I wrote cc64 during my university years; the majority of the code was written 1989-1991. Motivated by buzzphp who's building a C library for cc64, and also by Johan Kotlinski of DurexForth and AcmeForth, I have finally open-sourced the project. See Versions for more info.

I hope you'll find cc64 fun to use; I definitely had - and am having - fun developing it.

About

cc64 is a small-C compiler written in Forth, hosted on the Commodore C64, Plus4 and C16 with 64k, and on the Commander X16. It is targeting the 6502 CPU.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published