HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
MS-DOS
Assembly2018–2026
microsoft / MS-DOS · Archived

MS-DOS

The original sources of MS-DOS 1.25, 2.0, and 4.0 for reference purposes

68Distinct people
79Mentions
0Explicit recommenders
32.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The original sources of MS-DOS 1.25, 2.0, and 4.0 for reference purposes

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 9:02:44 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year79 dated mentions

Observed mentions: 2018-09-28 22:44:43 UTC to 2026-09-20 23:50:56 UTC.

051015202018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 10 mentions; 0 submissions, 10 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 0 submissions, 10 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 22 mentions; 2 submissions, 20 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC826
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC505
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC10010
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC606
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC10010
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC615
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC22220
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC707
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC505

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
MS-DOS v1.25, v2.0, v4.0 Source Code This repo contains the original source-code and compiled binaries for MS-DOS v1.25 and MS-DOS v2.0, plus the source-code for MS-DOS v4.00 jointly developed by IBM and Microsoft. The MS-DOS v1.25 and v2.0 files were originally shared at the Computer History Museum on March 25th, 2014 and are being (re)published in this repo to make them easier to find, reference-to in external writing and works, and to allow exploration and experimentation for those interested in early PC Operating Systems. License All files within this repo are released under the MIT License as per the LICENSE file stored in the root of this repo. For historical reference The source files in this repo are for historical reference and will be kept static, so please don’t send Pull Requests suggesting any modifications to the source files, but feel free to fork this repo and experiment 😊. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Read the full README on GitHub

What Hacker News says

