Hacker News new | past | comments | ask | show | jobs | submit login
86-DOS Revisited (os2museum.com)
81 points by ingve 9 months ago | hide | past | favorite | 22 comments



I had a copy of this as Seattle Ccomputer Products O/S that I purchased from Lifeboat Associates in NY on an 8" floppy. It was used to run my CompuPro S100 system (I used it with my dual processor (8085/86) board along with CP/M-80.

Those were the days when we had to compile the BIOS—I still have the ASM file for that somewhere it's called HMXBIOS.ASM if I recall correctly.

It's nice to know someone has archived the O/S and that there's a link to it—thanks snvzz.


Complete with disk images[0] for preservation proper. Bless archivists.

0. http://www.bitsavers.org/bits/SeattleComputerProducts/86-DOS...


"; Translated from the Z80 on 12-19-80 and subsequently upgraded to handle

; all of the following controllers. Set switch to one to select."

Despite Tim Patterson, and later Bill Gates trying to pretend that DOS was a wholly new creation, the first comment re-confirms what everyone knew at the time -- that DOS was a cross-assembler translation of the leaked CP/M source code with some very minor changes (INT 5 vs. CALL 5).

https://archive.org/details/bitsavers_seattleComsemblerPreli...

https://www.theregister.com/2007/07/30/msdos_paternity_suit_...

https://www.theregister.com/2014/10/02/cpm_source_code_relea...

http://www.s100computers.com/Hardware%20Folder/Seattle%20Com...

https://www.wired.com/2012/08/ms-dos-examined-for-thef/


86-DOS was modeled after CP/M, with separate BIOS (hardware drivers) and BDOS (filesystem) modules. What was translated from Z80 is likely the BIOS code, since SCP already had written that before the 8086 CPU card existed.

And all versions supported both CALL 5 and INT 21h for system calls (not 5, which was reserved by Intel, though IBM didn't care about that when they designed the PC and used it for "print screen"). That doesn't mean the implementation was based on leaked CP/M code, let alone literally translated.


CP/M consists of three parts, CCP = Console Command Processor, BDOS = Basic Disk Operating System, BIOS = Basic Input Output System.

SCP copied the CCP and BDOS. The BIOS would be the most hardware-centric part of CP/M, and would probably not be copied between platforms. Also, the BIOS was the only "open" part of CP/M.

You are correct that DOS uses INT 21 and not INT 5. Sorry for my typo. The INT 21 vs CALL 5 APIs are effectively identical aside from the calling mechanism.

I never did it, but I think it would have been interesting to run the SCP cross-assembler on the leaked CP/M CCP and BDOS. (They would need to be translated from Intel mnemonics into Zilog ones, but there are tools for that too.) After using the automated tools, I believe the resulting x86 assembly source would be "substantially similar" to the early DOS source.


If 86-DOS was copied it would be easy to tell -- you could probably read all the source code for both products in a single day. Even reading the decompiled code wouldn't be hard.

It's no secret that 86-DOS was modelled on CP/M and designed to be compatible.

But it would still have probably been easier to write it from scratch then to copy it. Also the Z80 and 8086 are not similar enough that it would make sense to directly translate one from the other in general (one is an 8bit CPU and the other is 16bit).


I agree that it would be pretty easy to tell, but AFAIK, nobody has taken the approach that I mentioned above.

x80 and x86 have quite a lot in common. Did you look at the link of the SCP Z-80-to-8086 cross-assembler manual that I posted?


> Did you look at the link of the SCP Z-80-to-8086 cross-assembler manual that I posted?

It's an assembler that takes 8086 mnemonics and produces 8086 binaries but the assembler runs on a Z80 computer. It's a common type of assembler -- all the assemblers I use these days run on x64 Windows or Linux but assemble for other architectures (6502, Z80, SC61860, ARM).

> x80 and x86 have quite a lot in common.

They do. But they also have some pretty massive differences. If you're trying to run 8080 programs on an 8086 you can translate but you're still getting an 8080 program with it's limitations. You wouldn't write an OS for 8086 that way! It wouldn't make sense at all.

I think you need a better understanding of the technologies involved here before you try and defame Tim Patterson.


8080 asm source can be auto-translated to 8086 but Z80 is an independent extension of the 8080, there's no direct compatibility.


You are correct, but CP/M was written for the 8080 CPU, and the Intel 8080 is a subset of the Zilog Z-80, so a direct translation is entirely possible. The Z-80 is not hardware compatible. (E.g. it cannot be plugged into a system to replace an 8080.) The Z-80 is however 100% software compatible with the 8080. Anything that will run on an 8080 will run on a Z-80 without modification.

So the process to reproduce DOS would be:

1) Convert the 8080 assembly mnemonics in the leaked CP/M BDOS and CCP into Z-80 mnemonics. I remember that there are tools to do this under CP/M, but I haven't run CP/M for nearly 40 years, so I don't remember their names.

2) Run the Z-80-to-x86 cross assembler (conveniently written by the same company that "wrote" DOS -- SCP) on the Z-80 assembler files you've just produced.

