I have heard several versions of this story. Most seem to be unsubstantiated AFAICT.
The one that seems to add up is that Dr Kildall claimed that only he knew why some DOS APIs took the exact parameters they did.
Which ISTM is fair enough, if they were written using DR documentation. As I said, DR intended the API docs to be for app writers, but that didn't stop people using them to write compatible OSes, and lots of companies did.
That's how come David Given's amazing CPMish OS was possible:
CPMish combines existing BDOS and BIOS replacements and other components. It puts together so many existing replacement parts for parts of CP/M-80 that nothing of the original was left. Theseus' ship, in software:
We need to specify which version of MSDOS we're talking about. And which version of CP/M we're talking about.
PCDOS 1.0 (could also be called MSDOS 1.0) was written to use the same set of calls as CP/M 80. (NOT CPM-86.) That was the one that was written by the Seattle Computer Company and eventually sold to Microsoft, bought by Bill gates when he needed something to sell to IBM.
When I was younger back in the 80s, just because I could, I wrote a cp/m emulator that basically intercepted the 'Call 0005" of cp/m and called the MSDOS interrupt instead, using the cp/m register arguments as MSDOS arguments. All those cp/m programs ran perfectly as MSDOS programs. Because the same APIs were used for MSDOS as had been used for CP/M.
This is from my DOC file for the emulator:
First of all, I thought it might be simple enough to make an 8080
emulator which ran an 8080 program in the ES: segment just as if
the ES: segment was a 64K 8-bit system. It did work but so slowly
in the CP/M operating system section that I next thought I should
keep CP/M's CCP and BDOS in 8080 but code the BIOS in 8086 so
that file I/O and console I/O would be a little faster.
Then I made a discovery about MSDOS. I knew that it had been
patterned on CP/M originally, but I didn't realise how closely!
In fact, most of the BDOS calls in CP/M are identical to the INT
21H calls in MSDOS. With this in mind, it is relatively easy to
trap any calls to the emulator's BDOS and use those parameters to
invoke the MSDOS operating system.
This means we don't need CP/M code as such in our emulator; no
CCP, no BDOS, no BIOS - just a jump table so that application
programs can latch into the emulator if required.
Later versions of MSDOS drew largely on UNIX/Xenix practices, like pipes and tree-structured directories. These versions no longer used the original CP/M interrupt calls and used interrupt calls that did a similar job but were more like UNIX calls.
Having said that, most of those original CP/M-based interrupt calls were retained also, for back-compatibility with older software.
I mean, if someone wants to Google this and check that I have my facts straight, they need to be exact about the spelling and punctuation.
True. But I'm lazy and this isn't really worth me spending a lot of time on. And it shows. With the exception of my quoted text, everything I wrote was purely from memory.
The CALL 5 interface was also provided in DOS, even the later versions. CP/M 86 used INT E0h instead, but the registers used were the same (function number in CL).