Files
libasm/ft_strlen.s
2024-05-23 14:59:13 +02:00

12 lines
238 B
ArmAsm

global ft_strlen
ft_strlen:
xor rax, rax ; rax = 0;
.cmp_char:
cmp byte [rdi + rax], 0 ; if (str[rax] == 0)
je .end ; goto end
inc rax ; rax++;
jmp .cmp_char ; repeat
.end:
ret ; return it