ZIP indir
0
main
1 dal
git@carbon4code.com:ahmet/libasm.git
Ahmet Kerem Final
4 commit
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