; ; Program 1, Hello World ; This program prints Hello World! ; section .data message: db "Hello World!", 0x0A message_length: equ $ - message SYSCALL_WRITE: equ 1 STDOUT: equ 1 SYSCALL_EXIT: equ 60 SUCCESS: equ 0 section .text global _start _start: ; cout << message << endl; mov rsi, message mov rdx, message_length ; set the output file to be stdout ; mov rdi, 1 mov rdi, STDOUT ; set the system call to be write mov rax, SYSCALL_WRITE ; mov rax, 1 syscall ; return 0; ; set the system call to be exit ; mov rax, 60 mov rax, SYSCALL_EXIT ; set the success code to be 0 ; mov rdx, 0 mov rdx, SUCCESS syscall