What is assembly language

Contents
What assembly is
Where it runs
Why learn it
Why NASM

What assembly is

Assembly language is the human-readable form of machine code. Each instruction moves data, does arithmetic, or changes the flow of control, and each one maps almost one-to-one to a CPU instruction.

A program is a list of these instructions plus data, assembled by an assembler into an object file, then linked into an executable. There is no runtime, no garbage collector, and no hidden work.

Where it runs

Assembly runs everywhere a program runs: Linux, Windows, macOS, and the embedded devices around you. This course targets x86-64 on Linux, the architecture of most servers and desktops.

The classic first program writes one line to the screen and exits, using two Linux system calls:

section .data msg db "Hello from assembly", 10 len equ $ - msg section .text global _start _start: mov rax, 1 ; sys_write mov rdi, 1 ; stdout mov rsi, msg mov rdx, len syscall mov rax, 60 ; sys_exit xor rdi, rdi ; status 0 syscall

Why learn it

Assembly teaches what every other language hides: how the stack works, how a function call really happens, and why a cache miss costs hundreds of cycles. After assembly, profilers and debuggers make sense.

You will not write a web server in assembly, but you will read it when a compiler emits a surprising instruction, when you patch a binary, or when you write a boot sector.

Why NASM

NASM (Netwide Assembler) is the assembler this course uses. Its syntax is clean, its documentation is free, and it targets every x86 system in existence. GAS uses a different syntax (AT&T), and MASM belongs to Windows.

Next: Install NASM and check the version

Article author: Arthur Isaev

Related articles
Assembler
Assembler course: zero to hero in 50 lessons
What is assembly language
Install NASM and check the version
NASM syntax basics
Your first program
Registers
MOV and data transfer
Number bases and operands
Defining strings and data
Flags and the status register
Conditional jumps
Loops
The stack
Procedures
LEA and addressing modes
Memory layout: sections
Linux syscalls
Arithmetic
Bitwise operations
Arrays
Structures
Macros
Calling C functions
Debugging with GDB
The ELF format
Time and date syscalls
File I/O
Command-line arguments
Environment variables
Floating point (SSE)
SIMD basics
Interrupts
Sockets
A tiny HTTP client
Output formats: bin, elf, elf64
Advanced macros and %include
Linking object files
32-bit vs 64-bit
The System V ABI
Makefiles for assembly
Optimization basics
Error codes and logging
Parsing CSV
Data structures: linked list
A tiny HTTP server
Boot sector: hello in 512 bytes
Capstone: command-line calculator
Capstone: hex editor
Performance: cycles and cache
Modern x86: AVX tour
Hero roadmap: the whole course on one page
Install NASM on Windows 11
Install NASM on Ubuntu
Install NASM on Rocky Linux
Install NASM on macOS
Install NASM on FreeBSD
Assembly in Docker
ARM assembly

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su, info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: