Outputting PASM memory maps?
Wuerfel_21
Posts: 5,053
in Propeller 1
In the process of mucking about with XMM, I decided to write my own assembler in Ruby (well, technically I'm writing a bunch of methods that make you think you're writing assembly code when you're really writing compile-time ruby code) that allows easily defining custom "instructions" and also allows static recompilation to other targets (anything targeted by clang or gcc, basically). However, to generate propeller binaries, it of course needs to know where in the interpreter cog all the registers and routines are (and ideally, where stuff is in hubram, too). Since i don't want to bloat my XMM assembler with the ability to assemble cog-mode PASM, I'd like to use another assembler to assemble the interpreter/kernal. Does anyone know of one that supports outputting the values of labels in a format that is easy-ish to parse? (otherwise, i'd need to partially parse the binary listings of openspin/bstc/homespun, pick your poision)
Comments
If anyone is interested, here is the ruby code to do parse a listing and return a Hash that maps labels to cog addresses.
Note that anything that is not a label or condition code needs to indented to not be picked up as a label.