-
Notifications
You must be signed in to change notification settings - Fork 3
/
base.asm
44 lines (39 loc) · 1.19 KB
/
base.asm
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
* = HRESET
CLC
XCE ; go into native mode
SEI ; ignore interrupts
JML TRACKER
* = HIRQ ; IRQ handler.
RHIRQ
setaxl
PHB
PHD
PHA
PHX
PHY
;
; todo: look up IRQ triggered and do stuff
;
JSL IRQ_HANDLER
PLY
PLX
PLA
PLD
PLB
RTI
; Interrupt Vectors
* = VECTORS_BEGIN
JUMP_READY JML TRACKER ; Kernel READY routine. Rewrite this address to jump to a custom kernel.
RVECTOR_COP .addr HCOP ; FFE4
RVECTOR_BRK .addr HBRK ; FFE6
RVECTOR_ABORT .addr HABORT ; FFE8
RVECTOR_NMI .addr HNMI ; FFEA
.word $0000 ; FFEC
RVECTOR_IRQ .addr HIRQ ; FFEE
RRETURN JML TRACKER
RVECTOR_ECOP .addr HCOP ; FFF4
RVECTOR_EBRK .addr HBRK ; FFF6
RVECTOR_EABORT .addr HABORT ; FFF8
RVECTOR_ENMI .addr HNMI ; FFFA
RVECTOR_ERESET .addr HRESET ; FFFC
RVECTOR_EIRQ .addr HIRQ ; FFFE