From 1237cc89ebea4ace6c478173dc8d75b139ebc1cd Mon Sep 17 00:00:00 2001 From: Gale Faraday Date: Sat, 7 Dec 2024 06:55:22 -0600 Subject: [PATCH] chore: using aliases from hardware.inc and optimized divisor setup --- code/boot/src/boot.s | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/boot/src/boot.s b/code/boot/src/boot.s index e09b5d5..7f13307 100644 --- a/code/boot/src/boot.s +++ b/code/boot/src/boot.s @@ -13,25 +13,26 @@ ORG ROM_BASE RESET - lda #%11000001 ; 8n1 serial, enable DLAB + ; 8n1 Serial Enable DLAB + lda #(UARTF_LCR_WLS | UARTF_LCR_DLAB) sta UART_LCR - lda #$00 ; Set divisor to 12 (9600 baud) - sta UART_DLL - lda #$0C + ; REVIEW: Potential endianness hiccough here + ldd #$0C00 ; Set divisor to 12 (9600 baud) sta UART_DLM + stb UART_DLL - lda #%11000000 ; 8n1 serial, disable DLAB + lda #(UARTF_LCR_WLS) ; 8n1 serial, disable DLAB sta UART_LCR - lda #%01000000 ; Enable RTS + lda #(UARTF_MCR_RTS) ; Enable Request-to-Send sta UART_MCR - lda 'H ; send 'H' + lda 'H ; send 'H' sta UART_BUFR WAIT - sync ; Wait for interrupts + sync ; Wait for interrupts nop bra WAIT