separate declarations in libasm.h file and add list_push_front and list_size

This commit is contained in:
2025-04-03 04:55:28 +02:00
parent 394b016f2f
commit 34b139c60b
5 changed files with 126 additions and 10 deletions

19
srcs/bonus/ft_list_size.s Normal file
View File

@ -0,0 +1,19 @@
global ft_list_size
section .text
ft_list_size:
xor rax, rax
count_start:
test rdi, rdi
je end
mov rdi, [rdi + 8]
lea rax, [rax + 1]
jmp count_start
end:
ret