<story><title>An Inside Look at MS-DOS – The design decisions behind the popular OS (1983)</title><url>https://patersontech.com/Dos/Byte/InsideDos.htm</url></story><parent_chain><item><author>ksaj</author><text>I studied MS-DOS inside and out (quite literally).&lt;p&gt;One thing that I always thought was interesting was all the stuff that gets packed in the first 100h bytes before a .COM file&amp;#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.&lt;p&gt;Probably a bit hacky, but really clever.&lt;p&gt;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.&lt;p&gt;Don&amp;#x27;t bring it up with me at a party, &amp;#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.</text></item></parent_chain><comment><author>stevekemp</author><text>For me my reversing started and ending with discovering and documenting the List of Lists:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;fd.lod.bz&amp;#x2F;rbil&amp;#x2F;interrup&amp;#x2F;dos_kernel&amp;#x2F;2152.html&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;fd.lod.bz&amp;#x2F;rbil&amp;#x2F;interrup&amp;#x2F;dos_kernel&amp;#x2F;2152.html&lt;/a&gt;&lt;p&gt;That allowed TSRs to do clever things.&lt;p&gt;I didn&amp;#x27;t use CP&amp;#x2F;M before DOS, but these days I know all about the PSP via writing code for CP&amp;#x2F;M, in Z80.  Kinda impressive how long all these backwards compatibility things last.</text></comment>
<story><title>An Inside Look at MS-DOS – The design decisions behind the popular OS (1983)</title><url>https://patersontech.com/Dos/Byte/InsideDos.htm</url></story><parent_chain><item><author>ksaj</author><text>I studied MS-DOS inside and out (quite literally).&lt;p&gt;One thing that I always thought was interesting was all the stuff that gets packed in the first 100h bytes before a .COM file&amp;#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.&lt;p&gt;Probably a bit hacky, but really clever.&lt;p&gt;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.&lt;p&gt;Don&amp;#x27;t bring it up with me at a party, &amp;#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.</text></item></parent_chain><comment><author>ipython</author><text>Awesome! I encourage you to post your code and blog about it. I would find it fascinating, and suspect others would too.</text></comment>