move modem q variables to the direct page, adjust CDA hexdump to show most recent 16*8 bytes.

This commit is contained in:
Kelvin Sherlock 2022-01-08 22:26:34 -05:00
parent 02c6e1271c
commit 8fa8d8d1fa
3 changed files with 37 additions and 18 deletions

View File

@ -84,6 +84,14 @@ saved_x ds 2
saved_y ds 2 saved_y ds 2
saved_decom ds 2 saved_decom ds 2
* async read/write pointers.
*
read_q_head ds 2
read_q_tail ds 2
write_q_head ds 2
write_q_tail ds 2
do *>256 do *>256
err "too big" err "too big"
fin fin

View File

@ -535,13 +535,20 @@ hexdump
php php
lda #0 lda #0
stz :offset
sep #$20 sep #$20
ldx #4*2 ldx #4*2
stx :row stx :row
ldy #0 lda DPAGE+read_q_tail
sty :offset sec
sbc #8*16
sta :offset
:one_row :one_row

View File

@ -6,7 +6,7 @@
mx %11 mx %11
cas se cas se
* use vt.equ use vt.equ
SCCBREG equ $c038 SCCBREG equ $c038
SCCAREG equ $c039 SCCAREG equ $c039
@ -35,13 +35,15 @@ init_modem ent
php php
sei sei
stz q_head stz read_q_head
stz q_tail stz read_q_tail
stz write_q_head
stz write_q_tail
* zero out the buffer [for CDA debugger] * zero out the buffer [for CDA debugger]
ldx #0 ldx #0
]loop stz buffer,x ]loop stz read_buffer,x
inx inx
bne ]loop bne ]loop
@ -144,7 +146,7 @@ read_modem_sync ent
:rts rts :rts rts
buffer equ $1e00 read_buffer equ $1e00
modem_vector ent modem_vector ent
jml modem_int jml modem_int
@ -171,9 +173,9 @@ modem_int
:read :read
lda SCCBDATA lda SCCBDATA
ldx q_tail ldx DPAGE+read_q_tail
sta buffer,x sta read_buffer,x
inc q_tail inc DPAGE+read_q_tail
* more? * more?
stz SCCBREG stz SCCBREG
@ -207,12 +209,12 @@ read_modem_async ent
php php
sei sei
ldx q_head ldx read_q_head
cpx q_tail cpx read_q_tail
beq :nope beq :nope
lda buffer,x lda read_buffer,x
inc q_head inc read_q_head
plp plp
sec sec
rts rts
@ -226,13 +228,15 @@ reset_modem_buffer ent
mx %11 mx %11
php php
sei sei
stz q_head
stz q_tail stz read_q_head
stz read_q_tail
stz write_q_head
stz write_q_tail
plp plp
rts rts
q_head ds 2
q_tail ds 2
*buffer ds 256 *buffer ds 256
sav vt100.modem.L sav vt100.modem.L