A DOS, read from the inside
LainDOS.
A tiny single-tasking DOS for x86 real modereal modeThe original 8086-compatible CPU mode where addresses are segment:offset and there is no memory protection., written from scratch in NASMNASMNetwide Assembler, the assembler used for LainDOS boot, kernel, shell, and focused test programs. — small enough to read end to end, complete enough to boot The Secret of Monkey Island.
These docs walk the source the way the machine runs it. Start with the boot path — the whole journey from power-on to a running game — then branch into the subsystems.