Did Microsoft steal DOS from CP/M?

Did Microsoft steal DOS from CP/M? There’s $100,000 in it for you if you can prove they did.

Digital forensics consultant Bob Zeidman still says no. I’ve written about him before. But the rumors persist, hence the reward. So how would one go about claiming it?

Start with what we know.

If DOS had stolen CP/M code in it, there are two ways for it to get there. They could have copied source code, or copied machine code directly from a running computer’s memory.

Poke around enough in old Usenet archives, and you can find both theories. Zeidman tested the first theory, although the problem with it is that CP/M and MS-DOS are written in different languages. Gary Kildall wrote CP/M in his own high-level language, PL/M. Tim Paterson wrote MS-DOS in 8086 assembly language.

There was a second scenario in play. CP/M ran on computers that used the Intel 8080 or 8085 CPU or their cousin, the Zilog Z-80. MS-DOS ran on the Intel 8086. The 8086 is a different CPU, but Intel deliberately made it fairly straightforward to adapt 8080/8085 code to run on the 8086. Intel even had some tools that would help you translate 8080 code into working 8086 code.

So it would be possible to dump the memory from an 8080-based machine running CP/M, run it through Intel’s translator, and get a jump start on the project. The translated code wouldn’t work as-is. But fixing that code would be less work than writing from scratch.

If Tim Paterson simply read the CP/M programming manuals and duplicated the APIs using his own code, everything he did was legal, under 1980 law. Clean-room API reimplementations are OK, and that’s essentially what Compaq did when it cloned the IBM PC. There would be no stolen code present if he did it that way.

If Tim Paterson dumped the memory out of a computer running CP/M and translated the contents of that memory into 8086 assembly language to create the foundation for MS-DOS, that would have been illegal.

Zeidman observed that CP/M and DOS had identical APIs. That’s not a new observation–it was part of the original design spec. When Tim Paterson sued Harold Evans, Kildall’s biographer, the court found Paterson had indeed copied CP/M’s API.

This nondescript floppy contains PC-DOS 1.0, the earliest released version of Microsoft's MS-DOS.
This nondescript floppy contains PC-DOS 1.0, the earliest released version of Microsoft’s MS-DOS. Rumors abound that an encrypted Digital Research copyright message lurks on this disk, but no one has demonstrated it in more than 20 years.

You see, IBM wanted CP/M so there would be an instant library of software for the IBM PC to run. Since that was technically impossible at the time given the other things they wanted, they settled for something close enough to make porting CP/M software to the new IBM PC very easy.

The problem is detecting how Paterson implemented the API is complex. It’s akin to trying to prove somebody writing in Portuguese plagiarized from a Spanish translation of something originally written in English.

What else we know

Kildall left behind some clues. CP/M contained code to stop would-be cloners from stealing code. There is an encrypted copyright message that, if changed, causes CP/M to stop working. Kildall used this to stop illegal clones in the 1970s.

We know that Kildall had experience with encryption in the Navy in the early 1970s. So we have to look at what technologies he would have been exposed to. One option is linear feedback shift registers. The state of the art at the time were Feistel block ciphers, but implementing that on early 8-bit CPUs seems a bit much. Linear feedback shift registers likely were good enough for this application.

Kildall’s writings suggested these checks happened early in the boot sequence. It would likely make more sense to look for them in the binaries rather than the source. Since Digital Research shared source code with its OEMs, I wouldn’t expect the source code for this particular check to survive, but it ought to be possible to observe with a debugger.

The key is to find the code in CP/M first. Then find the byte sequence it’s decoding. Then look for the same byte sequence in MS-DOS 1.0, 1.1 or 1.2. If it’s not there, all of this is rumor.

The rumors

Gary Kildall believed at some level that CP/M code found its way into MS-DOS. Based on the questions he asked, it sounded like he recognized something distinctive about the way he wrote code, or the way his PL/M compiler generated code, that a programmer implementing something similar from scratch wouldn’t do.

There are other stories, like the existence of an obscure bug in the FCB implementation that was present in both CP/M 1.3 and DOS 1.0.

John C. Dvorak alluded to this story way back in 1996 but didn’t give any details. On Leo Laporte’s This Week in Tech podcast, episode 73, Jerry Pournelle talked about an Easter egg that appears in early versions of MS-DOS that print a surprising message. It’s at 16:10 in the podcast.

I can tell you, I saw Gary Kildall take a copy of DOS 1, 1.1 or 1.2, and I have written down what he did to get it, and it brings up “copyright Digital Research Corporation, Gary Kildall programmer.” I am not kidding. It was in the code. I’ve seen it! This is not somebody-told-me-this. Gary showed it to me.

I’m not telling you what I’ve heard. This I saw. I was up there at Pebble Beach. Bill Godbout said you’ve gotta come up here, Gary will show you something but he’s only going to show it to you in person, he’s not going to talk about it on the phone. And I come up there, and by [golly], there it was, and it really popped it up. Which is why DOS 2 is so different from DOS 1. DOS 2 was written in a clean room. It’s also why if you own DR-DOS, you will never be sued for look and feel. I don’t know all the terms of the settlement with Kildall, but I know that was in it.

The lawsuit that wasn’t

But what is this “settlement with Kildall” that Pournelle alluded to? Finding that story is nearly impossible. When you do find it, it usually looks like this:

1982: Digital Research sued Microsoft and IBM over copyright infringement. Gary Kildall sat down at a fresh IBM PC, typed a few keystrokes and [popped] up a Digital Research copyright notice. This impressed the judge. DR won the case, monetary damages, and the right to clone MS-DOS. Microsoft won a gag [order] to make sure the public never heard about this case.

The same story appears in a few books, such as The Telecommunications Illustrated Dictionary, Second Edition by J.K. Petersen. But none go into any more detail than that.

In Harold Evans’ chapter on Kildall in They Made America, Evans recounts how Kildall made a deal with IBM. But when it comes to Microsoft, Evans said Kildall and Digital Research did not sue, and made a mistake in doing so. At the time, nobody had ever sued over computer software copyright infringement. Digital Research’s attorney, Gerry Davis, now says it was a mistake, but it’s too late for that now. SCO, the company who ended up owning Digital Research’s intellectual property, learned the hard way that suing IBM might not end well.

I can’t find any mention of a Digital Research/Microsoft lawsuit in any magazines of the time. Perhaps they couldn’t have talked about a settlement but they certainly could have talked about the existence of the case. It would have been big news in the computer field. So I think the story of Kildall demonstrating infringement in front of a judge has to be a myth.

Digital Research did have a settlement with IBM, which may be what he was referring to. Or perhaps he was referring to the settlement between Microsoft and Caldera. I’m not sure.

So did Microsoft steal DOS from CP/M? There’s still no firm answer, I don’t think. But now that there’s 100 grand on the table, I think we’re more likely to find an answer. Now there’s some real motivation, regardless of which side you fall on, to look for the answer.

One thought on “Did Microsoft steal DOS from CP/M?

  • August 8, 2016 at 10:34 am
    Permalink

    Man, thanks for the memory nudge!

Comments are closed.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux