SQ Notes: CP/M

See all articles from SMUG Bytes v6 n3
Author(s): R. A. Hilsmann
Publication: SMUG Bytes
Pub Details: SMUG Bytes v6 n3 (Volume 6, Issue 3)
Date: March 1989
Pages: 3-5

Lets visit other computer systems for a change, maybe this will make you appreciate the system you are using now. I used all sorts of computers in the past and still do so at this time, but I have always wondered why people put up with some of them.

Some systems are ancient and outdated in computer terms, and the system I like to talk about today, namely CP/M, is no exception. But sooner or later you may run into a system using CP/M, and it may well be worth to know what to expect.

CP/M stands for Control Program for Microprocessors. Designed to execute user commands and allow the user to use the hardware resources provided by the computer. Unlike the 2068, the Spectrum, or even the QL, which are using a Basic operating system permanently installed in ROM in the computer, most other computers are using a System which has to be installed into the computer after turn on. Only a BOOT program exists to allow you to load the operating system into memory of the computer, which otherwise has nothing but empty memory in place.

Therefore everytime you reset the computer, you will have to reinstall the system onto the computer, that is why disks most likely will have the operating system on them, chewing up disk space. Hold on, thats not all you will find on a disk, most will also have PIP on them, which stands for Peripheral Interchange Program, needed to transfer files between devices.

ED (Editor), is another utility program installed onto most disks, this is a crude, and I mean crude form of a word-processor, if you thought the ZX81 or the TIMEX 1000 gave you fits, try using an EDITOR!

To operate a CP/M system computer, you of course have to turn it on first, next you would have to insert a diskette holding the operating system into drive A, then press the appropriate key for the computer you are operating, (maybe the “B” key (for boot)), now ENTER, and the system (CP/M) will be installed into the computers memory. To find out what’s on the disk, you could next type “DIR”, for directory, this will give you a listing of files on the disk. Simple? Of course it is, at least to this point, but to get all the fine points of the system you would have to buy a CP/M handbook to really understand the system. It is far beyond the scope of these few pages to explain all there is about CP/M.

To load or run a file on a disk simply type the name of the file or program, then press the enter key, but hold it, all files or programs will most likely have an extension to the name, like ‘PIP.COM’. ‘.COM’ files can be loaded by just typing the name, but if a program has an extension ‘.BAS’, you would have to install the basic interpreter first, and it would have to be the right basic, such as MBASIC (Microsoft Basic), this of course will not leave much memory on a 64K computer for programing, that’s why most systems will manipulate the disks for additional storage. This means that sometimes out of the blue the drives will start up and do their thing while you are using a program.

To just display a text file onto the screen, use the TYPE command, and specify the filename, like:

A> TYPE SAMPLE.TXT then ENTER.

To get a hardcopy of such a file on a printer, enter CTRL ‘P’ (^P) before you enter the filename, and if all is well, the printer should give you a printout of the file.

To turn the printer off again, enter another control ‘P'(press the CTRL key, and press the ‘P’ key, whike holding the control key down).

To change a disk in a drive, switch to the drive by typing either ‘A:’,’B:’, or ‘C:’ etc. then ENTER, next remove the old disk, insert the new one, and enter a ‘Control C’ for what’s called a warm boot (that’s because you did not reset (cold boot) the computer to do so). The system will then read the disk to install the new directory. I like to point out that a warm boot needs to be performed only if your intentions are to write to the disk. You may just insert a new disk without performing a warm boot if you wish to only read from the new disk.

As you noticed you can switch from drive A to drive B by typing ‘B:’ as a command:

A> B: <ENTER>
B>

this will give you the new cusor.

PIP.COM will allow you to make copies of files or programs, It has to be noticed that in order to do so, you will have to specify the drive, then the new file name, next the originating drive, and then the old file name, it should look like this:

D:newfile.name=D:oldfile.name

The newfile.name and oldfile.name arguments are actual filenames, and the ‘D’ stands for the letter of the drive. PIP always needs the newfile name first and the oldfile name second separated by an = sign. somewhat cumbersome, but something one gets used to.