3) Change all occurrences of CALL 5 to INT 21.

4) Integrate with BIOS for your x86 hardware.

5) Done!


> Run the Z-80-to-x86 cross assembler

That's not what that assembler does. From the manual:

The Seattle Computer Products Z80/8086 Cross Assembler runs on the Z80 processor under CP/M or its derivatives. It accepts as input a text file of 8086 source code using mnemonics similar or identical to Intel's ASM-86. (Emphasis mine)

...

Why a Cross Assembler?

During the early life of a new processor, a cross assembler offers the user certain advantages over a resident assembler. Chief among these is the ready availability of low cost software for the older host computer. For the Z-80, this software includes editors, operating systems, and utility packages. Using a cross assembler also enables the user to write machine language code for the new processor even before the hardware is available.


Okay, so I tagged the wrong product. I know there was a Z-80 to x86 cross assembler for CP/M because I had a copy of it.

I think it was called something like xlt86.com.

XLT86 is mentioned here: https://en.wikipedia.org/wiki/CP/M

I see that this one is a translator for Intel mnemonics and isn't for Z-80, so that would make the task of porting even simpler.

I know that there was a translator for Z-80 to x86 though. Sorry I cannot remember everything from 40 years ago in precise detail.

I also remember ZCPR, which was a Z-80-only CCP replacement for the CP/M CCP. If you had a Z-80-based CP/M computer, you could replace your CCP and gain some new command line intrinsics. ZCPR was circulated on the CP/M BBS circuit (RCP/M). Digital Research couldn't do much about it because the author was not identified, and it was not distributed for profit.


I still think you fail to realize how significant it is that Z80 CP/M is an 8bit operating system and every version of DOS is a 16bit operating system. You could probably steal some ideas but any sort of translation makes no sense. If it was that easy, Digital Research would have had their OS done first.

DOS was designed to run re-compiled CP/M programs with minimal changes. And some people translated 8080 programs to run on 8086 but they're still just 8bit programs.

An operating system needs to be optimized and customized for the CPU it runs on. You're not going achieve much of value taking OS code from a different lesser CPU.


The 8080 and Z-80 had 16-bit registers and could do some limited 16-bit arithmetic. The 8088 (used in the first IBM PC) used an 8-bit bus to communicate with memory and I/O. The 8086 had a 16-bit bus. CompuPro had an 8086 S-100 board, which may have been the first target for DOS, but I cannot recall for certain.

Both 8086 and 8088 ran in what is now called "real mode", which allows direct access to only 64k of RAM (just like the 8080 and Z-80). To access more than 64k at a time, you had to use segment registers. CP/M 3 (x80) employed bank-switching, which was a similar technique, but done with hardware that was external to the CPU instead of built-in.

There really wasn't much difference between the Z-80 and the 8086 in terms of performance. Yeah, the 8086 had a 16-bit bus, but the instructions were 16-bits too, so running a program from non-cached RAM (because there wasn't any such thing as RAM cache then) was about the same. The 8088 (at 4.77MHz) would under-perform when compared with a (4MHz) Z-80, because they both used an 8-bit bus, but the Z-80 needed only one memory fetch per instruction, vs. two for the 8088.

https://en.wikipedia.org/wiki/X86_memory_segmentation

I do not fail to realize anything, but I'm wondering why you are so passionate about trying to disprove that SCP/Tim Patterson ripped off DR/Gary Kildall's code to produce QDOS when there is so much strong evidence that he did.


This presentation doesn't do exactly what you suggest, but it does allege a forensic deep dive into the two. https://www.youtube.com/watch?v=lB0qq5xc5aw

You may also be interested in Tim Paterson's account of backporting MS-DOS to the Z80 as MSX-DOS. https://www.msx.org/wiki/The_History_of_MSX-DOS

(My own view is, given that Intel themselves published tools and docs to automatically convert an 8080 program to an 8086 program, "implement the interface a translated CP/M program would expect" is a reasonable goal regardless of whether you want to copy the implementation. http://www.bitsavers.org/pdf/intel/ISIS_II/9800642A_MCS-86_A... )


Where did it emerge from? No mention… Sometimes the story of how it was acquired it just as interesting.


The person who imaged the disks commented on this video exploring 86-DOS 0.11: https://www.youtube.com/watch?v=Zd7T5euID1E

(It's a neat video by the way – he shows how 86-DOS would be used in that state back then by creating a Z80 "Hello World" program in CP-M, copying it over with RDCPM, translating it to 8086 assembly with TRANS, tweaking the source with EDLIN, assembling with ASM and HEX2BIN, and running it.)


I give some detail in my article on the find:

https://www.theregister.com/2024/01/05/oldest_ancestor_of_ms...


Sometimes people don't want others to know how they got it.


This has happened infuriatingly often lately. Some disk image from history just suddenly turns up on github with little knowledge of how it got there.

These are 8" disks, so someone not only found the disks but had the setup to read the disks and dump the binaries.


I think we need to know more about why the disk has "BILL" written in the corner.


It probably belonged to Bill Gates.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: