• Please review our updated Terms and Rules here

Bring life back to a i8086

Joined
Feb 22, 2024
Messages
10
Hey guys,

There's a new operating system that I'm working on that targets the i8086 and newer hosted at https://cos.candlhat.org/. You may wonder why I'm creating a new operating system and the answer is that MS-DOS/PC-DOS has their limitations (i.e. no command history) and if you get FreeDOS from https://freedos.org none of the images seem to work with the i8086. There are places you can get FreeDOS for 8086 (but you don't exactly know exactly what's in the images) or you can get the source code and compile it yourself (provided you know how to and have the specific tools). My operating system is built with 8086 in mind so no sketchy downloads and no recompiling from source code. There's no internet support in the OS so there's no way of data being used so there's no need to even collect any data in the first place. The source code isn't available yet as I need to make a living and I'm testing out a pay what you want model first and if it seems viable I'll release the source code. If you find any bugs please feel free to post about them here (with details of how you got them) and I'll do my best to address them.
 
(i.e. no command history)
What about DOSKEY?

Are you writing your OS in ML or an higher language? I'm writing an OS as well: CBM-DOS. It is written in ML. It has its own file system and it is written pure out of fun. And that's why it is taking already some years.
The most difficult thing at the moment is handling directories. My OS is more like Linux: each command has its own executable. Changing the directory isn't the problem. But that means I have to tell the OS where to find all the executables like DIR etc. The obvious idea is to use a variable like PATH in DOS. But implementing it isn't that simple.
 
What about DOSKEY?

Are you writing your OS in ML or an higher language? I'm writing an OS as well: CBM-DOS. It is written in ML. It has its own file system and it is written pure out of fun. And that's why it is taking already some years.
The most difficult thing at the moment is handling directories. My OS is more like Linux: each command has its own executable. Changing the directory isn't the problem. But that means I have to tell the OS where to find all the executables like DIR etc. The obvious idea is to use a variable like PATH in DOS. But implementing it isn't that simple.
Looking at https://en.wikipedia.org/wiki/DOSKEY I see "DOSKEY was introduced in MS-DOS/PC DOS 5.0" but neither of them seem to work in pcem with an 8086 CPU.

I'm writing the OS completely in assembly, but there are aspects of C style (i.e. storeing to and retrieving from the stack and using .Lxx for labels instead of coming up with specific names). I opted for a MS-DOS like OS for the file system, instead of creating one I opted for FAT as it's well documented. The OS supports FAT12, FAT16 and FAT32, I've lost track of how long it's taken me to get this far due to rewrites implementing things slightly different each time and dealing with 3 filesystems is a bit time consuming and requires quite a bit of debugging to make sure everything works that's why things like MKDIR and DEL aren't implemented yet, FAT12 and FAT16 isn't a problem I have code for them but I need a little more time to implement the FAT32 stuff. What CPU's is your OS targeting?
 
DOSKEY works on a PS/2 model 30 with 8086 CPU. So I have no idea why it doesn't work in PCEM. Maybe PCEM is to blame?

CBM-DOS is meant to run on my older Commodore PCs in the first place and they have an 8088 on board.
 
MS-DOS/PC-DOS has their limitations (i.e. no command history)
For a long time there have been various COMMAND.COM replacements that address this. The most popular solution I'm aware of is 4DOS, which was originally shareware when I used it around 1990, later became freeware, and has also had the source released.

if you get FreeDOS from https://freedos.org none of the images seem to work with the i8086.
I'm surprised, this download sounds like it should work:

For classic hardware

FreeDOS 1.3 includes a floppy-only edition! This edition should run on any original IBM PC system, including the PC, XT, and AT. Provides versions for 720kB, 1.2MB, and 1.44MB floppy disks.

and I saw a report online of it working on a Book8088 (after using a newer machine to install to a CF card, but it sounds like the installer is meant to support 8088 too). If it doesn't work I'd assume it's a bug that might be fixed rather than an intentional limitation.

There are places you can get FreeDOS for 8086 (but you don't exactly know exactly what's in the images) or you can get the source code and compile it yourself (provided you know how to and have the specific tools). My operating system is built with 8086 in mind so no sketchy downloads and no recompiling from source code.
Perhaps I'm the only one that thinks this way, but I wouldn't consider a closed-source operating system from someone I don't know to be less sketchy than a FreeDOS build from someone I don't know!

