head/tail swapped.

This commit is contained in:
Kelvin Sherlock 2022-01-15 16:31:38 -05:00
parent ea6ee76a9d
commit 900dccb3d1

View File

@ -169,6 +169,7 @@ modem_int
phk phk
plb plb
lda SCCBREG ; sync
stz SCCBREG stz SCCBREG
lda SCCBREG lda SCCBREG
and #%0000_0001 ; rx ready. and #%0000_0001 ; rx ready.
@ -176,9 +177,9 @@ modem_int
:read :read
lda SCCBDATA lda SCCBDATA
ldx DPAGE+read_q_tail ldx DPAGE+read_q_head
sta read_buffer,x sta read_buffer,x
inc DPAGE+read_q_tail inc DPAGE+read_q_head
* more? * more?
stz SCCBREG stz SCCBREG
@ -329,12 +330,12 @@ read_modem_async ent
php php
sei sei
ldx read_q_head ldx read_q_tail
cpx read_q_tail cpx read_q_head
beq :nope beq :nope
lda read_buffer,x lda read_buffer,x
inc read_q_head inc read_q_tail
plp plp
sec sec
rts rts