use right register for strlen
This commit is contained in:
parent
391e0a21f9
commit
f4f9159a88
@ -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
|
Loading…
Reference in New Issue
Block a user