global _start ; constants SYS_WRITE equ 1 SYS_EXIT equ 60 STDOUT equ 1 SECTION .data hello db "Hello world!", 0x0a hello_len equ $ - hello SECTION .text _start: ; syscall(SYS_WRITE, STDOUT, hello, hello_len); mov rax, SYS_WRITE mov rdi, STDOUT mov rsi, hello mov rdx, hello_len syscall push rax ; syscall(SYS_EXIT, - hello_len); mov rax, SYS_EXIT pop rdi sub rdi, hello_len syscall