libasm/src/ft_read.s
2026-06-22 14:30:12 +02:00

22 lines
218 B
ArmAsm

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