• Please review our updated Terms and Rules here

Earliest known copies of 86-DOS...

Hello, first time poster here.

86-DOS 0.11 IBM PC Port

I have ported 86-DOS 0.11 to the IBM PC! You can now boot it on DOSBox/86Box/Bochs/VirtualBox and... your modern computers!!!

86-DOS 0.11.png

But... I need your help to improve the port. The current situation is everything works, but performance is horrible. Several things contribute to why this crap runs unbearably slow:
  1. Lack of proper I/O buffering. 86-DOS 0.x only supported 128-byte sectors, I worked around it by simulating 128-byte physical sectors in the DOS BIOS. The correct way of handling physical sectors >128 bytes is to use I/O buffering, but I am too lazy and (admittedly) I do not have the skills for that. I have done some experimental buffered read support before I gave up, but that's about it. I need somebody to implement proper I/O buffering.
  2. Constant stack switching. Much like 86-DOS 1.x, this thing's stack is not big enough for the PC BIOS calls. I have written about the problem in my 86-DOS 1.14 port writeup before, and my solution to it for 1.14 was to patch the kernel. This time I decided to work around it by switching to an internal stack for every DOS BIOS call, so you get this stack switch latency for every single I/O (like printing a character to the screen). I need someone to figure out a way to safely switch SS:SP without having to mess with interrupts and/or flags (you can take a look at IO.ASM to see what I'm talking about).
  3. Sh*t code. I have very little (pronounced 'zero') experience with low level DOS programming, so I write very sh*t code. Please help me to improve my code (SYSPC.ASM and parts of IO.ASM).
If you're willing to help, please shoot me a message or drop me a reply here :). You can find the source code of my DOS BIOS (IO.ASM) and SYS tool (SYSPC.ASM) in the ZIP file attached. Note: 86-DOS 0.x disks are different, they use 16-byte directory entries. 86-DOS 1.x can be used to transfer files to/from 86-DOS 0.x formatted disks, so my 86-DOS 1.14 port may come in handy. You'll also need 86-DOS 1.14's assembler for assembling IO.ASM.

86-DOS 0.11 Source Reconstruction

I've done reconstructing the source code of COMMAND.COM, SYS.COM and HEX2BIN.COM. The disassemblies compile back the the exact same binaries and can be assembled using this IBM PC port of 86-DOS 0.11 (though you will experience the excruciatingly slow disk I/O). They can be found in the ZIP archive attached.

I also plan on doing a full disassembly of the OS, but since I am not the best at 8086 assembly, I feel like I need some help. My goal is to achieve fully-readable binary-exact disassembly of all system components. Yes, I've done some apps already but they're just the low hanging fruits, the kernel, assembler, source code translator and line editor are all waiting to be done. My next target is the kernel, which without a doubt is a tough one. If you're interested and have the relevant skills, please lend a hand.

Lastly, I'm not sure if it is appropriate to ask here (I can't send DMs because I'm new), but Lucas Brooks and AltairMan/Rich Cini from BetaArchive have done some quality disassembly of 86-DOS 1.14 before; I reached out to both of them about this project, but sadly no one responded. I think @RichCini is still active here, so may I ask you to join forces with me to 'open source' the earliest version of DOS?

Sincerely,
Pig
 

Attachments

  • 86dos011port_with_bios_sys_src.zip
    57.6 KB · Views: 16
Hello, first time poster here.

86-DOS 0.11 IBM PC Port

I have ported 86-DOS 0.11 to the IBM PC! You can now boot it on DOSBox/86Box/Bochs/VirtualBox and... your modern computers!!!

View attachment 1271181

