--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/db2e8967-a29c-47c9-b8f7-c624ac516795n%40googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/91621564-dfaa-4b55-8deb-b46c6b332a0en%40googlegroups.com.
Timex used a lot of relocatable code, but also used a table in
the base address space.
https://datassette.s3.us-west-004.backblazeb2.com/livros/timex_sinclair_2068_rom_disassembly.pdf
There may be something in this document that will help.
Use of HL, IX & IY does muck up the works a bit, this is
where a table in the base address space is useful.
Say your code was written based on being at 8F00 and you moved to
9A00 all the relative jumps and calls should be fine. Your table
has a list of where you are loading HL, IX and IY so you would
possibly add 0F00 to the address loaded into those places.
This could be dynamic, that is as part of the call and move of the
code-block itself.
Timex/Sinclair code has a problem keeping track of the usage of
IX & IY which greatly restricts the hobbyist use of them. But,
when it's all your own code...
Your relocatable code could be a code block that includes, say.
0000 address of where relocatable code actually starts
0002 First address to modify
0004 Next address to modify
If you're using expanded memory spaces then each entry could be 3 or 4 bytes long.

To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/63fdbabd87083c.1343c6193ab61e%40gmail.com.