-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_list_size_bonus.s
32 lines (27 loc) · 1.06 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: ikole <ikole@student.codam.nl> +#+ #
# +#+ #
# Created: 2020/03/09 12:56:49 by ikole #+# #+# #
# Updated: 2020/03/09 22:10:31 by ikole ######## odam.nl #
# #
# **************************************************************************** #
global _ft_list_size
section .text
_ft_list_size:
mov rax, 0
cmp rdi, 0
je empty
mov r8, rdi
loop:
inc rax
mov r8, [r8 + 8]
cmp r8, 0
jne loop
ret
empty:
mov rax, 0
ret