
.macro EXIT_
        xor  %eax, %eax
        push %eax # return code 0
        call _exit
.endm

.macro GETCHAR
        call _getchar
        cmp  $-1, %eax
        jne  L0
        ret
L0:
        and  $255, %eax # mask out char value
.endm

.macro PUTCHAR
        mov  (%edi), %eax
        push %eax
        call _putchar
        add  $4, %esp
        xor  %eax, %eax 
        push %eax
        call _fflush
        add  $4, %esp
.endm
