Remix.run Logo
rasz 2 hours ago

Id go other way too. Disk Operating System might seem simple or even downright pleasant. Easy to understand and well compartmentalized DOS/BIOS Interrupt API, small functions doing small things.

Then you read some "under the hood" book or source code and start stumbling upon decade of hacks upon hacks to keep this cart rolling while computer revolution was happening in the background.

One example: IBM in its infinite wisdom didnt expect to support more than one type of floppy in 5150 BIOS. IVT (Interrupt Vector Tble) has allocated space for only one DPT entry (Diskette Parameters Table), same goes for DBA (Bios Data Area). Few years later 1.2MB 5.25 drives showed up, year later 720KB 3.5 ones and so one. As a result BIOS was forced to play musical chairs under the hood constantly shuffling contents of that _one DPT entry_ replacing it on the fly while trying to keep track of whats going on. Of course DOS needs to run on older PCs without multi floppy format aware BIOS thus 1986 MS-DOS 3.2 introduced DRIVPARM doing exactly the same shuffling one layer above https://jeffpar.github.io/kbarchive/kb/060/Q60091/

DOS was build one small hack at a time. High Memory, Upper Memory, Expanded memory, Extended memory, A20, exit from Protected mode, more than one kind of floppy, hard drive, more than two hard drives, the list of kludges just keeps going.