A simple (not feature-complete) HolyC compiler for the Motorola 6800 released in 1974.
- Types:
U8
,I8
,U0
, 16-bit pointers - Functions
- Locals
if
/else
statementsswitch
statementswhile
loopscontinue
,break
in switches & loops- Multi-argument expressions parsed with respect of the order of operations
- Operators
- Bytecode optimizer
See holy6800 --help
for options.
Depends on CMake. Run make all
to build.
else if
is NOT supported.()
in expressions are NOT supported (e.g.2 * (2 - 2)
)- Not battle tested. Expect bugs.
/
(div) is NOT supported.- The 6800 has an 8-bit data bus. Arithmetic on pointers may overflow. See
tests/manualPtrs.hc
for a solution if you want to do pointers manually.
Holy6800 uses a cdecl
-like calling convention.
Parameters are pushed and popped by the caller, in the order they appear in the function signature.
The function's return value is stored in A
.
See tests/
.