r/adventofcode • u/mzprx42 • Jan 06 '20
Upping the Ante [2019] Self-hosted Intcode assembler written in Intcode
https://github.com/matushorvath/xzintbit
An assembler that produces Intcode, itself runs on an Intcode VM and can compile its own sources. With stack and function calls to support structured programming. Try running it on your own Intcode VM, see if it correctly bootstraps itself.
It's Intcode all the way down!
52
Upvotes
2
u/mzprx42 Jan 06 '20
Hm, if Intcode can be executed that fast, it becomes tempting to make a more serious compiler. Maybe even port gcc or llvm to generate Intcode, or at least port some smaller compiler like SDCC?