Vintage Computers:

CP/M Introduction

CP/M Internals

Computer Collection

Other Pages :

Video Game Favourites

Hurley 22

Suzuki Swift


Oscar Vermeulen's Personal Web Site

A Quick Overview of CP/M

CP/M was the first operating system for microcomputers in general use. Before MS-DOS gained dominance in the 16-bit microprocessor world, Digital Research's CP/M ruled the market for 8-bit machines. Although CP/M was created specifically for the Intel 8080 processor, actually, most users ran it on a Zilog Z80, the supercharged 8080-compatible chip that dominated hardware just like CP/M dominated the OS market in the late 70s and early 80s.

On this page, you will find an outline of CP/M's history, as well as an emulator loaded with the important software of the period. After that, a second page holds a brief overview of the inner workings of the system.

The purpose of it all is to give interested newcomers to CP/M a flavour of what the system offered. Although antique, it still has relevance in three respects, which really justify giving CP/M a closer look:

  • It is the platform on which modern personal computing emerged
  • It is the absolute minimal system that is still useable for normal tasks such as word processing
  • It is so simple, that any interested person can quickly gain a full understanding of operating system and hardware.

Because CP/M was one of the very first operating systems, working on minimal hardware, it is very easy to understand. If you feel like finding out how exactly computers work, from the ground up, studying CP/M is the best way to do it.

A Quick Tour of History | Try a CP/M Emulator | Getting Started with CP/M | CP/M How-To's

CP/M Internals - how it works

A Quick Tour of History

The MITS Altair 8800 was the very first ready-to-order microcomputer. In its original shape, it had no keyboard or screen, let alone a diskdrive. One was supposed to key in software byte for byte through the front panel, and read out the results from memory bytes through LEDs. There is a great emulator of the original bare-bones Altair.

The ad to the left is from February, 1977 and shows the whole Altair product range of MITS, at a time when peripherals suchs as a disk drive and paper tape reader were already introduced. MITS had a poor quality reputation, and that - in combination with the machine having an open expansion bus - sparked off the S-100 computer industry.

Soon, serial terminals were attached and disk drive units became available. Gary Kildall, founder of Digital Research, wrote CP/M as a standard disk operating system. Version 1.4 was the first public version, and was tied closely to the use of 8" disks. Version 2.2 was the next version for general release. This version made significant improvements, most notably, the support of 5.25" disks and increased hardware independence. A version 3 became available much later, after CP/M had already peaked in its popularity. MP/M was a multi-user version of CP/M.

The S-100 card cage computers

Soon after the Altair, a whole range of S-100 computer vendors sprang up. Where Altair was noted for its cheap but flaky hardware, Cromemco was at the high quality end of the spectrum. Cromemco, more than any other company, commercialised the microcomputer in its first years. Their machines were typical of the early CP/M machines: large metal boxes with a motherboard, which only held a row of connectors. The computer was built up from a processor card, floppy disk card, memory card and interface card - all of which were plugged in to the motherboard.

Many premier computer names of this era started as DIY part vendors. To the left is an early advert from Godbout, who became known as the king of the S-100 system builders.


The rise of the all-in-one designs

The S-100 bus, although very expandable, was a bulky way of building computers. At the end of the 70s, all-in-one type computers become more prevalent. With keyboard and screen built in and a small single motherboard rather than a card cage with separate processor, disk and memory cards, these machines were way cheaper to build - and probably, a lot more reliable in most cases.

The Intertec Superbrain was one of these early all-in-one designs. To this day, it is one of the fastest computers in daily use. Booting took seconds, loading the WordStar wordprocesor from disk only a few more. These machines show how effective and efficient CP/M could really be. 'Luggable' CP/M machines came fairly quickly afterwards, most notably the Osborne 1, followed by the great KayPro machines.

'Modern' CP/M incarnations

At the end of its life span, in 1982-1985, CP/M-compatible hardware had become very cheap to manufacture. CP/M computers had always been at the upper end of the microcomputer market, but with the arrival of machines like the Bondwell 12, CP/M systems now became very affordable. Even later, Amstrad in the UK would offer CP/M as an option on its cheap home computers - as Commodore did on its 128.

Not all later CP/M computers were of the cheap and cheerful kind. Epson produced the Epson PX-8 in 1983, the first laptop with normal functionality: an LCD screen, a RAM disk and microcassette tape drive for storage, and built-in P/M and WordStar on ROM capsules. The PX-8 stands out as one of the most impressive engineering feats ever in microcomputer history.



A CP/M Emulator

