1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-21 09:17:52 +00:00

Further optimizations in common/conio.

This commit is contained in:
IrgendwerA8
2018-05-22 15:59:05 +02:00
parent d7da827be8
commit ba2c6d9008
5 changed files with 81 additions and 88 deletions
+6 -6
View File
@@ -2,26 +2,26 @@
; Ullrich von Bassewitz, 31.05.1998
;
; Note: strspn & strcspn call internally this function and rely on
; the usage of only ptr1 here! Keep in mind when appling changes
; the usage of only ptr2 here! Keep in mind when appling changes
; and check the other implementations too!
;
; int strlen (const char* s);
;
.export _strlen
.importzp ptr1
.importzp ptr2
_strlen:
sta ptr1 ; Save s
stx ptr1+1
sta ptr2 ; Save s
stx ptr2+1
ldx #0 ; YX used as counter
ldy #0
L1: lda (ptr1),y
L1: lda (ptr2),y
beq L9
iny
bne L1
inc ptr1+1
inc ptr2+1
inx
bne L1