ZIP indir
0
main
1 dal
git@carbon4code.com:ahmet/libasm.git
Ahmet Kerem Final
4 commit
libasm ft_read.s
ft_read.s 271 B
global ft_read
    extern __errno_location

    section .text

ft_read:
    mov rax, 0
    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