Although nothing beats the feeling of a real CP/M machine, there are many emulators which do an excellent job of replicating a CP/M system on a normal PC. As CP/M computers, by today's standards, are tiny in their processing power, emulators tend to be very small programs.

The best emulator I know of is Simeon Cran's MyZ80. If you want a quick start, without reading up on anything before getting started: download the emulator here, and my virtual hard disk with software here. Unzip both packages in the same directory, and run CPM.EXE.

What you get: The A: drive contains some system support files, the C: drive contains a fully loaded hard drive with all the main CP/M programs. To mention some:
- WS.com - WordStar 3.0, the most-used version of the famous word processor and editor
- VDE.com - a small programmer's editor
- TURBO.com - Turbo Pascal
- DDTZ, M80, L80 - the Microsoft Z80 assembler and the DDTZ debugger.
- ASM, DDT, LOAD - the original CP/M assembler package
If you switch to the USER 1, 2 and 3 segments, you'll find versions of C and WordStar 4.0. Please refer to the readme.txt file.

Getting Started with CP/M

If you can remember MS-DOS, then CP/M will not be completely alien. After the computer has booted up, the user is presented with a command line. The following commands are built in:

(show directory of the disk drive)
(switches default drive, where drive is A, B, or C if there is a hard disk)
ERA file
(deletes file)
TYPE file
(types file on screen)
(starts the program file.com)
SAVE n filename.com
(save the first n 256-byte blocks from program memory
to disk as filename.com
(n between 0-15). Disk files created by one user are invisible to another;
this is a primitive subdirectory mechanism, really - and never used unless
you have a hard disk with too many files. Then, User 1 may hold your
programming languages, User 2 your word processor files, etc.


Obviously, there is more. Here is the full list of CP/M commands. Some of these are transient commands (things like DIR are built in to the command line interpreter) and others are external programs that load from disk (like PIP, the file copy command).

In the late 90s, CP/M was put into the public domain by its then-owner, Caldera. As a result, the original CP/M 2.2 manual, along with all other manuals and CP/M source code is available (here, at Gaby Chaudry's website).


CP/M How-To's

Below is a selection of how-to's that can help you in actually using a CP/M system:

  • PIP - the file copy program.
    This is the one part where CP/M appears baffling for people with MS-DOS experience. Instead of the normal COPY command, you have to use PIP. A typical command would be PIP B:=A:TEST.*; or PIP COPY.TXT=ORIGDOC.TXT. Don't go too deep into PIP until you need to.
  • Overview of assembly language programming for CP/M.

    - Summary of debugging tools
    - Summary of available assembers
    (Excerpts taken from The Software Bus, Sigma Technical Press, 1983)

    One thing to add to this good overview: normally, you'd start using CP/M's standard ASM assembler, which uses 8080 mnemonics.
    Although the Z80 is compatible with the 8080, it introduced a different set of names for the instruction codes, and so, there is a Z80ASM as well for those who prefer Z80 codes. Similarly, DDT (info) is the debugger that comes with CP/M 2.2. Many people prefer DDTZ, a version that uses Z80 mnemonics.
  • Text editing

    WordStar was the only logical choice for wordprocessing on CP/M. In fact, it was the first widely sold word processor. It still is a very, very useable text editor/word processor - once you've understood and memorised the keys you need to use to get around your text (WordStar uses control-X for page down, for instance).

    VDE was a very small editor (the program is often less than 8K, depending on the version you use) that did what WordStar did, pretty much, but was much smaller. Excellent choice for a programmer's editor.

    Note that both WordStar and VDE require installation of the right terminal codes to drive your screen. If you get a garbled picture, that's why. Find out what terminal codes your CP/M machine or terminal uses, and download the proper files from Gaby Chaudry's website


CP/M Internals

I have tried to give a concise overview of CP/M's internal workings here: Internals - how it works.

Useful Links

The Commercial CP/M Software archive holds pretty much every well-known CP/M program. Gaby Chaudry's web site is the home of many CP/M related things, most notably the Unofficial CP/M web site, which holds all the original source code from Digital Research as well as all CP/M releases and manuals. The best CP/M emulator is still MyZ80, written by Simeon Cran. But the SIMH emulator found at Peter Schorn's site is an excellent way to go more in-depth into Altair hardware emulation, as he gives all the source code. Lastly, I prefer the YAZE emulator as the best source to play around with for my own projects. It is quite portable C-code, and that allows you to run CP/M on pretty much any platform.


Last updated January, 2003 by Oscar Vermeulen