• Please review our updated Terms and Rules here

New to CP/M how does it compare to MS-DOS?

punchy71

Experienced Member
Joined
Nov 16, 2011
Messages
100
Location
U.S.
Hi to all,
I am new to CP/M and have never actually used it before so I was wondering how it compares to MS-DOS? What is it good at that MS-DOS is not and vice versa? Or, said another way; what are some advantages and disadvantages to each?

Thank you
 
CP/M is a bit more simplistic than MS-DOS; it doesn't support hierarchical filesystems (i.e. nested subdirectories,) and is much more geared towards the idea of a handful of files on removable disks than the modern practice of storing hundreds or thousands of files in a hierarchy on a hard disk. One thing it does have over DOS, however, is that it's portable to a very broad range of hardware (basically anything with a Z80, a storage medium, and a serial port) and runs pretty well on most of it. (Though you do get programs that require or work better with particular systems/configurations, or just need to be fed the right control codes for your terminal in order to display properly.)
 
Try running with DOS/MS-DOS 1.x and you'll be awfully close. I mean, really, really close, right down to a fair number of internals.

DOS 2.0 introduced subdirectories, installable device drivers and such.
 
The major difference that one needs to get used to is PIP which does many things including copy. It will take some time to get used to reversing the order of the operands. CP/M PIP B:=A:*.* is equivalent to MS-DOS COPY A:*.* B:

A difference that is annoying if using real hardware is that there are many different CP/M disk formats. You can't just grab any old disk and expect to readily read it.

Later versions of CP/M had multi-tasking functionality.
 
...and MP/M was not only multi-tasking, but multi-user--something pretty remarkable for an 8-bit 8080-compatible OS.

The OEM kit was very thin on utilities. Basically, you got a copy program (although PIP can do far more things than DOS COPY can), an editor (again, ED, while a line editor, is far more powerful than EDLIN), an assembler and loader (you paid for those separate in DOS), a simple system management/generation utilitiy (MOVCPM) and a debugger (DDT) similar to DOS DEBUG. There is also a batch file processor (SUBMIT and XSUB), with similar, but not identical capabilities to DOS batch files as well as the usual "builtin" commands (DIR, TYPE, REN, ERA, etc.). Another utility, STAT, was a catchall for managing some devices, and furnishing general information about disks. That's pretty much it--no BASIC, for example.

OEM vendors were expected to customize some of the DRI-furnished utilities and provide their own utilities, such as FORMAT.

But, as I mentioned, if you were at home in DOS 1.x, you could get acclimatized to CP/M in very little time--and vice-versa.
 
...and MP/M was not only multi-tasking, but multi-user--something pretty remarkable for an 8-bit 8080-compatible OS.

... and apparently supported multi-threading within tasks, if I'm reading the documentation correctly.

BDOS function 144 "Create Process". Creating another "process" within the existing process memory space.

MP/M II Programmers Guide - Aug 1982 said:
Processes can only be created either in common memory or by user programs in non-banked systems because Process Descriptors are all maintained on linked lists that must be accessible at all times.

Whereas MPM-86 seems to remove that restriction, and makes it more obvious by referring to a "subprocess"

MP/M-86 Programmers Guide - Sep 1981 said:
The CREATE PROCESS function allows a process to create a subprocess within its own memory area. The child process shares all memory owned by the calling process at the time of the CREATE PROCESS call. If the Process Descriptor (PD) is outside of the Operating System Area, the system copies it into a PD from the internal PD Table.

So definitely not too shabby with the former (MP/M-I) being from 1979 (The Specification), and the latter being from 1981. So way before OS/2 offered multi-threading in a PC OS.

I shall have to run up either (or both) and play with them, multiple threads, channels (queues) - CSP style programming here we come!
 
DRI implementing a PL/I subset on the x80 platform around the same time was pretty remarkable also. It was part of my MP/M package; I don't know if that was standard packaging, however--or if it was just for OEMs.
 
I was just checking some other references. While Tony Hoare described CSP in 1978, that was before he added channels.

Whereas the Actor model dates from 1973. Given how the CLI works for internal commands (sending the CL tail to a queue named for the command), and TMP's sending lines to the CLI, I wonder if actors were more of the inspiration for that bit?

It has been previously stated that RSX-11M was significant inspiration for FlexOS.

I've sort of convinced myself that RSX-11D was inspiration for MP/M; there are a number of similarities (some understandably simplified) and (IMO) the telling use of the term "significant event" which I believe Dan Brevik coined for RSX-15.

Otherwise the capabilities and structure of RSX-11D and MP/M-I are very similar, adjusted to handle the CP/M flavour and 8080 limitations. Moreso once we get to MP/M-86, and its immediate derivatives. I wonder if Tom Rolander would confirm that inspiration if someone was able to ask him?
 
Or, said another way; what are some advantages and disadvantages to each? Thank you

CP/M and MS-DOS are very similar - and MS-DOS really is just a "fork" with all new code from CP/M. However MS-DOS continued to improve, gain more functionality, grow to take advantage of the extra memory in PCs and extend out until it was a key element of MS Windows, while CP/M more or less ended at version 3, with version 2.2 the main contender for compatibility.

Something similar happened when MS-DOS 4 came out, and a lot of people stayed with MS-DOS 3.3, however in the end the better memory management on newer systems with MS-DOS 4 won out, and slowly the MS-DOS 3.3 machines died out.

The big differences are;

People used CP/M. Not many people used MS-DOS. And by people I mean the software the wrote - on CP/M machines, you needed to make the system calls for compatibility, but on a PC, the hardware was consistent and compatible and well understood. All of the clones used the same hardware, so there was no need to deal with the OS beyond bootstrapping your program and maybe for some file access and mode changes, but once you got to things like video, you went direct to the screen in many cases. Because of this, MS-DOS but not PC Compatible machines don't have a lot of software for them.

