Fix uncatalogued name clash with libsrc/runtime/leave.s

Even though these labels are not exported, they can show up in linker
maps and thus break o65 modules.
This commit is contained in:
Daniel Gimpelevich
2025-09-29 17:12:34 -07:00
parent 93c1b659ee
commit 6be0731247
3 changed files with 20 additions and 20 deletions

View File

@@ -81,13 +81,13 @@ L1: .repeat 2 ; Unroll this a bit to make it faster
; Set the remaining bytes if any ; Set the remaining bytes if any
L2: ldy ptr3 ; Get the low byte of n L2: ldy ptr3 ; Get the low byte of n
beq leave ; something to set? No -> leave beq @leave ; something to set? No -> leave
L3: dey @L3: dey
sta (ptr1),y ; set bytes in low sta (ptr1),y ; set bytes in low
sta (ptr2),y ; and high section sta (ptr2),y ; and high section
bne L3 ; flags still up to date from dey! bne @L3 ; flags still up to date from dey!
leave: @leave:
jmp popax ; Pop ptr and return as result jmp popax ; Pop ptr and return as result

View File

@@ -27,21 +27,21 @@ _strcspn:
loadChar: loadChar:
ldy #0 ldy #0
lda (ptr1),y ; get next char from s1 lda (ptr1),y ; get next char from s1
beq leave ; handly byte of s1 beq @leave ; handly byte of s1
advance: @advance:
inc ptr1 ; advance string position to test inc ptr1 ; advance string position to test
bne check bne @check
inc ptr1+1 inc ptr1+1
dey ; correct next iny (faster/shorter than bne...) dey ; correct next iny (faster/shorter than bne...)
checkNext: @checkNext:
iny iny
check: cpy tmp1 ; compare with length of test character string @check: cpy tmp1 ; compare with length of test character string
beq endOfTestChars beq endOfTestChars
cmp (ptr4),y ; found matching char? cmp (ptr4),y ; found matching char?
bne checkNext bne @checkNext
leave: txa ; restore position of finding @leave: txa ; restore position of finding
ldx tmp2 ; and return ldx tmp2 ; and return
rts rts

View File

@@ -27,26 +27,26 @@ _strspn:
loadChar: loadChar:
ldy #0 ldy #0
lda (ptr1),y ; get next char from s1 lda (ptr1),y ; get next char from s1
beq leave ; handly byte of s1 beq @leave ; handly byte of s1
advance: @advance:
inc ptr1 ; advance string position to test inc ptr1 ; advance string position to test
bne check bne @check
inc ptr1+1 inc ptr1+1
dey ; correct next iny (faster/shorter than bne...) dey ; correct next iny (faster/shorter than bne...)
checkNext: @checkNext:
iny iny
check: cpy tmp1 ; compare with length of test character string @check: cpy tmp1 ; compare with length of test character string
beq leave beq @leave
cmp (ptr4),y ; found matching char? cmp (ptr4),y ; found matching char?
bne checkNext bne @checkNext
foundTestChar: @foundTestChar:
inx inx
bne loadChar bne loadChar
inc tmp2 inc tmp2
bne loadChar ; like bra... bne loadChar ; like bra...
leave: txa ; restore position of finding @leave: txa ; restore position of finding
ldx tmp2 ; and return ldx tmp2 ; and return
rts rts