Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. ; *** scan for y/n ***
  2.  
  3. ; allocate memory
  4. sub esp, 8
  5. ; pointer for scanned value
  6. mov dword [esp+4], _val ; *decl* _val db ?
  7. ; type of value (integer/string)
  8. mov dword [esp], _type ; *decl* _type db "%s", 0
  9. ; call scan
  10. call [scanf]
  11.  
  12. ; pop type
  13. add esp, 4
  14.  
  15. ; print scanned value (since we popped type, now our scanned value is left at the top of the stack)
  16. call [printf]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement