change labels

This commit is contained in:
matthias@rpi 2023-11-09 12:09:36 +01:00
parent 454812a647
commit e0ba885132

View File

@ -58,7 +58,6 @@ RB_LENGTH = RBUF_MEM_END - RBUF_MEM_START - 2
cpx RB_WRITE
beq @rb_read_rts ; if buffer empty
lda RB_START,x
Inc_buf_ptr RB_READ
inx ; increment RB_READ pointer, not using macro bec. of unknown Pz
cpx #RB_LENGTH
beq @read_wrap
@ -89,16 +88,17 @@ RB_LENGTH = RBUF_MEM_END - RBUF_MEM_START - 2
stx RB_WRITE
@check_buf_full: ; increment read if buffer is full
cpx RB_READ
beq read_inc
beq @read_inc
rts
@write_wrap: ; ptr == RB_LENGTH -> ptr = 0
stz RB_WRITE
ldx #0
bra @check_buf_full
@read_inc:
ldx RB_READ
inx
cpx #RB_LENGTH
beq read_wrap
beq @read_wrap
stx RB_READ
rts
@read_wrap: ; ptr == RB_LENGTH -> ptr = 0