Programming

From QDOS to GitHub: Building Your Own DOS from 45-Year-Old Source Code

2026-05-02 19:36:25

Overview

Forty-five years ago, a single programmer at Seattle Computer Products wrote a quick-and-dirty operating system for Intel's new 8086 chip. That OS—originally called QDOS (Quick and Dirty Operating System)—was bought by Microsoft for under $100,000, rebranded as 86-DOS, then shipped as PC DOS 1.0 in August 1981. Microsoft kept the rights to sell the same OS to other manufacturers under the name MS-DOS, which propelled the company to dominate personal computing for two decades.

From QDOS to GitHub: Building Your Own DOS from 45-Year-Old Source Code
Source: itsfoss.com

Today, that historic code is freely available. On April 28, 2025—the 45th anniversary of 86-DOS 1.00—Microsoft published the earliest known DOS source code on GitHub under the MIT license. This tutorial will guide you through obtaining, understanding, and even compiling the 86-DOS 1.00 kernel and related utilities, using the original assembler and tools. Whether you're a retro-computing enthusiast, a low-level systems programmer, or just curious about computing history, this guide will get you hands-on with the code that launched a revolution.

Prerequisites

Before diving in, make sure you have the following:

Step-by-Step Instructions

1. Obtain the Source Code

Clone the official Microsoft GitHub repository:
git clone https://github.com/microsoft/MS-DOS.git
Or download the ZIP archive from the repository page. The code resides in the v1.0 directory (for 86-DOS 1.00) and the v1.0/snapshots folder for development snapshots of PC-DOS 1.00.

2. Set Up Your Build Environment

The source code is not a tidy archive of digital files. Instead, it was reconstructed from physical assembler printouts and continuous-feed paper dating from 1981. Historians Yufeng Gao and Rich Cini scanned, transcribed, and reconstructed the compilable code. To build it, you need:

Detailed build steps are in the README.md within the repository. They involve running a Python script that generates a final DOS.SYS file from the assembled object code. Follow them carefully.

3. Compile the Kernel

Within your DOS emulator, navigate to the directory containing the source code and the ASM assembler. Run:
ASM DOS.ASM
This will produce an object file (typically DOS.OBJ). Then link it using the linker provided (or use LINK.EXE from a DOS 2.x package). The final result should be DOS.SYS—the kernel binary.

If you encounter errors, double-check that your assembler version matches the one Paterson used (official releases of ASM from Seattle Computer Products). The repository includes a pre-built DOS.SYS for reference.

4. Build the Utilities

In addition to the kernel, the repository contains source for several utilities: CHKDSK.ASM, FORMAT.ASM, MODE.ASM, and others. Compile each with the same ASM assembler. For example:
ASM CHKDSK.ASM
LINK CHKDSK.OBJ
The result will be CHKDSK.EXE.

5. Test Your Build

Copy the newly built DOS.SYS and utility binaries to a bootable floppy disk image (or use a DOS emulator that can load a custom kernel). Boot the system—it should start up as 86-DOS 1.00, displaying a prompt. Run CHKDSK to verify the utilities work. If you have a real vintage PC, you can write the image to a floppy and boot from it. Expect a minimal command-line environment—no directories, no hard drive support—just raw disk access and basic file management.

From QDOS to GitHub: Building Your Own DOS from 45-Year-Old Source Code
Source: itsfoss.com

6. Explore the Code

Read through the assembly source to understand how Paterson implemented CP/M API compatibility, memory management, and the file system. Key files:

Annotations in the code from the historians clarify obscure sections and point out differences from the shipped PC-DOS 1.0.

7. (Optional) Compare with Later Versions

The repository also includes snapshots from PC-DOS 1.00 development. Compare the 86-DOS 1.00 kernel with these to see what changed before IBM's release. You'll find additions like support for the IBM PC's 8250 UART and the 8259 interrupt controller. This is a valuable lesson in how operating systems evolve under hardware constraints.

Common Mistakes

Summary

This tutorial walked you through obtaining and compiling the earliest known DOS source code—86-DOS 1.00, the direct ancestor of MS-DOS. You set up an emulation environment, assembled the kernel and utilities with the original Seattle Computer Products ASM assembler, and booted your own copy of a 45-year-old operating system. Along the way, you explored the assembly code that gave Microsoft its foothold in personal computing. The repository is a goldmine for retro-computing enthusiasts and students of low-level systems. Dive in, tweak, and appreciate the humble beginnings of an industry giant.

Explore

10 Key Highlights of Python 3.15.0 Alpha 6 Building a Smarter Community Search: A Guide to Hybrid Retrieval and Model-Based Evaluation Rust's Hurdles: Insights from Extensive Community Interviews Fliti Galaxy Projector: Your Ultimate Guide to the $25 Starry Room Displays Revitalizing Legacy Systems: A Practical UX Improvement Guide