3 ms·
I'm also working on a compiler targeting the DCPU-16. It doesn't compile C code, instead there's a simple C-like language supporting modules and pointers. It's
by Zr40 15y ago
I'm also working on a compiler targeting the DCPU-16. It doesn't compile C code, instead there's a simple C-like language supporting modules and pointers.
It's not really finished and can surely produce better code, but I wanted to share it anyway.
Here's the fib example from the LLVM backend's README: https://gist.github.com/2336867 https://gist.github.com/2336867. My compiler currently manages to compile fib to 30 instructions (0x2E words) compared to 38 instructions (0x41 words) for the LLVM backend.
Here's the source: https://github.com/zr40/dcc https://github.com/zr40/dcc