diff options
| author | Duncan Smith | 2010-12-27 22:36:40 -0800 |
|---|---|---|
| committer | Duncan Smith | 2010-12-27 22:42:51 -0800 |
| commit | 230532164770650c105199a6da7bb178d3627b35 (patch) | |
| tree | 02b447ec4f6019dc500aa48e0ac0ac5b58f1472b /interrupts.asm.m4 | |
| parent | ffd2a82196893869ccf739d7492e2535f41f9d3d (diff) | |
Cleaned up interrupt routine, now it works properly.
Perhaps this is slower than necessary, particularly when interrupts
are disabled.
Diffstat (limited to 'interrupts.asm.m4')
| -rw-r--r-- | interrupts.asm.m4 | 6 |
1 files changed, 2 insertions, 4 deletions
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. |
