Page 1 of 1

REL file format not working?

Posted: Sun Nov 10, 2019 6:09 am
by Poobah
Hi all,

I've got some .rel files I'm trying to incorporate into my project, and I'm not having much success.

When I try to use rel2z80, the resulting .o file says that it is in the Z80RMF1 format, which I gather is rather old :-)
So I run the file through zobjcopy, which tells me that it is converting the file to version 12.
I then turn the obj file into a .lib using z80asm.
But when I include the resulting library on my zcc command line (with the -l switch), I am told:

Error at module 'hx_c': file 'hexbuf.lib' not an object file
Errors in source file /home/grandpoobahbrian/z88dk/lib/config/../..//lib/target/trs80/classic/trs80_crt0.asm:
Error at module 'hx_c': file 'hexbuf.lib' not an object file.

Running z80nm on the lib file shows the following:
Library file hexbuf.lib at $0000: Z80LMF12
Object file hexbuf.lib at $0010: Z80RMF12
Name: HEXBUF
Section "": 41 bytes
Symbols:
X A $0000 HEXBUF (section "") (file "")
G A $0000 HEXBUF2 (section "") (file "")


I don't know what the "X" vs "G" means for the two public symbols, but it is concerning because the output of rel2bin shows that the HEXBUF2 symbol is not at $00, but $0F, and looking at the disassembly shows that that is indeed the case.

I suspect there's some bit rot here, and that no one has looked at the .rel format in a while? I can dis & reassemble, but that's a somewhat fraught process. I'd really like to just use the converted .rel files if that's possible.

Are there steps I'm missing? Anyway to diagnose what's wrong with the lib file being generated by the rel2z80 / zobcopy / z80asm process?

Thanks
B.

Posted: Sun Nov 10, 2019 3:57 pm
by stefano
Rel2z80 is an abandoned path. The direct support for the REL files will come directly from z80asm, it is in the to do list.