[Retro 考古] 通用 MS-DOS 1.25

Prior to MS-DOS 3.20, Microsoft never directly distributed MS-DOS. Instead, they sent out OEM Adaptation Kits (OAKs) to OEMs, and OEMs release their customized versions of MS-DOS to the general public. IBM can also be considered as an OEM, their customized MS-DOS is called PC-DOS. Most OEM copies include their custom brandings and some are not PC-compatible. So before MS-DOS 3.20, if you use the IBM PC, then generally you use IBM’s PC-DOS, otherwise you use your OEM’s customized MS-DOS.

What are the differences between MS-DOS and PC-DOS? In the DOS source code, you can see IBMVER and MSVER switches – you turn on MSVER and turn of IBMVER to build MS-DOS, vice versa for PC-DOS. Main differences between PC-DOS and MS-DOS are – different copyright messages, a different escape sequence table, different delimiters for various things and the default drive being A: for PC-DOS.

What if I want to use MS-DOS on an IBM PC? We know that PC-DOS is a customized version of MS-DOS by IBM, so we can borrow some code from PC-DOS to create a generic version of MS-DOS 1.25 using the MS-DOS OAK. For MS-DOS 1.25, the OEM must write the DOS BIOS, the boot sector and the OEM FORMAT module.

For the DOS BIOS, we can simply take PC-DOS’s IBMBIO.COM and rename it to IO.SYS. For the boot sector, we can patch PC-DOS’ to load IO.SYS and MSDOS.SYS instead of IBM’s IBMBIO.COM and IBMDOS.COM. The OEM FORMAT module is a bit hard, because IBM linked it against the PC-DOS version of Microsoft’s FORMAT module. We need to link it against the MS-DOS version of Microsoft’s FORMAT module, so we must extract the OEM module from PC-DOS’ FORMAT.COM first. Once that is done, we can then link it against Microsoft’s FORMAT module to produce FORMAT.COM for MS-DOS.

Now we have all OEM components ready, it is time to put together a generic PC-compatible version of MS-DOS 1.25. Since a lot of OEMs distributed Microsoft’s development utilities with MS-DOS, we can assume MS-DOS 1.25 should have 2 disks, one with MS-DOS and the other with development utilities. We then add the DOS BIOS, DOS kernel and all standalone components from Microsoft’s OAK to the first disk, and Microsoft’s development utilities to the second disk. And… we’re all done!