Assembly Tutorial

Assembly is the lowest-level language a human still writes by hand: one line of source maps to one machine instruction. It is not portable — every processor family has its own instruction set and its own dialect. This track teaches one dialect thoroughly (x86-64 with NASM) and then shows you the same ideas in ARM, RISC-V, and WebAssembly, so you can read the assembly behind any compiler.

Scope: Study the topics in order, assemble and run every example, and always connect the mnemonic to the register and flag it actually changes on your target CPU.

Assembly Study Progress

0% Complete
# ASM Topic Description
PHASE 1: FUNDAMENTALS
01IntroductionMachine code, the CPU, the assembler, and the map of assembly dialects.
02Toolchain & First ProgramInstall NASM, assemble, link, run, and inspect your first program.
03Numbers & MemoryBinary, hexadecimal, two's complement, endianness, and the memory model.
PHASE 2: REGISTERS & DATA
04RegistersGeneral-purpose registers, the flags register, and the ABI layout.
05Data DefinitionsSections, db/dw/dd/dq, constants, and strings in memory.
06Addressing ModesEffective addresses, base + index + scale, RIP-relative, and lea.
PHASE 3: INSTRUCTIONS & LOGIC
07InstructionsMove, logic, shift, compare, and the instruction categories.
08ArithmeticAdd, subtract, multiply, divide, and how the flags record the result.
09Control FlowLabels, jmp, conditional jumps, and loop-building patterns.
PHASE 4: PROGRAM STRUCTURE
10Subprograms & the Stackcall/ret, stack frames, calling conventions, and recursion.
11Macros & DirectivesAssembler macros, symbols, and conditional assembly.
PHASE 5: SYSTEMS & FLAVORS
12Input/Output & SyscallsLinux syscalls, libc calls, and console input/output.
13Debugging & DisassemblyGDB, breakpoints, register and memory inspection, objdump.
14Assembly FlavorsOne idea, four dialects: x86, ARM64, RISC-V, and WebAssembly.
PHASE 6: PRACTICE & DEMO
15Lab ExamplesRun and modify single-file x86-64 and ARM practice programs.
16Study ProjectsString routines, sorting, and calling C from assembly.
PHASE 7: REFERENCE
17References & AssemblersOnline assemblers, simulators, official manuals, and courses.
Credits: Lesson content drafted with DeepSeek via Fireworks AI. References: free tutorials below.

Free References

For the full categorized table — online assemblers, CPU simulators, official manuals, courses, and sample repositories for every dialect — see the References & Assemblers page.