Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. printInt: // to use it push int on stack and call
  2. push ebx
  3. push ecx
  4. push edx
  5.  
  6. // get argument
  7. mov ebx, eax
  8. mov eax, [esp + 16]
  9. push eax
  10.  
  11. // get format
  12. mov eax, offset intFormat
  13. push eax
  14. call printf
  15.  
  16. add esp, 8
  17.  
  18. mov eax, ebx
  19. pop edx
  20. pop ecx
  21. pop ebx
  22. ret
  23. intFormat: .string "%d\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement