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