use right register for strlen

This commit is contained in:
starnakin 2024-08-28 13:53:42 +02:00
parent 391e0a21f9
commit f4f9159a88

View File

@ -2,11 +2,12 @@
global ft_strlen
ft_strlen:
mov rax, 0
mov rcx, 0
loop:
cmp BYTE [rdi + rax], 0
cmp BYTE [rdi + rcx], 0
je out
inc rax
inc rcx
jmp loop
out:
mov rax, rcx
ret