• Please review our updated Terms and Rules here

CP/M DOS Compatibility?

Raven

Veteran Member
Joined
Mar 7, 2009
Messages
2,752
Location
DE, USA..
Excuse me if this is a stupid question, as I have never used CP/M in any incarnation.

With that said - is there any DOS compatibility software for CP/M? I'd imagine CP/M-86 the likeliest candidate for this, as it's the same architecture. I would imagine that if such software exists it would be limited to simple apps, and games (at least graphical ones) would likely not be able to run.

Anybody know?
 
But if you mean can you simply run a program on a disk from a cp/m system on a DOS box, no you can't do that directly. There are programs live Move It that allow a person to copy files from CP/M to DOS using a serial cable, intact, but then you'll need a cp/m emulator.

Anyone here correct me anyone if I am wrong, I don't have a well-honed method for copying files from a cp/M system to a DOS system. I have a lot of tools but not a lot of reason to do it/not much experience. I am trying to remember what I have done in the past. I have a program called Magic (something) that appears to work.
 
Unless I'm reading Raven's post wrong, he's actually asking if there's any tools for running MS-DOS software on CP/M. I'm guessing a definite "no" on Z80 CP/M, but there might theoretically be something like that for CP/M-86.
 
What kind of CP/M? CP/M-86? Well, early versions of Concurrent DOS had a degree of CP/M compatibility.

And there were programs to run some CP/M-86 programs on DOS.

And DOS itself has a kind of CP/M compatibility--the FCB comes straight out of CP/M and you can even issue DOS requests by setting CL to the request number and calling location 5 in your PSP. Sound familiar?

The bigger issue is that if a program was available for CP/M-86, it was probably available for DOS. There was little need for much cross-pollination.
 
Reverse of what you (and most of you, except commodorejohn) are talking about, Chuck. I'm saying "On CP/M-86, can I run a DOS program in any way, and what restrictions might there be?".
 
Not really. I'm not saying it's not possible, just that there was no demand for it. Systems that originally shipped with CP/M-86 added MS-DOS later. It was simpler to do things that way.
 
DRI DosPlus was a later version of CP/M-86 with an ability to also run some MS-DOS programs. In theory, other programs could have done the same handling of MS-DOS interrupts and passing the parameters to the matching CP/M-86 functions but I don't know of any. CP/M-86 had a short life. I doubt any 8086 emulators that ran on CP/M-80 existed.

On the other side, there were several programs that permitted running CP/M-86 programs on top of MS-DOS. One I downloaded also had a CP/M-80 emulator that ran on its CP/M-86 application so many programs could be used. Not all, some of the CP/M functions have no corresponding MS-DOS equivlent. I couldn't find where these are located in a quick web search.
 
Kreb, you can identify these really quickly by taking a DOS 1.x reference manual and sitting it next to a CP/M-80 system interface manual. In general, for CP/M-80, the differences are fairly minor between it and DOS in the area of system calls.

One of the problems with CP/M of any flavor is that it uses a flat file structure (no subdirectories), so compatibility with anything later than about DOS 1.25 is not really possible.

But understand that CP/M was really designed for a much earlier era--mostly floppy-only support. I recall that I was tasked with working out the CP/M 2.2 BIOS to work with a 40MB hard disk (Shugard SA4008 ). It wasn't easy. 5 drives of 8MB each was the way it had to be done.
 
Chuck(G): Dos Plus could run MS-DOS 2.1 programs (well at least some) and handle FAT disks. If Wikipedia can be trusted on this, the later versions of Personal CP/M included the ability to read/write MS-DOS disks but not the MS-DOS functions translator. I have used Dos Plus briefly but I never saw Personal CP/M-86.

I know about the similarity between DOS 1 and CP/M 2. But some programs used unsupported functions or the advanced graphics routines or manipulated data structures directly. All techniques guaranteed to make programs fail if running under a simple translator used between MS-DOS and CP/M.

John Elliot (who posts here) has some interesting web pages regarding how CP/M works with FAT disks. http://www.seasip.demon.co.uk/Cpm/dosplus_fat.html
 
One could certainly argue that DOSPlus isn't CP/M-86, but rather DRI's clone of DOS with a CP/M-86 API layered on. I've never seen a CP/M-86 version with a DOS API layered on, which is what Raven was asking about.

