Click here to Skip to main content
15,886,963 members
Articles / Programming Languages / Assembler
Tip/Trick

Building MS-DOS 1.25

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
15 Feb 2024CPOL3 min read 3.6K   173   6   1
How to build Microsoft Disk Operating System 1.25
The source code of Seattle Computer Product's release of MS-DOS 1.25 was published by Microsoft on GitHub and may be freely published and distributed by anyone. This tutorial will help you to build the MS-DOS 1.25 source code.

1. How to Build it?

MS-DOS 1.25 was published on GitHub MS-DOS 1.25 was completely written in 8086 assembly so it needs to be assembled using an assembler (MASM and SCP 8086 Assembler). The object file(s) produced by MASM will then be linked to produce an executable which will then be converted to a raw binary executable (.COM). The .HEX files produced by SCP 8086 Assembler will be converted directly to raw .COM files using the HEX2BIN utility.

2. How to Make DOS?

This is as hard as the source code for the DOS BIOS (IO.SYS) was designed for Virtual Box and is not PC-compatible. Theoretically, the compiled binaries should work on Virtual Box but using the source code release by Microsoft alone will not produce a valid bootable disk as no source code for the boot sector is given. I do have access to the source code of the boot sector but as a result of Microsoft not releasing it publicly, I will not share it. This basically means with only the source code published by Microsoft, it is impossible to produce a working copy of MS-DOS 1.25.

3. What is Required

The following is required for compiling MS-DOS 1.25:

  1. Microsoft Macro Assembler (MASM)
  2. Microsoft 8086 Object Linker (LINK)
  3. EXE to Binary Conversion Utility (EXE2BIN)
  4. Seattle Computer Products 8086 Assembler (ASM)
  5. HEX to Binary Conversion Utility (HEX2BIN)
  6. A copy of the MS-DOS 1.25 source code

4. Details

The files STDDOS.ASM and MSDOS.ASM can be assembled to produce the DOS kernel and they are MASM compatible. All switches are set in the file STDDOS.ASM. MSVER generates binaries for MS-DOS with Microsoft copyright strings, IBM produces IBM PC-DOS binaries with IBM copyright strings. There is no need to change HIMEM and DSKTEST unless you want to experiment more with it.

COMMAND.ASM can be assembled using MASM to produce the command interpreter for MS-DOS. Just like the DOS kernel, you may use switches to produce both MS-DOS and IBM PC-DOS binaries. The HIMEM switch is also present.

ASM.ASM, HEX2BIN.ASM, IO.ASM and TRANS.ASM were written by SCP and must be assembled using their own assembler. IO.ASM have switches to configure the floppy disk controller and the Cromemco 4FDC is currently supported by The SIMH Altair 8800 Z80 simulator.

5. Compile It

Now, we are ready to compile MS-DOS 1.25 for the first time! If you are experienced in assembly, used those assemblers and tools listed above, then you should be able to get everything done by yourself. For those unable to assemble it on their own, my build disk will save your time.

Here is how to build MS-DOS 1.25 with the build disk:

  1. Download the build disk.
  2. Create a new virtual machine using your favorite emulator or hypervisor.
  3. Add a floppy drive, load the build disk.
  4. Start the virtual machine (it should boot from the build disk).
  5. Check the filenames using the DIR command and it should return:
  6. Type in MK <FILENAME> to assemble that particular component or MK ALL to assemble everything.
  7. Once you have everything assembled, type in DIR *.COM and DIR *.SYS to see the executable produced, it should be similar to:
  8. You have done it! You can now copy those executables to another disk or extract them or run them!

6. Experiments

Now we can experiment more with the source code and make modifications! Go ahead and try assembling it with the IBM switch on! Try customizing the strings and add Easter eggs...

7. Summary

Now we have MS-DOS 1.25 compiled/assembled and here are the binaries just in case.

Co-Author: Lucas Brooks

History

  • 15th February, 2024: Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I'm a Royal Society of the Arts Fellow, I'm a Moore, Chapman, Hathaway, McCulley, Spencer and Lyon and Irish Ashkenazi Jewish. Microsoft System Integrator with valid contract from 2002-present. INTJ-T tested at the University of California, University of Virginia Computer Science Alumni. With 3.5 GPA Scholar Award. I was UVa's ACM Vice President in 2008-2010. I'm also Windows 7/2008 Internals Certified. Former Macromedia User Group trainer from 1999. WK3 was released on my birthday.

I was born in 1978. I grew up with Alpha, MIPS, VAX and x86 computer architecture. My first computer was a Tandy TRS-80 with Microsoft XENIX in 1984. AT&T System V at Sullins Academy in 1983. I later bought Apple Macintosh Pro's, Hewlett Packard and Dell PC's and servers running OpenVMS, Apple's System, Mac OS X and Windows. I've bought 4 MSDN enterprise subscriptions and have three Microsoft Bizspark grants.

I've worked for ID Software for Quake 1, 2 and 3 Arena. I was born with as lisp. I look forward to Windows Embedded in 2029. To bring back modular round trip engineering of Windows. Because I think Linux is bad corporate Darwinism. Microsoft has a nice UNIX corporate ideology. I'm looking forward to when Microsoft can be called a Computer Science company not IT.

I've done work with BSD in 2001 on the Common Desktop Environment for x86. I would like to teach the top down software design approach of Bell Labs Plan 9 to students. I have submitted my Bell Labs distinguished academic scholar application to Nokia Bell Labs awaiting approval in 2026.

My licensed work is in the Computer History Museum for Macromedia. I own a Macromedia Patent Portfolio. I helped ship Macromedia Studio 8 and Windows Server 2003 and the Windows 11 Dev Drive. I also worked on official Windows 8/8.1 PowerPoint Storyboards. I'm also A Windows Compact Embedded Shared Source Initiative Licensee 2000-2023. Future work will be for Mathworks in Matlab. My family lives in NY, California and Virginia.
This is a Collaborative Group (No members)


Comments and Discussions

 
QuestionGreat job, but why not MS DOS 2.0? Pin
steppeman17-Feb-24 5:48
steppeman17-Feb-24 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.