What is Control Program for Microcomputers (CP/M)?

CP/M originally stood for Control Program/Monitor and then the name was changed to Control Program for Microcomputers. It is considered the first OS for microcomputers (micros) — in comparison with mainframes.

Gary Kildall in 1988; (c) Tom O'Neal, Carmel Valley, CA; fair use; https://computerhistory.org/blog/in-his-own-words-gary-kildall/

It was written by Gary Kildall (1942-94) in 1972 for the 4-bit i4004 microprocessor — first chipset manufactured by Intel in 1971, which ran at 740-750 KHz, using Programming Language for Microcomputers (PL/M), which was the first high-level language that he also wrote. Kildall continued development of CP/M on the first ever micro — the Intellec-8 (Intel, 1973) running on an 800 KHz i8008 (1972-83) with 5 KB of RAM expandable to 16 KB. He then started Digital Research, Inc. (DRI or DR) and released the first commercial version in 1974 — two years after Unix was released in its native C programming language.

By definition, since CP/M can manage disks, CP/M is a DOS and it is partially compatible with MS-DOS (its direct competition).

By Kyle Owen — Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=22794183

The latest release was 3.1 in 1983. Although there has not been much development or any at all on the OS, CP/M is not considered obsolete thanks to many enthusiasts and its newly-adopted BSD-like license (FOSS). As such, several developers have worked on new OSs based on CP/M like CP/Mish and MicroDOS.

CP/M was a multi-tasking OS and it offered consoles to run individual applications. This was much more advanced compared to MS-DOS. Ironically by the late 1980s, the latter had taken over the market by selling each license per microcomputer sold for $40, while DRI sold each license of CP/M-86 for $240 per machine.

If you would like to play with this OS, you should look into CP/M-86 2.2, which had become the industry standard in 1970s, or CP/M-86 3.1 — the latest version. Note that, in the CP/M naming convention, 86 refers to x86 chipsets, not the year, and 3.1 is the version of the OS. As such, CP/M-86 3.1 is CP/M for x86 version 3.1, which was released in 1983.

By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=37398368

By the way, my only memory of CP/M was using WordStar (Rob Barnaby, MicroPro International, 1978-99) to type some biology papers in high school in the late 1980s. I never really had a chance to use it. I started playing with computers in 1983. I went from MOS 6202 (C64) and Z80 (TRS-80 Model III) architectures running BASIC from an on-board ROM directly to x86 (IBM PCjr while in high school) running DOS with BASIC as a stand-alone binary. Needless to say, we were interested in programming (taught in school without too much of an option) and not hardware configurations.

If you want to test CP/M-86, you can use an application like VirtualBox to mount a CP/M-86 image as a floppy. Another way to run CP/M-86 is booting into the image (for example, X:\IMAGES\CPM86.IMG, where X: is the disk where you had saved the CP/M-86 image and CPM86.IMG is the name of the image) from DOSBox" target="_self" rel="dofollow" title= "What is Disk Operating System (DOS) — DOSBox?">DOSBox.

        
        MOUNT C X:\IMAGES
        BOOT C:\CPM86\CPM86.IMG
      

Note that, once you boot into the CP/M-86 (A:), you cannot go back to the DOSBox" target="_self" rel="dofollow" title= "What is Disk Operating System (DOS) — DOSBox?">DOSBox. You would have to close the application and restart the application.

Loading CP/M:

In the late 1970s and early 1980s, most micros did not come with internal hard drive disks (HDDs). Computers shipped with one or two floppy drive disks (FDDs). The secondary FDD to avoid switching floppies — for example, one to load applications to RAM and second for saving data.

By Digital Research, Inc. — http://hampa.ch/pce/screenshots/index.html, Public Domain, https://commons.wikimedia.org/w/index.php?curid=77387751

On boot, CP/M would be loaded to RAM from a boot disk (floppy, A:). The good thing about this practice is that customers could boot to CP/M or DOS as needed for the job.

CP/M is divided into Basic Input/Output System (BIOS), the Basic Disk Operating System (BDOS), the Console Command Processor (CCP) and the Transient Program Area (TPA). The BIOS and BDOS are called as one subsystem referred to FDOS — not to be confused with C:\FDOS. CCP handles the human interaction with the system via CLI. TPA handles all applications loaded to RAM that were called by the user via CCP.

Just like DOS, CP/M uses an AUTOEXEC.SUB file similar to a AUTOEXEC.BAT file. There is a major difference between the two OSs when writing the files. You can write and/or edit the AUTOEXEC.BAT with EDIT.EXE with MS-DOS or E.EXE (with REXX support) in PC DOS. In the other hand, you cannot write and/or edit the AUTOEXEC.SUB with the text editor included in CP/M — ED.CMD. In order to edit (not write) the AUTOEXEC.SUB, you need to run the SETUP.CMD utility to edit the Power-On Command Line (F1) section of the BIOS configuration.

CP/M does not support directories just like other OSs of the time — for example, MVS. All files are saved at the root (A:), which looks and feels messy. This means that you can adopt a naming convention of your own restricted by the 8.3 naming format to organize your files. For example, you could use 0 as the prefix and then the real name of the file A:FOOBAR.TXT. This way your file would be A:0FOOBAR.TXT keeping all your files together. Of course, the alternative would having a separate disk (B:) for personal files (B:0FOOBAR.TXT).

Installing CP/M-86:

Once prices of hard disk drives (HDDs) dropped enough for most customers to afford then, manufacturers started shipping their micros with internal HDDs. This meant that OSs like CP/M-86 and DOS could be copied (installed) to HDD allowing the micros to boot from the HDD.

I do not have any experience installing CP/M-86. Since I do not have a computer with a FDD anymore, I cannot run a boot disk or the various floppies to load the OS (.DSK) to RAM. I was able to get complete OS images (.IMG, not .ISO) with CP/M-86 1.0 and 2.0 — the release that had become the standard in the industry. Installing CP/M-86 properly (floppy after floppy) is still a work in progress for me.