main-content

## Inhaltsverzeichnis

### 1. What is CP/M?

Abstract
CP/M stands for “Control Program for Microcomputers”, or “Control Program and Monitor”; no-one now seems quite certain exactly which of these is correct. It is an operating system for the range of microcomputers that have a Zilog Z80 — or look-alike — microchip as their central processor.
Peter Gosling

### 2. Formatting a New Disk

Abstract
Before using any new disks on a CP/M system, or any computer system for that matter, these disks have to be “formatted”. Formatting disks is the operation of preparing them to have data recorded on them and it is very similar to the operation of ruling lines to provide blank columns in a ledger. Because every computer system seems to have a different way of laying out its disks, they cannot be supplied ready formatted by the manufacturers. It is perhaps worth while at this stage, before going into how disks are formatted, to describe the layout of the disks used by typical microcomputer systems. At present there are three kinds of disk storage available: these are on 5–1/4 inch diameter floppy disks, 8 inch diameter floppy disks and the so-called “Winchester” or hard disks.
Peter Gosling

### 3. CP/M Resident Commands

Abstract
Apart from the CP/M commands that exist on their own and are identified by their names followed by the.COM or the.CMD extension, there are several that form a part of the built-in CP/M utilities. These commands are DIR, ERA, REN and TYPE.
Peter Gosling

### 4. PIP, the Peripheral Interchange Program

Abstract
PIP, as with the line editor, can trace its origins back to the early days (around 1968) of minicomputers and the DEC PDP-8 series of machines. At that time the program was used to link files on disk to a paper tape device, either a reader or a punch. By using PIP it was then possible to copy a file stored on punched paper tape straight onto disk. Similarly a file on disk could be copied onto punched paper tape. Hence the name of Peripheral Interchange Program. In the beginning it was just that; an interchange of data between a pair of peripheral devices, a disk drive and paper tape reader or punch. The version of PIP in use under CP/M is now far more versatile and allows us to move data between many pairs of peripheral devices and even internally on the same device. Since PIP is a command file (it has the extension.COM or.CMD) all that is needed to invoke it is its, name and so we get
$$\begin{gathered} A>PIP \hfill \\ * \hfill \\ \end{gathered}$$
the * prompt indicating that further instructions are being awaited.
Peter Gosling

### 5. The STAT Command

Abstract
STAT is used to determine the STATus of either files stored on a disk or the disks themselves, plus a few other pieces of useful information, as will be described later.
Peter Gosling

### 6. ED, the CP/M Line Editor

Abstract
The standard editor supplied with all versions of CP/M has a long and honourable lineage. It exhibits great similarities to a number of editors developed initially for minicomputers in the 1960s, in particular to the DEC series of machines and the Data General Nova and Eclipse line. Anyone using a microcomputer with CP/M will immediately feel at home with ED if he has had some experience at operating system level on a minicomputer.
Peter Gosling

### 7. Using MBASIC

Abstract
The commonest version of the popular BASIC language used on CP/M systems is that known as MBASIC; this is a copyright program by Microsoft Inc. The version used under CP/M-86 is known as BASIC-86, which is identical with MBASIC. It is an interactive programming language developed initially for teaching the principles of programming back in the late 1960s. Since then it has undergone many variations as each computer manufacturer has produced his own customised version of the language. Luckily we have in the Microsoft version something that is very close to a standard for the language. At a simple level Microsoft BASIC is easy to use and at its present level of development it provides a powerful and sophisticated programming tool.
Peter Gosling

### 8. Using a Compiler

Abstract
The CP/M operating system allows the use of many different languages apart from MBASIC, which is probably the commonest. MBASIC was conceived, and is widely used, as an interactive language to enable programmers to learn the techniques of programming. The commands and program instructions are executed either in an “immediate” mode, when the computer is made to behave as if it were a desk calculator, or after the command RUN has been issued. This is dealt with in more detail in the previous chapter. A compiled language, on the other hand, has its programs initially written as a string of text characters and thus they can be created by any editor that works under CP/M, for example its own ED utility, WORDSTAR, T/MAKER or any other text editor that produces a set of ASCII characters. In the example shown in Chapter 6 we have used ED to create and subsequently modify a CBASIC program.
Peter Gosling

### 9. ASM, the CP/M Assembler and DDT

Abstract
If you really want to get to the “heart” of a computer system then it is necessary to learn to talk to it in, as near as possible, a language that it understands. Using high-level programming languages such as MBASIC means that you are talking to the computer through an interpreter and hence all the instructions that you issue in a program take that much longer to be carried out. That is why we use a compiler; see chapter 8. But even if we use a compiled language we cannot control a number of aspects of the computer’s operation at what we could call the “bit level”. This is the lowest level of communication with the microprocessor and in the past, when computers were still in their infancy, this was the only way of programming. It was actually performed in the binary code of zeros and ones. This is not surprising since this is the only kind of code that the processor understands. High-level languages have taken a lot of the hard work out of programming, but a lot of detail has been lost on the way.
Peter Gosling

### 10. CP/M Plus (CP/M Version 3.1)

Abstract
Now that memory is very cheaply and easily available for microcomputers it is noticeable that, as each year goes by, the size of memory commonly installed increases by a factor of two. At present 64K of RAM is the norm for the 8-bit micro and the step up to 128K has produced a problem. An 8-bit processor cannot address, directly at least, more than 64K. This is because the largest integer that can be stored in a Z80 processor address register of 16 bits is 65535 in decimal notation, or FFFF in hexadecimal. 65535 is in fact 64 times 1024 minus 1; 1K being, of course, 2 to the power 10, not 1000.
Peter Gosling

### 11. CP/M-86

Abstract
When the Intel 8088 and 8086 16-bit processor chips became available for a new generation of microcomputers then CP/M was soon amended to run on these. CP/M-86 is a version of CP/M 2.2 and contains all the standard CP/M commands. Because of the greater addressing capabilities of the new 16-bit processors application programs written with CP/M-86 in mind can address up to a megabyte (1 048 576 bytes) of RAM. All files written by CP/M-86 are compatible with 8-bit versions of CP/M and this allows easy communication of data between 8bit and 16-bit machines.
Peter Gosling

### 12. MP/M

Abstract
With the continued popularity of the CP/M operating system for running programs relating to business requirements —. spreadsheets, word processors, databases and accounting systems — it was a logical step to make the files and programs written under the system available to more than one user at a time. With microcomputers becoming so cheap and communications technology becoming so sophisticated it was no real surprise when the multi-user version of CP/M came along. MP/M exists in both 8-bit and 16-bit versions: MP/M and MP/M-86.
Peter Gosling

### 13. Concurrent CP/M

Abstract
Most central processors spend their time doing very little. This is because many of the jobs being done by the computer, large or small, mainframe or micro, are protracted by the slowness of the data input and output. The input device is usually the keyboard, and even the speediest of typists cannot supply data at anything like the speed that it can be processed. Similarly, the speed of printers is far slower than the speed that the computer can hand over the data — hence the need for printer buffers. This is a problem that will be familiar to former users of mainframe and minicomputers; it was overcome by the use of a technique known as multi-programming. This enabled the computer to handle more than one program at a time. The result meant that, for example, while someone was editing a program on line the central processor could be getting on with some other task, say that of compiling a program in FORTRAN, in between the editing keystrokes.
Peter Gosling

### 14. CP/NET

Abstract
Now that the networking of microcomputers has become quite commonplace it is not unexpected that the CP/M operating system and the programs that operate under its direction should be available on a network.
Peter Gosling

### Backmatter

Weitere Informationen