This is a simple compiler for the Forth programming language. I wanted to learn Forth and improve my C++, so I wrote this little compiler. It outputs x64 assembly code (in GAS syntax), and supports enough Forth to be usable. Being a static compiler, some of the more interesting features of Forth aren’t possible (like reading the input stream at runtime), but it’s still fun.
This was a good learning exercise, as my assembly skill much improved. If you’re curious, the code is available on github. The readme gives a good explanation of some design decisions & how the compiler is structured.