======================
== fabulous.systems ==
======================
Welcome to the world of fabulous.systems

The Broken Source Code for MS-DOS 4.00 Has Been Restored


#retrocomputing #msdos #operatingsystems

On April 25, 2024, Microsoft released the source code of MS-/PC-DOS 4.00 to the public.

While this release is exciting and essential to computing history, Microsoft’s release process was not entirely flawless: An accidental conversion from codepage 437 to UTF-8 destroyed parts of the source code and caused build failures.

In less than a week, on April 30, 2024, the community provided all necessary patches to restore the source code to its original state, matching the 1988 release of MS-DOS 4.00.

To get a working source tree for myself, I imported the patches by Howard M. Harte (hharte) and E. C. Masloch (ecm) to my MS-DOS fork on GitHub .

Additionally, I converted the source files from LF to CRLF because it is very likely that all source files were originally stored with CRLF line endings. A fix to the SETENV.BAT batch file was also applied to fix broken include paths. I want to make absolutely clear that all changes that brought the code to a working, complete state are not mine and I was not involved in figuring out the correct code fixes.

Downloads

You can either use the files in the ZIP archive on DOSBox or try the floppy images containing a self-extracting RAR archive on real hardware or in an emulator.

Please note that if you want to use the floppy images, you must copy the contents of all four disks to a new directory and run V400_SRC.EXE from there, which will extract all files in the current working directory. Please note that the self-extracting RAR archive requires an 80386 or higher and 8 MB of RAM.

The compiled files in MS-DOS 4.00 (compiled from source, bootable, 1x 1.44MB) match the October 1988 MS-DOS 4.00 release, available at archive.org .

You can flip two switches in INC/VERSION.INC, which allows building the IBM PC-DOS variant instead of the “original” Microsoft variant. The generated binaries are available in the image PC-DOS 4.00 (compiled from source, bootable, 1x 1.44MB).

However, this build comes with an interesting oddity. The boot loader and SYS.COM expect IBMBIO.COM and IBMDOS.COM instead of IO.SYS and MSDOS.SYS, and there are multiple checksum mismatches, so we get a different build.

But here’s the catch: Booting the system and running VER shows the Microsoft copyright notice instead of the IBM one — there’s no matching entry in MESSAGES/USA-MS.MSG.

Do you have any comments or suggestions regarding this article? Feel free to join the discussion at our fabulous.community!