Your project sounds interesting though, there are all sorts of things that could be done to make DOS nicer!
 
DOSKEY works on a PS/2 model 30 with 8086 CPU. So I have no idea why it doesn't work in PCEM. Maybe PCEM is to blame?

CBM-DOS is meant to run on my older Commodore PCs in the first place and they have an 8088 on board.
Yeah, I think it's an issue with the ROM I used as I've tried MS-DOS 5 on 2 different ones and they both seem to work. Not sure how that DOSKEY works though as there doesn't seem to be any command history when booted from the floppy.

That's cool, nice to see I'm not the only person interested in old vintage machines. Unfortunately I haven't had the money to get any physical machines so I'm reliant on emulators like pcem and 86box.
 
For a long time there have been various COMMAND.COM replacements that address this. The most popular solution I'm aware of is 4DOS, which was originally shareware when I used it around 1990, later became freeware, and has also had the source released.


I'm surprised, this download sounds like it should work:



and I saw a report online of it working on a Book8088 (after using a newer machine to install to a CF card, but it sounds like the installer is meant to support 8088 too). If it doesn't work I'd assume it's a bug that might be fixed rather than an intentional limitation.


Perhaps I'm the only one that thinks this way, but I wouldn't consider a closed-source operating system from someone I don't know to be less sketchy than a FreeDOS build from someone I don't know!

Your project sounds interesting though, there are all sorts of things that could be done to make DOS nicer!
If you take a look at the attached screenshot you'll see that I'm trying the Floppy Edition X86BOOT.img with an 8088 IBM XT and nothing happens, it just sits there. From replies I'm getting (regarding that sketchy part) I'm starting to think of maybe making it open source regardless eventually so people can actually see what's going on (provided they know how to read assembly and have the time to go through everything). I've just got to make a few improvement (i.e. creating directories and files and poosibly deleting them), it's a lot to cover when dealing with 3 filesystems. I've got reading and executing (no MZ parsing support though) sorted, command history and tab auto-complete and finding files and folders so far as well as getting input from the user so nearly there for a basic system.
 

Attachments

  • Screenshot from 2024-08-02 13-19-56.png
    Screenshot from 2024-08-02 13-19-56.png
    239.6 KB · Views: 9
Not sure how that DOSKEY works though as there doesn't seem to be any command history when booted from the floppy.
MS-DOS 6.22's DOSKEY gives command history via up and down arrow keys, although it's only stored in RAM, not persisted to disk. I'd be surprised if booting from floppy affects it, but perhaps MS-DOS 5's DOSKEY was different, I don't have time to check it right now.

By the way, do you know about COMMAND.COM's rudimentary command editing? For example if you wanted to run DIR FOO.* but left off the R, so you just got a "Bad command or file name" because DI wasn't found, you can hit the right arrow twice to recall the DI, then hit insert (to go out of overwrite mode), type R, then hit F3 to recall the rest of the command. It's certainly not friendly by today's standards, but once you understood it all (it only took me a few decades) it's useful! It sounds like your shell will be much nicer!

That's cool, nice to see I'm not the only person interested in old vintage machines. Unfortunately I haven't had the money to get any physical machines so I'm reliant on emulators like pcem and 86box.
For me, money to buy them isn't the only concern, it's being able to repair them or have someone who can do it for you! If you can find a local retro computer group (e.g. search on Facebook) you might find people are selling things a lot cheaper than on eBay, and be able to find people who can help with repairs. I'd given up on using physical machines until I found such a group!

If you take a look at the attached screenshot you'll see that I'm trying the Floppy Edition X86BOOT.img with an 8088 IBM XT and nothing happens, it just sits there.
So it booted into the ROM BASIC instead of booting from the floppy? I guess the FreeDOS floppy is a 1.44MB one, and I wonder if the XT BIOS actually supports that size of floppy - I wouldn't be surprised if it didn't. I'd look this up in the book Upgrading and Repairing PCs if I could do that right now!

