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