An Inside Look at MS-DOS – The design decisions behind the popular OS (1983)
I studied MS-DOS inside and out (quite literally).<p>One thing that I always thought was interesting was all the stuff that gets packed in the first 100h bytes before a .COM file&#x27;s entry point, called the Program Segment Prefix (PSP). It is why you could simply execute a RET (return) and have it drop back to DOS again. The first bytes of the PSP are a literal INT 20h which is the Drop To DOS interrupt, and a RET with nothing left on the stack will return you to that zero offset, and then Drop to DOS.<p>Probably a bit hacky, but really clever.<p>I wrote my own DOS clone in Assembler, that I called PoverDOS because it was surely going to make me about that much money, and managed to make a boot sector that was far more functional than the one that comes standard with MS and PC DOS. The main thing it did was self-diagnostics to determine if the system had been infected by a boot sector virus. That was quite a feat, but became a moot point once 64 bit computing came about, because the boot sequence also gained a whole lot more space to work in.<p>Don&#x27;t bring it up with me at a party, &#x27;cos all those DOS intricacies are still among my favourite subjects, and 97% of the population probably would not be nearly as enthusiastic. DOS is still the party killer it always was.