SHARE
TWEET

Hello World Assembly

DanDelatt Mar 15th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top