🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Some Disassembly Required

Published February 22, 2009
Advertisement
Alas, I spent most of the day off in the Big Blue Room having one of those "social life" thingies, so I didn't get a huge block of time to hack on Epoch today.

However, I did manage to get the table-driven disassembler finished; the same blob of macro magic now powers both the assembler and disassembler. In there somewhere I got sick of reading flat EASM files, so I wrote a quick pretty-printer that automatically indents the files. Unfortunately, the presence of whitespace totally confuses the assembler/disassembler code, so I'll have to shore that up a bit.

My next thing to tackle is factoring out common sequences in the assembly table. For example, there's a delicate way that begin-scope instructions have to be handled; at the moment, every time I read into a new lexical scope, I have to do some juggling to make sure things get written out correctly. Let's just say that the order of instructions surrounding a lexical scope entry is... quirky. So one thing I can do is factor that bit of juggling out into a meta-instruction in the assembly table.

I can practically smell all the dark voodoo that's oozing out of this assembler, but it's been a fun little diversion from the main language efforts [grin]
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement