CP/M operating system (original) (raw)
CP/M, an acronym for Control Program/Monitor (or Control Program/Microcomputer), was an early operating system for Intel 8080 and Zilog Z80 based microcomputers. It was created by Digital Research, Inc founded by Gary Kildall. The combination of CP/M and S-100 bus computers patterned on the MITS Altair was the first "industry standard", and was widely used through the late 1970s and into the mid-80s.
Description
CP/M's command line interface, implemented in the CCP command processor, was patterned after the operating systems from Digital Equipment Corporation, such as RSTS/E for the PDP-11. Commands generally took the form of a keyword followed by a list of parameters separated by spaces or special characters. The commands themselves would sometimes be somewhat obscure; for instance, the command to duplicate files was named [PIP](../../p/pe/peripheral%5Finterchange%5Fprogram.html "Peripheral Interchange Program")
(Peripheral-Interface-Program).
One key innovation in CP/M was the use of an abstraction layer that separated the operating system into two main parts. The CCP translated user commands into a series of high-level instructions. These instructions were then fed into the BDOS, which provided functionality like "open file". The BDOS then translated these commands into a new series of lower-level instructions. These were then fed into the BIOS, which contained the hardware-specific code that carried out the instructions from BDOS.
To illustrate the flow of commands, consider the PIP
command mentioned earlier. When a PIP
command was entered into the CCP it was broken down into a series of instructions for the BDOS, which would be similar to "locate the file named foo.txt
, open it, create a new file named bar.txt
...". The BDOS commands in turn were sent to the BIOS as a string of even simpler instructions, like "move the disk head to this sector, read sector..." etc.
The vast majority of the complexity in CP/M was isolated in the BDOS, and to a lesser extent, the CCP. This meant that by porting the limited number of simple commands in the BIOS to a particular hardware platform, the entire OS would work. This significantly reduced the development time needed to support new machines, and was one of the main reasons for CP/M's widespread use. Today this sort of abstraction is common to most OSs, but at the time OSs were typically intended to run on only one platform, and multilayer designs were considered unnecessary.
History
CP/M was originally distributed on 8 inch floppy disks, and ran on the Intel 8080 CPU (as well as the compatible and very popular Zilog Z80). Eventually, the industry moved to the 5 1/4 inch disk format, and CP/M followed. Programs written for CP/M were typically completely portable amongst different machines with the same CPU; this made it popular, and much more software was written for CP/M than for operating systems that only ran on one brand of hardware.
Hundreds of different brands of machines ran CP/M, some notable examples being the above-mentioned Altair, the IMSAI 8080, the Osborne 1 and Kaypro portables, and even the Apple II when an extra Z80-card was installed. WordStar, one of the first widely used word processors, and dBASE, the first widely-popular database program for small computers, were originally written for CP/M.
Versions of CP/M were later completed for other CPUs as well, although they required the programs to be re-compiled for the new CPUs. One of the first was CP/M-86 for the Intel 8086, which was soon followed by CP/M-68k for the Motorola 68000. At this point the original CP/M became known as CP/M-80 to avoid confusion.
CP/M-68k was widely used only in one application, it formed the basis of the Atari ST computer. CP/M-86 had the potential of becoming the standard operating system of the new IBM PCs, but minor legal issues made IBM turn to Microsoft instead. They purchased a CP/M clone known as QDOS, and used it to create PC-DOS/MS-DOS which went on to become the "official" PC operating system. CP/M-86 never became popular.
MS-DOS takes over
Many of the basic concepts and internal mechanisms of early versions of MS-DOS were copied from those of CP/M. Internals like file-handling data structures were identical, and both referred to disk drives with a letter (A:, B:,
etc.). This was done on purpose, to make it easy to port popular CP/M software like WordStar and dBase.
The user interface of MS-DOS, however, was a bit more friendly. Compare for example CP/M's copy command, `` [PIP](../../p/pe/peripheral%5Finterchange%5Fprogram.html "Peripheral Interchange Program")
:
PIP
<_destination filename_>=<_source filename_>
to the more intuitive syntax of DOS's COPY
(roughly patterned after that of UNIX's cp
):
COPY
<_source filename_> <_destination filename_>
CP/M would slowly lose market share as the microcomputing world moved to the PC platform, and it never regained the popularity it once had. Later versions of CP/M-86 made significant strides in terms of performance and usability however, and for some time in the 1980s was considered to be a better MS-DOS than MS-DOS. To reflect this compatibility the name was changed, and CP/M-86 became DR-DOS.
See also: