Add uart2 test program

Reads input from uart and then writes it back out again immediately.
This commit is contained in:
Byron Lathi
2023-01-12 14:05:13 -06:00
parent d5bccd46e3
commit 519cd19739
7 changed files with 53 additions and 23 deletions

View File

@@ -0,0 +1,23 @@
.code
UART_TX = $efe6
UART_RX = UART_TX
UART_STATUS = $efe7
UART_CONTROL = UART_STATUS
main:
ldx #$00
loop:
lda UART_STATUS ; see if bit 0 is set
bit #$01
beq loop
lda UART_RX ; read rx buffer if so
sta UART_TX ; transmit it back again
bra loop
.segment "VECTORS"
.addr main
.addr main
.addr main