Skip to main content

Tag

Computer Architecture

16 articles filed under Computer Architecture, newest first.

All topics All articles

Articles tagged Computer Architecture

Illustrated compiler pipeline showing source code passing through analysis and code-generation stages before becoming machine code.

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

Compiler project written in C++ that translates the Si programming language into native x86-64 executables

Programming

Build a Compiler From Scratch in C++ for x86-64

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

Diagram of two process control blocks exchanging CPU state through context_switch, with tasks A and B interleaving on a round-robin timeline

Chapter 9 · Operating Systems

Context Switching & Process Scheduling: Teaching the Kernel to Multitask

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

Diagram of an AArch64 exception vector table with a timer interrupt routed through the GICv2 to the CPU and the kernel's IRQ handler

Chapter 7 · Operating Systems

AArch64 Exceptions & Interrupts: Teaching Your Kernel to Listen

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

Diagram of an AArch64 virtual address walked through L0, L1 and L2 page tables to a physical 2 MB block of RAM

Chapter 6 · Operating Systems

AArch64 Virtual Memory & the MMU: Teaching the CPU to Lie

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

Diagram of a CPU storing a character to the PL011 UART data register at 0x09000000 over MMIO, with the text appearing on a terminal

Chapter 4 · Operating Systems

PL011 UART Driver on QEMU: Your First Bare-Metal Kernel Output

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

Diagram of the ARM64 boot flow from the reset vector through exception levels EL2 to EL1, with the boot checklist ending at kernel_main

Chapter 3 · Operating Systems

The ARM64 Boot Process: From Reset Vector to kernel_main

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

Diagram of the computing stack from applications and libc down through the operating system to firmware and AArch64 silicon, with the descent highlighted

Chapter 1 · Operating Systems

Why Build an OS from Scratch? The Case for Going All the Way Down

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