DanDelatt

Hello World Assembly

Mar 15th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. global _main ;declare main
  2. extern _printf ;declare printf
  3.  
  4. section .text ;code section
  5. _main: ;main function
  6. push message ;push message to stack
  7. call _printf ;call printf from C
  8. add esp, 4 ;pull stack pointer back 4 bytes
  9. ret ;exit
  10. message:
  11. db 'Hello, World', 10, 0 ;message variable
Advertisement
Add Comment
Please, Sign In to add comment