Advertisement
Metalhead33

1.asm

May 24th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SECTION .data   ;initialized data
  2. ; db = define byte (8-bit), dw = define word (16-bit), dd = define double-word (32-bit), equ = constant
  3.  
  4. msg: db "Hello world!",10,0 ; this is our message
  5. ;printf
  6.  
  7. SECTION .bss ;uninitialized data
  8. ; resb resw resd = db dw dd
  9.  
  10. SECTION .text   ;asm code
  11. extern printf
  12. global main
  13. main:
  14.     push ebp
  15.     mov ebp, esp
  16.  
  17.     push msg
  18.     call printf
  19.    
  20.     mov esp, ebp
  21.     pop ebp
  22.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement