fix(serial): INITUART now writes LCR and RESET calls INITUART with params

This commit is contained in:
2025-09-11 15:18:40 -05:00
parent 0de0dd5cbd
commit fbb94b8707
2 changed files with 4 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ NEXT@
lds #STACK_TOP ; Set S to top of newly cleared stack lds #STACK_TOP ; Set S to top of newly cleared stack
BOOTSCR BOOTSCR
lda #13 ; 9600 baud
ldb #%11 ; 8N1
jsr INITUART ; Initialize serial console jsr INITUART ; Initialize serial console
ldx #VERMSG ; Print version information ldx #VERMSG ; Print version information
jsr POUTZSTR jsr POUTZSTR

View File

@@ -26,6 +26,8 @@ INITUART
ldd a,x ; Get divisor into D ldd a,x ; Get divisor into D
sta UART_DLM ; Write divisor MSB sta UART_DLM ; Write divisor MSB
stb UART_DLL ; Write divisor LSB stb UART_DLL ; Write divisor LSB
puls b ; Restore B
stb UART_LCR ; Write LCR
lda UARTF_FCR_FE|UARTF_FCR_RFR|UARTF_FCR_XFR ; FIFO disable and clear lda UARTF_FCR_FE|UARTF_FCR_RFR|UARTF_FCR_XFR ; FIFO disable and clear
sta UART_FCR sta UART_FCR
lda #0 lda #0