forked from amberisvibin/chibi-pc09
chore: using aliases from hardware.inc and optimized divisor setup
This commit is contained in:
@@ -13,18 +13,19 @@
|
|||||||
ORG ROM_BASE
|
ORG ROM_BASE
|
||||||
|
|
||||||
RESET
|
RESET
|
||||||
lda #%11000001 ; 8n1 serial, enable DLAB
|
; 8n1 Serial Enable DLAB
|
||||||
|
lda #(UARTF_LCR_WLS | UARTF_LCR_DLAB)
|
||||||
sta UART_LCR
|
sta UART_LCR
|
||||||
|
|
||||||
lda #$00 ; Set divisor to 12 (9600 baud)
|
; REVIEW: Potential endianness hiccough here
|
||||||
sta UART_DLL
|
ldd #$0C00 ; Set divisor to 12 (9600 baud)
|
||||||
lda #$0C
|
|
||||||
sta UART_DLM
|
sta UART_DLM
|
||||||
|
stb UART_DLL
|
||||||
|
|
||||||
lda #%11000000 ; 8n1 serial, disable DLAB
|
lda #(UARTF_LCR_WLS) ; 8n1 serial, disable DLAB
|
||||||
sta UART_LCR
|
sta UART_LCR
|
||||||
|
|
||||||
lda #%01000000 ; Enable RTS
|
lda #(UARTF_MCR_RTS) ; Enable Request-to-Send
|
||||||
sta UART_MCR
|
sta UART_MCR
|
||||||
|
|
||||||
lda 'H ; send 'H'
|
lda 'H ; send 'H'
|
||||||
|
Reference in New Issue
Block a user