Live data from Hacker News

There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

thenextweb.com

21–30 of 73 posts

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#21
post #16

> 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.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#22
post #13

Earlier quoted context omitted.

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.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#23
post #16

> 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.

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.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#24
post #5
post #3

Didn't Microsoft buy DOS to make MS-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.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#25
post #16

> 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…

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

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#26

Yeah well I think it has been proven that Gates was more style than substance and some of the choices he made early in the DOS wars were at the expense of others like Kildall. He was able to take a something that was not technically superior (copied or not) and beat his competition (DOS 6.22 anyone?). So yes he is a "good" capitalist but his 31337 skills are sh!t, he was never a tech genius.

"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...

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#27
post #16

> 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.

They are most probably talking about interrupt handlers.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#28
post #16

> 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.

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 o…

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.

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#29

Earlier quoted context omitted.

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 o…

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 c…

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

Re: There’s a $200k reward for anyone who proves Microsoft ripped off MS-DOS source

#30
post #17
post #11

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 corrobo…

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.
Post reply on HN