NASM Coding: Basics

; A program printing "Hello world!\n" to the screen
; 10 is the ASCII code of a newline character

section .data
    msg db "Hello world!", 10

section .text
    global _start

_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, msg
    mov rdx, 13
    syscall
    
    mov rax, 60
    mov rdi, 0
    syscall