use right register for strlen
This commit is contained in:
parent
391e0a21f9
commit
f4f9159a88
@ -2,11 +2,12 @@
|
|||||||
global ft_strlen
|
global ft_strlen
|
||||||
|
|
||||||
ft_strlen:
|
ft_strlen:
|
||||||
mov rax, 0
|
mov rcx, 0
|
||||||
loop:
|
loop:
|
||||||
cmp BYTE [rdi + rax], 0
|
cmp BYTE [rdi + rcx], 0
|
||||||
je out
|
je out
|
||||||
inc rax
|
inc rcx
|
||||||
jmp loop
|
jmp loop
|
||||||
out:
|
out:
|
||||||
|
mov rax, rcx
|
||||||
ret
|
ret
|
Loading…
Reference in New Issue
Block a user