Software

Inside Windows 10's ancestor: Five facts revealed by MS-DOS' source code

The fresh release of MS-DOS source code sheds interesting light on how much software development has changed in the three decades since the OS' release.

About 35 years ago, a fledgling company called Microsoft released MS-DOS, the operating system that give rise to Windows.

Now Microsoft has released the source code for MS-DOS v1.25 and v2.0 on GitHub, the second time the source for the text-based command line OS has been made publicly available.

The source code is being made available "to allow exploration and experimentation for those interested in early PC Operating Systems", according to Microsoft.

Although the files will be static, their release still sheds interesting light on how much software development has changed since MS-DOS' release in the early 1980s.

Here are five interesting facts revealed by the MS-DOS source code.

MS-DOS was far smaller than a typical web page

The source-code for MS-DOS v1.25 — the first version of MS-DOS to be released to general PC manufacturers — has just seven source files. When compiled, version 1.0 of the OS only took up about 12kb of memory, an order of magnitude less than a typical web page today.

SEE: 20 pro tips to make Windows 10 work the way you want (free PDF) (TechRepublic)

Dating back to around May 9th 1983, the collection of source files also includes the original MS-DOS Command-Line shell, COMMAND.ASM.

The actual size would have been even less, as only three of the seven files would have been used to compile MS-DOS for most OEM PCs, with the remaining four being ancillary files used by Seattle Computer Products (SCP), which made the original OS that Microsoft purchased and rebranded as MS-DOS.

MS-DOS had millions of times fewer lines of code than Windows

The extent to which software has ballooned in size in the intervening years since MS-DOS' release is also thrown into stark relief by the number of lines of code.

While, the now aged Windows XP had tens of million lines of code according to online estimates, there are just 13,587 lines of code across the seven source files for MS-DOS v1.25.

It was written in a very-low level programming language

While the bulk of Windows is written in the C, C++ and C# programming languages, MS-DOS v1.25 and v2.0 were written in 8086 assembly code.

Unlike the readable, high-level languages used today, which abstract away much of the detail of how CPUs process instructions, in the 1970s and early 1980s it was often necessary to write software using low-level languages whose commands are close to the instructions executed by the CPU, and hence difficult for humans to read without annotation.

Writing software in assembly was necessary to squeeze performance out of systems at the time, which were extremely limited in terms of speed and memory compared to modern computers.

MS-DOS ballooned in size between v1.25 and v2.0

The number of source files jumped from seven to more than 100 .ASM files between v1.25 and v2.0, and the memory use from v1.0 to 2.0 jumped from 12kb to a, still tiny by today's standards, 28kb.

As Rich Turner, senior project manager at Microsoft, wrote: "MS-DOS 2.0 dates from around August 3rd 1983, and grew considerably in sophistication (and team size)".

The code is surprisingly readable.

Not only is the source-code for MS-DOS.ASM relatively short in v1.25, it's also surprisingly readable, given it's written in assembly language.

The code is split into clearly named functions, with plenty of comments explaining what each of the major functions do, often breaking down what's going on line-by-line.

Also see

About Nick Heath

Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.

Editor's Picks

Free Newsletters, In your Inbox