CP / M

from Wikipedia, the free encyclopedia
CP / M
developer Digital Research Inc.
License (s) proprietary
First publ. 1974
Current  version 3.1 or 1.2 (CP / M-68k) (1983)
Kernel BDOS : monolithic ( assembler )
Architecture (s) Intel 8080 / 8085 , Zilog Z80 ,
Intel 8086 / 8087 / 8088 and Motorola 68000
Installation medium Floppy disks
Languages) English

CP / M ( english C ontrol P rogram for M icrocomputers ) is a set of operating systems , which from around 1974 by Digital Research Inc. under Gary Kildall developed. CP / M was the first platform-independent operating system (in addition to Unix, which was designed for more powerful computers ) . A multi-user version under the name MP / M developed. With the advent of MS-DOS and its IBM variant PC-DOS, CP / M lost its importance.

CP / M without a specific name usually stands for CP / M-80 , the original version developed from 1974 for the Intel 8080 and Zilog Z80 microprocessors . The last version of the CP / M-80 was called the CP / M-Plus . CP / M-86 was a port on the processors Intel 8086 / 8088 . A less successful variant for the Motorola 68000 followed with the CP / M-68K .

The abbreviation CP / M originally stood for Control Program / Monitor (English for control program / monitor ). The original acronym was later reinterpreted as Control Program for Microcomputers .

CP / M Operating System Manual, 1982


The lowest level of CP / M is the hardware abstraction layer, the Basic Input Output System (BIOS) , which provides a standardized interface for hardware-related tasks, especially for input and output. Only this part of the operating system had to be adapted to the respective type of computer, which was usually done by the manufacturer. The remaining parts could be adopted without major changes, as they are only based on the functions of the CP / M-BIOS.

The standardized functions of the BIOS are used by the actual system kernel, the hardware-independent BDOS ( Basic Disk Operating System ), which provides higher functions, especially for file management. This only accesses the hardware indirectly via the BIOS, which means that it is hardware-independent.

The BDOS, in turn, is used by the CCP (Console Command Processor), a command line interpreter that accepts the user's commands. Some simple commands are carried out by the CCP itself (examples: dir(show diskette table of contents), rename(rename file [s]) and others). Otherwise a corresponding program with the name extension .com (for CP / M-68k .68k ) is loaded and started. Examples: pip.com (copy program), stat.com (information about various system settings), etc.

Application programs usually only communicate with the hardware via the constant BDOS and the standardized entry points of the BIOS - and are therefore portable. However, for reasons of speed and storage space, the application programs for CP / M are often written in assembler and have only rarely been published in the source code , so that in practice portability was only given within one processor family. The assembler source code of CP / M was delivered together with the assembler program asm.com . In this way, the operating system could be changed and expanded in assembler as required. Nevertheless, CP / M was not " open source " in the modern sense, since the distribution of modified versions was not allowed.

The structure of CP / M was later also taken over by MS-DOS : Here the parts described above (boot files) are now called IO.SYS instead of BIOS, MSDOS.SYS instead of BDOS and (the command interpreter ) COMMAND.COM instead of CCP. Ever the first version of MS-DOS leaned heavily on CP / M, which main change was the improved FAT - File System .

Weak points

One of the weaknesses of CP / M was that there was no uniform disk format for 5¼ "disks. The only official ( IBM - industry standard ) format was an 8 "format, so that after the extensive disappearance of the 8" drives, the exchange of floppy disks between CP / M computers from different manufacturers became very difficult or even impossible. The screen and printer control was not uniform in CP / M systems either, because CP / M was originally developed for screenless, teletype- based systems ( TTY ). Later systems that ran CP / M often emulated widely used screen types, such as VT100 , so that as much software as possible could be used unchanged. Commercial programs had to be adapted to the respective target system. In the best case, the selection was possible via a predefined installation program ( setup ). Not infrequently, however, the user had to use the necessary control characters for e.g. B. Find out "clear screen" or cursor positioning as well as control codes for the printer used and integrate them into the program code. In such cases, a patch in the application program using a debugger was usually required. Some professional programs, such as the word processing software WordStar , were already conceptually set up for this through prepared patch areas.

On the other hand, this was only a consequence of the flexibility of CP / M: It only specified the processor and a minimum memory size as hardware. This enabled it to run on very different computers from home computers like the CPC 664 to computers like the Epson QX 10 with 256 kB of RAM. In its CP / M version, the manufacturer only had to adapt the BIOS part to the hardware used.

With the rapid decline of memory prices from about 1981, the limit of 64 kilobytes directly usable memory was a problem - blame was here but not CP / M itself, but the 8-bit - processors , where it has been used mainly. The poor suitability for hard disks also slowed CP / M from around 1982 increasingly. The main problem was the inability of the CP / M-80 to manage subdirectories , which is almost essential for larger volumes. CP / M's own subdivision concept for data carriers by means of so-called "user numbers" was too limited, as it only allowed 16 areas and no hierarchical structures. However, MS-DOS only received this capability in 1983.

