section .data fmt db "Programa: %s", 10, 0 global main ; símbolo chamado por _start de crt0.o extern printf ; (opcional) usar funções da libc section .text main: ; argc → rdi ; argv → rsi ; envp → rdx (não obrigatório) ; Exemplo: imprimir argv[0] mov rdi, fmt mov rsi, [rsi] ; argv[0] xor rax, rax ; terminação de argumentos (printf é variádica) call printf mov eax, 0 ; retorno de 'main' = (int)0 ret