arch/m68k-amiga: Helper routines for M68K exceptions
[AROS.git] / arch / m68k-amiga / boot / m68k_exception.h
blobfe4225863540ff532963479127ca0d961c8905fc
1 /*
2 copyright © 1995-2010, the aros development team. all rights reserved.
3 $id$
5 desc: M68K Exceptions
6 lang: english
7 */
8 #ifndef M68K_EXCEPTION_H
9 #define M68K_EXCEPTION_H
11 #include <aros/kernel.h>
12 #include <exec/execbase.h>
14 /* Here's how it's all laid out:
15 * M68K Exception
16 * 0 Reset: Initial SP
17 * 1 Reset: Initial PC (NOTE: Really is SysBase!)
18 * 2 Bus Error
19 * 3 Address Error
20 * 4 Illegal Instruction
21 * 5 Divide by Zero
22 * 6 CHK Instruction
23 * 7 TRAPV Instruction
24 * 8 Privileged Instruction
25 * 9 Trace
26 * 10 Line 1010 Emulator
27 * 11 Line 1111 Emulator
28 * 12 -
29 * 13 -
30 * 14 Format Error
31 * 15 Uninitilaized Interrupt Vector
32 * 16 -
33 * ..
34 * 23 -
35 * 24 Spurious Interrupt
36 * 25 Level 1 Interrupt
37 * 26 Level 2 Interrupt
38 * 27 Level 3 Interrupt
39 * 28 Level 4 Interrupt
40 * 29 Level 5 Interrupt
41 * 30 Level 6 Interrupt
42 * 31 Level 7 Interrupt
43 * 32 TRAP #0
44 * ..
45 * 47 TRAP #15
46 * 48 -
47 * ..
48 * 63 -
49 * 64 User 1
50 * ..
51 * 255 User 191
53 struct M68KException {
54 UBYTE Id;
55 void (*Handler)(int id, UWORD SRReg, struct ExecBase *SysBase);
58 void M68KExceptionInit(const struct M68KException *Table, struct ExecBase *SysBase);
60 #endif /* M68K_EXCEPTION_H */