In the case of hard disks, these user USERnumbers were used to manage several areas on a data carrier with the command and to only display the data that belong to the respective user.

CP / M-Plus

In 1983  the last version of the classic 8080 CP / M appeared with CP / M-Plus (3.0), which now also supports more than 64 kB of memory by means of bank switching . In addition, with CP / M-Plus a number of tasks that previously had to be carried out by the manufacturer-specific BIOS have been moved to the manufacturer-independent BDOS, thus further simplifying porting. Above all, the conversion between the basic data block size of 128 bytes for CP / M and the block size actually used by the hardware, which is almost always larger with the newer diskette and hard disk formats, was no longer required in the BIOS of every manufacturer to be re-implemented, but now took place in the BDOS. However, this CP / M version was also slower and used more memory for itself. This version is indeed the best-selling worldwide thanks to the Commodore 128 and the Schneider / Amstrad CPC 6128 , with which it was supplied, but what the actual use is no longer linked to the popularity of the smaller and faster CP / M 2.2.

CP / M 3.0 could also contain an extension called Graphics System Extension (GSX, see Graphical Kernel System ), which eliminated the problem that the printer and screen are controlled differently depending on the manufacturer. It provided an additional interface for text and graphic output (including bar and pie charts). GSX used printer drivers for this which the printer manufacturer had to provide.

Typical hardware

CP / M-Computer, DEC VT180 , 1982

Typical computer from the early 1980s on which CP / M was used, had a Zilog Z80 - processor (code compatible to the Intel 8080) with 2 to 4  MHz , 64 or 128  kB memory, a monochrome screen , the 80 × 24 characters Could display text (but not graphics ), one or two floppy drives with 8- inch or 5¼-inch floppy disks , possibly also a hard disk with about 5 MB.

CP / M was also used by many hobbyists on their homemade computers. While S-100 bus systems such as the IMSAI dominated in the early days , well-known commercial CP / M computers of the later years were the Osborne 1 and the Kaypro models; on the Apple II , the CP / M was often used with an additional Z80 processor card ( Apple CP / M ). Also on the Commodore office computers 3032 and 4032 ( PET successor).

CP / M could also be used on many home computers, for example on the Schneider / Amstrad CPC, Commodore 64 (with additional module) and the Commodore 128; In practice, however, it was rarely used on these, as they each also brought their own operating system with them, which was better tailored to the respective hardware and was therefore better suited for graphic computer games in particular.

The Amstrad PCW 8256/8512 - marketed in Germany as "Schneider Joyce" - had, in addition to the LocoScript designed for marketing reasons as a combined operating and word processing system, as a second, independent operating system CP / M on board. The PC was equipped with a Z80 processor with 4 MHz and 256 or 512 kilobytes of RAM. In this configuration, the started CP / M operating system was distributed over three "memory banks" of 64 kilobytes each, with a common "common" area from address HxC000 (e.g. kernel in bank 1, keyboard and screen in bank 0, Printer in bank 2). These versions could be recognized by the file name * .EMS.

Porting of CP / M

CP / M in the GDR

In the GDR , CP / M was mostly used under the name SCP on U880 -based hardware. The abbreviation “SCP” stands for “Single User Control Program”, which means that it is a single-user operating system. For general office work on the 8-bit microcomputers of the P8000 and P8000 compact , OS / M is an operating system that is compatible with CP / M. The small computers KC 85 could be expanded with an attachment by 5¼ ″ floppy disk drives and thus also run CP / M, which was used in the MicroDOS variant. In the 1980s, within the Academy of Sciences of the GDR, the CP / A operating system was used for computers based on the Z80 / U880 processors (such as PC 1715 , A 5110 / A 5120 / A 5130 ). It had the advantage over CP / M or SCP that z. B. 5¼ ″ floppy disks with the full storage capacity of 800 kB could be used for data, while CP / M only allowed 720 kB of data and reserved 80 kB for the system. The VEB Mansfeld Kombinat developed 1 to 4 CP / M versions under the name SCP / M 2 for their MPC office computer series. The “CP / Z” system was developed at Carl-Zeiss Jena, which had very little, but very efficient program code. There was a lively exchange of software between the GDR companies, as copyright violations by foreign companies in the GDR were not prosecuted. Only now and then there were nasty surprises at international trade fairs. The company Ashton-Tate made after the end of the GDR all dBase users a discounted offer.

CP / M-86

In addition to the 8080 / Z80 version of CP / M, the CP / M-86 in particular gained practical importance, a CP / M version for 8086 and 8088 CPUs from Intel .