PIP will also allow you to copy an entire disk onto another, the command for that is:

A> PIP B:=A:*.*
followed by ENTER

this would copy the contents of the disk in drive ‘A’ to drive ‘B’.

Transient System Commands

CP/M’s standard transient commands are: SYSGEN, PIP, ED, STAT, ASM, LOAD, DUMP, DDT, SUBMIT, and MOVCPM. All are .COM files.

SYSGEN; is used to copy CP/M from one disk to another. Usually used after formating a new disk. SYSGEN turns an ordinary diskette into a system diskette, in other words, it will put the CP/M system on the new disk from the originating disk.

PIP; is the file transfer program I talked about earlier.

ED; is the editor, used in place of a better word-processor, but most usefull in writing a source file for the assembler (ASM).

STAT; is used to display available disk space and device assignments. Also used to modify device assignments.

SUBMIT and XSUB; submitting a file of commands for execution (shoot the darn thing (pun intended)). Sometimes it may be useful or necessary to execute a sequence of CP/M commands as if they were instructions in a program. For example, if a sequence is frequently used by an operator, it would be convenient to give a name to the sequence, and execute it with a single command, just like a program.

ASM, LOAD, and DUMP; in the world of assembly language, ASM, LOAD, and DUMP are standard terms for operations that allow assembly language programs to work like commands. You could use the commands ASM and LOAD to turn an assembly language source program written with ED into a text file, into a do it yourself transient command, and also use DUMP to display the contents of the transient command. The term DUMP is often used to describe large scale copy operations, and the act of sending the contents of a program to a printer. CP/M’s DUMP ‘dumps’ the memory area of a program (HEX) onto the terminal display (to send a file in that fashion to a printer, or to do large scale copy operations you have to use PIP). ASM.COM is the assembler program that translates an assembly language source file into a machine language file (code).

DDT; is a machine code debugging program (disassembler). DDT can be used to correct errors, or bring a file into the main memory in order to save it.

SAVE; will naturally permit you to save any program or file to disk.

MOVCPM; used to reconfigure a version of CP/M to fit another memory requirement (when expanding memory, or to prepare a system for alterations to another hardware enviroment).

Now that you know something about the CP/M system, you may ask where did it come from, or how did it come about? The CP/M operating system was created by Gary Kildall, while employed as a consultant for Intel Corporation, Gary wrote the first high level language compiler produced by Intel, PL/M, Then, in 1974, he created his first version of a CP/M file system which was designed (at the time) to suport a resident PL/M compiler.

CP/M made its initial commercial appearance in 1975 when the first licensing contracts were entered, but went relatively unnoticed for at least a year. During this time, the early version of the editor (ED), the assembler (ASM), and the debugger (DDT) were developed. The first large scale commercial user of this operating system was IMSAI (now defunct), which was licensed to distribute the CP/M version 1.3 that evolved into what IMSAY called IMDOS. CP/M has now evolved into CP/M version 2.2 (and successive versions), which is designed to take advantage of larger storage capabilities of hard disks now in use. MP/M was designed to provide a multi user time sharing enviroment for multi programming systems.

Not long ago, CP/M was probably one of the most frequently used operating systems on microcomputers. Although it can be criticized by operaters, users, and designers who are familiar with more powerful time sharing machines, it serves its purpose, and had become a de-facto standard for many microcomputer users.

One of the main advantages of CP/M is the fact that all CP/M compatible software and files can be shared by users. CP/M has the virtues of any standard operating system, namely compatibility. For this reason, CP/M will probably be used for some time to come, at least as long as the processors on which it usually resides are still being built.

Well I hope this has put some light on the CP/M system, like I said in the begining, most likely sooner or later you may sit in front of a computer which employes CP/M as an operating system. I hope these few pages have helped you to understand the system better,. if nothing else, you may be capable of adapting easier to computers using a simular operating system.

A good source for additinal information on CP/M is the CP/M handbook by Rodney Zaks, SYBEX INC. Publ.

That’s all folks….

till next month RAH.