REL file format not working?

Discussion about other targets
Post Reply
Poobah
New member
Posts: 1
Joined: Wed Nov 06, 2019 9:27 pm

REL file format not working?

Post 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.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post 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.
Post Reply