Hacker News new | past | comments | ask | show | jobs | submit login
There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source (thenextweb.com)
102 points by bndr on Aug 15, 2016 | hide | past | favorite | 69 comments



> 22 system calls ... that had the same function (and function number) as the CP/M code.

That probably shows evidence of reverse engineering, not code copying, similar to the clean-room reimplementation of IBM's BIOS chips by Compaq.

> the types of actions that send/receive text from a printer, phone, hard disk, etc.

I know they are giving examples for a modern audience, but I was amused by the inclusion of phones in that list. Heck, even hard drives would have been unsupported until version 2 IIRC.


No reverse engineering necessary. Those CP/M system calls were all documented, and it never was a secret that QDOS was heavily modelled after CP/M.


> it never was a secret that QDOS was heavily modelled after CP/M.

Indeed. In fact, when IBM first built the PC, they'd tried to reach a deal with Digital Research to get an official version of CP/M as the PC's flagship OS. The deal fell through for some reason I can't recall at the moment, so IBM went to MicroSoft and explicitly asked for a CP/M work-alike and a BASIC interpreter (which was considered MS's forte back then). This was really a no-brainer, given how supremely popular CP/M and BASIC were on microcomputers at the time.

After Digital Research heard about the QDOS/PC-DOS deal, they threatened to sue IBM, alleging even then that it infringed their intellectual property. But they gave IBM an option: also sell CPM/86 alongside PC-DOS, and IBM gladly obliged. Problem was: PC-DOS cost something like $50 whereas CPM/86 cost something like $250, and consumers voted with their wallets.

