summaryrefslogtreecommitdiff
path: root/crt0.asm
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2024-01-19 18:52:14 +0100
committerThomas Albers Raviola <thomas@thomaslabs.org>2024-01-19 18:52:14 +0100
commitdcbb611c31cabb80cbc7f35759cc9c269bb769b8 (patch)
treef9344dd308013c2c246a957d4c59f3c46d7b07cf /crt0.asm
parent3c1c8415713f80cd0919f7bd5244d292f1c3cfe1 (diff)
* Use new MMUHEADmaster
Replace use of internal WIN_N registers by new MMU design
Diffstat (limited to 'crt0.asm')
-rw-r--r--crt0.asm27
1 files changed, 13 insertions, 14 deletions
diff --git a/crt0.asm b/crt0.asm
index 567ab47..2a2c032 100644
--- a/crt0.asm
+++ b/crt0.asm
@@ -6,9 +6,9 @@
.area _HEADER (ABS)
;; Reset vector
.org 0x0000
- ld SP, #0x00
- xor A
- ld I, A
+ ld sp, #0x00
+ xor a
+ ld i, a
jp init
;; ISR table
.org 0x0010
@@ -26,18 +26,17 @@ _rx_isr_ptr:
.dw #_rx_isr
;; Init code
init:
- xor A
- ;; Enable extended memory
- out (WIN_0_CTRL), A
- ld A, #0b00100000
- out (WIN_1_CTRL), A
- ld A, #0b01000000
- out (WIN_2_CTRL), A
- ld A, #0b01100000
- out (WIN_3_CTRL), A
+ ;; Configure banking
+ ld a, #0x81
+ out (MMU_A), A
+ ld a, #0x82
+ out (MMU_B), A
- ld A, #SREG_EXT_MEM
- out (SREG_CTRL), A
+ ;; Disable PIO interrupts
+ ld a, #0x07
+ out (PORT_A_CTRL), a
+ ld a, #0x07
+ out (PORT_B_CTRL), a
call gsinit
call _main