start working on boot code, move things around

This commit is contained in:
2024-11-21 10:40:59 -05:00
parent fc115752e6
commit dcc1bea405
15 changed files with 79 additions and 6 deletions

44
code/boot/boot.s Normal file
View File

@@ -0,0 +1,44 @@
; CHIBI PC-09 Prototype #1 Boot ROM
; (Copyright (c) 2024 Amber Zeller
; UART registers
UART = $7F00
; When DLAB = 0
BUFR = UART ; TX/RX Buffer (Read for RX, Write for TX)
IER = UART + 1 ; Interrupt Enable Register
IIR = UART + 1 ; Interrupt Enable Register (Upon Read)
; When DLAB = 1
DLL = UART ; Divisor Latch (LSB)
DLM = UART + 1 ; Divisor Latch (MSB)
FCR = UART + 2 ; FIFO Control Register (Upon Write)
LCR = UART + 3 ; Line Control Register
MCR = UART + 4 ; MODEM Control Register
LSR = UART + 5 ; Line Status Register
MSR = UART + 6 ; MODEM Status Register
SCR = UART + 7 ; Scratch Register (Not for control just spare RAM)
; SECTION code
org $8000
RESET:
sta $cc
jmp RESET
fdb RESET
; ENDSECTION
; SECTION vectors
org $FFF0
; Reset/Interrupt Vectors
fdb $0000 ; Reserved
fdb $0000 ; SWI3
fdb $0000 ; SWI2
fdb $0000 ; FIRQ
fdb $0000 ; IRQ
fdb $0000 ; SWI
fdb $0000 ; NMI
fdb RESET ; Reset
; ENDSECTION