http://0x10c.com/ A new spaceship game is under development (by the creator of a popular Java game), and it features a virtual 16-bit processor (called DCPU16) that you can program in and run code for in the game. I think it's a good C exercise for me to write an assembler/disassembler for the DCPU16 machine. Question is, how would I do something like that?
Finally, what does it take to write a gcc backend/standalone C or C++ compiler/Java Virtual Machine/Python interpreter for the in-game processor? I wonder if it Linux could be ported to that thing! :-D
I'd advice looking into a lexographical parser. When I studied the topic lex and yacc were the two tools of the trade but I believe they've been replaced by something easier. In regard to a gcc backend - a lot of blood, sweat, and tears. haha. I wouldn't attempt it, but if you do let me know how it turns out!
Join our real-time social learning platform and learn together with your friends!