I have a rather whacked out idea, but it would suit my purposes better than using the Pre_hook, but I want Kerm's input on this first, before actually doing it.
Code:
In order to suit my purposes, I need to insert a persistent hook.
To undo this, simply repeat the process, but shift everything backwards 2 bytes.
Code:
; where Cn2_Start is the starting address of the Cn2_Interrupt
; where Cn2_Size is the size of the interrupt
ld hl, Cn2_Start
ld de, saferam1
ld bc, Cn2_Size
ldir
ld hl,saferam1
ld de, Cn2_Start + 2
ld bc, Cn2_Size
ldir
; I have effectively shifted Cn2's entire interrupt forward 2 bytes...
;; now, i can insert a call to my code in the beginning.
In order to suit my purposes, I need to insert a persistent hook.
To undo this, simply repeat the process, but shift everything backwards 2 bytes.