Arakula / A09

A09 6800/6801/6809/6309/68HC11 Assembler
GNU General Public License v2.0
40 stars 8 forks source link

binary output from 6800 code missing first 48 bytes (zeroes) - yet .lst, s19 and intel output all correct #12

Closed stanleyruppert closed 9 months ago

stanleyruppert commented 1 year ago

Ran across an assembly listing, that when compiled has no errors/warnings, the .lst, s19, and hex outputs all show correct bytes in first 48 address locations. but binary output file has zeroes in the first 48 bytes. Same behaviour in v140, 150, and 158. Test code and other 6800 code all generate correct binary output files. Cannot find why this particular code is troublesome. assembly command: ./a09 -lJBUG.lst -oM00 -oNUM -oDAT -bJBUG.bin JBUG.ASM build command: gcc -o a09 a09.c [gcc version 9.2.0, host x86_64 darwin MacOS 10.14] JBUG.TXT Missing 48bytes

Arakula commented 9 months ago

That's the ORG $A000 section with the RMBs at the end of JBUG.TXT. It gets a bit better if you add -oNFB for this one (which causes the RMB statements to add zeroes at the end of the file instead of overwriting the start), but in general ... well, for the moment, don't let A09 emit binary files with such a layout. Create Intel Hex or Motorola S-Record files and convert these to binary, if that's needed.

stanleyruppert commented 9 months ago

Thanks for the explanation on the impact of the RMB section and tip about NFB option! I’ll watch out for similar situations in other vintage codes with like layout.