Skip to content

Instantly share code, notes, and snippets.

@djg
Created November 20, 2013 02:51
Show Gist options
  • Save djg/7556865 to your computer and use it in GitHub Desktop.
Save djg/7556865 to your computer and use it in GitHub Desktop.
Current byte count == 24
# getchar: # read a byte from stdin
6a 00 # push 0
89 e0 # mov eax, esp
6a 01 # push 1
50 # push eax
6a 00 # push STDIN_FILENO
6a 03 # push SYS_READ
58 # pop eax
50 # push eax
cd 80 # int 80h
85 c0 # test eax, eax
74 05 # je exit
83 c4 10 # add esp, 16
58 # pop eax
c3 # ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment