laitimes

Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

Once upon a time, many netizens asked in the Q&A community: "Why doesn't Microsoft open source some old operating systems, after all, those systems have no commercial value?"

Nowadays, it seems that the time has not yet come for the old system to not open source, or that no one can think of it.

Thanks to a researcher's reminder and advocacy, Microsoft and IBM recently decided to open source MS-DOS 4.0 and publish the code on GitHub (https://github.com/microsoft/MS-DOS) for everyone to study and learn.

Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!
Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

36 years later, Microsoft open-sourced MS-DOS 4.0

MS-DOS 4.0 has been released for nearly 36 years since it was first released in 1988, and the MS-DOS 4.0 project is released under the MIT license, which includes source code, binaries, disk images, and documentation, allowing modification and distribution.

This time MS-DOS 4.0 was open-sourced, thanks in large part to a correspondence between former Microsoft CTO Ray Ozzie and a young British researcher named Connor (Starfrost) Hyde.

In this regard, Scott Hanselman, vice president of developer community at Microsoft, and Jeff Wilcox, head of Microsoft's open source program office, also released an announcement on "open source MS-DOS 4.0".

Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

In contrast, DOS 4.0 has a complex and fascinating history, with Microsoft working with IBM to develop some of the code, but also creating a branch of DOS called "Multitasking DOS" (MT-DOS), but not widely released, the announcement said.

Not long ago, researcher Connor (Starfrost) Hyde and former Microsoft CTO Ray Ozzie spoke about some of the software they have in their collection. In the floppy disk of the collection, Ray Ozzie was surprised to find some unreleased DOS 4.0 beta binaries.

With that in mind, researcher Starfrost reached out to Microsoft's Office of Open Source Initiatives (OSPO) to release the source code for DOS 4, as he was researching the relationship between documenting DOS 4, MT-DOS, and IBM's OS/2. Some later versions of these multitasking DOS (MT-DOS) binaries can be found on the internet, but these new multitasking DOS beta binaries appear to be much earlier, have not yet been released, and also include the ibmbio.com source code.

With this information in mind, Scott Hanselman, Microsoft's vice president of developer communities, imaged the raw disks with the help of Internet archivist and enthusiast Jeff Sponaugle and carefully scanned the original printed files in "Ozzie Drop." Both Microsoft and IBM researchers agree that this is a highlight piece of the history of the operating system that is worth sharing.

Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

Later, Jeff Wilcox, head of Microsoft's open source program office, went to the Microsoft Archives, but they couldn't find the full source code of MT-DOS, but found MS-DOS 4.0, which is what is now open source.

"If you want to run the MS-DOS 4.0 software yourself and explore it, we've managed to run it directly on the original IBM PC XT, newer Pentium computers, and open-source PCem and 86box emulators," Microsoft said. ”

  • GitHub address: https://github.com/microsoft/MS-DOS
Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

MS DOS 源码陆续发布中

This isn't the first time Microsoft has released MS-DOS source code.

