Ahmet Kerem Final
libasm ft_write.s
ft_write.s 289 B
global ft_write
extern __errno_location
section .text
ft_write:
mov rax, 1
syscall
cmp rax, 0
jl .error
ret
.error:
neg rax
push rax
call __errno_location wrt ..plt
pop rcx
mov DWORD [rax], ecx
mov rax, -1
ret