diff options
Diffstat (limited to 'crt0.asm')
-rw-r--r-- | crt0.asm | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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 |