Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. extern printf
  2. extern fflush
  3. extern scanf
  4.  
  5. section .data
  6. fmt db "%d", 0
  7. fmtprint db "%d",10,0
  8.  
  9. section .bss
  10. input resd 1
  11.  
  12. section .text
  13. global main
  14.  
  15. main:
  16. push input
  17. push fmt
  18. call scanf
  19. add esp, 8
  20.  
  21. mov ecx,[input]
  22. mov eax,1
  23.  
  24. loop1:
  25. mov ebx,2
  26. mul ebx
  27. loop loop1
  28.  
  29.  
  30. push eax
  31. push fmtprint
  32. call printf
  33. add esp,8
  34.  
  35.  
  36. exit:
  37. push 0
  38. call fflush
  39. mov eax, 1
  40. mov ebx, 0
  41. int 0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement