CP/M-86 Quick Reference Guide:
Notes:
- End each CP/M-86 command with a carriage return.
- CP/M-86 commands that do not specify a drive name operate only on the default or currently selected drive. (The default drive is indicated in the system prompt; for example. A> indicates that A is the default drive
- The ALT (Alternate) key acts as the Control key. The key sequences Control-C is the same as ALT-C on the Sirius 1 In this guide, the ALT key is represented by a ^ , such as ^ Z.
- Italics are used through this guide to represent elements you provide when entering commands (such as filename)
- The list below is not all the commands available for CP/M-86 but are the most common and should be adequate for everyday use
File Specifiers
A CP/M-86 file is identified by its file specifier, which consists of three parts: the drive name, file name, and an optional file extension. The drive name may be omitted when the file is on the diskette in the default drive.
File specifiers have the following form: d:filename.ext
| Where: |
d: |
is the drive name |
|
filename |
is the 1 to 8 character file name |
|
.ext |
is a 0 to 8 character file extension |
CP/M-86 will not accept the following characters in file specifiers :
< > . , : ; = ? + [ ]
Wild-card characters
CP/M-86 has two wild card characters for use in file specifiers:
| ? |
means " match any character - or no character - in this location in the filename or extension ". |
| * |
means " pad with ?s ". (pads all characters that follow it, within the filename or extension) |
Wild-card examples:
| PAY???.ROL |
- matches - |
PAYJAN.ROL, PAYFEB.ROL, PAYDAY.ROL etc. |
| *.TXT |
- matches - |
any files with the extension .TXT |
| BA*.* |
- matches - |
any files with names beginning with BA |
| ?TEST.* |
- matches - |
any files with 4 or 5 -character filenames, the last 4 of which are TEST |
| *.* |
- matches - |
all files on the default drive |
By including wild-card characters, you can enter commands that refer to any number of files with similar names.
PIP, DIR/DIRS, ERA, and STAT accept wild-card characters.
REN and TYPE do not.
Built-in Commands
| COMMAND |
WHAT IT DOES |
| DIR |
Display file directory, default drive |
| DIRS |
Display names of system files, default drive |
| DIR x:filename.ext |
Search for named directory file, named drive |
| DIRS filename.ext |
Search for named system file, default drive |
| TYPE filename.ext |
Display contents of named file, default drive |
| ERA filename.ext |
Erase named file, default drive |
| ERA x:*.* |
Erase all files, named drive |
| REN newname.ext = oldname.ext |
Rename file, default drive |
| REN x:newname.ext = oldname.ext |
Rename file, named drive |
CP/M-86 Alternate-Character Functions
ALT CHARACTER |
FUNCTION |
ASCII CODE |
| ^C |
Clear or reset disk system |
03H |
| ^E |
Start new physical line |
05H |
| ^H |
Move cursor back and delete one character (also backspace) |
08H |
| ^I |
Tab 8 character columns |
09H |
| ^M |
Carrage return and terminate input |
0AH |
| ^P |
Start/stop output to printer |
0DH |
| ^R |
Redisplay current line |
12H |
| ^S |
Stop display output; any character except ALT-C restarts output |
13H |
| ^U |
Delete current line |
15H |
| ^X |
Delete start of line |
18H |
| ^Z |
Mark end of line (ED and PIP) |
1AH |
| "Delete/Rubout" |
Delete and display last typed character |
7FH |
STAT Commands
| COMMAND |
WHAT IT DOES |
| STAT |
Display free space and accessing attribute (RW or RO) of diskette, active drive |
| STAT x: |
Display free space and accessing attribute, named drive |
| STAT DEV: |
Display physical to logical device assignments |
| STAT DSK: |
Display diskette characteristics, default drive |
STAT x:filename.ext |
Display space used and accessing attribute for named file, named drive |
| STAT*.ext |
Display space used and accessing attribute for all files with named extension, default drive |
STAT filename.ext[size] |
Display size, space used, and accessing attribute of named file, default drive |
| STAT x:=RO |
Set named drive to read-only |
STAT filename.ext[RO] |
Set named file to read-only, default drive |
STAT filename.ext[RW] |
Set named file to read-write, default drive |
| STAT filename.ext[SYS] |
Set named file to system file, default drive |
STAT filename.ext[DIR] |
Set named file to directory file, default drive only |
STAT logdev:=physdev: |
Set physical-to-logical device assignment |
| STAT VAL: |
Display valid STAT parameter options |
PIP (Peripheral Interchange Program) Commands
You may enter PIP commands in either of two ways:
- Type the command stem (PIP) and Return to load PIP; after the PIP prompt (an asterisk), enter the remaining command elements. To exit the PIP program, enter a Return at the PIP prompt.
- Type the entire PIP command on one line, ending with a carrage return.
The examples shown below use the first method of entering a PIP command.
| COMMAND |
WHAT IT DOES |
| PIP |
Initiate PIP |
| d:=s:filename.ext |
Copy named file from source drive to destination drive |
| d:newname.ext=oldname.ext |
Copy old named file from source drive to new named file on destination drive |
| d:=s:*.* |
Copy all files from source drive to destination drive |
| LST:=filename.ext |
Send named file (default drive) to list device |
| AXO:=filename.ext |
Send named file (default drive) to auxiliary output device |
| CON:=s:filename.ext |
Send named file (source drive) to consol device |
| filename.ext=AXI: |
Copy data from auxiliary input device to named file,default drive |
| d:newname.ext=s:a.ext,s:b.ext |
Copy and concatenate files a and b from source to destination drive |
| LST:s:a.ext,s:b.ext |
Send files a and b (source drive) in sequence to list device |
PIP Parameters
| Example: |
PIP LST:=x:filename.ext[FT8P66] (Outputs named file to list device, filters embedded form feeds, sets tabs at every 8 columns, and inserts a form feed every 66 lines). |
| PARAMETER |
WHAT IT DOES |
| [Dn] |
Delete characters past column n |
| [E] |
Echo copy operation to consol |
| [F] |
Filter (delete) embedded form feeds |
| [H] |
Check for proper hex format |
| [I] |
Check for proper hex format and ignore :00 records |
| [L] |
Change uppercase characters to lower case |
| [N] |
Add line numbers with leading zeros suppressed |
| [N2] |
Add line numbers with leading zeros displayed |
| [O] |
transfer object file; ignore end-of-file marker |
| [P] |
Insert form feed every 60 lines |
| [Pn] |
Insert form feed every n lines |
| [Qstring^Z] |
Quit copying after string is found |
| [Sstring^Z] |
Start copying after string is found |
| [R] |
Read SYS (system) file |
| [Tn] |
Set tabs every n columns |
| [U] |
Change lower case characters to upper case |
| [V] |
Verify copied data |
| [W] |
Overwrite RO (read-only) files at destination |
| [Z] |
Set parity bit to zero on all characters in file |
PIP Keywords
| Logical Devices |
|
| CON: |
Consol device (defined in BIOS) |
| LST: |
List device (defined in BIOS) |
| AXO: |
Auxiliary output device (defined in BIOS) |
| AXI: |
Auxiliary input device (defined in BIOS) |
| Physical Devices |
|
| CRT: |
Keyboard and cathode ray tube display |
| LPT: |
Line printer (parallel output port) |
| TTY: |
Teletype-style printer (serial output port A) |
| UL1: |
Serial printer (port B) |
| BAT: |
Batch mode-reader AXI:) as input, a printer (LST:) as output |
| Special Terms |
|
| EOF: |
Send end-of-file (ALT-Z or ASCII 1AH) to device |
| NUL: |
Send 40 nulls to device |
| PRN: |
Send file to list device, but with tabs every 8th column, numbered lines, and a form feed every 60 lines (with initial form feed) |
Other Utilities
| COMMAND |
WHAT IT DOES |
| SUBMIT filename parameters |
Execute .SUB file, using optional paramater(s) |
| FORMAT |
Initiate FORMAT program |
| FORMAT x: $[C|D|E|Z] |
Format disk in named drive, including optional switches |
| BOOTCOPY |
Initiate BOOTCOPY program |
| BOOTCOPY s: to d: |
Copy boot tracks from drive s: to drive d: |
| DCOPY |
Initiate DCOPY program |
| DCOPY f: to t: $[C|D|E|Z] |
|
| Format and Dcopy switches |
| C - |
Display count of tracks copied and number of soft errors encountered |
| D - |
FORMAT or DCOPY double-sided diskette |
| E - |
Display the location of soft errors |
| Z - |
Display disk zone information (size of tracks and gaps) |
ED Commands
| COMMAND |
WHAT IT DOES |
| ED x:filename.ext |
Execute editor program: create/edit named file, named drive |
| nA |
Append n lines to edit buffer (if n=0, fill half of buffer) |
| B |
Move character pointer to beginning of file |
| -B |
Move character pointer to end of file |
| nC |
Move characer pointer foward n characters |
| nD |
Delete next n characters |
| E |
Edit end, close file, return to CP/M-86 |
| Fs^Z |
Find string s |
| nFs^Z |
Find nth occurance of string s |
| H |
End edit, move pointer to beginning of file |
| I |
Insert following text at pointer until ALT-Z is typed |
| Is^Z |
Insert string at pointer |
| Is1^Zs2^Zs3 |
Juxtapose and delete: delete text between string 2 and beginning of string 3; insert string 2 after string 1 |
| nK |
Kill n lines starting at pointer |
| nL |
Move pointer n lines |
| nMx |
Execute Macro command string (x) n times |
| nMs |
Global search (F command) through end of file |
| O |
Abandon edit file, start over with original file |
| nP |
Display next n pages of 23 lines ( if n=0, display current page) |
| Q |
Quit edit, abandon temporary file, and return to CP/M-86 |
| Rfilename.LIB |
Read filename.LIB into buffer at character pointer |
| Sx^Zy |
Substitute string y for string x |
| nSx^Zy |
Substitute string y for next n occurrences of string x |
| nT |
Type n lines |
| U |
Translate following lower case to upper case |
| -U |
Disable lower-to-upper case translation |
| -V |
Disable line number generation |
| nW |
Write n lines to output file (start at beginning of buffer) |
| nXfilename.ext |
Write next n lines to named temporary file |
| nX |
Write next n lines to file X$$$$$$$.LIB |
| nZ |
Sleep (pause) n\2 seconds |
| n |
Move foward n lines and type new line |
| <RETURN> |
Move foward one line and type new line |
| n:x |
Move to line number n and perform x command |
| :nx |
Perform command x from current line to line x |
| n::mx |
Move to line number n and perform command x (T, L or K) through line number m |
File Extensions
Below is a list of common file extensions found in CP/M-86 and their meaning.
| . EXT |
MEANING |
| .A86 |
8086 assembly language source code |
| .BAK |
Backup file created by ED program |
| .BAS |
BASIC source code |
| .CMD |
Executable command file |
| .COB |
COBAL source code |
| .CBL |
COBAL source code |
| .DAT |
Data file (assumed to be ASCII) |
| .FOR |
FORTRAN source code |
| .H86 |
Hex file |
| .INT |
Intermediate compiled code |
| .LST |
Listing of compilation or assembly |
| .OVR |
Overlay module |
| .PRN |
Listing of compilation or assembly |
| .REL |
Relocatable object code module |
| .SUB |
Command file executed by SUBMIT command |
| .SYM |
Symbol table of assembly or compilation |
| .XRF |
Cross-reference |
| .$$$ |
Temporary, system-generated file |
|
Last revision 27/03/2011
|