The World of CP/M

Author(s): David Baulch
Publication: LISTing Newsletter
Date: April 1988
Pages: 12

With help from “CP/M and the Personal Computer”

From The Data Expansion,T/S Users Group of Fort Worth, June, 1987

You own a microcomputer, a Timex probably, if you are reading this, an ‘old’ Z-80 based computer. There are building blocks that will help to extend the life of your computer-the AERCO interface, disk drives and a microcomputer disk operating system. One of these disk operating systems is MS-DOS or Micro-Soft Disk Operating System. Another one, the one being discussed here, was originally called ‘Control Program for Microcomputers’; we know it now as…CP/M.

CP/M is a program, or rather a set of programs or tools, that gives the computer operator advanced facilities and special manipulative facilities for the information stored on disks. It resides at the top of user memory (RAM). It is functionally divided into three modules:

1. CCP which means the CONSOLE COMMAND PROCESSOR.
2. BDOS which means the BASIC DISK OPERATING SYSTEM.
3. BIOS which means the BASIC INPUT ANS OUTPUT SYSTEM.

Some of these ‘facilities’ are permanent (e.g. ERA-erase a disk file) and some are transient (called only when a complicated job is necessary). These three modules and other programs are usually all on your CP/M disk: When you do a ‘cold boot’; you are loading CP/M: CCP, BDOS, BIOS and the programs or ‘facilities’ necessary to but CP/M to work.

CP/M resides at the top of RAM where it occupies approximately 8K bytes, and its exact location depends on the size of RAM available. It always uses the first 256 bytes of RAM as a fixed base of operations.

The standard facility names are usually quite brief using a vocabulary like: ERA; DIR; REN, SAVE, TYPE; STAT, ASM, LOAD, DDT, PIP, ED; SYSGEN, SUBMIT, DUMP; AND MOVCPM. There are other commands as well. Sub-systems have an even more complex and confusing vocabulary until it is learned. The command structure is broken down into to main categories – built in commands and transient commands.

NOTE: ‘ufn’ means ‘unambiguous filename’ being the exact name of the file. ‘afn’ means ‘ambiguous filename’ being several files having similar names and can accept ? or * for WILDCARD symboligy (any character or group of characters).

SEVEN BUILT IN COMMANDS

1) d: ———– changes the logged in drive to drive dixx (any one of 16 allowable drives)
2) DIR afn ——- lists the names of all files on disk with name afn
3) ERA afn ——- erases the file(s) with the name afn
4) REN ufn2=ufn1 – renames files (newname=oldname)
5) SAVE n ufn —- saves n (number of pages 1-255) of the TPA (Transient Program Area) on a disk with name ufn
6) TYPE ufn —— lists and ASCII file to the screen. Also possible to list a machine code program to screen
7) USER n ——– to distinguish the user n (0-15), default 0) of the disk

NINE TRANSIENT COMMANDS

1) ASM – Assembler
2) DDT – Dynamic Debugging Tool
3) DUMP afn – Similar to TYPE except the file is displayed in HEX
4) ED – a text editor
5) LOAD – Used to load a .HEX machine language file into a command file
6) PIP – (Peripheral Interchange Program) moves copies of programs from one place to another
7) STAT – Statistical information about disk file storage and amount of bytes left
8) SUBMIT – For submitting a ‘batch’ of jobs where each job is a CP/M command together with whatever programs are necessary to complete the job
9) XSUB – When DDT ufn is executed, it waits for a sub-command which can be supplied ahead of time with XSUB (lets you ‘stack’ commands)

This is only the preliminary work with CP/M. The programs that ‘RUN’ under CP/M naturally take advantage of the many resources that are available with this operating system.

Stolen From: CATS OCTOBER