I lost interest in CP/M-86 about the same time that DRI did--and never got any requests for CP/M-86 emulation save for a couple of DEC Rainbow and Eagle 1600 programs. Even Atari ST GEM is pretty much MS-DOS for the CP/M 68K. It's sure not CP/M-68K. It's pretty clear that DRI acknowledged early on that the flat CP/M file structure was a dead fish.

Was a version of MS-DOS for the DEC Rainbow ever produced that allowed one to run CP/M-80 programs on the Z80 transparently?

It's odd that the only OSes from the early PC days anyone seems to remember are DOS and CP/M. There were some remarkable alternatives, such as TurboDOS (for both 8 and 16 bit platforms) that never seemed to catch on.
 
One could certainly argue that DOSPlus isn't CP/M-86, but rather DRI's clone of DOS with a CP/M-86 API layered on. I've never seen a CP/M-86 version with a DOS API layered on, which is what Raven was asking about.

You'd be wrong; the DOS emulation is a layer on top of a multitasking CP/M kernel. Remove the DOS module, and you've got Personal CP/M-86 v2.0.
 
Sounds like I should look into Personal CP/M-86 and DOSPlus and check out what they can do. Sounds like fun, if nothing else. :D

For some perverse reason, I seem to love getting DOS software running on non-DOS operating systems, heh.. the more transparent, the better.
 
You'd be wrong; the DOS emulation is a layer on top of a multitasking CP/M kernel. Remove the DOS module, and you've got Personal CP/M-86 v2.0.

Indeed I am. I see now that DOS+ (I found a copy) responds to interrupt E0 requests, just like CP/M-86, betraying the CP/M-86 underpinnings.

While we're on the subject of non-Microsoft operating systems, does anyone here use Real/32?
 
I used to contribute to the "CP/M-86 software Repository" when it was going. These days there are some mirror sites around, which restore some of the stuff I contributed (not sure if it's all there though). Turbo Pascal 3 is a good means to port DOS Pascal programs to CP/M-86 (in my case it's version 1.1 of CP/M-86 for the IBM PC/XT with a patch applied to it so it would run on anything else that's faster). The thing to know though is the Hardware Interrupts and the Software Interrupts. DOS Interrupt 21H (I think it is for example) is a DOS Specific - it doesn't exist in CP/M-86. Interrupt 10H though which is a hardware Interrupt, does, so things like which video mode your using, pixels, etc can be done in CP/M-86! Ralf Browns Interrupt Guide is the best thing in this situation though, so you can see what's possible and what's not. CP/M-86 is different to DOS though and sometimes those things need to be taken into consideration, things like the Status Bar on Line 25 though can easily be removed by looking up the Terminal Emulation Guide on John Elliotts Website. CP/M handles files differently too and I think because CP/M-86 v1.1 the 16bit version of CP/M v2.2 on the 8bits, same rules apply. Changing Disks for example you need to CTRL-C. Unlike DOS where a File can be in Length 1 Byte at a Time, CP/M in general stores Files as Records - 1 Record = 128 bytes, so every file ends up being a demoninator of 128 bytes.
 
Hi
While in DOS a file can seems as though it is 1 byte in size
to an application, it actually does take up a larger allocation
of disk. depending on the level of the DOS and the drive,
it can be quite large.
The difference is that CP/M leaves it up to the application
to determine the size seen by that particular application,
while DOS keeps a record of the file size.
Both still have a block size allocated on the disk. In DOS,
the application is not aware of this block size.
Dwight
 
Bill - to copy files from CP/M to DOS machine it is probably safest/simplest to use one of the standard comms programs (X-ZModem, Kermit) using XON/XOFF.

I'll be posting soon to the S-100 topic about some code I've written for my EPROM monitor that loads a file (or code typed from a PC console) via serial port crossover cable into z80-machine memory, without any operating system at all - useful when restoring a system that has no storage or bootable OS. The PC sends file/code as if to a printer, using DOS COPY or PRINT commands or a serial terminal program. CP/M to DOS could probably be done with PIP on the CP/M side and a serial monitor program on the DOS side, but I haven't had any need for that.
 
Using a comm cable to copy from CP/M to DOS or vice-versa is the slow, cumbersome and error-prone way if you have compatible drives on the DOS machine. There are several very good disk transfer utilities.

If you want to use comms to do the trick, Kermit can be bootstrapped to a CP/M system using nothing more than PIP.
 
Back
Top