Skip to content

Instantly share code, notes, and snippets.

@djg
Created November 20, 2013 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djg/7556852 to your computer and use it in GitHub Desktop.
Save djg/7556852 to your computer and use it in GitHub Desktop.
; ryg's version
getchar: ;read a byte from stdin
xor eax, eax
push eax
mov ecx, esp
push eax
push ecx
push eax
push eax
mov al, SYS_READ
int 80h
test eax, eax
je exit
add esp, 16
pop eax
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment