]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/strchr.s
Added further optimizations and unit tests.
[cc65] / libsrc / common / strchr.s
index 0bd55d0e148321d5f1241823b7268589e472b2b2..48bb8822b2596426a355426c4eebc4663e4ca51e 100644 (file)
@@ -14,8 +14,12 @@ _strchr:
         jsr popax       ; get s
         tay             ; low byte of pointer to y
         stx ptr1+1
+.if (.cpu .bitand ::CPU_ISET_65SC02)
+        stz ptr1
+.else
         lda #0
-        sta ptr1        ; ptr access page wise
+        sta ptr1        ; access from page start, y contains low byte
+.endif        
 
 Loop:   lda (ptr1),y    ; Get next char
         beq EOS         ; Jump on end of string