fork download
  1. %macro print_ 1
  2. mov eax, 4
  3. mov ebx, 1
  4. mov ecx, %1
  5.  
  6. call print
  7. %endmacro
  8.  
  9. %macro exit_ 1
  10. mov eax, 1
  11. mov ebx, %1
  12. int 80h
  13. %endmacro
  14.  
  15. SECTION .data
  16. hello:
  17. db "Hello World!",0x0A,0
  18.  
  19. SECTION .text
  20. global _start
  21.  
  22. _start:
  23. print_ hello
  24. exit_ 0
  25.  
  26. ;print code called by print_ macro
  27. print:
  28. push ecx
  29. count:
  30. inc ecx
  31. cmp byte [ecx], 0
  32. jne count
  33.  
  34. mov edx, ecx
  35. pop ecx
  36. sub edx, ecx
  37.  
  38. int 80h
  39. ret
  40.  
Success #stdin #stdout 0s 144KB
stdin
Standard input is empty
stdout
Hello World!