Files
libasm/ft_write.s

17 lines
205 B
ArmAsm

global _write
extern __errno_location
_write:
mov eax, 0x1
syscall
test rax, rax
js .error
ret
.error:
mov ebx, eax
call __errno_location wrt ..plt
neg ebx
mov dword [rax], ebx
mov rax, -1
ret