This first assembly check targets Linux on an x86-64 processor using NASM syntax. Assembly instructions and system-call conventions depend on the processor and operating system.
What you need
- An x86-64 Linux environment; Windows users can use Ubuntu in WSL
- NASM assembler and GNU linker
- A terminal and text editor
Set up your environment
- On Windows, follow the official WSL installation guide and open your Ubuntu terminal. Linux users can use their existing terminal.
- Confirm
uname -mreportsx86_64. This example is not an ARM or native Windows executable. - On Ubuntu install tools with
sudo apt updateandsudo apt install nasm binutils. Checknasm -vandld --version. - Save exit.asm in your Linux home folder. Assemble it, link it and run it in the same Linux environment.
Your first check
Save as exit.asm
global _start
section .text
_start:
mov rax, 60
xor rdi, rdi
syscallRun or verify
nasm -f elf64 exit.asm -o exit.o
ld exit.o -o exit
./exit
echo $?Expected result: The program exits without printing. The final command prints 0, its successful exit status.
Common setup problems
- Run these commands inside Linux/WSL, not ordinary Windows Command Prompt.
- If your processor is ARM-based, use an ARM-focused assembly guide and matching tools instead of this x86-64 example.
Official documentation
Guide reviewed 17 November 2026. Check the linked vendor documentation for current supported versions and operating systems.