Jump to content
MLdB

Pseudo opcode for real offset of byte or word in final bin

Recommended Posts

For my project I want to include the locations of a couple of tables in the final binary. I want to be able to allow editing (for a mapeditor coded separately in js) the data inside the binary without dis- or reassembling. Naturally if I write "word LABEL", dasm will insert the location of the label within the addressable 4K (F000-FFFF), it would be trivial (I think) for dasm to report the real location of the label within the binary (from 0000-[EOF]), but as I cannot think of any real uses for such a feature apart from my own, I'm afraid it will not exist yet...

Share this post


Link to post
Share on other sites

Generate a symbol table file when you compile, and the label and its address is in that, easily machine-readable.

 

dasm yourfile.asm -l./yourfile.lst -f3 -s./yourfile.sym -o./yourfile.bin

The -l will generate a human-readable listing.

The -s is what you're interested in - generate a symbol listing file (use .txt as the extension if you wish, but stella specifically recognises .sym)

 

  • Like 1

Share this post


Link to post
Share on other sites

I'm an idiot, thanks for your swift reply Andrew. But I see that I forgot to mention that I want dasm to write the location to the binary, so my map editor can read it from the binary file at a known location (like the interrupt and program start locations are always at FFFC-FFFF (if I'm not mistaken) I'd like my table addresses to be included somewhere in a predetermined location but have dasm account for the bank they are in, ignoring Atari's usual 4K addressing limitation.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...