.else
lda #0
sta ptr2 ; access from page start, y contains low byte
-.endif
+.endif
stx ptr2+1
findEndOfDest:
bne findEndOfDest
endOfDestFound:
- sty ptr2 ; advance pointer to last y position
+ sty ptr2 ; advance pointer to last y position
ldy #0 ; reset new y-offset
copyByte:
.else
lda #0
sta ptr1 ; access from page start, y contains low byte
-.endif
+.endif
Loop: lda (ptr1),y ; Get next char
beq EOS ; Jump on end of string
iny
bne Loop
inc ptr1+1
- bne Loop ; Branch always
+ bne Loop ; Branch always
; End of string. Check if we're searching for the terminating zero
check: cpy tmp1 ; compare with length of test character string
beq endOfTestChars
cmp (ptr1),y ; found matching char?
- bne checkNext
+ bne checkNext
leave: txa ; restore position of finding
ldx tmp2 ; and return
inx
bne loadChar
inc tmp2
- bne loadChar ; like bra...
-
+ bne loadChar ; like bra...
L7: lda ptr3
ldx ptr3+1
rts
-
-
check: cpy tmp1 ; compare with length of test character string
beq leave
cmp (ptr1),y ; found matching char?
- bne checkNext
+ bne checkNext
foundTestChar:
inx
bne loadChar
inc tmp2
- bne loadChar ; like bra...
+ bne loadChar ; like bra...
leave: txa ; restore position of finding
ldx tmp2 ; and return
rts
-
\ No newline at end of file