Gary Kildall started Intergalactic Digital Research (later shortened to Digital Research or just DRI) and created the first microcomputer operating system, CP/M, used on many hobbyist personal computers before Apple and IBM introduced their machines. But Microsoft captured the microcomputer OS market, and with it the market for software applications, with its MS-DOS that came out years later for the IBM PC. For decades, a rumor has persisted that DOS was illegally copied from CP/M and that the fortune accumulated by Bill Gates rightfully belonged to Gary Kildall.
Several years ago, I did a forensic comparison of the binary code for MS-DOS to the source code for CP/M. I could find no signs of copying, and wrote a journal paper and an article about my examination. Since that time, the Computer History Museum in Mountain View, California received the source code for MS-DOS 2.0 from Microsoft and was given permission to make it public. The museum also received the source code for MS-DOS 1.1 from Tim Paterson, the original developer of DOS who was originally contracted by Microsoft to write MS-DOS. Comparing source code is more accurate than comparing binary code, which can produce false negatives, so I decided to perform another comparison to put the question to rest for good.
In addition to source code, I examined whether the DOS commands were copied from CP/M and whether the DOS system calls were copied from CP/M. These issues have also been discussed and debated for decades.
Finally, I will discuss whether DRI could have had a legitimate copyright claim against Microsoft.
In 1980, IBM started a “skunk works” project in Boca Raton Florida to create a personal computer. This independent development group within IBM decided that they would focus on the hardware and partner with one of the small microcomputer companies already producing and selling programs. Thirty-six years ago, in August 1980, IBM executives flew to Bellevue, Washington to meet 24-year old Bill Gates who ran Microsoft, a company selling a very successful version of the BASIC programming language. Microsoft didn’t have an operating system, so Gates sent them to see his friend Gary Kildall at DRI in Pacific Grove, California, who had CP/M.
At this point there are several versions of the story. In one version, Kildall and his team, described by some as a bunch of hippies, didn’t trust “Big Brother” IBM. Avoiding the meeting, Kildall took off in his plane for a joyride. The IBM execs were met by Kildall’s wife and business partner Dorothy who refused to sign IBM’s non-disclosure agreement (NDA), a standard business document that would have kept the discussion secret. After several hours of quibbling over the NDA, not even getting to the essential negotiation, the IBM executives got frustrated and left.
In another version of the story, Kildall and DRI employee number 1, Tom Rolander, went off in Kildall’s plane to deliver software to a customer and put their chief negotiator Dorothy in charge. Dorothy felt the NDA was too restrictive and their attorney Gerry Davis advised her to wait for Kildall to return. Kildall returned later that day but again accounts differ as to whether he signed the NDA or even participated in discussions with IBM.
In any case, no deal was signed. The IBM negotiators flew back to Seattle that day and again met with Gates, still in need of an operating system. Gates decided to acquire the rights to Q-DOS from Seattle Computer Products for $75,000, and hired its author, Tim Paterson, to modify it into MS-DOS for licensing to IBM as PC-DOS.
The IBM PC became a huge success and Microsoft displaced DRI as the leading microcomputer operating system company. Kildall maintained that QDOS, and subsequently MS-DOS, had been directly copied from CP/M and thus infringed on his copyright. DRI attorney Gerry Davis claimed that forensic experts had proven that MS-DOS had been copied from CP/M and infringed DRI’s copyright but decided not to go to court.
Cleaning the Code
I had access to several versions of CP/M source code, but the most complete early version was a low resolution, dot matrix printout of version 1.3. I had to perform a number of time-consuming steps to get usable code.
First I had to remove things that were not source code, including stamps on each page indicating that the code is copyright by Digital Research in 1976. I had to cut out the stamps from each document page image and replace any underlying text that I could identify. I also manually cut out line numbers on the left margins and memory maps that weren’t part of the actual source code.
Some of the code ran off the printed page. Usually these were comments, which didn’t affect the functionality of the code but might have contained potential clues to copying. Unfortunately, anything printed off the page was lost forever.
I then performed OCR scanning on each page image and did several passes of manual corrections where the OCR didn’t produce good results, usually because the printouts weren’t clear.
I found a number of places where strange strings of characters showed up or unusual instructions that weren’t documented anywhere. I initially assumed these were some kind of deprecated instructions and searched online, put questions on various CP/M groups, and even asked Tom Rolander, DRI’s first employee. No one could identify these strange instructions. When I eventually saw a pattern, I realized that these were printer glitches causing extraneous letters to print at random times, and the printer to spew out random strings at other times. Carefully eliminating these superfluous characters, I ended up with legitimate source code that ran through an assembly language parser without errors.
Source Code Comparison
For the code comparison, I used the forensic techniques that I’ve developed at my consulting company Zeidman Consulting over the past 15 years or so, as well as the CodeSuite® tool from my software company Software Analysis and Forensic Engineering and followed the procedure that I’ve written about in my textbook on software forensics.
Searching for Clues
The first part of the process is to search for certain clues in the source code including the string “copyright,” company names, programmer names and initials, and any other relevant terms that can be thought of. You might be surprised how many times a copyright notice for company A can be found in the source code for company B it was copied.
Interestingly, a search for the terms “CP/M” and “CPM” produced some results in the DOS source code:
; 1.12 10/09/81 Zero high half of CURRENT BLOCK after all (CP/M programs don't)
STOSB ;Set it to zero (CP/M programs set low byte)
STOSB ;Set it to zero (CP/M programs set low byte)
STOSB ; Set it to zero (CP/M programs set low byte)
My research and my reading of the code led me to believe that the code above has something to do with the file system. Because it discusses differences between DOS and CP/M, it’s interesting, but not proof that the code was copied from CP/M. However, I also found the following reference to CP/M in the DOS code:
XOR AX,AX ; zero extent, etc for CPM
MOV AL,BYTE PTR [BX]
CMP AL,1AH ;^Z?
JZ FILEOFJ ;CPM EOF
CMP AL,0DH ;CR?
JZ FILEOFJ ;CPM EOF
The CP/M file system used fields called “extents” to keep track of files in directories. The sizes of CP/M files were stored in sectors of 128 bytes each. If a file filled up less than the 128 bytes of the last sector, the other bytes were filled with an ASCII Control-Z character as an end-of-file (EOF) marker.
DOS had a different way of keeping track of files, by recording file sizes in bytes, and so no EOF marker was needed. The code above seems to indicate that MS-DOS could read CP/M files and had special code to do so, but my initial research showed that CP/M files were incompatible with DOS. Was this a clue to copying?
The answer is no. Further research showed that very early versions of DOS were designed to read and write CP/M files. The code I found confirms that compatibility. Eventually that compatibility was dropped from DOS. This is not a sign of copying.
Source Code Correlation
The next part of the process is to run the CodeMatch® function of CodeSuite on the two sets of code. CodeMatch divides source code into elements: statements, comments, strings, identifiers, and instruction sequences. It then compares these elements to find matches or partial matches in the two sets of code, calculating correlation scores for pairs of files.
Finding a correlation between the source code files for two different programs does not necessarily mean that illicit behavior occurred. There are six reasons for correlation between two different programs, only one of which is copying. These reasons are:
- Third-Party Source Code . Both programs incorporate code from third parties.
- Code Generation Tools . Both programs were developed using the same code generation tool.
- Commonly Used Identifier Names . Both programs contain identifier names that are commonly taught in schools or commonly used by programmers, particularly in certain industries.
- Common Algorithms . Both programs use an algorithm that is taught in many programming classes or is found in a popular programming textbook.
- Common Author . Both programs were developed independently but written by the same programmer.
- Copied Code (Authorized or Plagiarized) . If none of the other reasons account for the correlation, then the code was copied from one program to another. If the copying wasn’t authorized by the original owner, then it’s plagiarism.
It’s important to remember that all of the first five kinds of correlation could have resulted from copied code, but it can’t be reasonably proven. If some correlation can only be explained by copying, then that is proof of copying, and then it makes sense to look at the surrounding code, and the previously eliminated correlations, to determine the extent of the copying.
The process for filtering out correlation due to reasons other than copying uses the SourceDetective® function of CodeSuite to search the Internet for other references to matching program elements. This filtering process is illustrated in Figure 1. If an element is found in two programs but nowhere else on the Internet, then it’s very likely due to copying.
Figure 1. Filtering process to find copying (Source: Bob Zeidman)
DOS was written in assembly code but CP/M had parts written in assembly code and other parts written in PL/M code. I needed to do two comparisons, DOS assembly code to CP/M assembly code and DOS assembly code to CP/M PL/M code.
Table 1 shows the search scores for the rarest matching statements in the two programs. As you can see, the first statements in the table are found in very few places on the Internet, which could indicate copying, but examining the code showed that these statements in the two different programs are part of very different routines performing very different functions, indicating that they are not signs of copying.
Table 1. Statements and hits on the Internet (Source: Bob Zeidman)
Table 2 and Table 3 show the rarest matching comments, strings, and identifiers. Other than the first comment, all the matches are fairly common and provide no signs of copying. Also, the code surrounding that first comment in the two programs comprise very different routines performing very different functions, indicating that it is not a sign of copying.
Table 2. Comments and strings and hits on the Internet (Source: Bob Zeidman)
Table 3. Identifiers and hits on the Internet (Source: Bob Zeidman)
My conclusion is that DOS source code was not copied from CP/M source code. The small number of correlations between DOS source code and CP/M source code can all be explained by reasons other than copying.
The commands for DOS and CP/M are given in Table 4 along with those of VMS, the operating system from Digital Equipment Corporation for the VAX computer that was released in 1977 and Apple DOS that was released in 1978.
Table 4. MS-DOS, CP/M, and VMS commands (Source: Bob Zeidman)
The commands were not copied; they were simple, descriptive terms that were common to other operating system such as VMS and Apple DOS.
The comments from the CP/M source code and the DOS source code for implementing system calls are shown in Table 5. Programs running on DOS and CP/M used different code to perform system calls, and the code to implement the system calls was very different in the two programs. However, the numbers for system calls 0 through 5, 9 through 11, 13 through 23, 25, and 26 represented identical functions.
Table 5. CP/M and DOS system calls (Source: Bob Zeidman)
The DOS system calls were definitely copied from the CP/M system calls. Given the quantity of identical numbers representing identical functions, it is clear that Tim Paterson referenced the CP/M manual when writing DOS.
 I removed the code to make the similarity clearer, because the code in both programs is very different.
 Based on the code comments and research into DOS and CP/M. It’s possible that other system calls also use identical numbers, but the functions of the system calls are not clearly described.
Was There Copyright Infringement?
Here are my conclusions about copying. And because many people are interested in whether DRI could have brought a copyright lawsuit against Microsoft, I will tie in my conclusions with that possibility. Keep in mind that while I have extensive experience in copyright law, I’m not a lawyer and the law is constantly changing.
There was no copied source code and so there was no copyright infringement of the code.
Commands were not copied, but even so, the commands are no copyrightable because they are simple and descriptive of the functionality. Only creative expression that is not simple description and not functional can be copyrighted.
The system call numbers were copied. While a list of numbers is not by itself creative and thus not copyrightable, a list of numbers that arbitrarily represent specific functions is creative and thus copyrightable. Furthermore, DRI appears to have indicated its copyright by putting a copyright notice on the CP/M Interface Guide that describes the system calls.
On the other hand, Microsoft could have prevailed by showing that it was a fair use to copy the system calls. According to copyright law, fair use is determined by the following factors:
- the purpose and character of the use, including whether such use is for nonprofit educational purposes;
- the nature of the copyrighted work, especially whether it benefits the public;
- the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and
- the effect of the use upon the potential market for or value of the copyrighted work.
It’s clear that the copying would not pass the first two factors. DOS was a commercial product sold at a profit and it would be hard to argue that the copying served a public benefit. Therefore to defeat a copyright infringement charge, Microsoft would have had to show that the amount of copyrighted material copied into DOS was minimal and that copying the CP/M system calls did not, by itself, cause DRI any financial harm.
I believe that DRI could have brought a legitimate copyright claim against Microsoft and that Microsoft would have had a good chance of avoiding liability by claiming a fair use defense.
The Zeidman Challenges
I’m confident in my conclusion, so I’ve decided to offer two cash rewards to back it up. The first Zeidman Challenge is an offer of $100,000 reward to anyone who can use accepted forensic techniques to prove that Microsoft copied MS-DOS source code from DRI’s CP/M source code. The second Zeidman Challenge is an offer of $100,000 reward to anyone who can demonstrate or find source code for a secret function in MS-DOS that prints Gary Kildall’s name or a copyright notice for DRI, as was claimed by science fiction author and computer pundit Jerry Pournelle to John C. Dvorak on the podcast This Week in Tech (TWiT) on October 15, 2006. The award details and specific criteria will be announced shortly.
- Steve Hamm and Jay Greene, “The Man Who Could Have Been Bill Gates,” BusinessWeek , October 25, 2004, http://www.businessweek.com/magazine/content/04_43/b3905109_mz063.htm
- Computer History Museum, What Was The First PC? http://www.computerhistory.org/revolution/personal-computers/17/297, retrieved 8/7/2013
- James Wallace and Jim Erickson, 1992. Hard Drive , John Wiley & Sons. ISBN 0-471-56886-4
- Mary Bellins, “Putting Microsoft on the Map: History of the MS-DOS Operating Systems, IBM & Microsoft,” com Guide , http://inventors.about.com/od/computersoftware/a/Putting-Microsoft-On-The-Map.htm, retrieved 12/5/2011
- Clive Akass, “The man who gave Bill Gates the world,” Computeract!ve, 11/8/2006, http://www.computeractive.co.uk/pcw/news/1923088/the-bill-gates-world
- Tony Smith, “Microsoft's MS-DOS is 30 today,” The Register , July 27, 2011, http://www.reghardware.com/2011/07/27/ms_dos_turns_30
- Mat Honan, “Bill Gates Spent the Best Money of His Life 30 Years Ago Today,” Gizmodo , http://gizmodo.com/5825184/bill-gates-spent-the-best-money-of-his-life-30-years-ago-today, July 27, 2011
- Doug Conner, “Father of DOS Still Having Fun at Microsoft,” MicroNews , 4/10/98, http://www.patersontech.com/Dos/Micronews/paterson04_10_98.htm
- Bob Zeidman, “A Code Correlation Comparison of the DOS and CP/M Operating Systems” Journal of Software Engineering and Applications , http://www.scirp.org/journal/PaperInformation.aspx?PaperID=46362#.U4WDefldWCU, May 27, 2014.
- Bob Zeidman, “Did Bill Gates Steal the Heart of DOS?” IEEE Spectrum , http://spectrum.ieee.org/computing/software/did-bill-gates-steal-the-heart-of-dos, July 2012.
- Bob Zeidman, The Software IP Detective’s Handbook , Prentice Hall; May 8, 2011.
- Babcock, Charles, “VMS Operating System Is 30 Years Old; Customers Believe It Can Last Forever,” InformationWeek , November 11, 2007, http://www.informationweek.com/vms-operating-system-is-30-years-old-customers-believe-it-can-last-forever/d/d-id/1061051.
- Roberge, D.G., “DOS 3.1,” everything2 , http://everything2.com/title/DOS+3.1, retrieved August 1, 2016.
- CP/M Interface Guide http://www.cpm.z80.de/randyfiles/DRI/CPM_1_4_Interface_Guide.pdf, © Digital Research 1976, 1978.
- Tysver, Daniel A., “Fair Use In Copyright Law,” Bitlaw , http://www.bitlaw.com/copyright/fair_use.html, retrieved August 1, 2016.
- Podcast This Week in Tech (TWiT) , Episode 73: Hello Armenia, October 15, 2006, ZeidmanConsulting.com/DOS_comparisons, originally at http://aolradio.podcast.aol.com/twit/TWiT0073H.mp3, retrieved 12/10/2011.
Bob Zeidman is considered a pioneer in the fields of analyzing and synthesizing software source code. He is the president and founder of Zeidman Consulting, a premier contract research and development firm in Silicon Valley that provides engineering consulting to law firms regarding intellectual property disputes, and he is the president and founder of Software Analysis and Forensic Engineering Corporation, the leading provider of software intellectual property analysis tools, having pioneered the field. His book The Software IP Detective’s Handbook is one of the main books for engineers and lawyers on software intellectual property
Editor's note: Updated for corrections on 7 Aug 2016.