CP/M is a leaner file system and is easier to implement and write your own utilities for.

CP/M came out in the text era, but MS-DOS came out in the graphics era, and so grew in that direction.

MS-DOS changed the names of common commands, which made CP/M feel somewhat alien to MS-DOS users.

CP/M was designed for 24K machines, while MS-DOS was designed for machines starting at 64K and quickly then 256K and 640K and finally UMBs, so it was able to fit more in.

Later versions of MS-DOS came with subdirectories, which fit in well with File Allocation Tables (FAT) type disks. CP/M's format structure didn't support this so well, and while some versions came out with support, the base idea of having the file entries remember where the file is, prevents having a lot of directories spread over a disk as it doesn't support hierarchical structures well.

CP/M files support sparse mode ( eg, Random files where only parts of the file exist on disk ) and common mode ( Files share common elements ) operation, while MS-DOS doesn't. Again, this is a characteristic of CP/M's file structure over MS-DOS.

CP/M also only has about 6 internal commands while MS-DOS has quite a few more and began to incorporate more as it continued. MS-DOS also had an integral debugger in later versions.

Another difference is what comes after the command. MS-DOS has the concept of switches, but CP/M has only the concept that the first two elements are probably filenames, so it populates a full FCB and a partial FCB and then leaves the command line in the lower DMA buffer.

CP/M source was distributed by DRI. MS-DOS source was not.

MS-DOS didn't need to do much to take advantage of x86 architectures. CP/M was limited to z80 systems with smaller memories and there was no common standard to additional memory before CP/M+, but even this didn't fully address the requirements.

The biggest difference though is they lived in separate eras. MSDOS was 1982 onwards. CP/M was dying out by this time and in it's decline. The changeover happed over around 2 years.

MS-DOS continued until 1995 and for a while after that, maybe in decline from 95 to 2005.

And of course, the systems that MS-DOS worked on got a LOT more powerful, very quickly, while CP/M machines never made that leap. Right up to the Pentium era, MS-DOS held it's own.

I really like CP/M. But I'd have chosen MS-DOS back in the 80's once I used it. I think version 3 was just coming out when I went to the 286. Now I'm starting to find an appreciation for CP/M but my experience is limited to CP/M 2.2

David
 
One thing that really tripped me up about CP/M was that it does not expect you to change disks - this was something I was so quick to do in DOS without a second thought. In CP/M if you change a disk, you need to hit Ctrl-C to do a warm boot so the new disk will be logged in.
 
I always hit Ctrl+C in DOS anyways. If SMARTDRV is running it flushing the cache.
 
DRI implementing a PL/I subset on the x80 platform around the same time was pretty remarkable also. It was part of my MP/M package; I don't know if that was standard packaging, however--or if it was just for OEMs.
Agree, PL/I on an 8bit micro is an achievement.

Historically speaking, PLM was created by the late Dr Gary Kildall while contracting for Intel to create interest in their Intel 8008 and later the 8080. PLM was a simplified structured Programming Language for Micros resembling a subset of PL/I syntax. So it makes sense that PL/I was near and dear to Gary and wanted to see PLI-80 and PLI-86. Jim

Try running with DOS/MS-DOS 1.x and you'll be awfully close. I mean, really, really close, right down to a fair number of internals.

DOS 2.0 introduced subdirectories, installable device drivers and such.
Awfully close, indeed. After all, MSDOS 1.x was a licensed 86DOS which was written independently by Tim Patterson purposely to be fully compliant with CP/M 2.2 API so applications can run under 86DOS thinking it was CP/M.

So MSDOS 1.x and PCDOS 1.x were CP/M API compatible. Many other similarities, A>, d:filename.ext, FCB, shell CCP, transit commands. Jim

Of course once you are comfortable with CP/M, time to try the Zsystem or at least ZCPR with commands history, aliases, and many more improvements.

Zsystem and ZCPR require a Z80 since they have rewritten CP/M from i8080 to Z80 and squeezed in the many improvements within the same memory footprint. Jim
 
Historically speaking, PLM was created by the late Dr Gary Kildall while contracting for Intel to create interest in their Intel 8008 and later the 8080. PLM was a simplified structured Programming Language for Micros resembling a subset of PL/I syntax. So it makes sense that PL/I was near and dear to Gary and wanted to see PLI-80 and PLI-86.
Oh, I know--I've programmed many lines of PLM on an MDS 800 back in the day. But it was a far cry from DRI PL/I. For example, the PL/I actually implements a full subset of the PL/I preprocessor.

Back in the early 1970s, there weren't too many choices for a portable-ish language. FORTRAN was the lingua franca among mainframes and Intel did come out with that. There was BASIC, but at the time, it was pretty much an interpreted tutorial language. C wasn't there yet in any portable form and Pascal was still a-borning. So PLM as a restricted subset of PL/I wasn't a bad choice.
 
One thing that really tripped me up about CP/M was that it does not expect you to change disks - this was something I was so quick to do in DOS without a second thought. In CP/M if you change a disk, you need to hit Ctrl-C to do a warm boot so the new disk will be logged in.
Keep in mind, CP/M 1.4 upto 2.2 required the Ctrl-C for warm boot, the later DRI CP/M 3.0 did not require Ctrl-C. I don't remember MP/M, MP/M II and Zsystem? It has been a while and I could be mistaken, but something tells me Zsystem also did away with Ctrl-C? I need to get them booted and check them out. Jim
 
Back
Top