From 98bb09408ebd65ef71efe59e8eaa05791b3a62e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Wed, 25 Dec 2013 11:23:07 +0000 Subject: [PATCH] added isr low-level handler --- BaS_gcc/sys/exceptions.S | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/BaS_gcc/sys/exceptions.S b/BaS_gcc/sys/exceptions.S index 97766b6..6f66eec 100644 --- a/BaS_gcc/sys/exceptions.S +++ b/BaS_gcc/sys/exceptions.S @@ -972,3 +972,33 @@ video_chg_end: lea 7 * 4(sp),a7 rte #endif /* MACHINE_FIREBEE */ + +/* + * low-level interrupt service routine for routines registered with + * isr_register_handler() + */ + .global _asm_isr_handler + .extern _isr_execute_handler + +_asm_isr_handler: + link a6,#-4*4 + movem.l d0-d1/a0-a1,(sp) + + move.w 4(a6),d0 + lsr.l #2,d0 + andi.l #0x0000ff,d0 + move.l d0,-(sp) + jsr _isr_execute_handler + lea 4(sp),sp + cmp.l #1,d0 + //beq handled +#ifdef _NOT_USED_ +nothandled: + movem.l (sp),d0-d1/a0-a1 + unlk a6 + jmp asm_exception_handler +#endif /* _NOT_USED_ */ +handled: + movem.l (sp),d0-d1/a0-a1 + unlk a6 + rte