w1coding.comAll tutorials

Assembly Environment Setup

Assembly lessons
  1. Environment Setup
  2. Introduction
  3. Syntax
  4. Datamovement
  5. Operators
  6. Control
  7. Loops
  8. Interupts
  9. Functions
  10. Memory
  11. System
  12. Debugging
  13. Macros
  14. Execution
  15. Floating
  16. Interupts
  17. Optimization
  18. Linking
  19. Inline
  20. Registers
  21. Bootloader
  22. Macros
  23. Stack
  24. Call
  25. Technique
  26. Responsive

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

  1. On Windows, follow the official WSL installation guide and open your Ubuntu terminal. Linux users can use their existing terminal.
  2. Confirm uname -m reports x86_64. This example is not an ARM or native Windows executable.
  3. On Ubuntu install tools with sudo apt update and sudo apt install nasm binutils. Check nasm -v and ld --version.
  4. 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
    syscall

Run 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.