Relocating MTX Machine Code

Everything about programming, including VDP and Sound programming.
Martin A
Posts: 887
Joined: 09 Nov 2013 21:03

Re: Relocating MTX Machine Code

Post by Martin A »

1024MAK wrote: 23 Sep 2025 19:01 Absolute instructions include CALL nn instructions and LD instructions such as LD a,(nn) or block move instructions accessing data within the loaded code, not just JP instructions.
I Imagine the real killer trio would be the calculated jumps

Code: Select all

JP (HL)
JP (IX)
JP (IY) 
oh and nearly forgot Memotech's trick, that both the CPM rom and system rom use:

Code: Select all

LD HL,exitRoutine
PUSH HL
... half a gazillion lines of code
RET    ; indirect jump to exitRoutine
Automatically working out where they get their address from could be "tricky".
User avatar
1024MAK
Posts: 802
Joined: 24 Dec 2012 03:01
Location: Looking forward to summer, in Somerset, UK

Re: Relocating MTX Machine Code

Post by 1024MAK »

Aye, one of the joys of Z80 machine code, all the "flexible" ways of doing things :lol:

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Oh my, summer has gone. Winter dead ahead :shock:

Not as many MTXs as Dave! :lol:
Post Reply