-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strlen.s
34 lines (28 loc) · 1.14 KB
/
ft_strlen.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; **************************************************************************** ;
; ;
; ::: :::::::: ;
; ft_strlen.s :+: :+: :+: ;
; +:+ +:+ +:+ ;
; By: vtarasiu <[email protected]> +#+ +:+ +#+ ;
; +#+#+#+#+#+ +#+ ;
; Created: 2019/07/21 16:56:18 by vtarasiu #+# #+# ;
; Updated: 2019/07/21 16:56:18 by vtarasiu ### ########.fr ;
; ;
; **************************************************************************** ;
global ft_strlen
global _ft_strlen
ft_strlen:
_ft_strlen:
push rbp
mov rbp, rsp
push rdi
mov rax, 0
mov rcx, 0
not rcx
repne scasb
not rcx
dec rcx
mov rax, rcx
pop rdi
pop rbp
ret