10 sources
You are right. It was DEBUG.COM. Indeed it did not have an assembler. It had a disassembler though. An archived copy from MS-DOS v1.25 can be found here: https://github.com/microsoft/MS-DOS/blob/master/v1.25/bin/DE... C:\>DEBUG.COM -A ^ Error -N HELLO.COM -L -U 100 107 0340:0100 B409 MOV AH,09 0340:0102 BA0801 MOV DX,0108 0340:0105 CD21 INT 21 0340:0107 C3 RET - There is another copy of the debugger for MS-DOS v2.0 here: https://github.com/microsoft/MS-DOS/blob/master/v2.0/bin/DEB... This one does does have an assembler. C:\>DEBUG.COM -A 0482:0100 MOV AH, 2 0482:0102 MOV DL, 41 0482:0104 INT 21 0482:0106 RET 0482:0107 -N A.COM -R CX CX 0000 :7 -W Writing 0007 bytes -Q C:\>A A C:\>
In A 23-byte “hello, world” program assembled with DEBUG.EXE in MS-DOS
Note that the OEM README[1] for MS-DOS 2 (the first version with a hierarchical filesystem) suggests that it was at IBM’s insistence that MS-DOS used backslash for directories and slash for options, rather than slash for directories and hyphen-minus for options (even though Microsoft’s own programs for CP/M apparently used slash for options due to DEC influences, instead of the brackets used by CP/M itself[2], so this is a bit of a tangle). The documentation and examples for CONFIG.SYS[3] also bear an evident Unix influence, note in particular AVAILDEV and SWITCHAR. The MS-DOS-specific calls for file descriptors (as opposed to CP/M-compatible calls for FCBs) are called “XENIX file calls” in the source[4]. (All DOS system calls for files accepted either separator, but the option parsers would retrieve SWITCHAR[5] and give it precedence.) [
Read the rest
In CP/M is really open-source now
> For people who don't know DOS: DOS didn't really have multiple processes. Well, compared to CP/M, it did. CP/M only supported a single program being loaded into memory at a time [0]–because every program was loaded into memory at the same absolute memory address (0x100). By contrast, DOS could have multiple processes in memory simultaneously, even though only one of them at a time could be the active foreground process. DOS processes can launch child processes; the parent will be suspended (while remaining in memory) while the child process executes, but will then resume execution once the child process finishes. Under CP/M, that was impossible, there was no API to do that, the architecture didn't support the existence of one. Indeed, while the main execution of the parent process would be suspended while the child process ran, any inte
Read the rest
rrupt handlers installed by the parent would still be invoked, so some of the parent's code could still run while the child was executing. A parent process can even expose an API to its children – which is exactly what COMMAND.COM does (such as INT 2E which I mentioned) That's what makes TSRs possible. A TSR is essentially just an ordinary program, the only difference is that when it exits, it tells the OS to leave the process in memory rather than unloading it. By contrast, the CP/M equivalent to TSRs, RSXs (Resident System Extensions), are completely different from ordinary CP/M programs. They are loaded at a variable address near the top of memory, instead of a fixed address at the bottom. > COMMAND.COM made part of it resident (TSR), which is how it "survived" invoking other applications. COMMAND.COM isn't a TSR. COMMAND.COM's "residence" is essentially the same as any other program which spawns a child program under DOS, the parent always remains in memory while the child runs. Unlike a TSR, when a COMMAND.COM instance terminates (the initial COMMAND.COM instance won't, but inferior instances will), it doesn't stay in memory, it is unloaded. What makes COMMAND.COM somewhat unusual, is that it splits itself into two portions, a "resident" portion and a "transient" portion. The resident porition is loaded at the bottom of memory, the transient portion is loaded at the top of free memory, without being officially allocated. Since DOS normally allocates memory in a bottom-up manner, if the child program doesn't use much memory, the transient portion will not be overwritten. When the chlid program returns, COMMAND.COM tests the integrity of the transient portion – if it finds it has been overwritten (because the child program needed that much memory), it reloads it from disk before continuing. That's quite unusual behaviour, but still rather different from how TSRs behave. > At any given point, there was exactly one process running, and all the state you'd typically associate with a process was "system-wide". That's not true. When you spawn a child process, you can either let it inherit your environment variables, or you can provide it with a new environment segment – thus each process in the system can potentially have different environment variables. Similarly, file handles are per-process. Similar to Unix – indeed, the DOS 2.x file handle design was copied from Unix – every handle has an "inherit" flag, which determines whether child processses inherit that handle from their parent. DOS keeps track of which processes have which files open, so when the last process with that file open terminates, the file is closed. Likewise, allocated memory blocks are per-process, so when a process is unloaded, DOS frees its memory blocks, but not those of ancestor processes or TSRs. If DOS has per-process environment variables, file handles and memory allocations – why not current directories as well? I don't know, but I can speculate: DOS 2.0 copied the idea of a current directory from Unix, so like Unix they probably would have initially planned to make it per-process. However, requirements for backward compatiblity with DOS 1.x programs pushed them towards having a separate current directory per each drive. Keeping a separate current directory per-process might have been feasible if it was just a single current directory, but having to do so separately for each drive would have made it a lot more complex and wasteful of memory. I think that is why they made it system-wide instead of per-process. Microsoft always planned to make MS-DOS a multi-tasking operating system, and much of its internal architecture was designed to support gradual evolution towards multi-tasking [1] – which makes its architecture somewhat closer to a multi-tasking operating system than that of a true single-tasking OS such as CP/M. In fact, they even developed a multi-tasking version of MS-DOS (the so-called "European MS-DOS 4.0" [2]) but it was largely unsuccessful. Eventually Microsoft gave up on the idea of making MS-DOS multitasking, but much of the ideas and experience they developed in trying to do so ended up going into OS/2 and Windows instead. [0] CP/M later evolved into MP/M, which was a true multi-tasking operating system, but I'm not talking about that here [1] See for example this design document in the MS-DOS 2.x source code: https://github.com/microsoft/MS-DOS/blob/master/v2.0/bin/DEV... [2] https://www.pcjs.org/software/pcx86/sys/dos/microsoft/4.0M/
In The Unix-Haters Handbook (1994) [pdf]
Hi! Massively predictable comment making noises about Symantec code-dumping QEMM, DESQview and DESQview/X :) Besides being a lot of fun to read, the latter (which incidentally got some attention on here just a month ago - https://news.ycombinator.com/item?id=29396561) is a whole DOS-native X server. IIUC only Netware's commissioned port of XFree86 comes close to that, but that runs on top of Netware's kernel infrastructure so doesn't really count. Naturally these sorts of situations sadly represent communicative chasms between geeks and management. Case studies in "it wasn't the end of the world" can perhaps be useful. My standard such example is the HP-20b and HP-30b calculators. On the surface they look just like other calculators HP made around the same time period (2008), but there happen to be a set of pins inside the battery compart
Read the rest
ment that allow reprogramming the non-bootloader-locked microcontroller inside. An SDK (https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv018.c...) (consisting mostly of a keypad test demo) filled in the remaining pieces (how the keyboard matrix worked, and how to get code running on the ARM CPU, basically), and the result was the WP-34S firmware that reimplemented calculator functionality completely from scratch (the code samples in the SDK provided zero such functionality). TL;DR, this kind of thing can definitely work and be constrained to a nice little obscure niche of very happy people with low/zero external side effects. In this case, I wouldn't even mind if the code was released under a similar license to what D used to use (https://archive.ph/20161022202138/https://github.com/dlang/d...) before Symantec relinquished control of the project (https://forum.dlang.org/thread/oc8acc$1ei9$1@digitalmars.com) and it was made fully open-source (https://news.ycombinator.com/item?id=14060846). Microsoft licensing GW-BASIC (https://github.com/microsoft/GW-BASIC) and early versions of MS-DOS (https://github.com/microsoft/MS-DOS) under MIT is... fascinating but understandable, yet entirely unnecessary. "View only with no repercussions but not open source" works for historical interest just fine too. What is a very good question is whether adequate precedent was set by relinquishing D that it would be tractably viable for say one or two individual campaigners to internally achieve something similar for arbitrary effectively-abandonware software that is only of historical interest. (If this turns out to not be possible because QEMM and/or DESQview are actively being supported in some way I think the whole retrocomputing scene would be very curious to hear about that through the grapevine!) Thanks for the interesting info about PC-DOS. That's very cool!
In Unidentified PC DOS 1.1 Boot Sector Junk Identified
DOS 2.0 was originally supposed to be a single-user version of Xenix. There were some undocumented options to make it more Unix-like, which were removed in later versions: https://www.youtube.com/watch?v=Vo8NG8T4rWs The connection with Xenix is also pretty clear from the file names and comments in the released source code: https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/... https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/...
In The World of Vintage Operating Systems

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.