CP/M Features and Facilities 1.1 Introduction CPM is a monitor control program for microcomputer system development that uses floppy disks or Winchester hard disks for backup storage. Using a computer system based upon lntel's 8080 microcomputer, CP/M provides a general environment for program construction, storage, and editing, along with assembly and program check-out facilities. An important feature of CP/M is that it can be easily altered to execute with any computer configuration that uses an Intel 8080 (or Zilog Z-80) Central Processing Unit and has at least 20K bytes of main memory with up to 16 diskette drives. A detailed discussion of the modifications required for any particular hardware environment is given in Chapter 6. Although the standard Digital Research version operates on a single-density Intel MDS 800, several different hardware manufacturers support their own input-output drivers for CP/M. The CP/M monitor provides rapid access to programs through a comprehensive file management package. The file subsystem supports a named file structure, allowing dynamic allocation of file space as well as sequential and random file access. Using this file system, a large number of programs can be stored in both source and machine- executable form. CP/M 2 is a high-performance, single-console operating system that uses table-driven techniques to allow field reconfiguration to match a wide variety of disk capacities. AU fundamental file restrictions are removed, maintaining upward compatibility from pre- vious versions of release 1. Features of CP/M 2 include field specification of one to sixteen logical drives, each containing up to eight megabytes. Any particular file can reach the full drive size with the capability of expanding to thirty-two megabytes in future releases. The directory size can be field-configured to contain any reasonable number of entries, and each file is optionally tagged with read/only and system attributes. Users of CP/M 2 are physically separated by user numbers, with facilities for file copy operations from one user area to another. Powerful relative-record random access functions are present in CP/M 2 that provide direct access to any of the 65536 records of an eight-megabyte file. CP/M also supports a powerful context editor, Intel-compatible assembler, and debugger subsystems. Optional software includes a powerful lntel-compatible macro assembler, symbolic debugger, along with various high-level languages. When coupled With CP/M's Console Command Processor, the resulting facilities equal or excel similar large computer facilities. CP/M is logically divided into several distinct parts: " BIOS Basic IIO System (hardware-dependent) BDOS Basic Disk Operating System CCP Console Command Processor TPA Transient Program Area The BIOS provides the primitive operations necessary to access the diskette drives and to interface standard peripherals (teletype, CRT, paper tape reader/punch, and user-defined peripherals). They can be tailored by the user for any particular hardware environment by "patching" this portion of CP/M. The BDOS provides disk management by controlling one or more disk drives containing independent file directories. The BDOS implements disk allocation strategies that provide fully dynamic file construction while minimizing head movement across the disk during access. The BDOS has entry points that include the following primitive operations, which can be programmatically accessed: SEARCH Look for a particular disk file by name. OPEN Open a file for further operations. CLOSE Close a file after processing. RENAME Change the name of a particular file. READ Read a record from'a particular file. WRITE Write a record to a particular file. SELECT Select a particular disk drive for further operations. The CCP provides a symbolic interface between the user's console and the remainder of the CP/M system. The CCP reads the console device and processes commands, which include listing the file directory, printing the contents of files, and controlling the operation of transient programs, such as assemblers, editors, and debuggers. The stand- ard commands that are available in the CCP are listed in Section 1.2,1. The last segment of CP/M is the area called the Transient Program Area (TPA). The TPA holds programs that are loaded from the disk under command of the CCP. During program editing, for example, the TPA holds the CP/M text editor machine code and data areas. Similarly, programs created under CP/M can be checked out by loading and executing these programs in the TPA. Any or all of the CPIM component subsystems can be "overlaid" by an executing program. That is, once a user's program is loaded into the TPA, tl~ CCP, BDOS, and BIOS areas can be used as the program's data area. A "bootstrap" loader is programmati- cally accessible whenever the BIOS portion is not overlaid; thus, the user program need only branch to the bootstrap loader at the end of execution and the complete CP/M monitor is reloaded from disk. TheCP/M operating system is partitioned into distinct modules, including the BIOS portion that defines the hardware environment in which CP/M is executing. Thus, the standard system is easily modified to any nonstandard environment by changing the peripheral drivers to handle the custom system. ALL INFORMATION PRESENTED HERE IS PROPRIETARY TO DIGITAL RESEARCH