global ft_read extern __errno_location section .text ft_read: mov eax, 0 syscall test rax, rax js .done neg rax mov edi, eax call __errno_location wrt ..plt mov dword [rax], edi mov eax, -1 .done: ret