From dcbb611c31cabb80cbc7f35759cc9c269bb769b8 Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Fri, 19 Jan 2024 18:52:14 +0100 Subject: * Use new MMU Replace use of internal WIN_N registers by new MMU design --- crt0.asm | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'crt0.asm') 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 -- cgit v1.2.3