MarketCP/M
Company Profile

CP/M

CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/85-based microcomputers by Gary Kildall of Digital Research, Inc. CP/M is a disk operating system and its purpose is to organize files on a magnetic storage medium, and to load and run programs stored on a disk. Initially confined to single-tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations and were migrated to 16-bit processors.

History
'' magazine Early history Gary Kildall originally developed CP/M during 1974, 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 from Naval 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. They supported CP/M because of its large library of software. The Xerox 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. Aware of its reputation, Digital Research's Gordon Eubanks promised in 1982 that his company's documentation would improve.) By 1984, Columbia University used the same source code to build Kermit binaries for more than a dozen different CP/M systems, plus two generic versions. allowing multiple programs to interact with different hardware in a standardized way. Many brands of machines ran the operating system, some notable examples being the Altair 8800, the IMSAI 8080, the Osborne 1 and Kaypro luggables, and MSX computers. The best-selling CP/M-capable system of all time was probably the Amstrad PCW. In the UK, CP/M was also available on Research Machines educational computers (with the CP/M source code published as an educational resource), and for the BBC Micro when equipped with a Z80 coprocessor. Furthermore, it was available for the Amstrad CPC series, the Commodore 128, TRS-80, and later models of the ZX Spectrum. CP/M 3 was also used on the NIAT, a custom handheld computer designed for A. C. Nielsen's internal use with 1 MB of SSD memory. Multi-user 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. CP/M Plus The last 8-bit version of CP/M was version 3, often called CP/M Plus, released in 1983. Many expected that CP/M would be the standard operating system for 16-bit computers. ZCPR3 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 requisite Z80 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. ==Hardware model==
Hardware model
A minimal 8-bit CP/M system would contain the following components: • A computer terminal using the ASCII character set • An Intel 8080 (and later the 8085) or Zilog Z80 microprocessor • The NEC V20 and V30 processors support an 8080-emulation mode that can run 8-bit CP/M on a PC-DOS/MS-DOS computer so equipped, though any PC clone could run CP/M-86. First featured in the Sharp MZ-800, a cassette-based system with optional disk drives, 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. Unit pricing of the S83 was quoted as $32 in 1,000 unit quantities. On most machines the bootstrap was a minimal bootloader in ROM combined with some means of minimal bank 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 using front-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, one Kaypro used them for Greek characters, and Osborne 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 the ISO 646 norm for localized character sets, replacing certain ASCII characters with localized characters rather than adding them beyond the 7-bit boundary. ==Components==
Components
While running, the CP/M operating system loaded into memory has three components: • 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 in files with the extension .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/M file 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 drive A:. 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 onward, changing a disk and then trying to write to it before its directory is read will cause a fatal error to be signaled. 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 (a hardware 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. Console Command Processor 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 the command line. The console most often displays the A> prompt, to indicate the current default disk drive. When used with a video terminal, this is usually followed by a blinking cursor 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, typing B: and pressing enter at the command prompt changes the default drive to B, and the command prompt then becomes B> to indicate this change. CP/M's command-line interface was patterned after the Concise Command Language used in operating systems from Digital Equipment, such as RT-11 for the PDP-11 and OS/8 for the PDP-8. Commands take the form of a keyword followed by a list of parameters separated by spaces or special characters. Similar to a Unix shell 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, the command to duplicate files is named PIP (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. The CP/M Console Command Processor includes DIR, ERA, REN, SAVE, TYPE, and USER as built-in commands. Transient commands in CP/M include ASM, DDT, DUMP, ED, LOAD, , PIP, STAT, SUBMIT, and SYSGEN. 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: CP/M 3 allows the user to abbreviate the built-in commands. Transient commands in CP/M 3 include COPYSYS, DATE, DEVICE, DUMP, ED, GET, HELP, HEXCOM, INITDIR, LINK, MAC, PIP, PUT, RMAC, SET, SETDEF, SHOW, SID, SUBMIT, and XREF. Basic Disk Operating System The Basic Disk Operating System, or BDOS, 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 or memory 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. Basic Input Output System '' magazine The Basic Input Output System or BIOS, 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 on single-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 of UART 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. ==Applications==
Applications
WordStar, one of the first widely used word processors, and dBase, an early and popular database program for microcomputers, were originally written for CP/M. Two early outliners, 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 of Borland Delphi, and Multiplan, the ancestor of Microsoft 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 its SuperCalc 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 popular programming languages of the time (such as BASIC, Borland's Turbo Pascal, FORTRAN and even PL/I The lack of standardized graphics support limited video games, but various character and text-based games were ported, such as Telengard, Video games There are '''''' commercial CP/M games on 8-inch disk included in this list. ==Disk formats==
Disk formats
IBM System/34 and IBM 3740's 128 byte/sector, single-density, single-sided format is CP/M's standard 8-inch floppy-disk format. No standard 5.25-inch CP/M disk format exists, with Kaypro, Morrow Designs, Osborne, and others each using their own. InfoWorld 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". Various formats were used depending on the characteristics of particular systems and to some degree the choices of the designers. CP/M supports 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 are many ways to customize these parameters for every system The Amstrad PCW ran CP/M using 3-inch floppy drives at first, and later switched to 3.5-inch drives. File system 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 containing ASCII 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) could create filenames containing lowercase letters, which then could not easily be referenced at the command line. Each disk drive was identified by a drive letter, for example, drive A and drive B. 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. File size was specified as the number of 128-byte records (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's File Control Block (FCB) by the operating system. Since many application programs (such as text editors) prefer to deal with files as sequences of characters rather than as sequences of records, by convention text files were terminated with a control-Z character (ASCII SUB, hexadecimal 1A). Determining the end of a text 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 modification time 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. CP/M 2.2 had no subdirectories 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 prefatory path, 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 with hard drives. The intent of the feature was to ease use of the same computer for different tasks. For example, a secretary could do data entry, then, after switching USER areas, another employee could use the machine to do billing without their files intermixing. ==Graphics==
Graphics
text output displayed on a monochrome monitor typical for that time Although graphics-capable S-100 systems existed from the commercialization of the S-100 bus, CP/M did not provide any standardized graphics support until 1982 with GSX (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 rudimentary ASCII art charts and diagrams in text mode or by using a custom character set. Some computers in the Kaypro line and the TRS-80 Model 4 had video hardware supporting block graphics characters, and these were accessible to assembler programmers and BASIC programmers using the CHR$ function. The Model 4 could display 640 by 240 pixel graphics with an optional high resolution board. ==Derivatives==
Derivatives
Official Some companies made official enhancements of CP/M based on Digital Research source code. An example is IMDOS for the IMSAI 8080 computer made by IMS Associates, Inc., a clone of the famous Altair 8800. Compatible Other CP/M compatible OSes were developed independently and made no use of Digital Research code. Some contemporary examples were: • Cromemco CDOS from CromemcoMSX-DOS for the MSX range of computers is CP/M-compatible and can run CP/M programs. • The Epson QX-10 shipped with a choice of CP/M or the compatible TPM-II or TPM-III. • The SAM 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. • The Husky 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 (see earlier) 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 the Open Spectrum Project and includes source code for the BIOS, BDOS and Command-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 the Enterprise computers, written by Intelligent Software. • VT-DOS for the Videoton TV Computer, written by Intelligent Software. • TIKO for the Norwegian Tiki 100, first called KP/M, was compatible with CP/M. At the time wrongly assumed to be an illegal copy, it was written from scratch in PL/M. Enhancements Some CP/M compatible operating systems extended the basic functionality so far that they far exceeded the original, for example the multi-processor capable TurboDOS. Eastern bloc A number of CP/M-80 derivatives existed in the former Eastern Bloc under various names, including SCP (), SCP/M, CP/A, 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. There were also CP/M-86 derivatives named SCP1700, CP/K, and K8918-OS. They were produced by the East German VEB Robotron and others. ==Legacy==
Legacy
A number of behaviors exhibited by Microsoft Windows are a result of backward compatibility with MS-DOS, which in turn attempted some backward compatibility with CP/M. The drive letter and 8.3 filename conventions in MS-DOS (and early Windows versions) were originally adopted from CP/M. The wildcard matching characters used by Windows (? and *) are based on those of CP/M, as are the reserved filenames used to redirect output to a printer ("PRN:"), and the console ("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 the C:\> command prompt. The control character ^Z marking the end of some text files can also be attributed to CP/M. Various commands in DOS were modeled 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 and source code under an open 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. After Olmstead's death on 12 September 2001, the distribution license was refreshed and expanded by Lineo, who had meanwhile become the owner of those Digital Research assets, on 19 October 2001. In October 2014, to mark the 40th anniversary of the first presentation of CP/M, the Computer History Museum released early source code versions of CP/M. , there are a number of active vintage, 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. ==See also==
tickerdossier.comtickerdossier.substack.com