fork download
  1. section .data
  2. msg db "Hello World", 10 ; Define the message with a newline character
  3. len equ $ - msg ; Calculate the length of the message
  4.  
  5. section .text
  6. global _start
  7.  
  8. _start:
  9. ; sys_write (write to stdout)
  10. mov rax, 1 ; System call number for sys_write
  11. mov rdi, 1 ; File descriptor (1 = stdout)
  12. mov rsi, msg ; Pointer to the message
  13. mov rdx, len ; Length of the message
  14. syscall ; Invoke the system call
  15.  
  16. ; sys_exit (exit the program)
  17. mov rax, 60 ; System call number for sys_exit
  18. mov rdi, 0 ; Exit code (0 = success)
  19. syscall ; Invoke the system call
  20.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Hello World