A Small C Compiler for MC6800 (fork from chibicc)
https://www.zukeran.org/shin/d/ ↗// readme
chibicc-6800-v1: A small C Compiler for MC6800
Overview
This project is a fork of @rui314’s chibicc, modified to create a C compiler for the Motorola MC6800 architecture.
This project was created as a tool for studying compilers for the MC6800, and while it includes extra code and comments that may not be essential, they reflect the learning process and experimentation involved in developing the compiler.
A lot of things about object code generation and performance only became clear once I actually implemented it. Some parts of the code may be there just for testing.
However, it works reasonably well on the MC6800. I hope it may still be of some use.
Dhrystone and Whetstone benchmarks now run successfully on the MC6800.
- https://github.com/z88dk/z88dk/tree/master/support/benchmarks/dhrystone21
- https://github.com/z88dk/z88dk/tree/master/support/benchmarks/whetstone
Topics
- Data types:
intand pointers are 16-bit;longandfloatare 32-bit.doubleandlong long(64-bit or more) are unsupported. - Structs/unions: Passing/returning by value are implemented. but this increases…