I've just got to make a few improvement (i.e. creating directories and files and poosibly deleting them), it's a lot to cover when dealing with 3 filesystems. I've got reading and executing (no MZ parsing support though) sorted, command history and tab auto-complete and finding files and folders so far as well as getting input from the user so nearly there for a basic system.
Sounds like fun!
 
MS-DOS 6.22's DOSKEY gives command history via up and down arrow keys
I've installed MS-DOS 5.00 in pcem and pressing up and down doesn't seem to do anything. Granted you did also say that you don't know if it's different.

So it I guess the FreeDOS floppy is a 1.44MB one, and I wonder if the XT BIOS actually supports that size of floppy
I didn't realize that it could be an issue with the floppy size. By default pcem has FDD1 and FDD2 set to 3.5" 2.88M so I just assumed that anything up to that size would work.

Sounds like fun!
A lot of fun, especially doing it all in assembly. Does anyone actaully know what filesystems MS-DOS supported? I've read that FAT32 was introduced with Windows 95 (i.e. MS-DOS 7.0 i think), although I don't think the underlining DOS version was offically avaialble. Was the FAT32 support ever back ported?
 
I've installed MS-DOS 5.00 in pcem and pressing up and down doesn't seem to do anything. Granted you did also say that you don't know if it's different.
For me, under PCem V16 emulating a 386 of some sort, up and down work. I guess I hit the arrow keys which aren't part of the numeric keypad, which aren't keys that exist on an XT keyboard, though. Perhaps DOSKEY doesn't handle those keys with an XT keyboard, or PCem isn't emulating the keyboard properly.

I didn't realize that it could be an issue with the floppy size. By default pcem has FDD1 and FDD2 set to 3.5" 2.88M so I just assumed that anything up to that size would work.
On further thought, perhaps it's DOS which affects which floppy sizes are supported, or maybe it's both DOS and the BIOS. I would think the BIOS has some effect, since on more recent machines you have to specify the floppy drive types/sizes in the BIOS settings, but I don't think an XT supports that, so perhaps it's more limited in what it supports.

Does anyone actaully know what filesystems MS-DOS supported? I've read that FAT32 was introduced with Windows 95 (i.e. MS-DOS 7.0 i think), although I don't think the underlining DOS version was offically avaialble. Was the FAT32 support ever back ported?
FAT32 might have been backported by third parties but I'm pretty sure Microsoft never did that. I think DOS only supported FAT12 originally, and FAT16 came along in DOS 2 or 3 or something (Wikipedia probably covers this in the page for FAT or DOS).
 
PCem isn't emulating the keyboard properly
I don't think it's a PCem issue as my code appears to work with all the ROM's I've tested so far so maybe it's a DOS limitation.

On further thought, perhaps it's DOS which affects which floppy sizes are supported, or maybe it's both DOS and the BIOS.
I think it may be a mixture of both, from my tests MS-DOS 3.30 doesn't seem to like floppy images smaller than 320 KB (If I've remembered correctly) that's why I thought it was a problem with FreeDOS but maybe I was just using the wrong images, I may get round to testing the other sizes at some point.

FAT32 might have been backported by third parties but I'm pretty sure Microsoft never did that. I think DOS only supported FAT12 originally, and FAT16 came along in DOS 2 or 3 or something (Wikipedia probably covers this in the page for FAT or DOS).
I've checked out Wikipedia, that's where I read that FAT32 was introduced in Windows 95. I can't remember reading anything about DOS supporting it though.
 
I've installed MS-DOS 5.00 in pcem and pressing up and down doesn't seem to do anything. Granted you did also say that you don't know if it's different.
Are you actually running the doskey executable before you try the up and down arrays? It isn’t loaded automatically (I think SOME versions may have added it to autoexec.bat as part of running “setup” from the MS-DOS floppies, but I could be misremembering.)
 
Are you actually running the doskey executable before you try the up and down arrays? It isn’t loaded automatically (I think SOME versions may have added it to autoexec.bat as part of running “setup” from the MS-DOS floppies, but I could be misremembering.)
Thanks for that info, after running DOSKEY the history seems to work. It would have made more sense for them to do it by default or for there be some documentation saying you need to run it first. Looking at https://en.wikipedia.org/wiki/DOSKEY it says about the usage but I can't see anything saying that it needs to be run before it's installed (maybe I'm missing something).
 
Hey guys,

