📄 exceptions.c
字号:
VECTORDISPLAY3(MCF5XXX_EXCEPTFMT, "Unimplemented F-Line Instruction", stackFramePC);
break;
case 12:
VECTORDISPLAY3(MCF5XXX_EXCEPTFMT, "Debug Interrupt", stackFramePC);
break;
case 14:
VECTORDISPLAY3(MCF5XXX_EXCEPTFMT, "Format Error", stackFramePC);
break;
case 15:
VECTORDISPLAY3(MCF5XXX_EXCEPTFMT, "Unitialized Interrupt", stackFramePC);
break;
case 24:
VECTORDISPLAY3(MCF5XXX_EXCEPTFMT, "Spurious Interrupt", stackFramePC);
break;
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
VECTORDISPLAY2("Autovector interrupt level %d\n", stackFrameVector - 24);
break;
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
VECTORDISPLAY2("TRAP #%d\n", stackFrameVector - 32);
break;
case 5:
case 6:
case 7:
case 13:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
case 63:
VECTORDISPLAY2("Reserved: #%d\n", stackFrameVector);
break;
default:
derivative_interrupt(stackFrameVector);
break;
}
}
#if REGISTER_ABI
asm void asm_exception_handler(void)
{
link a6,#0
lea -20(sp), sp
movem.l d0-d2/a0-a1, (sp)
lea 24(sp),a0 /* A0 point to exception stack frame on the stack */
jsr mcf_exception_handler
movem.l (sp), d0-d2/a0-a1
lea 20(sp), sp
unlk a6
rte
}
#else
asm void asm_exception_handler(void)
{
link a6,#0
lea -20(sp), sp
movem.l d0-d2/a0-a1, (sp)
pea 24(sp) /* push exception frame address */
jsr mcf_exception_handler
movem.l 4(sp), d0-d2/a0-a1
lea 24(sp), sp
unlk a6
rte
}
#endif
typedef void (* vectorTableEntryType)(void);
#pragma define_section vectortable ".vectortable" far_absolute R
/* CF have 255 vector + SP_INIT in the vector table (256 entries)
*/
__declspec(vectortable) vectorTableEntryType _vect[256] = { /* Interrupt vector table */
(vectorTableEntryType)__SP_AFTER_RESET, /* 0 (0x000) Initial supervisor SP */
_startup, /* 1 (0x004) Initial PC */
asm_exception_handler, /* 2 (0x008) Access Error */
asm_exception_handler, /* 3 (0x00C) Address Error */
asm_exception_handler, /* 4 (0x010) Illegal Instruction */
asm_exception_handler, /* 5 (0x014) Reserved */
asm_exception_handler, /* 6 (0x018) Reserved */
asm_exception_handler, /* 7 (0x01C) Reserved */
asm_exception_handler, /* 8 (0x020) Privilege Violation */
asm_exception_handler, /* 9 (0x024) Trace */
asm_exception_handler, /* 10 (0x028) Unimplemented A-Line */
asm_exception_handler, /* 11 (0x02C) Unimplemented F-Line */
asm_exception_handler, /* 12 (0x030) Debug Interrupt */
asm_exception_handler, /* 13 (0x034) Reserved */
asm_exception_handler, /* 14 (0x038) Format Error */
asm_exception_handler, /* 15 (0x03C) Unitialized Int */
asm_exception_handler, /* 16 (0x040) Reserved */
asm_exception_handler, /* 17 (0x044) Reserved */
asm_exception_handler, /* 18 (0x048) Reserved */
asm_exception_handler, /* 19 (0x04C) Reserved */
asm_exception_handler, /* 20 (0x050) Reserved */
asm_exception_handler, /* 21 (0x054) Reserved */
asm_exception_handler, /* 22 (0x058) Reserved */
asm_exception_handler, /* 23 (0x05C) Reserved */
asm_exception_handler, /* 24 (0x060) Spurious Interrupt */
asm_exception_handler, /* 25 (0x064) Autovector Level 1 */
asm_exception_handler, /* 26 (0x068) Autovector Level 2 */
asm_exception_handler, /* 27 (0x06C) Autovector Level 3 */
asm_exception_handler, /* 28 (0x070) Autovector Level 4 */
asm_exception_handler, /* 29 (0x074) Autovector Level 5 */
asm_exception_handler, /* 30 (0x078) Autovector Level 6 */
asm_exception_handler, /* 31 (0x07C) Autovector Level 7 */
asm_exception_handler, /* 32 (0x080) TRAP #0 */
asm_exception_handler, /* 33 (0x084) TRAP #1 */
asm_exception_handler, /* 34 (0x088) TRAP #2 */
asm_exception_handler, /* 35 (0x08C) TRAP #3 */
asm_exception_handler, /* 36 (0x090) TRAP #4 */
asm_exception_handler, /* 37 (0x094) TRAP #5 */
asm_exception_handler, /* 38 (0x098) TRAP #6 */
asm_exception_handler, /* 39 (0x09C) TRAP #7 */
asm_exception_handler, /* 40 (0x0A0) TRAP #8 */
asm_exception_handler, /* 41 (0x0A4) TRAP #9 */
asm_exception_handler, /* 42 (0x0A8) TRAP #10 */
asm_exception_handler, /* 43 (0x0AC) TRAP #11 */
asm_exception_handler, /* 44 (0x0B0) TRAP #12 */
asm_exception_handler, /* 45 (0x0B4) TRAP #13 */
#if CONSOLE_IO_SUPPORT
TrapHandler_printf, /* 46 (0x0B8) TRAP #14 */
#else
asm_exception_handler, /* 46 (0x0B8) TRAP #14 */
#endif
asm_exception_handler, /* 47 (0x0BC) TRAP #15 */
asm_exception_handler, /* 48 (0x0C0) Reserved */
asm_exception_handler, /* 49 (0x0C4) Reserved */
asm_exception_handler, /* 50 (0x0C8) Reserved */
asm_exception_handler, /* 51 (0x0CC) Reserved */
asm_exception_handler, /* 52 (0x0D0) Reserved */
asm_exception_handler, /* 53 (0x0D4) Reserved */
asm_exception_handler, /* 54 (0x0D8) Reserved */
asm_exception_handler, /* 55 (0x0DC) Reserved */
asm_exception_handler, /* 56 (0x0E0) Reserved */
asm_exception_handler, /* 57 (0x0E4) Reserved */
asm_exception_handler, /* 58 (0x0E8) Reserved */
asm_exception_handler, /* 59 (0x0EC) Reserved */
asm_exception_handler, /* 60 (0x0F0) Reserved */
asm_exception_handler, /* 61 (0x0F4) Reserved */
asm_exception_handler, /* 62 (0x0F8) Reserved */
asm_exception_handler, /* 63 (0x0FC) Reserved */
asm_exception_handler, /* 64 (0x100) Device-specific interrupts */
asm_exception_handler, /* 65 (0x104) Device-specific interrupts */
asm_exception_handler, /* 66 (0x108) Device-specific interrupts */
asm_exception_handler, /* 67 (0x10C) Device-specific interrupts */
asm_exception_handler, /* 68 (0x110) Device-specific interrupts */
asm_exception_handler, /* 69 (0x114) Device-specific interrupts */
asm_exception_handler, /* 70 (0x118) Device-specific interrupts */
asm_exception_handler, /* 71 (0x11C) Device-specific interrupts */
asm_exception_handler, /* 72 (0x120) Device-specific interrupts */
asm_exception_handler, /* 73 (0x124) Device-specific interrupts */
asm_exception_handler, /* 74 (0x128) Device-specific interrupts */
asm_exception_handler, /* 75 (0x12C) Device-specific interrupts */
asm_exception_handler, /* 76 (0x130) Device-specific interrupts */
asm_exception_handler, /* 77 (0x134) Device-specific interrupts */
asm_exception_handler, /* 78 (0x138) Device-specific interrupts */
asm_exception_handler, /* 79 (0x13C) Device-specific interrupts */
asm_exception_handler, /* 80 (0x140) Device-specific interrupts */
asm_exception_handler, /* 81 (0x144) Device-specific interrupts */
asm_exception_handler, /* 82 (0x148) Device-specific interrupts */
asm_exception_handler, /* 83 (0x14C) Device-specific interrupts */
asm_exception_handler, /* 84 (0x150) Device-specific interrupts */
asm_exception_handler, /* 85 (0x154) Device-specific interrupts */
asm_exception_handler, /* 86 (0x158) Device-specific interrupts */
asm_exception_handler, /* 87 (0x15C) Device-specific interrupts */
asm_exception_handler, /* 88 (0x160) Device-specific interrupts */
asm_exception_handler, /* 89 (0x164) Device-specific interrupts */
asm_exception_handler, /* 90 (0x168) Device-specific interrupts */
asm_exception_handler, /* 91 (0x16C) Device-specific interrupts */
asm_exception_handler, /* 92 (0x170) Device-specific interrupts */
asm_exception_handler, /* 93 (0x174) Device-specific interrupts */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -