First throw at UART.

This commit is contained in:
Byron Lathi
2023-01-12 13:34:46 -06:00
parent 7e97784992
commit ab46236816
8 changed files with 554 additions and 417 deletions

View File

@@ -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:

View 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