Based on feedback I've decided to make the project open source regardless. The source can be found at https://git.candlhat.org/chimaera.git, it's not the cleanest code and there's limited comments at the moment as I'm focused on getting things implemented and working. Feel free to examine the code provided you understand assembly language. Downloads can still be found at https://cos.candlhat.org although there are images within the build directory of the repo. I'm not sure if I'm going to keep releasing them in the repo (maybe they can be a development/experimental builds) or not but the images on https://cos.candlhat.org will be as stable as I can get them.
 
It isn’t loaded automatically (I think SOME versions may have added it to autoexec.bat as part of running “setup” from the MS-DOS floppies, but I could be misremembering.)
I don't recall that myself but I might just have forgotten!

Thanks for that info, after running DOSKEY the history seems to work. It would have made more sense for them to do it by default or for there be some documentation saying you need to run it first. Looking at https://en.wikipedia.org/wiki/DOSKEY it says about the usage but I can't see anything saying that it needs to be run before it's installed (maybe I'm missing something).
In the MS-DOS 6.22 manual, against an example AUTOEXEC.BAT file, it says "The doskey command loads the Doskey program into memory" which I guess is meant to indicate that you need to run it. As far as I recall, MS-DOS didn't provide any sort of friendly program that let you indicate via ticking a box whether or not you wanted DOSKEY or something, so I think it made sense to not install it by default since it uses up some of your precious 640KB (or less if you have a really old machine) of RAM.
 
I've installed MS-DOS 5.00 in pcem and pressing up and down doesn't seem to do anything. Granted you did also say that you don't know if it's different.
You need to run DOSKEY to enable this functionality. It is not enabled by default to conserve memory.
However, the "left arrow", "right arrow", and F3 keys work for command line editing even without it.

I didn't realize that it could be an issue with the floppy size. By default pcem has FDD1 and FDD2 set to 3.5" 2.88M so I just assumed that anything up to that size would work.
Most floppy controllers on XT-class machines cannot handle HD (high density) data rates. That is a hardware limitation.
Accordingly, the XT-class BIOS only knows about DD (double density) drive types, i.e. 5.25" (360 KB) and 3.5" (720 KB).

Most AT-class machines contain updated BIOS and floppy controller support for high density drives, i.e. 5.25" (1.2 MB) and 3.5" (1.44 MB).
Installing a newer floppy controller on XT-class machines is possible to get the hardware support for such drives.

Later DOS (since version 3.30) can handle all standard formats and it will use the drive type set by the BIOS.
But it can be overridden with DRIVPARM or DRIVER.SYS as well.

In emulation, the floppy controller can always handle high density and the BIOS type may be set correctly as well. Also, the virtual floppy controller often does not care about its configuration. So 1.44 MB or even 2.88 MB drives will work on most emulators, even if they would not work on real hardware.

A lot of fun, especially doing it all in assembly. Does anyone actaully know what filesystems MS-DOS supported?
MS-DOS only supports FAT12 (all versions) and FAT16 (since version 3.31). Standalone MS-DOS never supported FAT32.

I've read that FAT32 was introduced with Windows 95 (i.e. MS-DOS 7.0 i think), although I don't think the underlining DOS version was offically avaialble.
FAT32 was introduced with Windows 95b (that is, Windows 95 OSR2 / MS-DOS 7.1).
The original Windows 95 release (with MS-DOS 7.0) did not support FAT32.

Was the FAT32 support ever back ported?
No. However, DOS does support additional file system through loadable device drivers (the most common one is MSCDEX for CD-ROM file system support). The DRFAT32 driver does add FAT32 support to MS-DOS. According to Chuck(G), it takes a lot of memory and is buggy.

Many DOS clones (such as FreeDOS or PTS-DOS) support FAT32 natively.

I think it may be a mixture of both, from my tests MS-DOS 3.30 doesn't seem to like floppy images smaller than 320 KB (If I've remembered correctly) that's why I thought it was a problem with FreeDOS but maybe I was just using the wrong images, I may get round to testing the other sizes at some point.
Very early versions of DOS did support 5.25" disks with 160 KB / 180 KB / 320 KB. These formats are not common in later versions, and emulators may not implement the floppy hardware well enough for them to work in all situations.
 
Back
Top