How frost-rvl/system-programming-guide works
This repository is a system-programming learning journey, organized as a roadmap with two practical projects: an LC-3 virtual machine and a small operating system. The LC-3 workflow loads object images, fetches and executes instructions, and delegates memory, flags, traps, and input handling to helpers. The OS project boots a kernel with serial/VGA output and a small C runtime. Source excerpts show LC-3 call sites and the OS output path; other OS connections are limited to references in the source index.
Main entry points: main.c Instruction runner · stdio.c Formatted output · kmain.c Kernel entry · memory.c Memory access
Components 20
Learning roadmap
- Building foundations
docs/01_building_foundations.md - Core system topics
docs/02_core_system_programming.md - Advanced topics
docs/03_advanced_topics.md
LC-3 virtual machine
- Instruction runner
projects/01_virtual_lc3/src/main.c - Memory access
projects/01_virtual_lc3/src/memory.c - Registers
projects/01_virtual_lc3/src/registers.c - Condition flags
projects/01_virtual_lc3/src/flags.c - Trap services
projects/01_virtual_lc3/src/traps.c - Image and input
projects/01_virtual_lc3/src/utils.c
Little OS
- Boot loader
projects/02_little_os/src/boot/loader.s - Kernel entry
projects/02_little_os/src/kernel/kmain.c - Formatted output
projects/02_little_os/src/lib/stdio.c - Logging
projects/02_little_os/src/lib/log.c - String helpers
projects/02_little_os/src/lib/string.c - Math helpers
projects/02_little_os/src/lib/math.c - Serial driver
projects/02_little_os/src/drivers/serial/serial.c - VGA driver
projects/02_little_os/src/drivers/vga/vga.c - Port I/O
projects/02_little_os/src/io/io.s
Other components
- Learner
- VM user
Connections 24
- Learner → Building foundations: follows roadmap
README.md - Learner → Core system topics: follows roadmap
README.md - Learner → Advanced topics: follows roadmap
README.md - VM user → Instruction runner: runs images
projects/01_virtual_lc3/src/main.c - Instruction runner → Memory access: reads and writes
projects/01_virtual_lc3/src/main.c - Instruction runner → Condition flags: updates flags
projects/01_virtual_lc3/src/main.c - Instruction runner → Trap services: dispatches traps
projects/01_virtual_lc3/src/main.c - Instruction runner → Image and input: loads images
projects/01_virtual_lc3/src/main.c - Memory access → Registers: uses registers
projects/01_virtual_lc3/src/memory.c - Condition flags → Registers: updates register state
projects/01_virtual_lc3/src/flags.c - Trap services → Memory access: accesses memory
projects/01_virtual_lc3/src/traps.c - Trap services → Registers: uses registers
projects/01_virtual_lc3/src/traps.c - Image and input → Memory access: loads image data
projects/01_virtual_lc3/src/utils.c - Boot loader → Kernel entry: starts kernel
- Kernel entry → Serial driver: initializes serial
projects/02_little_os/src/kernel/kmain.c - Kernel entry → Logging: logs messages
projects/02_little_os/src/kernel/kmain.c - Kernel entry → Formatted output: prints output
projects/02_little_os/src/kernel/kmain.c - Logging → Formatted output: formats output
projects/02_little_os/src/lib/log.c - Formatted output → Serial driver: writes serial
projects/02_little_os/src/lib/stdio.c - Formatted output → VGA driver: writes display
projects/02_little_os/src/lib/stdio.c - Formatted output → String helpers: measures strings
projects/02_little_os/src/lib/stdio.c - Serial driver → Port I/O: uses port I/O
projects/02_little_os/src/drivers/serial/serial.c - VGA driver → Port I/O: uses port I/O
projects/02_little_os/src/drivers/vga/vga.c - VGA driver → Math helpers: uses math helpers
projects/02_little_os/src/drivers/vga/vga.c