Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IM 2
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).

Sub activateIsr ()
        ld  hl, isr_code
        ld  ($feff), hl
        ld  a, $fe
        ld  i, a
        im  2
    End Asm
End Sub

Sub allPurposeContainer
        push ix
        push hl
        push af
        ; random shyte
        ld a, r
        out (254), a
        pop af
        pop hl
        pop ix
    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?

Messages In This Thread

Forum Jump:

Users browsing this thread: 3 Guest(s)