But... I need your help to improve the port. The current situation is everything works, but performance is horrible. Several things contribute to why this crap runs unbearably slow:
  1. Lack of proper I/O buffering. 86-DOS 0.x only supported 128-byte sectors, I worked around it by simulating 128-byte physical sectors in the DOS BIOS. The correct way of handling physical sectors >128 bytes is to use I/O buffering, but I am too lazy and (admittedly) I do not have the skills for that. I have done some experimental buffered read support before I gave up, but that's about it. I need somebody to implement proper I/O buffering.
  2. Constant stack switching. Much like 86-DOS 1.x, this thing's stack is not big enough for the PC BIOS calls. I have written about the problem in my 86-DOS 1.14 port writeup before, and my solution to it for 1.14 was to patch the kernel. This time I decided to work around it by switching to an internal stack for every DOS BIOS call, so you get this stack switch latency for every single I/O (like printing a character to the screen). I need someone to figure out a way to safely switch SS:SP without having to mess with interrupts and/or flags (you can take a look at IO.ASM to see what I'm talking about).
  3. Sh*t code. I have very little (pronounced 'zero') experience with low level DOS programming, so I write very sh*t code. Please help me to improve my code (SYSPC.ASM and parts of IO.ASM).
If you're willing to help, please shoot me a message or drop me a reply here :). You can find the source code of my DOS BIOS (IO.ASM) and SYS tool (SYSPC.ASM) in the ZIP file attached. Note: 86-DOS 0.x disks are different, they use 16-byte directory entries. 86-DOS 1.x can be used to transfer files to/from 86-DOS 0.x formatted disks, so my 86-DOS 1.14 port may come in handy. You'll also need 86-DOS 1.14's assembler for assembling IO.ASM.

86-DOS 0.11 Source Reconstruction

I've done reconstructing the source code of COMMAND.COM, SYS.COM and HEX2BIN.COM. The disassemblies compile back the the exact same binaries and can be assembled using this IBM PC port of 86-DOS 0.11 (though you will experience the excruciatingly slow disk I/O). They can be found in the ZIP archive attached.

I also plan on doing a full disassembly of the OS, but since I am not the best at 8086 assembly, I feel like I need some help. My goal is to achieve fully-readable binary-exact disassembly of all system components. Yes, I've done some apps already but they're just the low hanging fruits, the kernel, assembler, source code translator and line editor are all waiting to be done. My next target is the kernel, which without a doubt is a tough one. If you're interested and have the relevant skills, please lend a hand.

Lastly, I'm not sure if it is appropriate to ask here (I can't send DMs because I'm new), but Lucas Brooks and AltairMan/Rich Cini from BetaArchive have done some quality disassembly of 86-DOS 1.14 before; I reached out to both of them about this project, but sadly no one responded. I think @RichCini is still active here, so may I ask you to join forces with me to 'open source' the earliest version of DOS?

Sincerely,
Pig

Hi,

I tried to BOOT the .DSK from the initial .zip file with my Altair 8800c, but it didn't work ... Is this only for Z80 CPUs?


.
 
FWIW, the '$' as string terminator for output goes all the way back to operating system code on the PDP-6, which made its way into OS/8 on the PDP-8, which, CP/M imitated much of its behavior..so....

-Thom
 
Hi,

I tried to BOOT the .DSK from the initial .zip file with my Altair 8800c, but it didn't work ... Is this only for Z80 CPUs?


.

… you’re replying to a post about an *IBM PC Compatible port* of an operating system for the 8086 processor, why are you trying to boot it on an Altair 8800 clone and thinking the problem is it might need a Z80?
 
Hi,

I tried to BOOT the .DSK from the initial .zip file with my Altair 8800c, but it didn't work ... Is this only for Z80 CPUs?


.
To boot this, you need a system with:

SCP 8086 CPU card
SCP 8086 CPU Support card (the console serial port is also on this card)
at least 48K of RAM
A Cromemco 4FDC (or 16 or 64) with the RDOS EPROM disabled. Set up for 3740 format single density
At least one compatible disk drive.

-Thom
 
What if one were to replace the IO.SYS file with one compatible with 5150 hardware? After all, it's just (based on my MSDOS 1.x OEM experience) an I/O interface module and not really part of 86-DOS per se. Of course, the boot code would also need to be rewritten.
 
Why not? It's like replacing the CBIOS in CP/M. It's still CP/M no matter whose BIOS is used. There are several not-PC-compatible installations of MS-DOS out there with vendor IO.SYS, They're still MS-DOS.
 
