Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. section .text
  2. global main
  3.  
  4. main:
  5. call _open
  6. call _read
  7. call _write
  8. mov eax, 0
  9. ret
  10.  
  11. _read:
  12. mov eax, 3
  13. mov ebx, esi
  14. mov ecx, str
  15. mov edx, 999
  16. int 0x80
  17. _open:
  18. mov eax, 5
  19. mov ebx, file_write:
  20. mov eax, 4
  21. mov ebx, 1
  22. mov ecx, str
  23. mov edx, 999
  24. int 0x80
  25. call _n
  26.  
  27. _n:
  28. mov eax, 4
  29. mov ebx, 1
  30. mov ecx, 0xa
  31. mov edx, 1
  32. int 0x80
  33.  
  34. _exit:
  35. mov eax, 1
  36. mov ebx, 0
  37. int 0x80
  38.  
  39.  
  40. section .data
  41. file: db './ex_1.S'
  42.  
  43. section .bss
  44. str: resb 999
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement