diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-11-22 02:35:31 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-11-22 02:35:31 +0100 |
| commit | b22183ba021d9ab3418d8f47545708597247e583 (patch) | |
| tree | 079af4d3d360a72908782abead1f4b272155bd18 /ft_strlen.s | |
| parent | 0931febe3e178b4e484259c9cdc79ef452208ae7 (diff) | |
| download | libasm-b22183ba021d9ab3418d8f47545708597247e583.tar.gz libasm-b22183ba021d9ab3418d8f47545708597247e583.tar.bz2 libasm-b22183ba021d9ab3418d8f47545708597247e583.zip | |
strcpy, strcmp, write, read
Diffstat (limited to 'ft_strlen.s')
| -rw-r--r-- | ft_strlen.s | 6 |
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 |