More to the point (at least to my reasoning)--can you boot it on a standard 5150?
Yes, that's the whole point of the port. Obviously I don't have an actual IBM PC, so I can't test it. 86Box emulates the IBM PC pretty well, so if it boots in 86Box, it should boot on a physical PC too. Also tried it in the cycle-accurate IBM PC emulator, MartyPC:

86-DOS 0.11 MartyPC.png

What if one were to replace the IO.SYS file with one compatible with 5150 hardware? After all, it's just (based on my MSDOS 1.x OEM experience) an I/O interface module and not really part of 86-DOS per se. Of course, the boot code would also need to be rewritten.
That's exactly what I did! You'll also have to patch the DOS kernel because it assumes that the DOS BIOS is located at 0040:0000, which isn't true for the IBM PC. I have provided the IO.SYS source code (IO.ASM) in the ZIP file uploaded.
 
Nice job! From your code I take it that you don't live in the CP/M world and 8086 assembly is not your usual language.
Correct! This is exactly why I'm reaching out for help! I use "functions" too much in my code, where each function does its own thing and I preserve all registers. This makes the code slightly easier to work with (IMO, at least), as it reduces the cognitive load, but needless to say, it f*cks up performance. Do I really have to preserve all registers? Can I "inline" the "functions"? I can probably figure all of these out myself given enough time, but I'm sure it's a better idea to ask the more experienced folks for help. Are you able to lend a hand 🥺?
 
I've been toying with the idea of a PC disk option ROM which would support, among other things, 128byte sectors and FM encoding

with something like that we could boot a more bare metal port no?
 
I've been toying with the idea of a PC disk option ROM which would support, among other things, 128byte sectors and FM encoding

with something like that we could boot a more bare metal port no?
This is an interesting idea! I think it'll remove the need of buffered I/O but at the same time completely destroy compatibility. At this point our goals are probably different - I want a PC-compatible port (that also boots in DOSBox/VirtualBox/etc. and on modern computers), and you want it to simply boot on the IBM 5150. But no matter what you do, you'll still have to rewrite the DOS BIOS and boot sector.

I wouldn't say that we get a more "bare metal" port just with native 128-byte sectors; have to throw away the IBM PC BIOS ROM and replace it with SCP's 8086 Monitor too, like this:

SCP Monitor ROM on IBM PC.png

With the experiment I did above, I merged the SCP and PC ROMs together, so DOS still gets to use INT 1x. For the real thing, will have to get rid of the INT 1x stuff (or not expose it to DOS) and let the DOS BIOS talk directly to the hardware. Side-tracked I know, but maybe one day I'll hack together a minimal IBM PC ROM with the SCP monitor and minus interrupts.
 
My idea for the option ROM wasn't really specifically targeted at the 51x0 computers, (in fact it was originally born of the desire to boot "modern" versions of DOS from a 1024 byte sector disk) but this seems like a potentially interesting use case to be able to boot Tim's DOS from original media (with some modifications).

Finding a FDC that would support the requisite data rate and encoding and work in the 5150 isn't all that hard either. There are several modern hobbyist designs even that would do it, using the Nat semi super FDC chip
 
I know all about that--I believe that I was the one who posted on FM-supported FDCs many years ago here. But that hardly constitutes a "standard" PC or XT.

Better is to simply implement a deblocking BIOS for 8-sector MFM. Using 128 byte MFM even limits you to a smaller segment of the available FDCs.

Then, there's the matter for the "authentic" purists. The 8477 didn't enter the market until after the 5170 held sway. There were add-in cards like the Maynard FDC and the early Compaticard (I and II), however, but they're a bit incompatible register-wise.
 
@PorkyPiggy your PC disk boots up ok on my IBM XT. This is the straight 86-DOS 0.11.img from your zip. Want me to try something else ?
From DOS 3.3 I did FORMAT /F:160 then dskimage 86dospc.img 0:40:1:8 to a real floppy. Seems to boot up and execute a com normal speed. I haven't tried writing anything yet. IMG_3464.JPG
 
Back
Top