fork download
  1. section .data
  2. hello: db 'Hello, World!',10 ; 'Hello, World!' plus a linefeed character
  3. helloLen: equ $-hello ; Length of the 'Hello world!' string
  4.  
  5. section .text
  6. global _start
  7.  
  8. _start:
  9. mov eax,4 ; The system call for write (sys_write)
  10. mov ebx,1 ; File descriptor 1 - standard output
  11. mov ecx,hello ; Put the offset of hello in ecx
  12. mov edx,helloLen ; helloLen is a constant, so we don't need to say
  13. ; mov edx,[helloLen] to get it's actual value
  14. int 80h ; Call the kernel
  15. mov eax,1 ; The system call for exit (sys_exit)
  16. mov ebx,0 ; Exit with return "code" of 0 (no error)
  17. int 80h;
Success #stdin #stdout 0s 5528KB
stdin
Standard input is empty
stdout
Hello, World!