Created
November 20, 2013 02:51
-
-
Save djg/7556865 to your computer and use it in GitHub Desktop.
Current byte count == 24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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