aboutsummaryrefslogtreecommitdiff
path: root/ft_list_size.s
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-11-22 21:20:22 +0100
committerCharles <sircharlesaze@gmail.com>2019-11-22 21:20:22 +0100
commit8e3a5ac569a3ccc1101b58fe8ef673f02b4961fb (patch)
tree13b1910aee2a8c9a73af3ad2042cd78e4a0a9e90 /ft_list_size.s
parentef74d8b236ba8c62ddb190ce64ea3d8b593ad1eb (diff)
downloadlibasm-8e3a5ac569a3ccc1101b58fe8ef673f02b4961fb.tar.gz
libasm-8e3a5ac569a3ccc1101b58fe8ef673f02b4961fb.tar.bz2
libasm-8e3a5ac569a3ccc1101b58fe8ef673f02b4961fb.zip
ft_atoi_base without the actual base, ft_list_push_front, ft_list_size
Diffstat (limited to 'ft_list_size.s')
-rw-r--r--ft_list_size.s25
1 files changed, 25 insertions, 0 deletions
diff --git a/ft_list_size.s b/ft_list_size.s
new file mode 100644
index 0000000..c37de61
--- /dev/null
+++ b/ft_list_size.s
@@ -0,0 +1,25 @@
+# **************************************************************************** #
+# #
+# ::: :::::::: #
+# ft_list_size.s :+: :+: :+: #
+# +:+ +:+ +:+ #
+# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
+# +#+#+#+#+#+ +#+ #
+# Created: 2019/11/22 20:59:52 by cacharle #+# #+# #
+# Updated: 2019/11/22 21:17:54 by cacharle ### ########.fr #
+# #
+# **************************************************************************** #
+
+.globl _ft_list_size
+
+# int ft_list_size(t_list *begin_list);
+_ft_list_size:
+ xor eax, eax
+ FT_LIST_SIZE_LOOP:
+ cmp rdi, 0
+ je FT_LIST_SIZE_END
+ inc eax
+ mov rdi, [rdi + 8]
+ jmp FT_LIST_SIZE_LOOP
+ FT_LIST_SIZE_END
+ ret