Guest User

Untitled

a guest
Jan 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. ; Defines "_start" as the starting point
  2. global _start
  3.  
  4.  
  5. section .text
  6.  
  7. ; Starting point
  8. _start:
  9.  
  10. mov eax, 0x4 ; Setting EAX to system number 4 (write)
  11. mov ebx, 0x1 ; Setting file descriptor to stdout
  12. mov ecx, message ; Setting the buffer containing what to write to the message declared below
  13. mov edx, mlen ; Setting the length of what to print ("Hello World")
  14. int 0x80 ; Issue the system call
  15.  
  16. mov eax, 0x1 ; Setting EAC to system number 1 (exit)
  17. mov ebx, 0x5 ; Returns the value 5
  18. int 0x8 ; Issue the system call
  19.  
  20.  
  21. section .data
  22.  
  23.  
  24. message: db "Hello World!"
  25. mlen equ $-message ; Way to define the length of the buffer being printed to the screen
Add Comment
Please, Sign In to add comment