MS-DOS 4.00 released as open source software

1

One open source project that I work on is the FreeDOS Project, an open source implementation of the classic DOS operating system. If you don’t know DOS (short for Disk Operating System) it was the original operating system that shipped in 1981 with the IBM Personal Computer, the IBM PC 5151. Microsoft’s MS-DOS has always been a command line operating system, and retained the limitations of the early 1980s, never losing its 16-bit architecture. I grew up on DOS, and I wasn’t too happy in 1994 when Microsoft announced the next version of Windows would eliminate DOS. So on June 29, 1994, I announced what would become the FreeDOS Project. And all these years later, FreeDOS still has a dedicated developer and user community.

With this background, I was very interested in 2018 when Microsoft released the source code to MS-DOS 1.25 and 2.0 under an open source license, via their repository on GitHub. Microsoft had already started to shake its long standing reputation of opposing open source software, and made headway into participating in open source software communities. But releasing these older versions of MS-DOS under the MIT license (also called the “Expat” license, and compatible with the GNU General Public License) was a huge step forward in the open source communities that I felt most strongly connected

And again in 2024, Microsoft has again released an older version of MS-DOS under the MIT license. Thanks to Scott Hanselman at Microsoft, and others at Microsoft and IBM, you can now find MS-DOS 4.00 in the MS-DOS GitHub project. Note that this release doesn’t build completely because of file conversion issues when the source code was uploaded to GitHub, but I’m sure we’ll see a working build soon.

Why it matters

It’s important to recognize the huge step forward that Microsoft has taken in releasing these versions of MS-DOS as open source software. MS-DOS and other DOS operating systems are not just historical curiosities; they are milestones in computing. The personal computer revolution may have started in the late 1970s with popular home computers like the TRS-80 (1977) and the Apple II (1977), but it was the IBM PC and DOS that ushered in the modern era of computers on every office desk and in every home.

DOS was the dominant operating system throughout the 1980s and into the 1990s. DOS supported countless applications that served as “daily drivers” for businesses and individuals at the time, including databases, word processors, spreadsheets, utilities, tools, specialty printing, games – and a seemingly endless list of other programs.

It’s because of this vast history that it’s important to preserve DOS. Merely keeping a binary-only copy of DOS isn’t enough. DOS was a milestone in computing; by releasing the source code, Microsoft has “opened the doors” to how MS-DOS worked on the inside.

DOS has always been a simple operating system with few “moving parts.” Booting a computer running DOS requires starting the kernel, which reads its configuration from the CONFIG.SYS text file. Then, DOS loads the user shell, typically called COMMAND.COM, which runs the AUTOEXEC.BAT file to set the initial environment. This simplicity allowed many people who were new to computers to understand how their computer worked.

With the source code, a new generation can dig into how MS-DOS worked. And not just how it worked, but why it did things in a particular way. We can see not just that MS-DOS does something a certain way, but the source code allows us to understand why it works the way it does.

Practical limitations

This new release of MS-DOS 4.00 as open source software is a significant step forward, but there’s also a practical limitation. You might assume “Now that Microsoft has released the source code to MS-DOS, surely FreeDOS can use it to improve FreeDOS.” The answer is yes and no.

FreeDOS started from an independent source code base, completely separate from MS-DOS. We implemented DOS functions and behaviors based on publicly available documentation such as Ralf Brown’s Interrupt List, so FreeDOS is already very compatible with MS-DOS.

However, the FreeDOS code base is mostly C with some Assembly. The MS-DOS source code is the other way; MS-DOS is mostly written in Assembly with some C. You can’t simply “copy and paste” between MS-DOS and FreeDOS, because the code assumptions and overall architectures are quite different.

So the MS-DOS source code is very interesting, but more as a reference. For example, FreeDOS developers can now examine the MS-DOS 4.00 source code to see how it implemented certain specific behaviors, and use that understanding to enhance any missing compatibility in FreeDOS.

A big step forward

I don’t want to focus on the limitations of this release, however. It’s important to recognize the huge step that Microsoft has taken in releasing these classic operating systems as open source software – and doing so using a license that is friendly to other developers and compatible with the GNU General Public License. Congratulations to Scott Hanselman and everyone at Microsoft and IBM for their work to release MS-DOS 4.00 as open source.

Leave a Reply