Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; *** scan for y/n ***
- ; allocate memory
- sub esp, 8
- ; pointer for scanned value
- mov dword [esp+4], _val ; *decl* _val db ?
- ; type of value (integer/string)
- mov dword [esp], _type ; *decl* _type db "%s", 0
- ; call scan
- call [scanf]
- ; pop type
- add esp, 4
- ; print scanned value (since we popped type, now our scanned value is left at the top of the stack)
- call [printf]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement