
.macro EXIT_
        mov   $0, %edi
        call  exit
.endm

.macro GETCHAR
        push   %rdi
        push   %rsi
        push   %rbp
        mov    %rsp, %rbp
        call getchar
        pop    %rbp
        pop    %rsi
        pop    %rdi
        xor    %r10, %r10 # zero register might have been clobbered
.endm

.macro PUTCHAR
        push   %rdi
        push   %rsi
        push   %rbp
        mov    (%rdi), %edi
        call   putchar
        mov    $0, %edi
        call   fflush
        pop    %rbp
        pop    %rsi
        pop    %rdi
        xor    %r10, %r10 # zero register might have been clobbered
.endm