Ten years ago, Microsoft released the source code for MS-DOS 1.25 and 2.0 to the Computer History Museum, and then re-open-sourced MS-DOS (https://github.com/microsoft/MS-DOS) on GitHub in 2018. This piece of code holds an important place in history and is a very good study for an operating system written entirely in 8086 assembly code just 45 years ago.

Other DOS versions have also been open-sourced over the years. The PC-MOS/386 is a multi-user MS-DOS clone from The Software Link, based in Norcross, Georgia, and was open-sourced (https://github.com/roelandjansen/pcmos386v501) in 2017. It can run most standard DOS and 386 protected mode applications.

Microsoft open-source legendary operating system MS-DOS 4.0, relive the technical style of more than 30 years ago!

Take a look back at the history of DOS

In fact, MS-DOS 4.0 is not a better DOS operating system. Looking back at the history of DOS, this operating system has also caused huge controversy.

You know, in the 15 years from 1981 to 1995, before Windows came along, DOS was a major player in the IBM PC-compatible market.

The history dates back to the 80s of the 20th century, when Tim Paterson, an American computer programmer, was developing a new product for his Seattle Computer Products company using a new Intel 8086 16-bit processor when he found that no operating system was available.

Beginning in the early 1980s, Tim Paterson spent less than a year developing an operating system called QDOS to fill this gap, initially with the simple goal of making it easy to port applications from CP/M. The process of porting an application from CP/M to this new operating system simply converts the 8080 or Z80 assembler to 8086 (using another tool written by Tim Paterson) and optimizes it by hand.

Later, the system was changed to 86-DOS, and Microsoft acquired the operating system, and Tim Paterson joined Microsoft to develop the operating system full-time. Apparently, it didn't take long for him to be immediately told he was working for IBM. Subsequently, the operating system was renamed again: PC-DOS if it was running on an IBM system, and MS-DOS if it was not running on an IBM system (because Microsoft was the rightful owner).

And this history can be seen in the account of Starfrost, the young British researcher mentioned above:

Microsoft Corporation was founded in 1975 by Bill Gates and Paul Allen to develop the BASIC interpreter for the MITS Altair 8800, one of the first personal computers. The initial version of the product was developed in 30 days and successfully demonstrated to the founder of MITS, known as the father of the personal computer. I won't go into the details of what follows.

Fundamentally, in just a few years, Microsoft became the most popular BASIC interpreter developer and had a ton of other products – a fairly successful tool and language company, although they also sold various "SoftCards" to allow computers to run programs for other architectures, as the PC industry was far from standardized during this period.

By 1980, Microsoft's revenues were in the millions of dollars, but this was nothing compared to later developments – the company's real "big breakthrough" came in 1980. At that time, the tech giant IBM drew up a contract to pay about $80,000 as a one-time payment for the perpetual rights to the MS-DOS operating system from Microsoft for the upcoming personal computer. IBM also acquired the rights to Microsoft's BASIC programming language, all of the company's other languages, and a number of newly developed applications. The smart thing to do would be to insist on charging royalties for patents so that his company can make a small amount of money from every PC IBM sells.

Through a series of hotly debated events, Gates "not too smartly" rejected the contract.

He insisted on licensing MS-DOS to anyone who needed it, and Microsoft paid a total of $75,000 for the acquisition of MS-DOS, of which $25,000 was for licensing and $50,000 for outright purchases, which, combined with the open architecture of IBM PCs, was almost immediately cloned as the de facto standard for personal computers. This gives Microsoft unlimited money printing machines from OEM revenues, although this won't be visible for a few years.

It turned out to be an extremely lucky stroke of luck, coupled with some shrewd business acumen, that eventually made Microsoft one of the biggest companies in the world, and Bill Gates was also the richest man in the world for many years.

While MS-DOS made Microsoft a lot of money, the problem was that it was terrible even by the standards of the time.

Since Tim Paterson hastily launched the QDOS system to meet an urgent need, QDOS literally means "fast and dirty operating system", and even by the limited standards of the time, the operating system lacked many basic features, such as the lack of subdirectories, device drivers, hard disk support, and so on.

In 1983, Microsoft completely rewrote MS-DOS and released MS-DOS 2.0, adding a number of new features and allowing 160KB and 320KB floppy disks to become 180KB and 360K. The update was generally welcomed due to the addition of much-needed features, but there were also some who criticized it for increasing memory usage.

However, as technology evolves, users still need more features. They wanted to do multiple things at the same time on a new, powerful computer at the time, so they needed an operating system to do it, and MS-DOS, a single-task operating system, simply couldn't do it. In addition, since the release of MS-DOS 1.x, Microsoft Corporation has promised to expand MS-DOS in the future - multi-user, network, multi-tasking.

So, in January 1983, Microsoft assembled some of its best programmers to develop a new version of MS-DOS 3.0 (MS-DOS 2.5 was developed simultaneously as an interim version in the same codebase to add basic network redirector support to Microsoft's and IBM's networking products) that would be a true multitasking operating system with preemptive-first schedulers, multithreading, named pipes, sempahores, a session management user interface, and many other features.

However, writing an operating system that is compatible with the thousands of applications already written for single-task environments is challenging. Starfrost dissects this:

Many MS-DOS applications, due to API flaws, do things like write directly to display memory – something that is not possible on multitasking operating systems, because the user can choose which application to display, and the "screen" can change at any time.

Since the new operating system will preemptively multitask, any application can be preempted by the operating system for context switching at any time, and many DOS applications do not perform well in this regard. Applications also write and read directly from peripherals, which can be fatal in a multitasking environment if the operating system is waiting for data from those devices.

Perhaps due to these complications, among other things, MS-DOS 3.0 was quickly delayed for a long time at the time. Later, MS-DOS 4.0 went further, even breaking through the memory limit of 640KB, supporting more than 32MB of hard disk space, and adding a directory interface with mouse support.

However, MS-DOS 4.0 is not compatible with many well-known programs, and some vulnerabilities can even cause user data to be corrupted.

In this regard, many users complained that popular programs at the time, such as WordPerfect 5.1, Lotus 1-2-3 and Doom, always had problems with MS-DOS 4.0. You may be working on a task, and all of a sudden, the program may be completely stuck. Even before we knew and hated the blue screen of death for Windows, MS-DOS 4.0 was already panicking PC users.

AS FOR THE REASON, FOREIGN MEDIA ZDNET SAID THAT THIS IS MAINLY BECAUSE MS-DOS 4.0 USES 92KB OF RAM. But it was a big deal at a time when high-end PCs only had 640K of RAM, and MS-DOS 4.0 used more memory than any previous version of DOS.

Even the word-of-mouth of this version of the crash made many developers who use the DOS system shy away from it, when the digital research company developed a DOS operating system called DR-DOS, whose version number was initially modeled after the MS-DOS version number since its release, to show that the former would work just as well as the latter. But when it came time for the release of DR-DOS 4.0, Digital Research named its new version DR-DOS 5.0 in 1989 to prevent anyone from thinking it had anything to do with MS-DOS 4.0.

So, even a year after the release of DOS 4.0, data from software retailer Egghead Software shows that DOS 3.3 sells twice as much as DOS 4.0.

In fact, perhaps one of the reasons why so many people were ready to try a new Unix-like operating system, Linux, in 1991 was that MS-DOS 4.0 annoyed so many users.

Later, Microsoft introduced the Windows operating system, and the release of Windows 95 in particular marked Microsoft's shift to a graphical user interface (GUI), leading to the demise of MS-DOS.

Once the MS-DOS 4.0 was controversial, many OS enthusiasts are excited about the open source it brings, and so far, the repository has 26.2k stars and 3.6k forks.

Reference Links:

https://cloudblogs.microsoft.com/opensource/2024/04/25/open-sourcing-ms-dos-4-0/

https://starfrost.net/blog/001-mdos4-part-1/index.html

https://www.zdnet.com/article/its-baaack-microsoft-and-ibm-open-source-ms-dos-4-0/

Read on