From January 1982 the CP / M-86 had the chance to become the standard operating system of the IBM PC , the first personal computer from IBM . Under controversial circumstances to this day, however, CP / M got MS-DOS from Microsoft , which was conceptually based on the CP / M-80, as a competitor. Although IBM initially left the choice of the operating system to the customer, MS-DOS - which was called PC DOS in the variant supplied by IBM - quickly prevailed over the much more expensive CP / M-86, especially software, due to its lower price of 40 dollars was initially developed for both platforms.

The SCP1700 operating system, which is derived from CP / M-86 and is largely compatible with it, was used on i8086 / K1810WM86 -based office computers from Kombinat Robotron . On the Robotron A 7100 introduced in 1985 , SCP1700 was the recommended standard operating system.

CP / M-68K

The port to the Motorola 68000, called the CP / M-68k , was not a great commercial success.

MP / M

MP / M was a multiuser system version ( "multiuser system" ) of CP / M. Several users could work on one computer at the same time via ASCII terminals .


An operating system expansion for communication between CP / M systems that was created in the late 1980s was called CP / NET . An MP / M system served as the server and CP / NET ran on the clients. The clients could also be operated without a hard drive. In addition to the shared use of file systems, electronic messages were also implemented.

CCP / M-86

A new variant Concurrent CP / M (CCP / M-86) was later developed from the CP / M-86 and MP / M-86 . This combined the multi-user capabilities of MP / M with high compatibility with CP / M-86.

Software for CP / M

Under CP / M application programs such as the word processors Electric Pencil and WordStar (from MicroPro ), the spreadsheet programs Supercalc and Microsoft Multiplan as well as the database software dBASE II (from Ashton-Tate ) were offered. An integrated office solution with the option of easy data transfer, e.g. B. from the database to word processing, was not yet available under CP / M. However, the file formats at that time were still quite simple, so that they could usually be taken over manually, or a separate small program had to be written for it.

In addition to the application programs, the focus of the software for CP / M was on programming languages ​​for creating specific programs. MBASIC from Microsoft, Fortran , Turbo Pascal from Borland , PL / I , muLISP and COMAL are worth mentioning here . The PL / M language offered by Digital Research itself , a system-level programming language with similarities to PL / I, was also used a lot internally at DR; the similarity with the name of the operating system is therefore not accidental. Some of the utility programs supplied as standard with CP / M were written in this language. The later so dominant language C was still quite insignificant under CP / M, accordingly, there are few compiler for that language running under CP / M - for example, BDS C . With Aztec C , a useful compiler became available towards the end of CP / M's lifetime.

In addition, there were quite large collections of public domain programs for CP / M. B. by user associations or private small sales companies were compiled on numbered diskettes. This area also includes computer games that never played a role in commercial CP / M software. Many of these collections were later republished on CD-ROM or for download from the Internet. A CD-ROM can easily hold ten thousand or more of today's tiny CP / M programs.



During the transition from 8-bit processors (such as the Z80) to 16-bit machines (such as the Intel 8086 and 80286 ) in the early 1980s, there was initially a great shortage of application programs for the new, more powerful hardware. Therefore software emulations were developed that simulated the CP / M and a Z80 CPU virtually on a 16-bit system so that existing applications and application data (e.g. a dBase II database) can continue to be used on the new system could. There is a native CP / M emulation for MacOS.

Source code releases

2001 gave Caldera CP / Ms source code under a liberal open source - license which redistribution and modification allows, via Tim Olmsteads "The Unofficial CP / M Website" free. In October 2014, to celebrate the 40th anniversary of its first launch, the Computer History Museum released additional early source code versions of CP / M under a license for non-commercial use.


  • Rodnay Zaks: CP / M manual , Sybex-Verlag GmbH, 1986, ISBN 3-88745-053-1
  • Digital Research: CP / M Plus (CP / M Version 3) operating system . Markt-und-Technik-Verlag, Haar near Munich 1986, ISBN 3-89090-371-1 .
  • Chip Spezial 82005/87004 "CP / M + better programming" (for CP / M 3.0), author Karlheinz Dereser, 28 DM, no further bibliographical information available (published around 1988)

Web links

Individual evidence

  1. http://www.digitalresearch.biz/CPM.HTM
  2. ^ Operating system OS / M In: robotrontechnik.de
  3. http://robotrontechnik.de/html/computer/mpc.htm (accessed on June 26, 2012)
  4. http://www.digitalresearch.biz/GARY&CPM.HTM (accessed June 26, 2012)
  5. Thomas Harte: TomHarte / CP-M-for-OS-X. February 29, 2020, accessed March 28, 2020 .
  6. The Unofficial CP / M Web site (English)
  7. CP / M collection is back online with an Open Source license The Register , November 26, 2001 (English)
  8. License agreement for the CP / M material presented on this site (English)
  9. David Laws: Early Digital Research CP / M Source Code ( English ) Computer History Museum . October 1, 2014. Retrieved July 25, 2015.