remove bonus
This commit is contained in:
@ -1,27 +0,0 @@
|
||||
extern malloc
|
||||
|
||||
section .text
|
||||
global ft_list_push_front
|
||||
ft_list_push_front:
|
||||
|
||||
push rdi
|
||||
push rsi
|
||||
|
||||
mov rdi, 16
|
||||
|
||||
call malloc wrt ..plt
|
||||
|
||||
cmp rax, 0
|
||||
je out
|
||||
|
||||
pop rsi
|
||||
pop rdi
|
||||
|
||||
mov rdx, [rdi]
|
||||
mov [rax + 0], rsi ; .data = arg#1
|
||||
mov [rax + 8], rdx ; .next = *arg#0
|
||||
|
||||
mov [rdi], rax
|
||||
|
||||
out:
|
||||
ret
|
@ -1,19 +0,0 @@
|
||||
section .text
|
||||
global ft_list_size
|
||||
|
||||
ft_list_size:
|
||||
xor rcx, rcx
|
||||
|
||||
loop:
|
||||
cmp QWORD [rdi + 8], 0
|
||||
je out
|
||||
|
||||
mov rdi, [rdi + 8]
|
||||
|
||||
inc rcx
|
||||
|
||||
jmp loop
|
||||
|
||||
out:
|
||||
mov rax, rcx
|
||||
ret
|
Reference in New Issue
Block a user