Initial commit : Added ft_strlen
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.o
|
||||||
|
*.c
|
||||||
|
*.out
|
||||||
11
ft_strlen.s
Normal file
11
ft_strlen.s
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
global _strlen
|
||||||
|
|
||||||
|
_strlen:
|
||||||
|
xor rax, rax
|
||||||
|
.cmp_char:
|
||||||
|
cmp byte [rdi + rax], 0
|
||||||
|
je .end
|
||||||
|
inc rax
|
||||||
|
jmp .cmp_char
|
||||||
|
.end:
|
||||||
|
ret
|
||||||
Reference in New Issue
Block a user