.macro EXIT_
        movl $0, %edi # return code of 0
        call exit
.endm

.macro GETCHAR
        push %rdi
        push %rsi
        call getchar
        pop  %rsi
        pop  %rdi
        # returns character in eax
.endm

.macro PUTCHAR
        push %rdi
        push %rsi
        mov  (%rdi), %edi
        call putchar
        mov  $0, %edi
        call fflush
        pop  %rsi
        pop  %rdi
.endm

.section ".note.openbsd.ident", "a"
        .align 2
        .long 8
        .long 4
        .long 1
        .ascii "OpenBSD\0"
