CP/M eventually became thede facto standard and the dominant operating system for microcomputers,[9] in combination with theS-100 bus computers. Thiscomputer platform was widely used in business through the late 1970s and into the mid-1980s.[10] CP/M increased the market size for both hardware and software by greatly reducing the amount of programming required to port an application to a new manufacturer's computer.[11][12] An important driver of software innovation was the advent of (comparatively) low-cost microcomputers running CP/M, as independent programmers andhackers bought them and shared their creations inuser groups.[13] CP/M was eventually displaced in popularity byDOS following the 1981 introduction of theIBM PC.
CP/M supported a wide range of computers based on the8080 andZ80 CPUs.[19] An early outside licensee of CP/M wasGnat Computers, an early microcomputer developer out ofSan Diego, California. In 1977, the company was granted the license to use CP/M 1.0 for any micro they desired for $90. Within the year, demand for CP/M was so high that Digital Research was able to increase the license to tens of thousands of dollars.[20]
Under Kildall's direction, the development of CP/M 2.0 was mostly carried out by John Pierce in 1978.Kathryn Strutynski, a friend of Kildall fromNaval Postgraduate School (NPS), became the fourth employee of Digital Research Inc. in early 1979. She started by debugging CP/M 2.0, and later became influential as key developer for CP/M 2.2 and CP/M Plus. Other early developers of the CP/M base included Robert "Bob" Silberstein and David "Dave" K. Brown.[21][22]
CP/M originally stood for "Control Program/Monitor",[3] a name which implies aresident monitor—a primitive precursor to the operating system. However, during the conversion of CP/M to a commercial product, trademark registration documents filed in November 1977 gave the product's name as "Control Program for Microcomputers".[6] The CP/M name follows a prevailing naming scheme of the time, as in Kildall's PL/M language, and Prime Computer'sPL/P (Programming Language for Prime), both suggesting IBM'sPL/I; and IBM'sCP/CMS operating system, which Kildall had used when working at the NPS. This renaming of CP/M was part of a larger effort by Kildall and his wife with business partner, Dorothy McEwen[4] to convert Kildall's personal project of CP/M and the Intel-contracted PL/Mcompiler into a commercial enterprise. The Kildalls intended to establish the Digital Research brand and its product lines as synonymous with "microcomputer" in the consumer's mind, similar to what IBM and Microsoft together later successfully accomplished in making "personal computer" synonymous with their product offerings. Intergalactic Digital Research, Inc. was later renamed via a corporation change-of-name filing to Digital Research, Inc.[4]
By September 1981, Digital Research had sold more than250,000 CP/M licenses;InfoWorld stated that the actual market was likely larger because of sublicenses. Many different companies produced CP/M-based computers for many different markets; the magazine stated that "CP/M is well on its way to establishing itself asthe small-computer operating system".[23] Even companies with proprietary operating systems, such asHeath/Zenith (HDOS), offered CP/M as an alternative for their 8080/Z80-based systems; by contrast, no comparable standard existed for computers based on the also popular6502 CPU.[19] They supported CP/M because of its large library of software. TheXerox 820 ran the operating system because "where there are literally thousands of programs written for it, it would be unwise not to take advantage of it", Xerox said.[24] (Xerox included aHoward W. Sams CP/M manual as compensation for Digital Research's documentation, whichInfoWorld described as atrocious,[25] incomplete, incomprehensible, and poorly indexed.[26]) By 1984,Columbia University used the samesource code to buildKermit binaries for more than a dozen different CP/M systems, plus two generic versions.[27] The operating system was described as a "software bus",[28][29] allowing multiple programs to interact with different hardware in a standardized way.[30] Programs written for CP/M were typically portable among different machines, usually requiring only the specification of theescape sequences for control of thescreen and printer. This portability made CP/M popular, and much more software was written for CP/M than for operating systems that ran on only one brand of hardware. One restriction on portability was that certain programs used the extendedinstruction set of the Z80 processor and would not operate on an 8080 or 8085 processor. Another was graphics routines, especially in games and graphics programs, which were generally machine-specific as they used direct hardware access for speed, bypassing the OS and BIOS (this was also a common problem in early DOS machines).[citation needed]
Bill Gates claimed that theApple II with aZ-80 SoftCard was the single most-popular CP/M hardware platform.[31] Digital Research stated in 1982 that the operating system had been licensed for more than 450 types of computer systems.[32] Many different brands of machines ran the operating system, some notable examples being theAltair 8800, theIMSAI 8080, theOsborne 1 and Kayproluggables, andMSX computers. The best-selling CP/M-capable system of all time was probably theAmstrad PCW. In the UK, CP/M was also available onResearch Machines educational computers (with the CP/M source code published as an educational resource), and for theBBC Micro when equipped with a Z80 co-processor. Furthermore, it was available for theAmstrad CPC series, theCommodore 128,TRS-80, and later models of theZX Spectrum. CP/M 3 was also used on the NIAT, a custom handheld computer designed forA. C. Nielsen's internal use with 1 MB ofSSD memory.
In 1979, a multi-user compatible derivative of CP/M was released.MP/M allowed multiple users to connect to a single computer, using multiple terminals to provide each user with a screen and keyboard. Later versions ran on 16-bit processors.
The last 8-bit version of CP/M was version 3, often called CP/M Plus, released in 1983.[21] Its BDOS was designed by David K. Brown.[21] It incorporated the bank switching memory management of MP/M in a single-user single-task operating system compatible with CP/M 2.2 applications. CP/M 3 could therefore use more than 64 KB of memory on an 8080 or Z80 processor. The system could be configured to support date stamping of files.[21] The operating system distribution software also included a relocating assembler and linker.[2] CP/M 3 was available for the last generation of 8-bit computers, notably the Amstrad PCW, theAmstrad CPC, theZX Spectrum +3, theCommodore 128,MSX machines and the Radio ShackTRS-80 Model 4.[33]
DEC PRO-CP/M-80 floppy-disk distribution for the Z80-A co-processor in a DEC Professional 3xx series
There were versions of CP/M for some16-bit CPUs as well.
The first version in the 16-bit family wasCP/M-86 for theIntel 8086 in November 1981.[34] Kathryn Strutynski was the project manager for the evolving CP/M-86 line of operating systems.[21][22] At this point, the original8-bit CP/M became known by theretronymCP/M-80 to avoid confusion.[34]
CP/M-86 was expected to be the standard operating system of the newIBM PCs, but DRI andIBM were unable to negotiate development and licensing terms. IBM turned to Microsoft instead, and Microsoft deliveredPC DOS based on86-DOS. Although CP/M-86 became an option for the IBM PC after DRI threatened legal action, it never overtook Microsoft's system. Most customers were repelled by the significantly greater price IBM charged for CP/M-86 over PC DOS (US$240 and US$40, respectively).[35]
WhenDigital Equipment Corporation (DEC) put out theRainbow 100 to compete with IBM, it came with CP/M-80 using a Z80 chip, CP/M-86 or MS-DOS using an 8088 microprocessor, orCP/M-86/80 using both. The Z80 and 8088 CPUs ran concurrently.[36][37] A benefit of the Rainbow was that it could continue to run 8-bit CP/M software, preserving a user's possibly sizable investment as they moved into the 16-bit world of MS-DOS.[36] A similardual-processor adaption for theCompuPro System 816 [sr] was namedCP/M 8-16. The CP/M-86 adaptation for the 8085/8088-basedZenith Z-100 also supported running programs for both of its CPUs.
Soon following CP/M-86, another 16-bit version of CP/M wasCP/M-68K for theMotorola 68000. The original version of CP/M-68K in 1982 was written inPascal/MT+68k, but it was ported to C later on. CP/M-68K, already running on the MotorolaEXORmacs systems, was initially to be used in theAtari ST computer, but Atari decided to go with a newer disk operating system calledGEMDOS. CP/M-68K was also used on the SORD M68 and M68MX computers.[38]
These 16-bit versions of CP/M required application programs to be re-compiled for the new CPUs. Some programs written inassembly language could beautomatically translated for a new processor. One tool for this was Digital Research'sXLT86, which translated .ASM source code for the Intel 8080 processor into .A86 source code for the Intel 8086. The translator would also optimize the output for code size and take care of calling conventions, so thatCP/M-80 andMP/M-80 programs could be ported to the CP/M-86 andMP/M-86 platforms automatically. XLT86 itself was written inPL/I-80 and was available for CP/M-80 platforms as well as forVAX/VMS.[41]
By the early 1980s an estimated 2000 CP/M applications existed.[42] Many expected that it would be the standard operating system for 16-bit computers.[43] In 1980 IBM approached Digital Research, atBill Gates' suggestion,[44] to license a forthcoming version of CP/M for its new product, the IBM Personal Computer. Upon the failure to obtain a signednon-disclosure agreement, the talks failed, and IBM instead contracted with Microsoft to provide an operating system.[45]
Many of the basic concepts and mechanisms of early versions of MS-DOS resemble those of CP/M. Internals like file-handling data structures are identical, and both refer to disk drives with a letter (A:,B:, etc.). MS-DOS's main innovation was itsFAT file system. This similarity made it easier to port popular CP/M software likeWordStar anddBase. However, CP/M's concept of separate user areas for files on the same disk was never ported to MS-DOS. Since MS-DOS has access to more memory (as few IBM PCs were sold with less than 64 KB of memory, while CP/M can run in 16 KB if necessary), more commands are built into thecommand-line shell, making MS-DOS somewhat faster and easier to use on floppy-based computers.
Although one of the first peripherals for the IBM PC was the Baby Blue card, a SoftCard-likeexpansion card that lets the PC run 8-bit CP/M software like WordStar not yet available for it,[42] andBYTE in 1982 described MS-DOS and CP/M asDavid and Goliath, the magazine stated that MS-DOS was "much more user-friendly, faster, with many more advantages, and fewer disadvantages".[32]InfoWorld stated in 1984 that efforts to introduce CP/M to the home market had been largely unsuccessful and most CP/M software was too expensive for home users.[46] In 1986 the magazine stated that Kaypro had stopped production of 8-bit CP/M-based models to concentrate on sales of MS-DOS compatible systems, long after most other vendors had ceased production of new equipment and software for CP/M.[47] CP/M rapidly lost market share as the microcomputing market moved to the IBM-compatible platform, and never regained its former popularity.Byte magazine, one of the leading industry magazines for microcomputers, essentially ceased covering CP/M products within a few years of the introduction of the IBM PC. For example, in 1983 there were still a few advertisements for S-100 boards and articles on CP/M software, but by 1987 these were no longer found in the magazine.
Later versions of CP/M-86 made significant strides in performance and usability and were made compatible with MS-DOS. To reflect this compatibility the name was changed, and CP/M-86 becameDOS Plus, which in turn becameDR-DOS.
ZCPR[48] (the Z80 Command Processor Replacement) was introduced on 2 February 1982 as a drop-in replacement for the standard Digital Research console command processor (CCP) and was initially written by a group of computer hobbyists who called themselves "The CCP Group". They were Frank Wancho, Keith Petersen (the archivist behindSimtel at the time), Ron Fowler, Charlie Strom, Bob Mathias, and Richard Conn. Richard was, in fact, the driving force in this group (all of whom maintained contact through email).
ZCPR1 was released on a disk put out by SIG/M (Special Interest Group/Microcomputers), a part of the Amateur Computer Club ofNew Jersey.
ZCPR2 was released on 14 February 1983. It was released as a set of ten disks from SIG/M. ZCPR2 was upgraded to 2.3, and also was released in 8080 code, permitting the use of ZCPR2 on 8080 and 8085 systems.
ZCPR3[49] was released on 14 July 1984, as a set of nine disks from SIG/M. The code for ZCPR3 could also be compiled (with reduced features) for the 8080 and would run on systems that did not have the requisiteZ80 microprocessor. Features of ZCPR as of version 3 included shells, aliases, I/O redirection, flow control, named directories, search paths, custom menus, passwords, and online help. In January 1987, Richard Conn stopped developing ZCPR, and Echelon asked Jay Sage (who already had a privately enhanced ZCPR 3.1) to continue work on it. Thus, ZCPR 3.3 was developed and released. ZCPR 3.3 no longer supported the 8080 series of microprocessors, and added the most features of any upgrade in the ZCPR line. ZCPR 3.3 also included a full complement of utilities with considerably extended capabilities. While enthusiastically supported by the CP/M user base of the time, ZCPR alone was insufficient to slow the demise of CP/M.
An Intel 8080 (and later the 8085) or Zilog Z80 microprocessor
TheNEC V20 andV30 processors support an 8080-emulation mode that can run 8-bit CP/M on a PC-DOS/MS-DOS computer so equipped, though anyPC clone could run CP/M-86.[50][51]
At least 16 kilobytes ofRAM, beginning at address 0
The only hardware system that CP/M, as sold by Digital Research, would support was the Intel 8080 Development System. Manufacturers of CP/M-compatible systems customized portions of the operating system for their own combination of installed memory, disk drives, and console devices. CP/M would also run on systems based on the Zilog Z80 processor since the Z80 was compatible with 8080 code. While the Digital Research distributed core of CP/M (BDOS, CCP, core transient commands) did not use any of the Z80-specific instructions, many Z80-based systems used Z80 code in the system-specific BIOS, and many applications were dedicated to Z80-based CP/M machines.
Digital Research subsequently partnered with Zilog andAmerican Microsystems to produce Personal CP/M, a ROM-based version of the operating system aimed at lower-cost systems that could potentially be equipped without disk drives.[52] First featured in the Sharp MZ-800, a cassette-based system with optional disk drives,[53] Personal CP/M was described as having been "rewritten to take advantage of the enhanced Z-80 instruction set" as opposed to preserving portability with the 8080. American Microsystems announced a Z80-compatible microprocessor, the S83, featuring 8 KB of in-package ROM for the operating system and BIOS, together with comprehensive logic for interfacing with 64-kilobit dynamic RAM devices.[54] Unit pricing of the S83 was quoted as $32 in 1,000 unit quantities.[55]
On most machines the bootstrap was a minimalbootloader inROM combined with some means of minimalbank switching or a means of injecting code on the bus (since the 8080 needs to see boot code at Address 0 for start-up, while CP/M needs RAM there); for others, this bootstrap had to be entered into memory usingfront-panel controls each time the system was started.
CP/M used the 7-bit ASCII set. The other 128 characters made possible by the 8-bit byte were not standardized. For example, oneKaypro used them for Greek characters, andOsborne machines used the 8th bit set to indicate an underlined character.WordStar used the 8th bit as an end-of-word marker. International CP/M systems most commonly used theISO 646 norm for localized character sets, replacing certain ASCII characters with localized characters rather than adding them beyond the 7-bit boundary.
In the 8-bit versions, while running, the CP/M operating system loaded into memory has three components:[3]
Basic Input/Output System (BIOS),
Basic Disk Operating System (BDOS),
Console Command Processor (CCP).
The BIOS and BDOS are memory-resident, while the CCP is memory-resident unless overwritten by an application, in which case it is automatically reloaded after the application finished running. A number of transient commands for standard utilities are also provided. The transient commands reside infiles with theextension .COM on disk.
The BIOS directly controls hardware components other than the CPU and main memory. It contains functions such as character input and output and the reading and writing of disk sectors. The BDOS implements the CP/Mfile system and some input/output abstractions (such as redirection) on top of the BIOS. The CCP takes user commands and either executes them directly (internal commands such as DIR to show a directory or ERA to delete a file) or loads and starts an executable file of the given name (transient commands such as PIP.COM to copy files or STAT.COM to show various file and system information). Third-party applications for CP/M are also essentially transient commands.
The BDOS, CCP and standard transient commands are the same in all installations of a particular revision of CP/M, but the BIOS portion is always adapted to the particular hardware.
Adding memory to a computer, for example, means that the CP/M system must be reinstalled to allow transient programs to use the additional memory space. A utility program (MOVCPM) is provided with system distribution that allows relocating the object code to different memory areas. The utility program adjusts the addresses in absolute jump and subroutine call instructions to new addresses required by the new location of the operating system in processor memory. This newly patched version can then be saved on a new disk, allowing application programs to access the additional memory made available by moving the system components. Once installed, the operating system (BIOS, BDOS and CCP) is stored in reserved areas at the beginning of any disk which can be used to boot the system. On start-up, the bootloader (usually contained in a ROM firmware chip) loads the operating system from the disk in driveA:.
By modern standards CP/M is primitive, owing to the extreme constraints on program size. With version 1.0 there is no provision for detecting a changed disk. If a user changes disks without manually rereading the disk directory the system writes on the new disk using the old disk's directory information, ruining the data stored on the disk. From version 1.1 or 1.2 onwards, changing a disk then trying to write to it before its directory is read will cause a fatal error to be signalled. This avoids overwriting the disk but requires a reboot and loss of the data to be stored on disk.
The majority of the complexity in CP/M is isolated in the BDOS, and to a lesser extent, the CCP and transient commands. This meant that by porting the limited number of simple routines 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 (ahardware abstraction layer), but at the time of CP/M's birth, OSs were typically intended to run on only one machine platform, and multilayer designs were considered unnecessary.
Screenshot showing a CP/M 3.0 directory listing using theDIR command on a Commodore 128 home computer
The Console Command Processor, or CCP, accepts input from the keyboard and conveys results to the terminal. CP/M itself works with either a printing terminal or a video terminal. All CP/M commands have to be typed in on thecommand line. The console most often displays theA> prompt, to indicate the current default disk drive. When used with a video terminal, this is usually followed by a blinkingcursor supplied by the terminal. The CCP awaits input from the user. A CCP internal command, of the form drive letter followed by a colon, can be used to select the default drive. For example, typingB: and pressing enter at the command prompt changes the default drive to B, and the command prompt then becomesB> to indicate this change.
CP/M's command-line interface was patterned after the operating systems fromDigital Equipment, such asRT-11 for thePDP-11 andOS/8 for thePDP-8.[citation needed] Commands take the form of a keyword followed by a list of parameters separated by spaces or special characters. Similar to a Unixshell builtin, if an internal command is recognized, it is carried out by the CCP itself. Otherwise it attempts to find an executable file on the currently logged disk drive and (in later versions) user area, loads it, and passes it any additional parameters from the command line. These are referred to as "transient" programs. On completion, BDOS will reload the CCP if it has been overwritten by application programs — this allows transient programs a larger memory space.
The commands themselves can sometimes be obscure. For instance, thecommand to duplicate files is namedPIP (Peripheral-Interchange-Program), the name of the old DEC utility used for that purpose. The format of parameters given to a program was not standardized, so that there is no single option character that differentiated options from file names. Different programs can and do use different characters.
CP/M Plus (CP/M Version 3) includes DIR (display list of files from a directory except those marked with the SYS attribute),DIRSYS /DIRS (list files marked with the SYS attribute in the directory),ERASE / ERA (delete a file),RENAME / REN (rename a file), TYPE /TYP (display contents of an ASCII character file), and USER /USE (change user number) as built-in commands:[57] CP/M 3 allows the user to abbreviate the built-in commands.[58] Transient commands in CP/M 3 includeCOPYSYS,DATE,DEVICE,DUMP,ED,GET,HELP,HEXCOM,INITDIR,LINK,MAC, PIP,PUT,RMAC,SET,SETDEF,SHOW,SID,SUBMIT, andXREF.[58]
The Basic Disk Operating System,[15][14] or BDOS,[15][14] provides access to such operations as opening a file, output to the console, or printing. Application programs load processor registers with a function code for the operation, and addresses for parameters ormemory buffers, and call a fixed address in memory. Since the address is the same independent of the amount of memory in the system, application programs run the same way for any type or configuration of hardware.
CP/M advertisement in the 11 December 1978 issue ofInfoWorld magazine
The Basic Input Output System or BIOS,[15][14] provides the lowest level functions required by the operating system.
These include reading or writing single characters to the system console and reading or writing a sector of data from the disk. The BDOS handles some of the buffering of data from the diskette, but before CP/M 3.0 it assumes a disk sector size fixed at 128 bytes, as used onsingle-density 8-inch floppy disks. Since most 5.25-inch disk formats use larger sectors, the blocking and deblocking and the management of a disk buffer area is handled by model-specific code in the BIOS.
Customization is required because hardware choices are not constrained by compatibility with any one popular standard. For example, some manufacturers designed built-in integrated video display systems, while others relied on separate computer terminals. Serial ports for printers and modems can use different types ofUART chips, and port addresses are not fixed. Some machines use memory-mapped I/O instead of the 8080 I/O address space. All of these variations in the hardware are concealed from other modules of the system by use of the BIOS, which uses standard entry points for the services required to run CP/M such as character I/O or accessing a disk block. Since support for serial communication to a modem is very rudimentary in the BIOS or may be absent altogether, it is common practice for CP/M programs that use modems to have a user-installed overlay containing all the code required to access a particular machine's serial port.
Distribution5+1⁄4-inch diskettes and packaging for the last version (version 4) of WordStar word processing program released for 8-bit CP/M
WordStar, one of the first widely usedword processors, anddBase, an early and popular database program for microcomputers, were originally written for CP/M. Two earlyoutliners,KAMAS (Knowledge and Mind Amplification System) and its cut-down successor Out-Think (without programming facilities and retooled for 8080/V20 compatibility) were also written for CP/M, though later rewritten for MS-DOS.Turbo Pascal, the ancestor ofBorland Delphi, andMultiplan, the ancestor ofMicrosoft Excel, also debuted on CP/M before MS-DOS versions became available.VisiCalc, the first-ever spreadsheet program, was made available for CP/M. Another company,Sorcim, created itsSuperCalc spreadsheet for CP/M, which would go on to become the market leader and de facto standard on CP/M. Supercalc would go on to be a competitor in the spreadsheet market in the MS-DOS world.AutoCAD, a CAD application from Autodesk debuted on CP/M. A host of compilers and interpreters for popularprogramming languages of the time (such asBASIC,Borland'sTurbo Pascal,FORTRAN and evenPL/I[59]) were available, among them several of the earliestMicrosoft products.
CP/M software often came withinstallers that adapted it to a wide variety of computers.[60] The source code for BASIC programs was easily accessible, and most forms ofcopy protection were ineffective on the operating system.[61] A Kaypro II owner, for example, would obtain software on Xerox 820 format, then copy it to and run it from Kaypro-format disks.[62]
The read/write memory between address 0100 hexadecimal and the lowest address of the BDOS was theTransient Program Area (TPA) available for CP/M application programs. Although all Z80 and 8080 processors could address 64 kilobytes of memory, the amount available for application programs could vary, depending on the design of the particular computer. Some computers used large parts of the address space for such things as BIOS ROMs, or video display memory. As a result, some systems had more TPA memory available than others. Bank switching was a common technique that allowed systems to have a large TPA while switching out ROM or video memory space as needed. CP/M 3.0 allowed parts of the BDOS to be in bank-switched memory as well.
CP/M came with a Dynamic Debugging Tool, nicknamedDDT (after the insecticide, i.e. abug-killer), which allowed memory and program modules to be examined and manipulated, and allowed a program to be executed one step at a time.[65][66][67]
CP/M originally did not support the equivalent ofterminate and stay resident (TSR) programs as under DOS. Programmers could write software that could intercept certain operating system calls and extend or alter their functionality. Using this capability, programmers developed and sold auxiliarydesk accessory programs, such asSmartKey, a keyboard utility to assign any string of bytes to any key.[68]CP/M 3, however, added support fordynamically loadableResident System Extensions (RSX).[57][21] A so-callednull command file could be used to allow CCP to load an RSX without a transient program.[57][21] Similar solutions like RSMs (forResident System Modules) were also retrofitted to CP/M 2.2 systems by third-parties.[69][70][71]
Although CP/M provided somehardware abstraction to standardize the interface to disk I/O or console I/O, application programs still typically required installation to make use of all the features of such equipment as printers and terminals. Often these were controlled byescape sequences which had to be altered for different devices. For example, the escape sequence to select bold face on a printer would have differed among manufacturers, and sometimes among models within a manufacturer's range. This procedure was not defined by the operating system; a user would typically run an installation program that would either allow selection from a range of devices, or else allow feature-by-feature editing of the escape sequences required to access a function. This had to be repeated for each application program, since there was no central operating system service provided for these devices.
The initialization codes for each model of printer had to be written into the application. To use a program such as Wordstar with more than one printer (say, a fast dot-matrix printer or a slower but presentation-qualitydaisy wheel printer), a separate version of Wordstar had to be prepared, and one had to load the Wordstar version that corresponded to the printer selected (and exiting and reloading to change printers).
IBM System/34 andIBM 3740's 128 byte/sector, single-density, single-sided format is CP/M's standard 8-inchfloppy-disk format. No standard 5.25-inch CP/M disk format exists, with Kaypro,Morrow Designs, Osborne, and others each using their own.[72][73][25][74] Certain formats were more popular than others. Most software was available in the Xerox 820 format, and other computers such as the Kaypro II were compatible with it,[62][75] butInfoWorld estimated in September 1981 that "about two dozen formats were popular enough that software creators had to consider them to reach the broadest possible market".[23]JRT Pascal, for example, provided versions on 5.25-inch disk forNorth Star, Osborne, Apple, Heath/Zenithhard sector andsoft sector, andSuperbrain, and one 8-inch version.[76] Ellis Computing also offered its software for both Heath formats, and 16 other 5.25-inch formats including two different TRS-80 CP/M modifications.[77]
Various formats were used depending on the characteristics of particular systems and to some degree the choices of the designers. CP/M supported options to control the size of reserved and directory areas on the disk, and the mapping between logical disk sectors (as seen by CP/M programs) and physical sectors as allocated on the disk. There were many ways to customize these parameters for every system[78] but once they had been set, no standardized way existed for a system to load parameters from a disk formatted on another system.
While almost every CP/M system with 8-inch drives can read the aforementioned IBM single-sided, single-density format, for other formats the degree of portability between different CP/M machines depends on the type of disk drive and controller used since many different floppy types existed in the CP/M era in both 8-inch and 5.25-inch sizes.[73] Disks can be hard or soft sectored, single or double density, single or double sided, 35 track, 40 track, 77 track, or 80 track, and the sector layout, size and interleave can vary widely as well. Although translation programs can allow the user to read disk types from different machines, the drive type and controller are also factors. By 1982, soft-sector, single-sided, 40-track 5.25-inch disks had become the most popular format to distribute CP/M software on as they were used by the most common consumer-level machines of that time, such as the Apple II, TRS-80, Osborne 1, Kaypro II, and IBM PC. A translation program allows the user to read any disks on his machine that had a similar format; for example, the Kaypro II can readTRS-80,Osborne,IBM PC, andEpson disks. Other disk types such as 80 track or hard sectored are completely impossible to read. The first half of double-sided disks (like those of the Epson QX-10) can be read because CP/M accessed disk tracks sequentially with track 0 being the first (outermost) track of side 1 and track 79 (on a 40-track disk) being the last (innermost) track of side 2. Apple II users are unable to use anything but Apple's GCR format and so have to obtain CP/M software on Apple format disks or else transfer it via serial link.
The fragmented CP/M market, requiring distributors either to stock multiple formats of disks or to invest in multiformat duplication equipment, compared with the more standardizedIBM PC disk formats, was a contributing factor to the rapid obsolescence of CP/M after 1981.
One of the last notable CP/M-capable machines to appear was theCommodore 128 in 1985, which had a Z80 for CP/M support in addition to its native mode using a 6502-derivative CPU. Using CP/M required either a1571 or1581 disk drive which could read soft-sector 40-trackMFM-format disks.
The first computer to use a 3.5-inch floppy drive, theSony SMC-70,[79] ran CP/M 2.2. The Commodore 128,Bondwell-2 laptop, Micromint/Ciarcia SB-180,[80]MSX andTRS-80 Model 4 (running Montezuma CP/M 2.2) also supported the use of CP/M with 3.5-inch floppy disks. CP/AM,Applied Engineering's version of CP/M for the Apple II, also supported 3.5-inch disks (as well as RAM disks on RAM cards compatible with the Apple II Memory Expansion Card).[81] TheAmstrad PCW ran CP/M using 3-inch floppy drives at first, and later switched to the 3.5 inch drives.
File names were specified as a string of up to eight characters, followed by a period, followed by a file name extension of up to three characters ("8.3" filename format). The extension usually identified the type of the file. For example,.COM indicated an executable program file, and.TXT indicated a file containingASCII text. Characters in filenames entered at the command prompt were converted to upper case, but this was not enforced by the operating system. Programs (MBASIC is a notable example) were able to create filenames containing lower-case letters, which then could not easily be referenced at the command line.
Each disk drive was identified by adrive letter, for example, driveA and driveB. To refer to a file on a specific drive, the drive letter was prefixed to the file name, separated by a colon, e.g.,A:FILE.TXT. With no drive letter prefixed, access was to files on the current default drive.[82]
File size was specified as the number of 128-byterecords (directly corresponding to disk sectors on 8-inch drives) occupied by a file on the disk. There was no generally supported way of specifying byte-exact file sizes. The current size of a file was maintained in the file'sFile Control Block (FCB) by the operating system. Since many application programs (such astext editors) prefer to deal with files as sequences of characters rather than as sequences of records, by convention text files were terminated with acontrol-Z character (ASCIISUB,hexadecimal 1A). Determining theend of atext file therefore involved examining the last record of the file to locate the terminating control-Z. This also meant that inserting a control-Z character into the middle of a file usually had the effect of truncating the text contents of the file.
With the advent of larger removable and fixed disk drives, disk de-blocking formulas were employed which resulted in more disk blocks per logical file allocation block. While this allowed for larger file sizes, it also meant that the smallest file which could be allocated increased in size from 1 KB (on single-density drives) to 2 KB (on double-density drives) and so on, up to 32 KB for a file containing only a single byte. This made for inefficient use of disk space if the disk contained a large number of small files.
File modificationtime stamps were not supported in releases up to CP/M 2.2, but were an optional feature in MP/M and CP/M 3.0.[21]
CP/M 2.2 had nosubdirectories in the file structure, but provided 16 numbered user areas to organize files on a disk. To change user one had to simply type "User X" at the command prompt, X being the user number. Security was non-existent and considered unnecessary on a personal computer. The user area concept was to make the single-user version of CP/M somewhat compatible with multi-user MP/M systems. A common patch for the CP/M and derivative operating systems was to make one user area accessible to the user independent of the currently set user area. A USER command allowed the user area to be changed to any area from 0 to 15. User 0 was the default. If one changed to another user, such as USER 1, the material saved on the disk for this user would only be available to USER 1; USER 2 would not be able to see it or access it. However, files stored in the USER 0 area were accessible to all other users; their location was specified with a prefatorypath, since the files of USER 0 were only visible to someone logged in as USER 0. The user area feature arguably had little utility on small floppy disks, but it was useful for organizing files on machines withhard drives. The intent of the feature was to ease use of the same computer for different tasks. For example, a secretary could dodata entry, then, after switching USER areas, another employee could use the machine to dobilling without their files intermixing.
MBASIC text output displayed on a monochrome monitor typical for that time
Although graphics-capable S-100 systems existed from the commercialization of theS-100 bus, CP/M did not provide any standardized graphics support until 1982 withGSX (Graphics System Extension). Owing to the small amount of available memory, graphics was never a common feature associated with 8-bit CP/M operating systems. Most systems could only display rudimentaryASCII art charts and diagrams intext mode or by using a customcharacter set. Some computers in theKaypro line and theTRS-80 Model 4 had video hardware supporting block graphics characters, and these were accessible to assembler programmers and BASIC programmers using theCHR$ command. The Model 4 could display 640 by 240 pixel graphics with an optional high resolution board.
Some companies made official enhancements of CP/M based on Digital Research source code.An example isIMDOS for theIMSAI 8080 computer made byIMS Associates, Inc., a clone of the famousAltair 8800.
MSX-DOS for the MSX range of computers is CP/M-compatible and can run CP/M programs.
TheEpson QX-10 shipped with a choice of CP/M or the compatible TPM-II or TPM-III.
The BritishZX Spectrum compatibleSAM Coupé had an optional CP/M-2.2 compatible OS called Pro-DOS.
The Amstrad/Schneider CPC series 6xx (disk-based) and PCW series computers were bundled with an CP/M disk pack.
TheHusky (computer) ran a ROM-based menu-driven program loader called DEMOS which could run many CP/M applications.
ZSDOS is a replacement BDOS for CP/M-80 2.2 written by Harold F. Bower and Cameron W. Cotrill.
CPMish is a new FOSS CP/M 2.2-compatible operating system which originally contained no DR code. It includes ZSDOS as its BDOS and ZCPR (seeearlier) as the command processor. Since Bryan Sparks, the president of DR owners Lineo, granted permission in 2022 to modify and redistribute CP/M code, developer David Given is updating CPMish with some parts of the original DR CP/M.
LokiOS is a CP/M 2.2 compatible OS. Version 0.9 was publicly released in 2023 by David Kitson as a solo-written Operating System exercise, intended for theOpen Spectrum Project and includes source code for theBIOS,BDOS andCommand-line interface as well as other supporting applications and drivers. The distribution also includes original DR Source code and a utility to allow users to hot-swap OS components (e.g., BDOS, CCP) on the fly.
IS-DOS for theEnterprise computers, written by Intelligent Software.
Some CP/M compatible operating systems extended the basic functionality so far that they far exceeded the original, for example the multi-processor capableTurboDOS.
A number of CP/M-80 derivatives existed in the formerEastern Bloc under various names, including SCP (Single User Control Program [de]), SCP/M, CP/A,[83] CP/J, CP/KC, CP/KSOB, CP/L, CP/Z, MICRODOS, BCU880, ZOAZ, OS/M, TOS/M, ZSDOS, M/OS, COS-PSA, DOS-PSA, CSOC, CSOS, CZ-CPM, DAC, HC and others.[84][85] There were also CP/M-86 derivatives namedSCP1700,CP/K andK8918-OS.[85] They were produced by theEast GermanVEB Robotron and others.[85][84][83]
A number of behaviors exhibited byMicrosoft Windows are a result ofbackward compatibility with MS-DOS, which in turn attempted some backward compatibility with CP/M. Thedrive letter and8.3 filename conventions in MS-DOS (and early Windows versions) were originally adopted from CP/M.[86] Thewildcard matching characters used by Windows (? and *) are based on those of CP/M,[87] as are the reserved filenames used toredirect output to aprinter ("PRN:"), and theconsole ("CON:"). The drive names A and B were used to designate the two floppy disk drives that CP/M systems typically used; when hard drives appeared, they were designated C, which survived into MS-DOS as theC:\> command prompt.[88] Thecontrol character^Z marking theend of some text files can also be attributed to CP/M.[89] Various commands in DOS were modelled after CP/M commands; some of them even carried the same name, like DIR, REN/RENAME, or TYPE (and ERA/ERASE in DR-DOS). File extensions like.TXT or.COM are still used to identify file types on many operating systems.
In 1997 and 1998,Caldera released some CP/M 2.2 binaries andsource code under anopen source license, also allowing the redistribution and modification of further collected Digital Research files related to the CP/M and MP/M families through Tim Olmstead's "The Unofficial CP/M Web site" since 1997.[90][91][92] After Olmstead's death on 12 September 2001,[93] the distribution license was refreshed and expanded byLineo, who had meanwhile become the owner of those Digital Research assets, on 19 October 2001.[94][95][1][96]In October 2014, to mark the 40th anniversary of the first presentation of CP/M, theComputer History Museum released earlysource code versions of CP/M.[97]
As of 2018[update], there are a number of activevintage, hobby and retro-computer people and groups, and some small commercial businesses, still developing and supporting computer platforms that use CP/M (mostly 2.2) as the host operating system.
^Warren, Jim (April 1976). "First word on a floppy-disk operating system".Dr. Dobb's Journal. Vol. 1, no. 4. Menlo Park, California, US. p. 5. Subtitle: Command language & facilities similar to DECSYSTEM-10.
^da Cruz, Frank (1984-04-27)."New release of KERMIT for CP/M-80".Info-CP/M (Mailing list). Kermit Project, Columbia University.Archived from the original on 2021-04-17. Retrieved2025-01-02.
^Lieber, Eckhard; von Massenbach, Thomas (1987). "CP/M 2 lernt dazu. Modulare Systemerweiterungen auch für das 'alte' CP/M".c't - magazin für computertechnik (part 1) (in German). Vol. 1987, no. 1.Heise Verlag. pp. 124–135.
^Lieber, Eckhard; von Massenbach, Thomas (1987). "CP/M 2 lernt dazu. Modulare Systemerweiterungen auch für das 'alte' CP/M".c't - magazin für computertechnik (part 2) (in German). Vol. 1987, no. 2.Heise Verlag. pp. 78–85.
^Huck, Alex (2016-10-09)."RSM für CP/M 2.2".Homecompuer DDR (in German).Archived from the original on 2016-11-25. Retrieved2016-11-25.
^abPohlers, Volker (2019-04-30)."CP/A".Homecomputer DDR (in German).Archived from the original on 2020-02-21. Retrieved2020-02-21.
^abKurth, Rüdiger; Groß, Martin; Hunger, Henry (2019-01-03)."Betriebssysteme".www.robotrontechnik.de (in German).Archived from the original on 2019-04-27. Retrieved2019-04-27.
^abcKurth, Rüdiger; Groß, Martin; Hunger, Henry (2019-01-03)."Betriebssystem SCP".www.robotrontechnik.de (in German).Archived from the original on 2019-04-27. Retrieved2019-04-27.