Skip to content

Commit

Permalink
[libc] optimize strlen
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Nov 21, 2024
1 parent 630537d commit e1a3e1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libc/strlen.src
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ _strlen := $0000D4
else

_strlen:
pop de
pop bc
ex (sp),hl
push de
push hl
pop de
push bc
xor a,a
ld bc,0
cpir
or a,a
sbc hl,hl
scf
sbc hl,de
sbc hl,bc
ret

end if
Expand Down

0 comments on commit e1a3e1d

Please sign in to comment.