-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_list_size_bonus.s
32 lines (27 loc) · 1.09 KB
/
ft_list_size_bonus.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
# **************************************************************************** #
# #
# ::: :::::::: #
# ft_list_size_bonus.s :+: :+: :+: #
# +:+ +:+ +:+ #
# By: masboula <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/25 14:51:03 by masboula #+# #+# #
# Updated: 2021/03/25 14:58:43 by masboula ### ########.fr #
# #
# **************************************************************************** #
bits 64
section .text
global ft_list_size
ft_list_size :
push rcx
mov rcx, 0
_while :
cmp rdi, 0
je _return
mov rdi, [rdi + 8]
inc rcx
jmp _while
_return :
mov rax, rcx
pop rcx
ret