From e0ba885132c098cbf3003c6088570ed54f161c9a Mon Sep 17 00:00:00 2001 From: "matthias@rpi" Date: Thu, 9 Nov 2023 12:09:36 +0100 Subject: [PATCH] change labels --- system/buffer.s65 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/buffer.s65 b/system/buffer.s65 index d34f8cc..599dc30 100644 --- a/system/buffer.s65 +++ b/system/buffer.s65 @@ -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