I am compiling a small program for the mos6502 and want Motorola S record output format.
I expected the output to be S1/S9 records (16-bit addresses) but it is producing S2/S8 (24-bit addresses).
Most 6502 tools expect S1/S9 format.
This is how I am building it: sdcc -mmos6502 --out-fmt-s19 hello.c
I have built sdcc from the latest code in svn.
Ticket moved from /p/sdcc/bugs/3839/
Can't be converted:
It should not be too hard for you to convert a 24-bit address S-record file to a 16-bit one. But if SDCC would only output 16-bit files then bank switching would no longer be possible.
You can also look in the assembler/linker manual to find an option to output the 16-bit format and tell SDCC to pass that to the assembler and/or linker.
Yes, I was able to convert the file using the srec_cat utility.
It would be a useful enhancement to support either S1/S9 or S2/S8 format directly from sdcc.