How adam97-1/novaos works
This repository implements a staged x86 boot path: a first-stage loader leads into stage 1.5, which finds a FAT partition, loads stage 2, and transfers control; stage 2 enables A20 and enters protected mode. It also contains a separate Multiboot kernel that reports boot information. The README is empty, so the map follows the sampled stage code and source index; connections to unsampled first-stage and disk internals are omitted where their calls are not shown.
Main entry points: stage1_5.c Stage 1.5 · fat.c FAT filesystem · stage2.c Stage 2 · mode.c Protected mode
Components 17
Boot stages
- Stage 1
stage1/stage1.asm - Stage 1.5
stage1_5/stage1_5.c - Stage 2
stage2/stage2.c - Real-mode transfer
lib16/exec/asm/exec_16b.asm
Disk and filesystems
- Disk access
lib16/disk - Partition lookup
lib16/mbr/mbr.c - FAT filesystem
lib16/fat/fat.c - Memory helpers
lib16/memory/memory.c - String helpers
lib16/string/string.c
Platform support
- A20 enable
lib16/a20/asm/enable_a20_16b.asm - Protected mode
lib16/mode/mode.c - NMI control
lib16/nmi/nmi.c - Port I/O
lib16/io/io.h - Text output
lib16/print/print.c
Multiboot kernel
- Kernel entry
kernel/kernel.c - Multiboot definitions
kernel/multiboot2.h
Other components
- Boot firmware
Connections 19
- Stage 1.5 → Disk access: initializes disk
stage1_5/stage1_5.c - Stage 1.5 → Partition lookup: reads partitions
stage1_5/stage1_5.c - Partition lookup → Disk access: reads sectors
lib16/mbr/mbr.c - Stage 1.5 → FAT filesystem: initializes and searches
stage1_5/stage1_5.c - FAT filesystem → Disk access: reads sectors
lib16/fat/fat.c - FAT filesystem → String helpers: uses strings
lib16/fat/fat.c - FAT filesystem → Memory helpers: copies data
lib16/fat/fat.c - Stage 1.5 → FAT filesystem: loads file
stage1_5/stage1_5.c - Stage 1.5 → Real-mode transfer: transfers control
stage1_5/stage1_5.c - Stage 2 → A20 enable: enables A20
stage2/stage2.c - Stage 2 → Protected mode: enters protected mode
stage2/stage2.c - Protected mode → NMI control: disables NMI
lib16/mode/mode.c - NMI control → Port I/O: reads port
lib16/nmi/nmi.c - Protected mode → Text output: reports errors
lib16/mode/mode.c - Stage 1.5 → Text output: prints status
stage1_5/stage1_5.c - Stage 2 → Text output: prints status
stage2/stage2.c - Boot firmware → Stage 1: starts boot
- Boot firmware → Kernel entry: passes Multiboot data
kernel/kernel.c - Kernel entry → Multiboot definitions: parses boot tags
kernel/kernel.c