Certain Versions of MS-DOS open sourced
Microsoft has recently release DOS 4.0 as MIT licensed OpenSource.
Dave’s Garage does a walkthrough of the history, sets up a dev environment (masm and C 5.1 compiler), builds the source, then bonus points for writing it to an actual 5.25″ floppy using a greaseweazle. He then boots it off an actual IBM XT.