From 340f43103a0fa81589c1ff1b82604721c60d547b Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Mon, 14 Mar 2022 22:19:19 -0500 Subject: [PATCH] Fix bug where A was overwritten in _uart_txb_block If you wanted to transmit a value and then check what it was, you can do that now. --- sw/uart.s | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw/uart.s b/sw/uart.s index dd23778..c852f7e 100644 --- a/sw/uart.s +++ b/sw/uart.s @@ -17,10 +17,12 @@ _uart_txb: rts _uart_txb_block: + pha sta UART_TXB ; Write value @1: lda UART_STATUS ; Wait for status[0] to be 0 bit #$01 bne @1 + pla rts _uart_rxb: