07-25-2012, 01:15 PM
Any special considerations to take in account? I set up my IM 2 ISR routine the same way I do from pure assembly and everything crashes beautifully :lol: (I know the code posted below will crash with hardware attached, this is just a quick test) (and no, no hardware is attached. The floating bus should read $ff).
The "random shyte" section is in fact a bigger routine. Do I have to save all the registers or something like that?
Code:
Sub activateIsr ()
Asm
ld hl, isr_code
di
ld ($feff), hl
ld a, $fe
ld i, a
im 2
ei
End Asm
End Sub
Sub allPurposeContainer
Asm
isr_code:
push ix
push hl
push af
; random shyte
ld a, r
out (254), a
;
pop af
pop hl
pop ix
ei
reti
End Asm
End Sub
activateIsr ()
While (1): Wend
The "random shyte" section is in fact a bigger routine. Do I have to save all the registers or something like that?