separate declarations in libasm.h file and add list_push_front and list_size
This commit is contained in:
19
srcs/bonus/ft_list_size.s
Normal file
19
srcs/bonus/ft_list_size.s
Normal 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
|
Reference in New Issue
Block a user