From abad5b6d636a86e4b4ef961bca1882220677184f Mon Sep 17 00:00:00 2001 From: Astrid Smith Date: Mon, 27 Dec 2010 22:36:40 -0800 Subject: Cleaned up interrupt routine, now it works properly. Perhaps this is slower than necessary, particularly when interrupts are disabled. --- interrupts.asm.m4 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'interrupts.asm.m4') diff --git a/interrupts.asm.m4 b/interrupts.asm.m4 index cf2b195..404f02f 100644 --- a/interrupts.asm.m4 +++ b/interrupts.asm.m4 @@ -42,8 +42,8 @@ int_handler: int_nevermind: rts do_interrupt: - ;; todo: make this file m4'd add.l #INT_OFFSET,a5 ; clear the interrupt flag + pea 0(a5,d0.w) ; allows us to rts properly tst.b int_enabled ; 4 cycles beq.b int_nevermind ; 8 cycles not taken @@ -52,8 +52,6 @@ do_interrupt: ;; Since this is an instruction all its own, we have D0, D1, ;; and D2 available. - pop.l a0 - ;; Interrupts are most often in mode 1, then mode 2, and ;; almost never in mode 0. move.b int_mode,d0 @@ -63,7 +61,7 @@ do_interrupt: beq int_do_mode1 cmpi.b #1,d0 beq int_do_mode0 - jmp (a0) + rts ;; This routine emulates a mode 0 interrupt. -- cgit v1.2.3