feat(src/strlen): adding the ft_strlen function

- The strlen function now working
This commit is contained in:
Raphael 2025-12-06 19:55:18 +01:00
parent c62f86e057
commit e5e343ff58
No known key found for this signature in database

19
src/ft_strlen.s Normal file
View file

@ -0,0 +1,19 @@
segment .note.GNU-stack
section .text
global ft_strlen
ft_strlen:
mov rax, 0
cmp rdi, 0
je .exit
jmp .loop
.loop:
cmp BYTE [rdi + rax], 0
je .exit
inc rax
jmp .loop
.exit:
ret