Home Source code Build MS-DOS from scratch like it was 1983

Build MS-DOS from scratch like it was 1983

3
0

Building a complete operating system by compiling its source code is not something for the faint of heart; a modern Linux or BSD distribution contains thousands of packages with millions of lines of code, all of which need to be processed in the right order and the result stored in the right place. For all but the most hardcore Gentoo enthusiasts, getting precompiled binaries is much easier, but obviously someone must have completed the entire compilation process at some point.

What is true for modern operating systems also applies to older software such as MS-DOS. When Microsoft released the source code for several DOS versions a few years ago, many people pored over the code for weird comments and undocumented features, but few actually tried to compile the entire package. Corn [Michal Necasek] at the OS / 2 museum did not hesitate to take up this challenge, and documented the highly unlikely process of compiling DOS 2.11 from source.

The first problem was knowing which version had been released: although the Computer History Museum labeled the package simply as “MS-DOS 2.0”, it actually contained a mix of version 2.0 OEM binaries, version 2.11 source code, and other items left over from the development process. OEM binaries are mostly finished executables, but also contain the basic source code for some system components, allowing computer manufacturers to tailor these components to their specific hardware platform.

Compiling the source code was not trivial either. [Michal] was determined to use tools of the correct period and examined the behavior of a dozen versions of MASM, the assembler likely to have been used by Microsoft in the early 1980s. As it turns out, version 1.25 of 1983 produced code that most closely matched the object code found in existing binaries, and even then some pieces of source code required slight modifications to be properly constructed. [Michal]S blog post also goes into great detail about the subtle differences between Microsoft-style DOS and IBM-style DOS, which go beyond just system file names (MSDOS.SYS vs. IBMDOS.COM).

The end result of this exercise is a modified DOS 2.11 source package that actually compiles into a working set of binaries, unlike the original. And while this does not generate any new code, since DOS 2.11 binaries have been available for a long time, it does provide fascinating insight into software development practices in an era when even the basic components of the PC platform were not. fully standardized. And don’t forget that even today, some people still like to develop new DOS software.


Source link