-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvectors.c
More file actions
51 lines (46 loc) · 1.32 KB
/
Copy pathvectors.c
File metadata and controls
51 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* As is, all interrupts except reset jumps to 0xffff, which is most
* likely not going to useful. To replace an entry, declare your function,
* and then change the corresponding entry in the table. For example,
* if you have a SCI handler (which must be defined with
* #pragma interrupt_handler ...) then in this file:
* add
* extern void SCIHandler();
* before th table.
* In the SCI entry, change:
* DUMMY_ENTRY,
* to
* SCIHandler,
*/
extern void _start(void); /* entry point in crt??.s */
#define DUMMY_ENTRY (void (*)(void))0xFFFF
#pragma abs_address:0xffd6
/* change the above address if your vector starts elsewhere
*/
void (*interrupt_vectors[])(void) =
{
/* to cast a constant, say 0xb600, use
(void (*)())0xb600
*/
DUMMY_ENTRY, /* SCI */
DUMMY_ENTRY, /* SPI */
DUMMY_ENTRY, /* PAIE */
DUMMY_ENTRY, /* PAO */
DUMMY_ENTRY, /* TOF */
DUMMY_ENTRY, /* TOC5 */
DUMMY_ENTRY, /* TOC4 */
DUMMY_ENTRY, /* TOC3 */
DUMMY_ENTRY, /* TOC2 */
DUMMY_ENTRY, /* TOC1 */
recv_handler, /* TIC3 */
DUMMY_ENTRY, /* TIC2 */
DUMMY_ENTRY, /* TIC1 */
DUMMY_ENTRY, /* RTI */
DUMMY_ENTRY, /* IRQ */
DUMMY_ENTRY, /* XIRQ */
DUMMY_ENTRY, /* SWI */
DUMMY_ENTRY, /* ILLOP */
DUMMY_ENTRY, /* COP */
DUMMY_ENTRY, /* CLM */
_start /* RESET */
};
#pragma end_abs_address