Chapter 1 · Programming
How a Compiler Works: From Source Code to Machine Code
Learn how a compiler transforms source code into machine code through lexing, parsing, semantic analysis, IR, optimisation and x86-64 code generation.
18 min Intermediate
Tag
16 articles filed under Computer Architecture, newest first.
Chapter 1 · Programming
Learn how a compiler transforms source code into machine code through lexing, parsing, semantic analysis, IR, optimisation and x86-64 code generation.
18 min Intermediate
Programming
A step-by-step compiler tutorial in C++: design a language, build a lexer and parser, add semantic analysis, and generate native Linux x86-64 programs.
4 min Intermediate
Chapter 9 · Operating Systems
Build a round-robin task scheduler from scratch for your AArch64 bare-metal kernel. Implement the PCB, understand why only callee-saved registers need saving, write the context_switch assembly, and watch two tasks interleave on the UART, the moment your kernel becomes an actual operating system.
22 min Intermediate
Chapter 7 · Operating Systems
Build an AArch64 exception vector table from scratch, set up the GICv2 Generic Interrupt Controller on QEMU, and write a working ARM Generic Timer interrupt handler. Your kernel finally responds to the hardware.
29 min Intermediate
Chapter 6 · Operating Systems
Master the AArch64 MMU on bare metal ARM. A deep dive into page table structures, translation levels (L0-L3), and configuring SCTLR_EL1, TCR_EL1, and MAIR_EL1 for kernel memory protection.
36 min Intermediate
Chapter 4 · Operating Systems
Learn how to write a bare-metal C driver for the PL011 UART on AArch64. Master Memory-Mapped I/O (MMIO), the volatile keyword in C, and building a kprint function for QEMU virt without a standard library.
15 min Intermediate
Chapter 3 · Operating Systems
Learn how to write an ARM64 bootloader stub in assembly. We cover AArch64 exception levels (EL2 to EL1), zeroing BSS, stack setup, and jumping to a C kernel_main on bare metal.
21 min Intermediate
Chapter 1 · Operating Systems
Stop treating the OS as a black box. Discover why building an AArch64 kernel from scratch on ARM is the ultimate systems programming challenge for 2026. From silicon to shell, we go all the way down.
11 min Beginner
Chapter 7 · Computer Architecture
Learn how CPUs communicate with devices through memory-mapped I/O, interrupts, DMA, PCIe, multicore systems, GPUs, and modern system-on-chip designs.
35 min Intermediate
Chapter 6 · Computer Architecture
Follow the fetch-decode-execute cycle step by step and learn how the program counter, registers, ALU, control unit, cache, and write-back stages execute machine code.
28 min Intermediate
Chapter 5 · Computer Architecture
Learn how the computer memory hierarchy works, including CPU registers, L1/L2/L3 cache, RAM, SSDs, virtual memory, TLBs, and page faults.
33 min Intermediate
Chapter 4 · Computer Architecture
Learn how a CPU control unit works, from instruction decoding and control signals to hardwired logic, microcode, timing, and the fetch-decode-execute cycle.
23 min Intermediate