Files
super6502/hw/efinix_fpga/test_programs/uart.s
Byron Lathi 519cd19739 Add uart2 test program
Reads input from uart and then writes it back out again immediately.
2023-01-12 14:05:13 -06:00

35 lines
351 B
ArmAsm

.code
UART_TX = $efe6
UART_RX = UART_TX
UART_STATUS = $efe7
UART_CONTROL = UART_STATUS
main:
ldx #$00
loop:
lda string,x
beq end
sta UART_TX
inx
wait:
lda UART_STATUS
bit #$02
beq loop
bra wait
end:
wai
bra end
string:
.asciiz "Hello, world!"
.segment "VECTORS"
.addr main
.addr main
.addr main