Advertisement
kokokozhina

sum.asm

Feb 24th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .data
  2. fmtin: db "%d%d", 0
  3. fmtout: db "%d", 10, 0
  4. section .bss
  5. a: resd 1
  6. b: resd 1
  7. section .text
  8. extern _printf
  9. extern _scanf
  10. global _main
  11. _main:
  12. push b
  13. push a
  14. push fmtin
  15. call _scanf
  16. add esp, 12
  17. mov eax, [a]
  18. add [b], eax
  19. push dword [b]
  20. push fmtout
  21. call _printf
  22. add esp, 8
  23. xor eax, eax
  24. xor ecx, ecx
  25. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement