First throw at UART.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
TARGETS=stacktest runram timer timer_irq multiplier divider
|
||||
TARGETS=stacktest runram timer timer_irq multiplier divider uart
|
||||
SRC=$(wildcard *.s)
|
||||
DIR=../ip/bram
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
$(TARGETS): $(SRC)
|
||||
cl65 --cpu 65c02 -C link.ld -l $@.list $@.s
|
||||
cl65 --cpu 65c02 -t none -C link.ld -l $@.list $@.s
|
||||
xxd -ps $@ | fold -w 2 > $@.hex
|
||||
|
||||
install:
|
||||
|
||||
28
hw/efinix_fpga/test_programs/uart.s
Normal file
28
hw/efinix_fpga/test_programs/uart.s
Normal file
@@ -0,0 +1,28 @@
|
||||
.code
|
||||
|
||||
UART_TX = $efe6
|
||||
UART_RX = UART_TX
|
||||
UART_STATUS = $efe7
|
||||
UART_CONTROL = UART_STATUS
|
||||
|
||||
main:
|
||||
ldx #$00
|
||||
loop:
|
||||
lda string,x
|
||||
sta UART_TX
|
||||
|
||||
end:
|
||||
wai
|
||||
bra end
|
||||
|
||||
|
||||
|
||||
string:
|
||||
.asciiz "Hello, world!"
|
||||
|
||||
|
||||
.segment "VECTORS"
|
||||
|
||||
.addr main
|
||||
.addr main
|
||||
.addr main
|
||||
Reference in New Issue
Block a user