aboutsummaryrefslogtreecommitdiff
path: root/ft_strlen.s
diff options
context:
space:
mode:
Diffstat (limited to 'ft_strlen.s')
-rw-r--r--ft_strlen.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/ft_strlen.s b/ft_strlen.s
index 82c0e34..c548d73 100644
--- a/ft_strlen.s
+++ b/ft_strlen.s
@@ -1,8 +1,8 @@
-.globl _ft_strlen
+.globl _ft_strlen
_ft_strlen:
- mov rbx, rdi # first argument in rbx
- xor rax, rax # rax = 0
+ mov rbx, rdi # str argument
+ xor rax, rax
FT_STRLEN_LOOP:
cmp byte ptr [rbx + rax], 0 # compare rbx[rax] and '\0'
je FT_STRLEN_RET