(I recently read somewhere that IBM didn't tell DRI about their planned price tag for PC-DOS, and Gary Kildall was right-miffed about the situation).

Besides those two, UCSD Pascal was also available to run on the bare metal of PC, essentially as an OS. I've never used it myself, so I don't know what its OS-y features were like, or if it had any at all.


TFA mentions the 22 calls as if the similarity is in some way potentially surprising though, which I took as meaning they weren't something in that documentation. Internal call points that were (at least at that time) intended to only be used by built-in tools and other internal routines, rather than being part of the published and supported API.


system calls in msdos were interrupts, so you would do the interrupt (int 21h for most parts) with different values of ah register to select the requested service (and remaining registers for arguments). My MS/DOS is a bit rusty - here is the norton guide - the MSDOS bible. http://www.ousob.com/ng/asm/index.php


> int 21h

http://www.ctyme.com/intr/int-21.htm

DOS kernel interrupts by name:

http://www.ctyme.com/intr/cat-010.htm

# Ralf Brown's Interrupt List


> # Ralf Brown's Interrupt List

Wow, that brings back memories of my ASM and Turbo Pascal programming days (inline ASM). I had a dot matrix printout of Ralf's list and it was invaluable.

A couple of weeks back I found some old floppies in the attic and after I unpacked and refitted a 3.5" drive to my desktop machine, I rediscovered a lot of my old work from the late 1980s and early 1990s - for example (using kernel interrupts...) - here's the QT (Qute Time) program which was inspired by an idea from the late, great Jim Button:

https://github.com/linker3000/Historic-code-PC-Pascal-and-AS...

It outputs exciting things like "It's nearly half past three" etc.


I still have some of my code from that era, where with the interrupt list and the "PC Game Programmer's Encyclopedia" I wrote a few games. Space invaders clone (with soundblaster support!). Flat-shaded 3D engine capable of a few hundred polygons per frame.

I've considered putting it on github, but I wouldn't want it to be seen as representative of my current work!


Far too many people underestimate Bill Gates' technical skills. He was an excellent programmer; and in the early 80s, at the top of his game.

Outside of the Bill Gates is evil bubble, he's regarded as a technical genius and a business genius; which is why he was able to trounce his competition. (Basically, he wrote better code and ran better businesses.)

All of the late 1970s and early 1980s personal computers ran Bill Gates' basic. Basic was their operating system.

Why would someone like this need to copy someone else's OS? He didn't, because he was mart enough to write his own OS, and had the experience to do so. The function number thing is no different then Android copying Java's API.


You are aware that Bill did not develop ms-dos right?

They bought QDOS (Quick and Dirty OS): https://en.wikipedia.org/wiki/86-DOS


Yeah, that's kind of the important point. It's not whether BillG or any of his engineers would have needed to rip off CP/M, it's whether the dude they bought it from did.


That just proves his brilliance in the business sense. He was certainly capable of writing MS-DOS himself, but realized he didn't have to and that there was an opportunity in front of him. He certainly exploited it.


It's not really taught these days, but writing simple Disk Operating Systems isn't that hard. Any decent programmer could do it.

And Dos 1.x's feature set was so small that a single programmer should be able to reproduce the it set in well under a year of full-time work. IBM's BIOS did most of the heavy lifting anyway.


The Apple ][ DOS was written in about 4 weeks by Paul Laughton. That doesn't mean it was easy, just that it was possible. (Laughton was/is an extraordinarily capable developer.)

(edit: fixed name!)


Spolsky's related blog post about Gate's technical chops and how he employed them when managing programmers: http://www.joelonsoftware.com/items/2006/06/16.html


>excellent programmer ... top of his game

One of these two assertions may not be true.

GORILLAS.BAS https://en.wikipedia.org/wiki/Gorillas_(video_game) DONKEY.BAS https://blog.codinghorror.com/bill-gates-and-donkey-bas/

Q.E.D.


If IBM asked asked you to make a few short demos of BASIC to bundle along with your interpreter as an example of what it could do, what would you have done?

Keep in mind that this is BASIC, and, as a result, is mostly targeted at people with little to no programming experience. Ideally, someone would be able to open the script up and probably learn something from it.


>Far too many people underestimate Bill Gates' technical skills. He was an excellent programmer; and in the early 80s, at the top of his game.

Err, tons of programmers in that era could program a BASIC or something similar. His skills are not particularly impressive given the time. At best, he was a decent programmer.

Contrast to someone like Bill Joy or Dennis Richie and you get my point.


DOS has been so thoroughly analysed, reverse engineered, examined and hex dumped by very very smart people that if such a function existed it would have been detected LONG LONG ago. There is no such function.


(the function being referred to in the comment above is the one that allegedly prints Kildall's name)


Some context from the QDOS wiki posted below

> Controversy has continued to surround the similarity between the two systems. Perhaps the most sensational claim comes from Jerry Pournelle, who claims that Kildall personally demonstrated to him that DOS contained CP/M code by entering a command in DOS that displayed Kildall's name; as of 2006 Pournelle has not revealed the command and nobody has come forward to corroborate his story. A 2004 book about Kildall says that he used such an encrypted message to demonstrate that other manufacturers had copied CP/M, but does not say that he found the message in DOS; instead Kildall's memoir (a source for the book) pointed to the well-known interface similarity. Paterson insists that the 86-DOS software was his original work, and has denied referring to or otherwise using CP/M code while writing it. After the 2004 book appeared, he sued the authors and publishers for defamation. The court ruled in summary judgement that no defamation had occurred, as the book's claims were opinions based on research or were not provably false.

https://en.wikipedia.org/wiki/86-DOS

If this command existed in MSDOS this most certainly would have come up in court for far more than $100k by now, no? This is a good way to dispell the myth though.


Kildall never explicitly claimed that MSDOS copied CP/M's code.

There are just repeated claims that "MSDOS infringed on CP/M's copyrights" and based on all reverse engineering efforts and the lack of an actual lawsuit, we can safely assume Kindall is not using a legally valid definition of "copyrights".


It's "Kildall". And he hasn't been doing anything for quite some time. He died in the 90's.


Thanks, I fixed the spelling.

Though it doesn't really matter what he has been doing recently, my point is that there was no lawsuit back in the '80s when he was alive, so we can safely assume he had no proof of actual infringement.

Furthermore, we can infer that what Kildall claimed was "Infringements of CP/M's copyrights" was something more along the lines of what google and oracle are now having massive legal battles over.


Possibly, but I would assume that he was referring to fairly unique features of CP/M, code that was never released under a free license, that were mimicked by QDOS in order to make it easier to port software to it, or, maybe, because they were a genuinely useful idea. At that time, the separation of of portable and non portable parts of an OS (CP/M ran on very different and fairly incompatible machines) was quite remarkable and, maybe, worth fighting for. Unfortunately, Kildall had other demons to fight.


> At that time, the separation of of portable and non portable parts of an OS (CP/M ran on very different and fairly incompatible machines) was quite remarkable

On microcomputers, perhaps, but not on computers in general. Unix is a well-known example of an OS that did this, with the hardware-dependent parts mostly confined to a small amount of assembly language and much of the C source platform-independent. This was the state of Unix by around 1973 or so. And that was near the dawn of minicomputers.

Even before Unix and minicomputers, it was starting to become common on mainframe computers as manufacturers started releasing revised and novel models (and dealing with the porting efforts). Notably, the Burroughs B5000 didn't have an assembly language at all, and system software (the Master Control Program, an awesome name that (perhaps unfortunately) lost the jargon skirmish with "Operating System") was written primarily in a dialect of Algol-60. The MCP went on to run on successor systems starting with the B6500 with only a small number of changes to support the new architecture, and Unisys's offerings to this day still run a continuously updated version of that original MCP -- first released in 1961.


That's true, of course. That doesn't make his accomplishment, to pull this off on severely limited machines, any less remarkable. And that's not mentioning he wrote the language to do it.


Of course. Good point!


How is it possible to not find the Kildall function if it's there? Isnt it a pretty tiny haystack for today's standards?


If it were there, you'd have to assume that Bob Zeidman would have found it. He's spent enough time looking. He therefore feels safe in offering $200,000 for it, which makes the whole thing look like more of a publicity stunt....


If he really wanted the truth, he would offer $100,000 to anyone who could prove the existence of the Kildall command in CP/M.

Once we know what it is, we can easily prove if the command does or doesn't exist in MSDOS.


> He did, however, find at least 22 system calls — the types of actions that send/receive text from a printer, phone, hard disk, etc. — that had the same function (and function number) as the CP/M code.

Older programmers: what are function numbers? Thanks.


The real-mode DOS system call interface is based on loading a function number into the AH register, other arguments in other registers, and calling interrupt 21h. I haven't used CP/M before, but it sounds like the DOS function numbers must be numbered in a similar fashion as their CP/M equivalents.

Edit:

This list of BDOS system calls bears a passing resemblance, based on my foggy memory, to some of the interrupt 21h calls I remember: http://www.seasip.info/Cpm/bdos.html The conventions with arguments in registers is different, however.


From a link I posted in response to another comment about the calls:

    [SNIP]

    ;**********************************************************
    ;*					    	              *
    ;*		      Get the time from DOS		      *
    ;*							      *
    ;**********************************************************

    MOV	AH,2CH	;Set up DOS call to get the current time
    INT 21H ;And go get it!

    [SNIP]

    MOV	AX,04C00	;Return to DOS
    INT 21H


My guess is they are referring to software interrupt numbers.

https://en.wikipedia.org/wiki/MS-DOS_API#Interrupt_vectors_u...

In my opinion it's unsurprising that they would be the same as in CP/M.


That is still how syscalls work today, you only have a limited number of interrupts but possibly many more system calls so what Linux used to do is use 0x80 for the syscall interrupt and then you just specify in a register the index (or function number) of what syscall you actually wanted to invoke.

Nowadays processors have a dedicated "syscall" instruction but it has no operands so you still pass the actual index of the syscall you want in a register.


I worked on an OS that did it differently. On the 8086, addresses were constructed by adding the segment and offset (shifted by 4 bits). SO there were 4096 combinations that resolved to the same location. We used those combinations to call into the OS app entry point. The particular combination indicated which function. The stack used the normal calling convention.

So no icky trap entry points to code around - just call the OS directly! It was slick.


That's pretty ingenious. Can you share any other details about the OS?


It was called, unimaginatively, 'CTOS' for "Convergent Technologies OS". When the 286 came along the original syscall trick quit working, so we invented another one. We simply used an invalid segment and trapped; the offset became the function number. Otherwise it worked identically.

CTOS was message-passing. All system calls were for timers, memory or message manipulation. The messages were a tiny header including a 'request code', some scalar arguments and a set of buffers. OpenFile, Read, everything. On the top of the OS were Services that received messages. There was an OS message dispatch mechanism where Services registered for particular message codes. So the client Sending a message didn't know where their message would end up. The original feature that made money was the 'diskless workstation'. The file system codes were dispatched to Client Agent that simply packaged them up and sent them to a designated Server. Brought down the client workstation cost dramatically.


Very interesting! I worked around a number of CTOS-based machines in a Unisys-based financial environment in the late 90s. I was responsible for the "PC" portion of the network. The CTOS-systems all fell on the "Unisys-side", where we plebeian non-Unisys vendors weren't permitted to work! I was always interested in the CTOS machines but never got a chance to mess around with any of them. Sounds like it might have been a lot of fun.


Yeah, Unisys bought Convergent. The Financial environment was strong. Also government and military. Anybody who used total-cost-of-ownership as a metric found CTOS to be attractive. The network was self-configuring so you saved a network admin right off the top.


They are most probably talking about interrupt handlers.


>He found no evidence it was copied and reported his findings in a piece titled ‘Did Bill Gates Steal the Heart of DOS?‘.

More supporting evidence that any title that ends in a question mark can be safely summed up as 'No'.


Ask Tim Paterson - he probably doesn't stand to lose too much now from telling the truth - assuming "the truth" is any different from conventional wisdom, which of course, it isn't.


Didn't Microsoft buy DOS to make MS-DOS?


Yeah, they bought QDOS (Quick and Dirty OS):

https://en.wikipedia.org/wiki/86-DOS


Bill Gates licensed something called QDOS which was made by Tim Paterson at Seattle Computer Products, which Tim had designed to mimick CP/M's API.


I heard somewhere that he bought a CP/M manual at RadioShack and based much of his work off of that.


IIRC, a lot, if not all, of CP/M was written in PL/M, but the 8086 was designed to make porting assembly code from the 8080/8085 easy, so, I'd assume a disassembly would be easy to automatically port to a 8086/8088. If there is some Easter egg Kildall left it was, probably, in those syscall identifiers. Are they discontinuous or something like that?


The source code for DOS is now public. Go verify it yourself: http://www.computerhistory.org/atchm/microsoft-ms-dos-early-...


Complete with denigration of women. Nice, thanks for posting...


We detached this subthread from https://news.ycombinator.com/item?id=12290843 and marked it off-topic.


I don't understand.


Can't edit, but I didn't mean to imply you shouldn't have posted it. Sorry I gave that impression. My issue is with Joel.


"like a little girl"

Why not like a little boy? Because Joel thinks women are weaker then men, obviously.


> Because Joel thinks women are weaker then men, obviously.

Well no or, maybe he does, but you can't infer that from this. What he is referring to is the tendency of little girls to like, OMG, get super excited and make squeally noises.

As a parent of both sexes and having refereed birthday parties for both I can safely say that his analogy was fair and wouldn't have worked if he had said "little boy". Of course, if he had run around the meeting room, screaming at the top of his lungs, trying to break furniture, then he had indeed picked the wrong gender.


It might be more charitable to assume that it's a reference to the perception that women are more emotional. I'm not saying that perception is valid or invalid but it's certainly more neutral than "women are weaker than men".

That said it could be an artifact of a time where it was acceptable to say that kind of stuff. Like watching old movies reading old articles can be a bit jarring at times. But getting upset with someone for posting it to support a point is unfair.


> It might be more charitable to assume that it's a reference to the perception that women are more emotional. I'm not saying that perception is valid or invalid but it's certainly more neutral than "women are weaker than men".

How is the idea that women are "more emotional" than men "more neutral" than the idea that "women are weaker than men".


Hoping this doesn't turn the thread into a male/female thing...

Assuming that your question is meant in good faith, here's an example. I have two sons. One is extremely emotional, far more so than his brother was at that age. He cries over minor incidents, take small slights to heart, gets upset easily, etc. His teacher describes him as "feeling things very deeply."

However, he is also extremely bright and very strong willed. Even at a young age, we can already see that he is not the type of person who will allow himself to be taken advantage of. Despite his sometimes irritating emotionality, there is simply no way I could ever characterize him as weak.

Does that help?


You just showed that the words "weak" and "emotional" mean two different things. No one ever questioned that.


The assumption in the post I replied to was that being emotional was seen essentially as being weak.


No, the question was in what way one was more neutral than the other.

I mean, the whole post (excluding quoted material used to show what that post was responding to) was (including the incorrect use of a period where a question mark was intended):

How is the idea that women are "more emotional" than men "more neutral" than the idea that "women are weaker than men".


No it wasn't. The question was whether one was more neutral than the other.


Let's please not take this thread farther afield than it already is.


Certainly not upset at the person for posting it, I admit i see how it could have come across that way.

To your point, this isn't from 1950 or even 1975. It's recent.


I've watched plenty of movies from the late 90's and early 2000's that have outrageous sexism and slurs against homosexuals. Watching something you remember being funny that has that type of content is incredibly awkward. It's kind of weird to think about but 2006 was 10 years ago and a lot can change in that time frame.

I'm not saying it wasn't a sexist comment or that if it was that Joel has changed. But I'm willing to give him the benefit of the doubt.


My gut is that it shows a lack of phrase turning expertise, but admits the possibility that converse could be true. To put it another way, I suspect it's more likely an example of poor writing rather than a well honed expository detail.

Doesn't change it's effects.


[flagged]


"So yes he is a "good" capitalist but his 31337 skills are sh!t, he was never a tech genius."

As Microsoft grew larger, his role became much more associated with managing the company at large than with technical mumbo jumbo, but Gates was more technically competent than you think. He co-developed Altair BASIC and (supposedly) FAT, and was well versed in some more CS-heavy stuff, also:

https://people.eecs.berkeley.edu/~christos/papers/Bounds%20F...


I even question the BASIC stuff and FAT maybe but I think not, at that point he was more interested in being rich than making something functional. His "contributions" were to take things that people in educational computing had been using and contributing to for the betterment of everyone and package that and sell it to IBM. I think there is more borrowed in DOS than just the Kildall contributions, but it has been whitewashed and forgotten.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: