CPM Users Guide Screen
CPM Users Guide Screen
(CP/M® Version 3)
Operating System
User’s Guide
COPYRIGHT
Copyright (C) 1983 Digital Research Inc. All rights reserved. No part of this publication
may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into
any language or computer language, in any form or by any means, electronic, mechanical,
magnetic, optical, chemical, manual, or otherwise, without the prior written permission of
Digital Research Inc., Post Office Box 579, Pacific Grove, California 93950.
DISCLAIMER
DIGITAL RESEARCH INC. MAKES NO REPRESENTATIONS OR WARRANTIES
WITH RESPECT TO THE CONTENTS HEREOF AND SPECIFICALLY DISCLAIMS
ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE. Further, Digital Research Inc. reserves the right to revise this
publication and to make changes from time to time in the content hereof without obligation
of Digital Research Inc. to notify any person of such revision or changes.
NOTICE TO USER
From time to time changes are made in the filenames and in the files actually included on
the distribution disk. This manual should not be construed as a representation or warranty
that such files or materials and facilities exist on the distribution disk or as part of the materials
and programs distributed. Most distribution disks include a “README.DOC” file. This file
explains variations from the manual which do constitute modification of the manual and the
items included therewith. Be sure to read this file before using the software.
TRADEMARKS
CBASIC, CP/M, Digital Research and its logo are registered trademarks of Digital Re-
search Inc. CP/M Plus, LINK-80, MAC, MP/M, Pascal/MT+, PL/I-80, RMAC, SID, and
TEX-80 are trademarks of Digital Research Inc. Z80 is a registered trademark of Zilog, Inc.
Intel is a registered trademark of Intel Corporation. MicroSoft is a registered trademark of
MicroSoft Corporation.
This is a recreation of the original manual based on publicly available OCRed sources on
the internet and proof-read with the original physical manual as a reference.
iii
turn provides more memory space for application programs. The banked
version also has additional enhancements that are noted in the text.
CP/M 3 and its utility programs are distributed on two floppy disks.
The system disk contains the operating system and the most commonly
used utility programs. A second disk contains additional utilities.
If you are new to computers, you might find some of the topics, such
as the programming utilities, difficult to understand at first. Learning
to use your computer is a challenge, and we hope you will find it fun.
This book proceeds step-by-step so that you can quickly proceed from
opening your new system disk package to mastering CP/M 3’s powerful
facilities.
vi
Table of Contents
Introduction to CP/M 3
How to Start CP/M 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
The Command Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Why You Should Back Up Your Files. . . . . . . . . . . . . . . . . . . . . . . . 1-5
How to Make Copies of Your CP/M 3 Disks. . . . . . . . . . . . . . . . 1-6
Command Summary
Let’s Get Past the Formalities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
How Commands Are Described. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
The COPYSYS Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
The DATE Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Display Current Date and Time. . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Set the Date and Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
The DEVICE Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Display Device Characteristics and Assignments. . . . . . . . . . 5-16
Assign a Logical Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Set Attributes of a Physical Device. . . . . . . . . . . . . . . . . . . . . . . 5-19
Display or Set the Current Console Screen Size. . . . . . . . . . . 5-20
The DIR Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Display Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Display Directory with Options . . . . . . . . . . . . . . . . . . . . . . . . 5-24
The DUMP Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
The ED Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
The ERASE Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42
The GENCOM Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Attach RSX Files to a COM File. . . . . . . . . . . . . . . . . . . . . . . . 5-45
Generate a COM File Using only RSX Files. . . . . . . . . . . . . . 5-45
Restore a File with Attached RSXs to Original COM File. 5-46
viii
Update (Add or Replace) RSX Files. . . . . . . . . . . . . . . . . . . . . 5-46
Attach a Header Record. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47
The GET Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-48
Get Console Input from a File . . . . . . . . . . . . . . . . . . . . . . . . . . 5-49
Terminate Console Input from a File . . . . . . . . . . . . . . . . . . . . 5-50
The HELP Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51
Display Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-52
Add Your Own Descriptions to the HELP.HLP File. . . . . . 5-53
The HEXCOM Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
The INITDIR Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-58
The LIB Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-60
The LINK Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64
The MAC Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-67
The PATCH Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-70
The PIP Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72
Single File Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-73
Multiple File Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-76
Combining Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-78
Copy Files to and from Auxiliary Devices. . . . . . . . . . . . . . . . 5-79
Multiple Command Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-81
Using Options With PIP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83
The PUT Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-91
Direct Console Output to a File. . . . . . . . . . . . . . . . . . . . . . . . . 5-92
Put Printer Output to a File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-93
Terminate Console Output to a File. . . . . . . . . . . . . . . . . . . . . 5-94
Terminate Printer Output to a File . . . . . . . . . . . . . . . . . . . . . . 5-94
The RENAME Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-95
The RMAC Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
The SAVE Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-100
The SET Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-102
Set File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-102
Set Drive Attribute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-104
Assign a Label to the Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-105
ix
Assign Password to the Label. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-105
Enable/Disable Password Protection for Files on a Disk. . 5-106
Assign Passwords to Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-107
Set Password Protection Mode for Files with Passwords. . 5-107
Assign a Default Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-108
Set Time Stamp Options on Disk . . . . . . . . . . . . . . . . . . . . . . 5-109
Additional SET Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-112
The SETDEF Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-113
Display the Program Loading Search Definitions. . . . . . . . 5-113
Assign the Drive for Temporary Files . . . . . . . . . . . . . . . . . . . 5-114
Define the Disk Drive Search Order. . . . . . . . . . . . . . . . . . . . 5-114
Define the Filetype Search Order. . . . . . . . . . . . . . . . . . . . . . . 5-115
Turn On/Off System Display Mode. . . . . . . . . . . . . . . . . . . . 5-115
Turn On/Off System Page Mode. . . . . . . . . . . . . . . . . . . . . . . 5-116
The SHOW Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-118
Display Access Mode and Disk Space Available. . . . . . . . . . 5-118
Display Disk Label. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-119
Display User Number Information . . . . . . . . . . . . . . . . . . . . . 5-120
Display Number of Free Directory Entries . . . . . . . . . . . . . . 5-120
Display Drive Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 5-121
The SID Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-122
SID Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-127
The SUBMIT Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-129
Program Input Lines in a SUB File . . . . . . . . . . . . . . . . . . . . . 5-131
The SUB File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-132
Executing the SUBMIT Command . . . . . . . . . . . . . . . . . . . . 5-133
The PROFILE.SUB Start-up File . . . . . . . . . . . . . . . . . . . . . . 5-134
The TYPE Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-135
The USER Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-137
The XREF Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-138
x
ED, The CP/M 3 Context Editor
Introduction to ED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Starting ED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
ED Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Appending Text into the Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
ED Exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Basic Editing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Moving the Character Pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Displaying Memory Buffer Contents . . . . . . . . . . . . . . . . . . . . 6-12
Deleting Characters The D (Delete) Command . . . . . . . . . . 6-13
Inserting Characters into the Memory Buffer. . . . . . . . . . . . . 6-15
Replacing Characters The S (Substitute) Command. . . . . . . 6-18
Combining ED Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Moving the Character Pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
Displaying Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
Editing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
Advanced ED Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
Moving the CP and Displaying Text. . . . . . . . . . . . . . . . . . . . . 6-22
Finding and Replacing Character Strings. . . . . . . . . . . . . . . . . 6-23
Moving Text Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29
Saving or Abandoning Changes: ED Exit . . . . . . . . . . . . . . . . 6-31
ED Error Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
List of Tables
Nonbanked CP/M 3 Line-editing Control Characters. . . . . . . . 3-3
CP/M 3 Logical Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Built-in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Transient Utility Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Reserved Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
CP/M 3 Filetypes Meaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
xi
Syntax Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
DEVICE options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
DIR Display Options Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25
ED Command Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34
GET Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-49
LIB Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-61
LIB Modifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-61
LINK Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64
Input/Output Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-68
Output File Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-68
PIP Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83
PUT Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-92
RMAC Command Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
SET File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-102
Password Protection Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-108
SID Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-124
Text Transfer Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Basic Editing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
CP/M 3 Line-editing Controls Result. . . . . . . . . . . . . . . . . . . . . . 6-16
ED Diskette File Error Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-35
CP/M 3 Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
ASCII Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
ASCII Conversion Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Common Filetypes Meaning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
Nonbanked CP/M 3 Control Characters. . . . . . . . . . . . . . . . . . . D-1
Banked CP/M 3 Line-editing Control Characters. . . . . . . . . . . D-2
xii
Appendixes
CP/M 3 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
ASCII and Hexadecimal Conversions. . . . . . . . . . . . . . . . . . . . . . . . . B-1
Filetypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
CP/M 3 Control Character Summary. . . . . . . . . . . . . . . . . . . . . . . . D-1
User’s Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
xiii
CP/M 3 User’s Guide How to Start CP/M 3
Section 1
Introduction to CP/M 3
This section tells you how to start CP/M 3, how to enter and edit
the command line, and how to make back-up copies of your CP/M 3
distribution disks.
First, check that your computer’s power is on. Next, insert the CP/M 3
system disk into your initial drive. In this section, assume that the initial
drive is A and the disk is removable. Close the drive door. Then, press
the RESET or RESTART button. This automatically loads CP/M 3
into memory. This process is called booting, cold starting, or loading
the system.
The version number, represented above by V.V, tells you the version of
CP/M 3 that you own. After this display, the following two-character
message appears on your screen:
A›
This is the CP/M 3 system prompt. The system prompt tells you that
DIGITAL RESEARCH™
1-1
The Command Line CP/M 3 User’s Guide
A›DIR MYFILE
The characters that the user types are slanted to distinguish them
from characters that the system displays. In this example, DIR is the
command keyword and MYFILE is the command tail. The carriage
return keystroke does not appear on the screen or in the example. You
must remember to press the carriage return key to send a command
line to CP/M 3 for processing. Note that the carriage return key can
be marked ENTER, RETURN, CR, or something similar on your
keyboard. In this guide, RETURN signifies the carriage return key.
DIGITAL RESEARCH™
1-2
CP/M 3 User’s Guide The Command Line
key and press the required letter key. For example, to move the cursor
to the left, hold down CTRL and press the H key.
You can type the keyword and command tail in any combination
of upper-case and lower-case letters. CP/M 3 treats all letters in the
command line as upper-case.
Generally, you type a command line directly after the system prompt.
However, CP/M 3 does allow spaces between the prompt and the
command keyword.
DIGITAL RESEARCH™
1-3
The Command Line CP/M 3 User’s Guide
A›DIR
CP/M 3 responds to this command by writing the names of all the files
that are stored on the disk in drive A. For example, if you have your
CP/M 3 system disk in drive A, these filenames, among others, appear
on your screen:
COPYSYS COM
PIP COM
SET COM
A›DJR
DJR?
to tell you that it cannot find the command keyword. To correct simple
typing errors, use the BACKSPACE key, or hold down the CTRL key
and press H to move the cursor to the left. CP/M 3 supports other
control characters that help you efficiently edit command lines. Section
3 tells how to use control characters to edit command lines and other
information you enter at your console.
DIR accepts a filename as a command tail. You can use DIR with a
filename to if a specific file is on the disk. For example, to check that the
transient utility program COPYSYS.COM is on your system disk, type
A›DIR COPYSYS*COM
CP/M 3 performs this task by displaying either the name of the file you
specified, or the message
DIGITAL RESEARCH™
1-4
CP/M 3 User’s Guide Why You Should Back Up Your Files
No File.
Be sure you type at least one space after DIR to separate the command
keyword from the command tail. If you do not, CP/M 3 responds as
follows.
A›DIRCOPYSYS.COM
DIRCOPYSYS.COM?
DIGITAL RESEARCH™
1-5
How to Make Copies of Your CP/M 3 Disks CP/M 3 User’s Guide
A›COPYSYS
CP/M 3 loads COPYSYS into memory and runs it. COPYSYS dis-
plays the following output on your screen. When the program prompts
you, press RETURN only when you have verified that the correct disk
is in the correct drive.
DIGITAL RESEARCH™
1-6
CP/M 3 User’s Guide How to Make Copies of Your CP/M 3 Disks
A›
You now have a copy of the operating system only. To copy the remaining
files from disk 1 of 2, enter the following PIP command.
A›PIP B:=A:*.*
This PIP command copies all the files in your disk directory to drive B
from drive A. PIP displays the message COPYING followed by each
filename as the copy operation proceeds. When PIP finishes copying,
CP/M 3 displays the system prompt.
Remove the copy from drive B and insert it in drive A. Use this copy
as your CP/M 3 system disk to make more back-ups, to try the examples
shown throughout this manual, and to start CP/M 3 the next time you
turn on your computer. Cold start the computer to check copy operations.
DIGITAL RESEARCH™
1-7
How to Make Copies of Your CP/M 3 Disks CP/M 3 User’s Guide
another new or reformatted disk in drive B. This time, type only the
command keyword:
A›PIP
PIP responds with an asterisk prompt, *. You can now remove disk
1 of 2 from drive A and insert the disk you want to copy, disk 2 of 2.
Type the following PIP command after the asterisk prompt, for example,
*B:=A:*.*
End of Section 1
DIGITAL RESEARCH™
1-8
Section 2
Files, Disks, and Drives
A data file can also contain the source code for a program. Generally,
a program source file must be processed by an assembler or compiler
before it becomes a program file. In most cases, an executing program
processes a data file. However, there are times when an executing pro-
DIGITAL RESEARCH™
2-1
How Are Files Created? CP/M 3 User’s Guide
gram processes a program file. For example, the copy program PIP can
copy one or more program files.
MYFILE
B:MYFILE
The filename can be from one to eight characters. When you make
up a filename, try to let the name tell you something about what the
DIGITAL RESEARCH™
2-2
CP/M 3 User’s Guide How Are Files Named?
file contains. For example, if you have a list of customer names for your
business, you could name the file:
CUSTOMER
so that the name gives you some idea of what is in the file.
As you begin to use your computer with CP/M 3, you will find that
files fall naturally into categories. To help you identify files belonging
to the same category, CP/M 3 allows you to add an optional one- to
three-character extension, called a filetype, to the filename. When you
add a filetype to the filename, separate the filetype from the filename
with a period. Try to use three letters that tell something about the file’s
category. For example, you could add the following filetype to the file
that contains a list of customer names:
CUSTOMER.NAM
CUSTOMER.NAM;ACCOUNT
If a file has been protected with a password, you must ENTER the
password as part of the file specification to access the file. Section 2.7.3
describes passwords in more detail.
DIGITAL RESEARCH™
2-3
Do You have the Correct Drive? CP/M 3 User’s Guide
from letters and numbers. You must not use the following characters in
filenames, filetypes, or passwords because they have special meanings
for CP/M 3:
A:DOCUMENT.LAW;SUSAN
A›DIR COPYSYS.COM
A›DIR B:MYFILE.LIB
CP/M 3 looks for the file MYFILE.LIB in the directory of the disk in
drive B. When you give a command to CP/M 3, note which disk is in
the default drive. Many application programs require that the data files
they access be stored in the default drive.
You can also precede a program filename with a drive specifier, even
DIGITAL RESEARCH™
2-4
CP/M 3 User’s Guide Do You Have the Correct User Number?
A›B:PIP
CP/M 3 looks in the directory of the disk in drive B for the file PIP.
COM. If CP/M 3 finds PIP on drive B, it loads PIP into memory and
executes it.
If you need to access many files on the same drive, you might find it
convenient to change the default drive so that you do not need to repeat-
edly enter a drive specifier. To change the default drive, enter the drive
specifier next to the system prompt and press RETURN. In response,
CP/M 3 changes the system prompt to display the new default drive:
A›B:
B›
Unlike the filename and filetype which are stored in the disk direc-
tory, the drive specifier for a file changes as you move the disk from one
drive to another. Therefore, a file has a different file specification when
you move a disk from one drive to another. Section 4 presents more
information on how CP/M 3 locates program and data files.
When you use a CP/M 3 utility to create a file, the file is assigned to
the current user number, unless you use PIP to copy the file to another
DIGITAL RESEARCH™
2-5
Accessing More Than One File CP/M 3 User’s Guide
user number. You can determine the current user number by looking
at the system prompt.
The user number always precedes the drive identifier. User 0, however,
is the default user number and is not displayed in the prompt.
You can use the built-in command USER to change the current user
number.
A›USER 3
3A›
You can change both the user number and the drive by entering the
new user number and drive specifier together at the system prompt:
A›3B:
3B›
Most commands can access only those files that have the current
user number. For example, if the current user number is 7, a DIR com-
mand with no options displays only the files that were created under
user number 7. However, if a file resides in user 0 and is marked with
a special file attribute, the file can be accessed from any user number.
(Section 2.7.1 discusses file attributes.)
DIGITAL RESEARCH™
2-6
CP/M 3 User’s Guide Accessing More Than One File
The two wildcard characters are ?, which matches any single letter in
the same position, and *, which matches any character at that position
and any other characters remaining in the filename or filetype. The
following list presents the rules for using wildcards.
Suppose, for example, you have a disk that contains the following
six files:
The following wildcard specifications match all, or a portion of, these files:
DIGITAL RESEARCH™
2-7
How to Protect Your Files CP/M 3 User’s Guide
a disk directory, and therefore wildcards are valid only in filenames and
filetypes. You cannot use a wildcard character in a drive specifier. You
also cannot use a wildcard character as part of a filename or filetype
when you create a file.
■ user numbers
■ attributes
■ time and date stamps
■ passwords (banked CP/M 3 only)
All of this information for each file is recorded in the disk directory.
File attributes control how a file can be accessed. When you create
a file, CP/M 3 gives it two attributes. You can change the attributes
with a SET command.
The first attribute can be set to either DIR (Directory) or SYS (Sys-
tem). This attribute controls whether CP/M 3 displays the file’s name in
response to a DIR command or DIRSYS command. When you create
a file, CP/M 3 automatically sets this attribute to DIR. You can display
the name of a file marked with the DIR attribute with a DIR command.
If you give a file the SYS attribute, you must use a DIRSYS command
to display the filename. Simple DIR and DIRSYS commands display
only the filenames created under the current user number.
DIGITAL RESEARCH™
2-8
A file with the SYS attribute has a special advantage when it is created
under user 0. When you give a file with user number 0 the SYS attribute,
you can read and execute that file from any user number. This feature
gives you a convenient way to make your commonly used programs
available under any user number. Note, however, that a user 0 SYS file
does not appear in response to a DIRSYS command unless 0 is the
current user number.
If you use date and time stamps, you can quickly locate the most
recent copy of a file, and check when it was last updated or changed.
You can choose to have the system tell you either when you created the
file, or when you last read from or wrote to the file. You use the SET
command to enable date and time stamping, and the DIR command
with the DATE option to display a file’s time and date stamp.
A SET command enables the option you want to monitor. You can
use the following commands to enable time and date stamping on a
disk, but you must choose between ACCESS and CREATE. If you
choose ACCESS, the stamp records the last time the file was accessed.
If you choose CREATE, the stamp records when the file was created.
DIGITAL RESEARCH™
2-9
How Are Files Stored on a Disk? CP/M 3 User’s Guide
A›SET [ACCESS=ON]
A›SET [CREATE=ON]
A›SET [UPDATE=ON]
Files created on or copied to a disk that has time and date stamping
are automatically stamped. The DATE command allows you to display
and reset the time and date that CP/M 3 is using. For a complete dis-
cussion of time and date stamping, see the descriptions of the SET and
INITDIR commands in Section 5.
Passwords allow you to protect your files from access by other users.
You can use passwords to limit access to certain files for security purposes.
DIGITAL RESEARCH™
2-10
CP/M 3 User’s Guide Changing Floppy Disks
attributes of each file in a special area of the disk called the directory.
In the directory, CP/M 3 also records which parts of the disk belong
to which file.
CP/M 3 allocates directory and storage space for a file as records are
added to the file. When you erase a file, CP/M 3 reclaims storage in two
ways: it makes the file’s directory space available to catalog a different file,
and frees the file’s storage space for later use. It is this dynamic allocation
feature that makes CP/M 3 powerful. You do not have to tell CP/M 3
how big your file will become, because it automatically allocates more
storage for a file as needed, and releases the storage for reallocation
when the file is erased. Use the SHOW command to determine how
much space remains on the disk.
At some time, you will need to take a disk out of a drive and insert
another that contains different files. You can replace an online disk
whenever you see the system prompt at your console. This is a clear
indication that no program is reading or writing to the drive.
You can also remove a disk and insert a new one when an application
program prompts you to do so. This can occur, for example, when the
data that the program uses does not fit on one floppy disk.
You can change disks on the drive without sending any special signals
DIGITAL RESEARCH™
2-11
Protecting a Drive CP/M 3 User’s Guide
End of Section 2
DIGITAL RESEARCH™
2-12
Section 3
Console and Printer
DIGITAL RESEARCH™
3-1
Console Line Editing CP/M 3 User’s Guide
You can use printer echo with a DIR command to make a list of files
stored on a floppy disk. You can also use CTRL-P with CTRL-S and
CTRL-Q to make a hard copy of part of a file. Use a TYPE command
to start a display of the file at the console. When the display reaches the
part you need to print, press CTRL-S to stop the display, CTRL-P to
enable printer echo, and then CTRL-Q to resume the display and start
pr inting. You can use another CTRL-S, CTRL-P, CTRL-Q sequence
to terminate printer echo.
A›POP A:=B:*.*
To move the cursor to the letter O, hold down the CTRL key and
DIGITAL RESEARCH™
3-2
CP/M 3 User’s Guide Console Line Editing
A›P
Now, type the correct letters, press RETURN, and send the com-
mand to CP/M 3.
A›PIP A:=B:*.*
DIGITAL RESEARCH™
3-3
Console Line Editing CP/M 3 User’s Guide
Character Meaning
CTRL-R Places a # at the current cursor location, moves
the cursor to the next line, and displays any partial
command you typed so far.
CTRL-U Discards all the characters in the command line,
places a # at the current cursor position, and moves
the cursor to the next command line.
CTRL-X Discards all the characters in the command line, and
moves the cursor to the beginning of the current line.
You probably noticed that some control characters have the same
meaning. For example, the CTRL-J and CTRL-M keystrokes have the
same effect as pressing the RETURN key; all three send the command
line to CP/M 3 for processing. Also, CTRL-H has the same effect as
pressing the BACKSPACE key.
Banked CP/M 3 allows you to edit your command line without de-
leting all characters. Using the line-editing control characters listed in ,
you can move the cursor left and right to insert and delete characters in
the middle of a command line. You do not have to retype everything to
the right of your correction. In banked CP/M 3, you can press RETURN
when the cursor is in any position in the command line; CP/M 3 reads
the entire command line. You can also recall a command for reediting
and reexecution.
In the following sample session, the user mistyped PIP, and CP/M 3
returned an error message. The user recalls the erroneous command line
by pressing CTRL-W and corrects the error (the underbar represents
the cursor):
DIGITAL RESEARCH™
3-4
CP/M 3 User’s Guide Console Line Editing
To execute the corrected command line, the user can press return
even though the cursor is in the middle of the line. A return keystroke,
or one of its equivalent control characters, not only executes the com-
mand, but also stores the command in a buffer so that you can recall it
for editing or reexecution by pressing CTRL-W.
DIGITAL RESEARCH™
3-5
Console Line Editing CP/M 3 User’s Guide
DIGITAL RESEARCH™
3-6
CP/M 3 User’s Guide Redirecting Input and Output
Character Meaning
CTRL-U Discards all the characters in the command line,
places a # at the current cursor position, and moves
the cursor to the next command line.
CTRL-W Recalls and displays previously entered command
line both at the operating system level and within
executing programs, if the CTRL-W is the first char-
acter entered after the prompt. CTRL-J, CTRL-M,
CTRL-U, and RETURN define the command line
you can recall. If the command line contains charac-
ters, CTRL-W moves the cursor to the end of the
command line. If you press RETURN, CP/M 3
executes the recalled command.
CTRL-X Discards all the characters in the command line, and
moves the cursor to the beginning of the current line.
You probably noticed that some control characters have the same
meaning. For example, the CTRL-J and CTRL-M keystrokes have the
same effect as pressing the RETURN key; all three send the command
line to CP/M 3 for processing. Also, CTRL-H has the same effect as
pressing the BACKSPACE key. Notice that when a control character is
displayed on your screen, it is preceded by an up-arrow, ^. For example,
a CTRL-C keystroke appears as ^C on your screen.
You can use a PUT command to direct console output to a disk file
DIGITAL RESEARCH™
3-7
Redirecting Input and Output CP/M 3 User’s Guide
as well as the console. With PUT, you can create a disk file containing
a directory of all files on that disk, as follows:
A›PUT CONSOLE OUTPUT TO FILE DIR,PRN
Putting console output to file: DIR.PRN
A›DIR
A: FILENAME TEX : FRONT TEX : FRONT BAK : ONE BAK : THREE TEX
A: FOUR TEX : ONE TEX : LINEDIT TEX : EXAMP1 TXT : TWO BAK
A: TWO TEX : THREE BAK : EXAMP2 TXT
A›TYPE DIR.PRN
A: FILENAME TEX : FRONT TEX : FRONT BAK : ONE BAK : THREE TEX
A: FOUR TEX : ONE TEX : LINEDIT TEX : EXAMP1 TXT : TWO BAK
A: TWO TEX : THREE BAK : EXAMP2 TXT
You can use a similar PUT command to direct printer output to a disk
file as well as the printer.
You add or omit the SYSTEM option in the GET command line
to specify whether CP/M 3 or a utility program is to start reading the
file, as shown in the following sample session. If you omit the SYSTEM
option, the system prompt returns so that you can initiate the program
that is to take input from the specified file. If you include the SYSTEM
option, CP/M 3 immediately takes input from the specified file.
3A›type pip.dat
B:=front.tex
b:=one.tex
DIGITAL RESEARCH™
3-8
B:=two.tex
3A›pip
CP/M 3 PIP VERSION 3.0
*b:=front.tex
*b:=one.tex
*b:=two.tex
* ^‹cr›
3A›type ccp.dat
dir
show
dirsys
3A›dir
A: FILENAME TEX : FRONT TEX : FRONT BAK : ONE BAK : THREE TEX
A: FOUR TEX : ONE TEX : LINEDIT TEX : EXAMP1 TXT : TWO BAK
A: TWO TEX : EXAMP3 : EXAMP2 TXT : PIP DAT : EXAMP4
A: THREE BAK : EXAMP5 : CCP DAT
3A›show
A: RW, Space: 3,392k
B: RW, Space: 452k
3A›dirsys
NON-SYSTEM FILE(S) EXIST
See the descriptions of GET and PUT in Section 5 for more ways
to use redirected input and output.
DIGITAL RESEARCH™
3-9
Assigning Logical Devices CP/M 3 User’s Guide
End of Section 3
DIGITAL RESEARCH™
3-10
Section 4
CP/M 3 Command Concepts
CP/M 3 has six built-in commands and over twenty transient utility
commands. You can add utilities to your system by purchasing various
CP/M 3-compatible application programs. If you are an experienced
programmer, you can also write your own utilities that operate with
CP/M 3.
DIGITAL RESEARCH™
4-1
Built-in Commands CP/M 3 User’s Guide
a related transient utility. The related transient has the same name as
the built-in and has a filetype of COM. This type of transient utility is
loaded only when a built-in command line contains options that cannot
be performed by the built-in command.
If you include certain options in the command tail for a built-in com-
mand, CP/M 3 might return a .COM Required message, This means
that the command tail options require support from a related transient
utility and CP/M 3 could not find that program file. The following
files must be accessible to support all the functions these built-ins offer:
ERASE.COM, RENAME.COM, TYPE.COM, and DIR.COM.
DIRSYS DIRS
ERASE ERA
RENAME REN
DIGITAL RESEARCH™
4-2
CP/M 3 User’s Guide Transient Utility Commands
TYPE TYP
USER USE
DIGITAL RESEARCH™
4-3
How CP/M 3 Searches for Program and Data Files CP/M 3 User’s Guide
Name Function
MAC Translates assembly language programs into machine
code form.
PIP Copies files and combines files.
PUT Temporarily directs printer or console output to a
disk file.
RMAC Translates assembly language programs into relo-
catable program modules.
SET Sets file options including disk labels, file attributes,
type of time and date stamping, and password pro-
tection.
SETDEF Sets system options including the drive search chain.
SHOW Displays disk and drive statistics.
SID Helps you check your programs and interactively
correct programming errors.
SUBMIT Automatically executes multiple commands.
XREF Produces a cross-reference list of variables used in
an assembler program.
As you recall, when you enter a command line, CP/M 3 passes the
DIGITAL RESEARCH™
4-4
CP/M 3 User’s Guide How CP/M 3 Searches for Program and Data Files
3A›TYPE MYFILE.TXT
Some CP/M 3 utilities, such as PIP and DIR, restrict their file search
to the current user number. Because CP/M 3 does not allow Read-Write
access to SYS files, ERASE and RENAME also restrict their search to
the current user number.
DIGITAL RESEARCH™
4-5
How CP/M 3 Searches for Program and Data Files CP/M 3 User’s Guide
The search procedure for a program file can be very different from
a data file search. This is because you can use the SETDEF command
described in Section 5 to define the search procedure you want CP/M 3
to follow when it is looking for a program file. With SETDEF you can
ask CP/M 3 to make as many as sixteen searches when you do not in-
clude a drive specifier before the command keyword, but that is a rare
case! We will begin by describing how CP/M 3 searches for program
files when you have not yet entered a SETDEF command.
If you include a drive specifier before the command keyword, you are
telling CP/M 3 precisely where to look for the program file. Therefore,
CP/M 3 searches only two locations: the directory for the current user
on the specified drive, and then for user 0 on the specified drive, before it
repeats the command line with a question mark. For example, if you enter
4C›A:SHOW [SPACE]
CP/M 3 looks on drive A, user 4 and then user 0 for the file SHOW.
COM.
DIGITAL RESEARCH™
4-6
CP/M 3 User’s Guide How CP/M 3 Searches for Program and Data Files
you first receive CP/M 3, there is only one drive in your chain, the default
drive. Unless you change the chain with a SETDEF command, CP/M 3
looks in two places for the program file. For example, if you enter
7E›SHOW [SPACE]
1. drive E, user 7
2. drive E, user 0
When you use a SETDEF command to define your own drive chain,
include the default drive, and the drive that contains your most frequently
used utilities. For an example, assume you defined your drive chain as *
(the default drive) and drive A. When you enter the following command:
2D›SHOW [SPACE]
1. drive D, user 2
2. drive D, user 0
3. drive A, user 2
4. drive A, user 0
You can include your default drive in your drive chain with an option
in a SETDEF command. Any drive chain you specify with SETDEF
remains in effect until you restart or reset the system.
DIGITAL RESEARCH™
4-7
Executing Multiple Commands CP/M 3 User’s Guide
If you find you need to execute the same command sequence fre-
quently, store the sequence in a disk file. To create this file, use ED or
another character file editor. The file must have a filetype of SUB. Each
command in the file must start on a new line. For example, an UPDATE.
SUB file might look like this:
DIR A:*.COM
ERA B:*.COM
PIP B:=A:*.COM
DIGITAL RESEARCH™
4-8
A›SUBMIT UPDATE
Not all application programs that run under CP/M can be termi-
nated by a CTRL-C, However, most of the transient utilities supplied
with CP/M 3 can be terminated immediately by a CTRL-C keystroke.
If you try to terminate a program while it is sending a display to the
screen, you might need to press a CTRL-S to halt the display before
entering CTRL-C.
DIGITAL RESEARCH™
4-9
Getting Help CP/M 3 User’s Guide
You can also use CTRL-C to reset the disk system. This is sometimes
called a warm start. When you press CTRL-C and the cursor is at the
system prompt, CP/M 3 logs out all the active drives, then logs in the
default drive. The active drives are any drives you have accessed since
the last cold or warm start. A SHOW [SPACE] command displays the
remaining space on all active drives. In the following example, SHOW
[SPACE] indicates that three drives are active. However, if you press
CTRL-C immediately after this display and then enter another SHOW
[SPACE] command, only the space for the default drive, A, is displayed.
A›SHOW [SPACE]
A: RW, Space: 9,488k
B: RO, Space: 2,454k
C: RO, Space: 1,665k
A›^C
A›SHOW [SPACE]
A: RW, Space: 9,488k
A›HELP
In response, the HELP utility displays a list of topics for which sum-
maries are available. After HELP lists the topics available, it displays
its own prompt:
HELP›
To this prompt, you can enter one of the topics presented in the list,
for example,
DIGITAL RESEARCH™
4-10
CP/M 3 User’s Guide Getting Help
HELP›SHOW
HELP›.OPTIONS
HELP lets you learn the basic CP/M 3 commands quickly. You might
find that you reference the command summary in Section 5 only when
you need details not provided in the HELP summaries. When you add
new utilities, you can modify HELP to add or subtract topics, or even
modify the summaries HELP presents. See the description of HELP
in Section 5 for complete details.
End of Section 4
DIGITAL RESEARCH™
4-11
Section 5
Command Summary
DIGITAL RESEARCH™
5-1
Let’s Get Past the Formalities CP/M 3 User’s Guide
B:MYFILE.DAT
filespec
B:MY*.A??
is a file specification with drive specifier B:, filename MY*, and filetype
DIGITAL RESEARCH™
5-2
CP/M 3 User’s Guide Let’s Get Past the Formalities
A??. This ambiguous file specification might match several files in the
directory.
Put together, the parts of a file specification are represented like this:
d:filename.typ;password
■ filename
■ filename.typ
■ filename;password
■ filename.typ;password
■ d:filename
■ d:filename.typ
■ d:filename;password
■ d:filename.typ;password
DIGITAL RESEARCH™
5-3
Let’s Get Past the Formalities CP/M 3 User’s Guide
Character Meaning
; password delimiter in file specification
*? wildcard characters in an ambiguous file spec-
ification
‹›&!|\+- option list delimiters
[] option list delimiters for global and local options
() delimiters for multiple modifiers inside square
brackets for options that have modifiers
/$ option delimiters in a command line
; comment delimiter at the beginning of a com-
mand line
CP/M 3 has already established several file groups. Table 5-2 lists
some of their filetypes with a short description of each family. Appendix
C provides the complete lst.
DIGITAL RESEARCH™
5-4
CP/M 3 User’s Guide How Commands Are Described
characters, default drive, and wildcards. You also see how to use the
formal names filespec, drive specifier, filename, and filetype. These
concepts give you the background necessary to compose complete
command lines.
The notation in the syntax lines describes the general command form
using these rules:
DIGITAL RESEARCH™
5-5
How Commands Are Described CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-6
CP/M 3 User’s Guide How Commands Are Described
Symbol Meaning
() Items in parentheses indicate a range of options. If
you use a range from an option list, you must enclose
the range in parentheses.
… Ellipses tell you that the previous item can be re-
peated any number of times.
| The or bar separates alternative items in a command
line.
^ or CTRL Represent the CTRL key on your keyboard. (CTRL
characters show as ^ on your screen.)
‹cr› Indicates a carriage return keystroke.
* Wildcard character—replaces all or part of a file-
name and/or filetype.
? Wildcard character—replaces any single character
in the same position of a filename or filetype.
The syntax of the DIR command with options shows how to use the
command line syntax notation:
This tells you that the command tail following the command keyword
DIR is optional. DIR alone is a valid command, but you can include
a file specification, or a drive specification, or just the options in the
command line. Therefore,
DIGITAL RESEARCH™
5-7
How Commands Are Described CP/M 3 User’s Guide
DIR
DIR filespec
DIR d:
DIR [RO]
RO
RW
DIR
SYS
Therefore,
is a valid command.
Using this syntax, you can construct several valid command lines:
DIR
DIR X.PAS
DIR X.PAS [RO]
DIR X.PAS [SYS]
DIR *.PAS
DIR *.* [RW]
DIR X.* [DIR]
DIGITAL RESEARCH™
5-8
file copy program. PIP can copy information from the disk to the screen
or printer. PIP can combine two or more files into one longer file. PIP
can also rename files after copying them. Look at one of the formats of
the PIP command line for another example of how to use command
line notation. PIP also copies files from one disk to another disk.
PIP NEWFILE.DAT=OLDFILE.DAT
PIP B:=A:THISFILE.DAT
PIP B:X.BAS=Y.BAS, Z.BAS
PIP X.BAS=A.BAS, B.BAS, C.BAS
PIP B:=A:*.BAK
PIP B:=A:*.*
DIGITAL RESEARCH™
5-9
The COPYSYS Command CP/M 3 User’s Guide
Example: A›COPYSYS
Copysys Ver 3.0
Source drive name (or return for default)C
Source on C then type return
Function Complete
Destination drive name (or return to reboot)C
Destination on C then type return
DIGITAL RESEARCH™
5-10
CP/M 3 User’s Guide The COPYSYS Command
Function complete
Do You wish to copy CPM3.SYS?)Y
Source drive name (or return for default)‹cr›
Source on default then type return
Function complete
Destination drive name (or return to reboot)C
Destination on C then type return
Function complete
DIGITAL RESEARCH™
5-11
The DATE Command CP/M 3 User’s Guide
Examples: A›DATE
A›DATE C
DIGITAL RESEARCH™
5-12
CP/M 3 User’s Guide The DATE Command
Explanation: The first form allows the user to enter both date and
time in the command. The time-specification format
is
MM/DD/YY HH:MM:SS
where:
The system checks the validity of the date and time entry
and determines the day for the date entered.
The second form prompts you to enter the date and the
time. To keep the current system date or time, press the
carriage return.
DIGITAL RESEARCH™
5-13
The DATE Command CP/M 3 User’s Guide
A›DATE SET
DIGITAL RESEARCH™
5-14
CP/M 3 User’s Guide The DEVICE Command
CONIN:
CONOUT:
AUXIN:
AUXOUT:
LST:
DIGITAL RESEARCH™
5-15
The DEVICE Command CP/M 3 User’s Guide
Examples: A›DEVICE
Physical Devices:
I=Input,O=Output,S=Serial,X=Xon-Xoff
CRT 9600 IOS LPT 9600 IOSX CRT1 9600 IOS
CRT2 9600 IOS CRT3 4800 IOS LPT1 134 IOSX
CEN NONE O MODEM1 19200 IOS MODEM2 300 S
CTRLR1 150 O GRACRT 19200 IOS DIABLO 110 O
CTRLR2 200 O SCRTY 7200
Current Assignments:
DIGITAL RESEARCH™
5-16
CP/M 3 User’s Guide The DEVICE Command
CONIN: = CRT
CONOUT: = CRT
AUXIN: = Null Device
AUXOUT: = Null Device
LST: = LPT
A›DEVICE NAMES
A›DEVICE VALUES
A›DEVICE CRT
A›DEVICE CON
DIGITAL RESEARCH™
5-17
The DEVICE Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-18
CP/M 3 User’s Guide The DEVICE Command
Option Meaning
baud-rate is the speed of the device. The system
accepts the following baud rates:
50 75 110 134
150 300 600 1200
1800 2400 3600 4800
7200 9600 19200
DIGITAL RESEARCH™
5-19
The DEVICE Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-20
CP/M 3 User’s Guide The DIR Command
DIRSYS {d:}
DIRSYS {filespec}
Explanation: The DIR command displays the names of files and the
attributes associated with the files. DIR and DIRSYS
are built-in utilities; DIR with options is a transient
utility.
Display Directory
DIRSYS {d:}
DIRSYS {filespec}
DIGITAL RESEARCH™
5-21
The DIR Command CP/M 3 User’s Guide
No File
DIGITAL RESEARCH™
5-22
CP/M 3 User’s Guide The DIR Command
Examples: A›DIR
A›DIR B:
A›DIR B:X.BAS
4A›DIR *.BAS
B›DIR A:X*.C?D
A›DIRSYS
DIGITAL RESEARCH™
5-23
The DIR Command CP/M 3 User’s Guide
3A›DIRS *.COM
DIGITAL RESEARCH™
5-24
CP/M 3 User’s Guide The DIR Command
DIGITAL RESEARCH™
5-25
The DIR Command CP/M 3 User’s Guide
Option Function
EXCLUDE
DIGITAL RESEARCH™
5-26
CP/M 3 User’s Guide The DIR Command
Option Function
LENGTH = n
DIGITAL RESEARCH™
5-27
The DIR Command CP/M 3 User’s Guide
Option Function
RW
DIGITAL RESEARCH™
5-28
CP/M 3 User’s Guide The DIR Command
Both the full format and the size format follow their
display with two lines of totals. The first line displays
the total number of kilobytes, the total number of re-
cords, and the total number of files for that drive and
user area. The second line displays the total number of
1K blocks needed to store the listed files. The number
of 1K blocks shows the amount of storage needed to
store the files on a single density disk, or on any drive
that has a block size of one kilobyte. The second line
DIGITAL RESEARCH™
5-29
The DIR Command CP/M 3 User’s Guide
A›DIR [DRIVE=C,FF]
A›DIR D: [RW,SYS]
A›DIR C: [USER=ALL]
A›DIR [USER=2]
A›DIR C: [USER=(3,4,10)]
A›DIR [DRIVE=ALL]
4A›DIR [DRIVE=C]
DIGITAL RESEARCH™
5-30
CP/M 3 User’s Guide The DIR Command
A›DIR [DRIVE=(B,D)]
The preceding example above lists all the files on the default
drive and user 0 that do not have a filetype of COM.
The preceding command line instructs DIR to list all the system
files of type PLI, COM, and ASM on the system in the currently
active drives for all the user numbers on the drives.
A›DIR [size,rw]D:
DIGITAL RESEARCH™
5-31
The DUMP Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-32
CP/M 3 User’s Guide The ED Command
The ED Command
Syntax: ED {input-filespec {d: | output-filespec}}
Explanation: The ED transient utility lets you create and edit a disk
file.
DIGITAL RESEARCH™
5-33
The ED Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-34
CP/M 3 User’s Guide The ED Command
Command Action
Fstring{^Z}
Juxtapose strings.
nK, -nK
Move CP n lines.
nMcommands
DIGITAL RESEARCH™
5-35
The ED Command CP/M 3 User’s Guide
Command Action
n:
Move to line n.
:ncommand
Substitute string
DIGITAL RESEARCH™
5-36
CP/M 3 User’s Guide The ED Command
Command Action
nT, -nT, 0T
Type n lines.
U, -U
Upper-case translation
V, -V, 0V
Delete filespec.
nZ
Wait n seconds.
DIGITAL RESEARCH™
5-37
The ED Command CP/M 3 User’s Guide
NEW FILE
#a
DIGITAL RESEARCH™
5-38
CP/M 3 User’s Guide The ED Command
nnnnn:
:*
DIGITAL RESEARCH™
5-39
The ED Command CP/M 3 User’s Guide
:*
:*#a
:*0p
to fill the screen with the first n lines of the buffer , where
n is the current default page size (See the DEVICE
command to set the page size).
:*e
DIGITAL RESEARCH™
5-40
CP/M 3 User’s Guide The ED Command
A›B:ED MYPROG.PAS B:
DIGITAL RESEARCH™
5-41
The ERASE Command CP/M 3 User’s Guide
ERASE {d:}wildcard-filespec
No File
DIGITAL RESEARCH™
5-42
CP/M 3 User’s Guide The ERASE Command
A›ERA *.PRN
All files with the filetype PRN are removed from the
disk in drive A.
A›ERA B:*.*
ERASE B:*.* (Y/N)?Y
DIGITAL RESEARCH™
5-43
The GENCOM Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-44
CP/M 3 User’s Guide The GENCOM Command
DIGITAL RESEARCH™
5-45
The GENCOM Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-46
CP/M 3 User’s Guide The GENCOM Command
DIGITAL RESEARCH™
5-47
The GET Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-48
CP/M 3 User’s Guide The GET Command
DIGITAL RESEARCH™
5-49
The GET Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-50
CP/M 3 User’s Guide The HELP Command
DIGITAL RESEARCH™
5-51
The HELP Command CP/M 3 User’s Guide
Display Information
Examples: A›HELP
A›HELP DATE
DIGITAL RESEARCH™
5-52
CP/M 3 User’s Guide The HELP Command
A›HELP ED
A›HELP ED COMMANDS
A›HELP ED
HELP›.COMMANDS
DIGITAL RESEARCH™
5-53
The HELP Command CP/M 3 User’s Guide
///nTopicname‹cr›
DIGITAL RESEARCH™
5-54
CP/M 3 User’s Guide The HELP Command
///1NEW UTILITY‹cr›
///2COMMANDS‹cr›
///3PARAMETERS‹cr›
///2EXAMPLES‹cr›
HELP›ED COMMANDS
DIGITAL RESEARCH™
5-55
The HELP Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-56
CP/M 3 User’s Guide The HEXCOM Command
DIGITAL RESEARCH™
5-57
The INITDIR Command CP/M 3 User’s Guide
Examples: A›INITDIR C:
DIGITAL RESEARCH™
5-58
CP/M 3 User’s Guide The INITDIR Command
DIGITAL RESEARCH™
5-59
The LIB Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-60
CP/M 3 User’s Guide The LIB Command
DIGITAL RESEARCH™
5-61
The LIB Command CP/M 3 User’s Guide
Modifier Meaning
Replace <module = filename.REL›
<filename›
Select (modFIR ST-modL A ST,mod1,
mod2,…,modN)
A›LIB TEST=TEST1(MOD1,MOD4),TEST2(C1-C4,C6)
A›LIB FILE2=FILE3<MODA=›
A›LIB FILE6=FILE5<MODA=FILEB.REL›
A›LIB FILE6=FILE5<THISNAME›
DIGITAL RESEARCH™
5-62
CP/M 3 User’s Guide The LIB Command
A›LIB FILE1[I]=B:FILE2(PLOTS,FIND,SEARCH-DISPLAY)
DIGITAL RESEARCH™
5-63
The LINK Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-64
CP/M 3 User’s Guide The LINK Command
Option Meaning
Gn Go; set start address to label n.
Lhhhh Load; change default load address of
module to hhhh. Default 0100H.
Mhhhh Memory size; define free memory re-
quirements for MP/M™ modules.
NL No listing of symbol table at console.
NR No symbol table file.
OC Output COM command file. Default.
OP Output PRL page relocatable file for
execution under MP/M in relocatable
segment.
OR Output RSP Resident System Process
file for execution under MP/M.
OS Output SPR System Page Relocatable
file for execution under MP/M.
Phhhh Program origin; changes default pro-
gram origin address to hhhh. Default
is 0100H.
Q Lists symbols with leading question
mark.
S Search preceding file as a library.
$Cd Destination of console messages, d,
can be X for console, Y for printer, or
Z for zero output. Default is X.
$Id Source of intermediate files; d is disk
drive A–P. Default is current drive.
$Ld Source of library files; d is disk drive
A–P. Default is current drive.
DIGITAL RESEARCH™
5-65
The LINK Command CP/M 3 User’s Guide
Option Meaning
$Od Destination of object file; d can be Z,
or disk drive A–P. Default is to same
drive as first file in the LINK-80 com-
mand.
$Sd Destination of symbol file; d can be Y,
Z, or disk drive A–P. Default is to same
drive as first file in LINK-80 command.
A›LINK m1,m2,m3
A›LINK m=m1,m2,m3
A›LINK MYFILE,FILE5[s]
You can direct the input and output of MAC using the
options listed in the following table. Use a letter with
the option to indicate the source and destination drives,
console, printer, or zero output. Valid drive names are
A through O. X directs output to the console. P directs
DIGITAL RESEARCH™
5-67
The MAC Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-68
CP/M 3 User’s Guide The MAC Command
Modifier Meaning
+S appends symbol file to print file
-S suppresses creation of symbol file
+1 produces a pass 1 listing for macro
debugging in PRN file
-1 suppresses listing on pass 1 (default)
DIGITAL RESEARCH™
5-69
The PATCH Command CP/M 3 User’s Guide
Patch Installed
DIGITAL RESEARCH™
5-70
CP/M 3 User’s Guide The PATCH Command
DIGITAL RESEARCH™
5-71
The PIP Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-72
CP/M 3 User’s Guide The PIP Command
Explanation: The first form shows the simplest way to copy a file. PIP
looks for the file named by src-filespec on the default
or optionally specified drive. PIP copies the file to the
drive specified by d: and gives it the name specified by
src-filespec. If you want, you can use the [Gn] option
to place your destination file (dest-filespec) in the user
number specified by n. The only option recognized
for the destination file is [Gn]. Several options can
be combined together for the source file specification
(src-filespec). See the Table 5-13, PIP Options.
The third form shows how to rename the file after you
copy it. You can copy it to the same drive and user
number, or to a different drive and/or user number.
Rules for options are the same. PIP looks for the file
specified by src-filespec, copies it to the location spec-
ified in dest-filespec, and gives it the name indicated
by dest-filespec.
DIGITAL RESEARCH™
5-73
The PIP Command CP/M 3 User’s Guide
Before you start PIP, be sure that you have enough free
space in kilobytes on your destination disk to hold the
entire file or files that you are copying. Even if you are
replacing an old copy on the destination disk with a
new copy, PIP still needs enough room for the new
copy before it deletes the old copy. Use the DIR com-
mand to determine filesize and the SHOW command
to determine disk space. If there is not enough space,
you can delete the old copy first by using the ERASE
command.
DIGITAL RESEARCH™
5-74
CP/M 3 User’s Guide The PIP Command
A›PIP B:newfile.dat=A:oldfile.dat
DIGITAL RESEARCH™
5-75
The PIP Command CP/M 3 User’s Guide
A›PIP newfile.dat=oldfile.dat
Using this long form of PIP, you can copy a file from
one drive and user number (usually user 0 because
CP/M 3 automatically starts out in user 0—the default
user number) to the same drive and user number. This
gives you two copies of the same file on one drive and
user number, each with a different name.
DIGITAL RESEARCH™
5-76
CP/M 3 User’s Guide The PIP Command
A›PIP B:=A:*.*
A›PIP B:=A:PROG????.*
A›PIP B:[G1]=A:*.BAS
DIGITAL RESEARCH™
5-77
The PIP Command CP/M 3 User’s Guide
Combining Files
Explanation: This form of the PIP command lets you specify two or
more files in the source. PIP copies the files specified in
the source from left to right and combines them into
one file with the name indicated by the destination file
specification. This procedure is called file concatenation.
You can use the [Gn] option after the destination file
to place it in the user number specified by n. You can
specify one or more options for each source file.
A, C, Gn, K, O, R, V, and W.
DIGITAL RESEARCH™
5-78
CP/M 3 User’s Guide The PIP Command
Explanation: This form is a special case of the PIP command line that
lets you copy a file from a disk to a device, from a device
to a disk or from one device to another. The files must
contain printable characters. Each peripheral device
is assigned to a logical device that identifies a source
device that can transmit data or a destination device
that can receive data. (See the DEVICE command.) A
DIGITAL RESEARCH™
5-79
The PIP Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-80
CP/M 3 User’s Guide The PIP Command
A›PIP LST:=CON:
A›PIP LST:=B:DRAFT.TXT[T8]
A›PIP PRN:=B:DRAFT.TXT
Syntax: PIP
Explanation: This form of the PIP command starts the PIP utility
and lets you type multiple command lines while PIP
DIGITAL RESEARCH™
5-81
The PIP Command CP/M 3 User’s Guide
Examples: A›PIP
CP/M 3 PIP VERSION 3.0
*NEWFILE=FILE1,FILE2,FILE3
* APROG.COM=BPROG.COM
* A:=B:X.BAS
*B:=*.*
*^M
A›
DIGITAL RESEARCH™
5-82
CP/M 3 User’s Guide The PIP Command
Explanation: With options you can process your source file in special
ways. You can expand tab characters, translate from up-
per- to lower-case, extract portions of your text, verify
that the copy is correct, and much more.
DIGITAL RESEARCH™
5-83
The PIP Command CP/M 3 User’s Guide
Option Function
Dn Delete any characters past column n.
This parameter follows a source file that
contains lines too long to be handled
by the destination device, for exam-
ple, an 80-character printer or narrow
console. The number n should be the
maximum column width of the desti-
nation device.
E Echo transfer at console. When this
parameter follows a source name, PIP
displays the source data at the console
as the copy is taking place. The source
must contain character data.
F Filter form-feeds. When this parame-
ter follows a source name, PIP removes
all form-feeds embedded in the source
data. To change form-feeds set for one
page length in the source file to an-
other page length in the destination
file, use the F command to delete the
old form-feeds and a P command to
simultaneously add new form-feeds
to the destination file.
DIGITAL RESEARCH™
5-84
CP/M 3 User’s Guide The PIP Command
Option Function
Gn Get source from or go to user num-
ber n. When this parameter follows a
source name, PIP searches the direc-
tory of user number n for the source
file. When it follows the destination
name, PIP places the destination file
in the user number specified by n. The
number must be in the range 0 to 15
H Hex data transfer. PIP checks all data
for proper Intel hexadecimal file for-
mat. The console displays error mes-
sages when errors occur.
I Ignore :00 records in the transfer of
Intel hexadecimal format file. The I
option automatically sets the H option.
L Translate upper-case alphabetics in the
source file to lower-case in the desti-
nation file. This parameter follows the
source device or filename.
N Add line numbers to the destination
file. When this parameter follows
the source filename, PIP adds a line
number to each line copied, starting
with 1 and incrementing by one. A
colon follows the line number. If N2
is specified, PIP adds leading zeros to
the line number and inserts a tab after
the number. If the T parameter is also
set, PIP expands the tab.
DIGITAL RESEARCH™
5-85
The PIP Command CP/M 3 User’s Guide
Option Function
O Object file transfer for machine code
(noncharacter and therefore nonprint-
able) files. PIP ignores any CTRL-Z
end-of-file during concatenation and
transfer. Use this option if you are com-
bining object code files.
Pn Set page length. n specifies the number
of lines per page. When this parameter
modifies a source file, PIP includes
a page eject at the beginning of the
destination file and at every n lines. If
n = 1 or is not specified, PIP inserts
page ejects every sixty lines. When you
also specify the F option, PIP ignores
form-feeds in the source data and in-
serts new form-feeds in the destination
data at the page length specified by n.
Qs Quit copying from the source device
after the string s.When used with the
S parameter, this parameter can ex-
tract a portion of a source file. The
string argument must be terminated
by CTRL-Z.
R Read system (SYS) files. Usually, PIP
ignores files marked with the system at-
tribute in the disk directory. But when
this parameter follows a source file-
name, PIP copies system files, includ-
ing their attributes, to the destination.
DIGITAL RESEARCH™
5-86
CP/M 3 User’s Guide The PIP Command
Option Function
Ss Start copying from the source device
at the string s. The string argument
must be terminated by CTRL-Z.
When used with the Q parameter, this
parameter can extract a portion of a
source file. Both start and quit strings
are included in the destination file.
Tn Expand tabs. When this parameter
follows a source filename, PIP expands
tab (CTRL-1) characters in the desti-
nation file. PIP replaces each CTRL-1
with enough spaces to position the
next character in a column divisible
by n.
U Translate lower-case alphabetic char-
acters in the source file to upper-case
in the destination file. This parameter
follows the source device or filename.
V Verify that data has been copied cor-
rectly. PIP compares the destination
to the source data to ensure that the
data has been written correctly. The
destination must be a disk file.
DIGITAL RESEARCH™
5-87
The PIP Command CP/M 3 User’s Guide
Option Function
W Write over files with RO (Read-Only)
attribute. Usually, if a PIP command
tail includes an existing RO file as
a destination, PIP sends a query to
the console to make sure you want
to write over the existing file. When
this parameter follows a source name,
PIP overwrites the RO file without
a console exchange. If the command
tail contains multiple source files, this
parameter need follow only the last
file in the list.
Z Zero the parity bit. When this param-
eter follows a source name, PIP sets
the parity bit of each data byte in the
destination file to zero. The source
must contain character data.
A›PIP CON:=WIDEFILE.BAS[D80]
DIGITAL RESEARCH™
5-88
CP/M 3 User’s Guide The PIP Command
A›PIP B:=LETTER.TXT[E]
A›PIP LST:=B:LONGPAGE.TXT[FP65]
B›PIP LST:=PROGRAM.BAS[NTBU]
B›PIP B:=A:*.COM[VMR]
DIGITAL RESEARCH™
5-89
The PIP Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-90
CP/M 3 User’s Guide The PUT Command
DIGITAL RESEARCH™
5-91
The PUT Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-92
CP/M 3 User’s Guide The PUT Command
DIGITAL RESEARCH™
5-93
The PUT Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-94
CP/M 3 User’s Guide The RENAME Command
No File
DIGITAL RESEARCH™
5-95
The RENAME Command CP/M 3 User’s Guide
A›REN *.TX1=*.TEX
A›REN A*.T*=S*.T*
A›REN A*.TEX=A.T*
A›RENAME
DIGITAL RESEARCH™
5-96
CP/M 3 User’s Guide The RENAME Command
A›RENAME S*.TEX=A*.TEX
A›REN B:NEWLIST=B:OLDLIST
A›REN B:NEWLIST=OLDLIST
or
DIGITAL RESEARCH™
5-97
The RMAC Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-98
CP/M 3 User’s Guide The RMAC Command
DIGITAL RESEARCH™
5-99
The SAVE Command CP/M 3 User’s Guide
Example: A›SAVE
A›SID dump.com
#g0
SAVE Ver3.0
File (or RETURN to exit)?dump2.com
Delete dump2.com?Y
From?100
To?400
DIGITAL RESEARCH™
5-100
CP/M 3 User’s Guide The SAVE Command
A›
DIGITAL RESEARCH™
5-101
The SET Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-102
CP/M 3 User’s Guide The SET Command
Option Meaning
SYS Gives the file the System SYS
attribute.
RO Sets the file attribute to allow
Read-Only access.
RW Sets the file attribute to allow
Read-Write access.
ARCHIVE = OFF Sets the archive attribute to
off. This means that the file
has not been backed up (ar-
chived). PIP with the [A] op-
tion can copy files with the
archive attribute set to OFF.
PIP with this option requires
an ambiguous filespec and
copies only files that have
been created or changed
since the last time they were
backed up with the PIP[A]
option. PIP then sets the
archive attribute to ON for
each file successfully copied.
ARCHIVE = ON Sets the archive attribute
to on. This means that the
file has been backed up (ar-
chived).
F1 = ON|OFF Turns on or off the user-de-
finable file attribute F1.
F2 = ON|OFF Turns on or off the user-de-
finable file attribute F2.
DIGITAL RESEARCH™
5-103
The SET Command CP/M 3 User’s Guide
Option Meaning
F3 = ON|OFF Turns on or off the user-de-
finable file attribute F3.
F4 = ON|OFF Turns on or off the user-de-
finable file attribute F4.
DIGITAL RESEARCH™
5-104
CP/M 3 User’s Guide The SET Command
Example: A›SET[NAME=DISK100]
DIGITAL RESEARCH™
5-105
The SET Command CP/M 3 User’s Guide
Examples: A›SET[PASSWORD=SECRET]
A›SET [PASSWORD=‹cr›
DIGITAL RESEARCH™
5-106
CP/M 3 User’s Guide The SET Command
DIGITAL RESEARCH™
5-107
The SET Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-108
CP/M 3 User’s Guide The SET Command
Example: A›SET[DEFAULT=dd]
DIGITAL RESEARCH™
5-109
The SET Command CP/M 3 User’s Guide
Example: A›SET[ACCESS=ON]
DIGITAL RESEARCH™
5-110
CP/M 3 User’s Guide The SET Command
A›SET [CREATE=ON,UPDATE=ON]
DIGITAL RESEARCH™
5-111
The SET Command CP/M 3 User’s Guide
B›DIR [FULL]
DIGITAL RESEARCH™
5-112
CP/M 3 User’s Guide The SETDEF Command
Syntax: SETDEF
DIGITAL RESEARCH™
5-113
The SETDEF Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-114
CP/M 3 User’s Guide The SETDEF Command
DIGITAL RESEARCH™
5-115
The SETDEF Command CP/M 3 User’s Guide
A›PIP
A:PIP COM
CP/M 3 PIP VERSION 3.0
*
4A›PIP
A:PIP COM (User 0)
CP/M 3 PIP VERSION 3.0
*
DIGITAL RESEARCH™
5-116
CP/M 3 User’s Guide The SETDEF Command
DIGITAL RESEARCH™
5-117
The SHOW Command CP/M 3 User’s Guide
Examples: A›SHOW B:
B: RW, Space: 9,488k
A›SHOW
A: RW, Space: 4k
B: RW, Space: 9,488k
DIGITAL RESEARCH™
5-118
CP/M 3 User’s Guide The SHOW Command
DIGITAL RESEARCH™
5-119
The SHOW Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-120
CP/M 3 User’s Guide The SHOW Command
A: Drive Characteristics
3,600: 128 Byte Record Capacity
450: Kilobyte Drive Capacity
96: 32 Byte Directory Entries
96: Checked Directory Entries
128: Records / Directory Entry
16: Records / Block
48: Sectors / Track
512: Bytes / Physical Record
DIGITAL RESEARCH™
5-121
The SID Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-122
CP/M 3 User’s Guide The SID Command
DIGITAL RESEARCH™
5-123
The SID Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-124
CP/M 3 User’s Guide The SID Command
DIGITAL RESEARCH™
5-125
The SID Command CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-126
CP/M 3 User’s Guide The SID Command
Examples: A›SID
A›B:SID SAMPLE.HEX
#DFE00+#128+5
SID Utilities
DIGITAL RESEARCH™
5-127
The SID Command CP/M 3 User’s Guide
SID filename.UTL
aaaa,bbbb
You create the SUB file with the ED utility. It can con-
tain CP/M 3 commands, nested SUBMIT commands,
and input data for a CP/M 3 command or a program.
DIGITAL RESEARCH™
5-129
The SUBMIT Command CP/M 3 User’s Guide
commands:
ERA $1.BAK
DIR $1
PIP $1 =A: $2.COM
ERA SAM.BAK
DIR SAM
PIP SAM= A:TEX.COM
DIGITAL RESEARCH™
5-130
CP/M 3 User’s Guide The SUBMIT Command
MAC $1 $$$2
A›SUBMIT AA ZZ SZ
MAC ZZ $SZ
PIP
‹B:=*.ASM
‹CON:=DUMP.ASM
‹
DIR
The three lines after PIP are input lines to the PIP
command. The third line consists only of the < sign,
indicating a carriage return. The carriage return causes
PIP to return to the system to execute the final DIR
command.
DIGITAL RESEARCH™
5-131
The SUBMIT Command CP/M 3 User’s Guide
DIR
DIR *.BAK
MAC $1 $$$4
PIP LST:=$1.PRN[T$2 $3 $5]
DIR *.ASM
PIP
‹B:=*.ASM
‹CON:=DUMP.ASM
DIGITAL RESEARCH™
5-132
CP/M 3 User’s Guide The SUBMIT Command
‹
DIR B:
Syntax: SUBMIT
SUBMIT filespec
SUBMIT filespec argument … argument
Example: A›SUBMIT
A›SUBMIT SUBA
A›SUBMIT AA ZZ SZ
DIGITAL RESEARCH™
5-133
The SUBMIT Command CP/M 3 User’s Guide
DATE SET
DIGITAL RESEARCH™
5-134
CP/M 3 User’s Guide The TYPE Command
Enter filename:
DIGITAL RESEARCH™
5-135
The TYPE Command CP/M 3 User’s Guide
No File
DIGITAL RESEARCH™
5-136
CP/M 3 User’s Guide The USER Command
Examples: A›USER
Enter User#:5
5A›
A›USER 3
3A›
DIGITAL RESEARCH™
5-137
The XREF Command CP/M 3 User’s Guide
The SYM and PRN files must have the same filename
as the filename in the XREF command tail. XREF
outputs a file of type XRF.
A›XREF B:MYPROG $P
End of Section 5
DIGITAL RESEARCH™
5-138
CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-139
CP/M 3 User’s Guide
DIGITAL RESEARCH™
5-140
Section 6
ED, The CP/M 3 Context Editor
6.1. Introduction to ED
To do almost anything with a computer you need some way to enter
data, a way to give the computer the information you want it to process.
The programs most commonly used for this task are called editors. They
transfer your keystrokes at the keyboard to a disk file. CP/M 3’s editor is
named ED. Using ED, you can easily create and alter CP/M 3 text files.
The correct command format for invoking the CP/M 3 editor is given
in Section 6.2, “Starting ED”. After starting ED, you issue commands
that transfer text from a disk file to memory for editing. Section 6.3, “ED
Operation” details this operation and describes the basic text transfer
commands that allow you to easily enter and exit the editor.
DIGITAL RESEARCH™
6-1
Starting ED CP/M 3 User’s Guide
6.2. Starting ED
Syntax:
To start ED, enter its name after the CP/M 3 prompt. The command
ED must be followed by a file specification, one that contains no wild-
card characters, such as:
A›ED MYFILE.TEX
A›ED MYFILE.TEX B:
Optionally, you can send the edited material to a file with a different
filename, as in the following example:
The file with the different filename cannot already exist or ED prints
the following message and terminates.
DIGITAL RESEARCH™
6-2
CP/M 3 User’s Guide ED Operation
A›ED MYFILE.TEX
:*
NEW FILE
:*
6.3. ED Operation
With ED, you change portions of a file that pass through a memory
buffer. When you start ED with one of the preceding commands, this
memory buffer is empty. At your command, ED reads segments of the
source file, for example MYFILE.TEX, into the memory buffer for you
to edit. If the file is new, you must insert text into the file before you
can edit. During the edit, ED writes the edited text onto a temporary
work file, MYFILE.$$$.
When you end the edit, ED writes the memory buffer contents to
the temporary file, followed by any remaining text in the source file.
ED then changes the name of the source file from MYFILE.TEX to
MYFILE.BAK, so you can reclaim this original material from the back-
up file if necessary. ED then renames the temporary file, MYFILE.$$$,
to MYFILE.TEX, the new edited file. The following figure illustrates
the relationship between the source file, the temporary work file, and
the new file.
DIGITAL RESEARCH™
6-3
ED Operation CP/M 3 User’s Guide
Note: when you invoke ED with two filespecs, an input file and an
output file, ED does not rename the input file to type BAK; therefore,
the input file can be Read-Only or on a write-protected disk if the
output file is written to another disk.
SOURCE
LIBRARIES
MEMORY
BUFFER
AFTER AFTER
(E) (E)
EDIT EDIT
INSERT TYPE
(I) (T)
BACKUP NEW
FILES SOURCE
MYFILE.BAK FILE
MYFILE.TEX
DIGITAL RESEARCH™
6-4
CP/M 3 User’s Guide ED Operation
When you start ED and the memory buffer is empty, you can use the
A (append) command to add text to the memory buffer.
Note: ED can number lines of text to help you keep track of data in the
memory buffer. The colon that appears when you start ED indicates that
line numbering is turned on. Type -V after the ED prompt to turn the
line number display off. Line numbers appear on the screen but never
become a part of the output file.
The V command turns the line number display in front of each line
of text on or off. The V command also displays the free bytes and total
size of the memory buffer. The V command takes the following forms:
V, -V, 0V
Initially, the line number display is on. Use -V to turn it off. If the
memory buffer is empty, or if the current line is at the end of the memory
buffer, ED represents the line number as five blanks. The OV command
prints the memory buffer statistics in the form:
DIGITAL RESEARCH™
6-5
ED Operation CP/M 3 User’s Guide
free/total
where free is the number of free bytes in the memory buffer, and total
is the size of the memory buffer. For example, if you have a total of
48,253 bytes in the memory buffer and 46,652 of them are free, the
OV command displays this information as follows
46652/48253
If the buffer is full, the first field, which indicates free space, is blank.
nA
6.3.2. ED Exit
You can use the W (Write) command and the E (Exit) command
to save your editing changes. The W command writes lines from the
memory buffer to the new file without ending the ED session. An E
command saves the contents of the buffer and any unprocessed material
from the source file and exits ED.
DIGITAL RESEARCH™
6-6
CP/M 3 User’s Guide ED Operation
The W command writes lines from the buffer to the new file. The W
command takes the form:
nW
When you enter an E command, ED first writes all data lines from the
buffer and the original source file to the $$$ file. If a BAK file exists, ED
deletes it, then renames the original file with the BAK filetype. Finally,
DIGITAL RESEARCH™
6-7
Basic Editing Commands CP/M 3 User’s Guide
ED renames the $$$ file from filename.$$$ to the original filetype and
returns control to the operating system.
DIGITAL RESEARCH™
6-8
■ If you enter a pound sign, #, in place of a number, ED uses the
value 65,535 as the argument. A pound sign argument can be
preceded by a minus sign to cause the command to execute
backwards through the memory buffer, -#.
■ ED accepts 0 as a numeric argument only in certain commands. In
some cases, 0 causes the command to be executed approximately
half the possible number of times, while in other cases it prevents
the movement of the CP.
DIGITAL RESEARCH™
6-9
Basic Editing Commands CP/M 3 User’s Guide
B, -B
nC, -nC
DIGITAL RESEARCH™
6-10
CP/M 3 User’s Guide Basic Editing Commands
nL, -nL
DIGITAL RESEARCH™
6-11
Basic Editing Commands CP/M 3 User’s Guide
The n command moves the CP and displays the destination line. The
n command takes the following forms:
n, -n
Also, a minus sign, −, without a number moves the CP back one line.
ED does not display the contents of the memory buffer until you
specify which part of the text you want to see. The T command displays
text without moving the CP.
DIGITAL RESEARCH™
6-12
CP/M 3 User’s Guide Basic Editing Commands
nT, -nT
DIGITAL RESEARCH™
6-13
Basic Editing Commands CP/M 3 User’s Guide
nD, -nD
the command 6D deletes the six characters after the CP, and the resulting
memory buffer looks like this:
You can also use a D command to delete the ‹cr›‹lf› between two
lines to join them together. Remember that the ‹cr› and ‹lf› are two
characters.
The K command kills or deletes whole lines from the memory buffer
and takes the forms:
nK, -nK
DIGITAL RESEARCH™
6-14
CP/M 3 User’s Guide Basic Editing Commands
lines after the CP. A negative number kills lines before the CP. When
no number is specified, ED kills the current line. If the character pointer
is at the beginning of the second line,
then the command -K deletes the previous line and the memory buffer
changes:
You can use the special # character to delete all the text from the CP
to the beginning or end of the buffer. Be careful when using #K because
you cannot reclaim lines after they are removed from the memory buffer.
To insert characters into the memory buffer from the screen, use the
I command.
DIGITAL RESEARCH™
6-15
Basic Editing Commands CP/M 3 User’s Guide
I
Istring^Z
When you type the first command, ED enters insert mode. In this
mode, all keystrokes are added directly to the memory buffer. ED
enters characters in lines and does not start a new line until you press
the enter key.
A›ED B:QUOTE.TEX
NEW FILE
: *i
1: Emily Dickinson said,
2: "I find ecstasy in living -
3: the mere sense of living
4: is joy enough."
5: ^Z
: *
Note: to exit from insert mode, you must press CTRL-Z or ESC. When
the ED prompt, *, appears on the screen, ED is not in insert mode.
DIGITAL RESEARCH™
6-16
CP/M 3 User’s Guide Basic Editing Commands
Command Result
CTRL-X Delete the entire line currently being typed. Same
as CTRL-U.
Backspace Remove the last character.
The second form of the I command does not enter insert mode. It
inserts the character string into the memory buffer and returns imme-
diately to the ED prompt. You can use CP/M 3’s line-editing control
characters to edit the command string.
To insert a string, first use one of the commands that position the CP.
You must move the CP to the place where vou want to insert a string.
For example, if you want to insert a string at the beginning of the first
line, use a B command to move the CP to the beginning of the buffer.
With the CP positioned correctly, enter an insert string, as follows
iIn 1870, ^Z
This inserts the phrase “In 1870,” at the beginning of the first line,
DIGITAL RESEARCH™
6-17
Combining ED Commands CP/M 3 User’s Guide
The S command searches the memory buffer for the specified string,
but when it finds it, automatically substitutes a new string for the search
string. Whenever you enter a command in upper-case, ED automatically
converts the string to upper-case. The S command takes the form:
DIGITAL RESEARCH™
6-18
CP/M 3 User’s Guide Combining ED Commands
same line. ED executes the command string only after you press the
carriage return key. Use CP/M 3’s line-editing controls to manipulate
ED command strings.
While the examples in the previous section show the memory buffer
and the position of the character pointer, the examples in this section
show how the screen looks during an editing session. Remember that the
character pointer is imaginary, but you must picture its location because
ED’s commands display and edit text in relation to the character pointer.
DIGITAL RESEARCH™
6-19
Combining ED Commands CP/M 3 User’s Guide
make a change at the end of the line and you do not want to calculate
the number of characters before the change, as in the following example:
1: *T
1: Emily Dickinson said,
1: *L-7CT
said,
1: *
A T command types from the CP to the end of the line. To see the
entire line, you can combine an L command and a T command. Type
0lt to move the CP from the middle to the beginning of the line and
then display the entire line. In the following example, the CP is in the
middle of the line. 0L moves the CP to the beginning of the line. T types
from the CP to the end of the line, allowing you to see the entire line.
3: *T
sense of living
3: *0LT
3: the mere sense of living
3: *
The command 0TT displays the entire line without moving the CP.
2: *8CT
ecstasy in living -
2: *
4: *B#T
1: Emily Dickinson said,
2: "I find ecstasy in living -
DIGITAL RESEARCH™
6-20
CP/M 3 User’s Guide Advanced ED Commands
6.5.3. Editing
To edit text and verify corrections quickly, combine the edit com-
mands with other ED commands that move the CP and display text.
Command strings like the one that follows move the CP, delete specified
characters, and verify changes quickly.
1: *15C5D0LT
1: Emily DicKinson,
1: *
1: *2L2KB#T
1: Emily Dickinson said,
2: "I find ecstasy in living -
1: *
DIGITAL RESEARCH™
6-21
Advanced ED Commands CP/M 3 User’s Guide
Although you can display any amount of text at the screen with a T
command, it is sometimes more convenient to page through the buffer,
viewing whole screens of data and moving the CP to the top of each
new screen at the same time. To do this, use ED’s P command. The P
command takes the following forms:
nP, -nP
To display the current page without moving the CP, enter 0P. The
special character 0 prevents the movement of the CP. If you specify a
negative number for n, P pages backwards towards the top of the file.
n:
where n is the number of the destination line. This command places the
CP at the beginning of the specified line. For example, the command
4: moves the CP to the beginning of the fourth line.
DIGITAL RESEARCH™
6-22
CP/M 3 User’s Guide Advanced ED Commands
:ncommand
1: *2::4T
2: "I find ecstasy in living -
3: the mere sense of living
4: is joy enough."
2: *
DIGITAL RESEARCH™
6-23
Advanced ED Commands CP/M 3 User’s Guide
The F command performs the simplest find function; it takes the form:
nFstring
1: *2fliving
3: *
The character pointer moves to the beginning of the third line where
the second occurrence of the word “living” is located. To display the
line, combine the find command with a type command. Note that if
you follow an F command with another ED command on the same line,
you must terminate the string with a CTRL-Z, as follows
1: *2fliving^Z0lt
3: *the mere sense of living
If ED does not find a match for the string in the memory buffer, it
issues the message,
DIGITAL RESEARCH™
6-24
CP/M 3 User’s Guide Advanced ED Commands
BREAK "#" AT
where the symbol # indicates that the search failed during the execution
of an F command.
The N Command
nNstring
BREAK "*" AT
Because ED writes the searched data to the new file before looking
for more data in the source file, ED usually writes the contents of the
DIGITAL RESEARCH™
6-25
Advanced ED Commands CP/M 3 User’s Guide
buffer to the new file before finding the end of the source file and issuing
the error message.
Note: you must use the H command to continue an edit session after
the source file is exhausted and the memory buffer is emptied.
The J command inserts a string after the search string, then deletes
any characters between the end of the inserted string to the beginning
of the a third delete-to string. This juxtaposes the string between the
search and delete-to strings with the insert string. The J command
takes the form:
1: *#T
1: Emily Dickinson said,
2: "I find ecstasy in living -
3: the mere of living
4: is joy enough."
1: *jDickinson^Z told a friend^Z,
1: *0lt
1: Emily Dickinson told a friend,
1: *
If you combine this command with other commands, you must ter-
minate the delete-to string with a CTRL-Z or ESC, as in the following
example. If an upper-case J command letter is specified, ED looks for
DIGITAL RESEARCH™
6-26
CP/M 3 User’s Guide Advanced ED Commands
Note: if long strings make your command longer than your screen line
length, enter a CTRL-E to cause a physical carriage return at the screen.
A CTRL-E returns the cursor to the left edge of the screen, but does
not send the command line to ED. Remember that no ED command
line containing strings can exceed 100 characters. When you finish your
command, press the carriage return key to send the command to ED.
nMcommand string
DIGITAL RESEARCH™
6-27
Advanced ED Commands CP/M 3 User’s Guide
1: *mfliving^Z-6diLiving^Z0lt
2: "I find ecstasy in Living -
3: the mere sense of Living
BREAK "*" AT ^Z
3: *
DIGITAL RESEARCH™
6-28
CP/M 3 User’s Guide Advanced ED Commands
nZ
Usually, the Z command has no real effect unless you use it with a
macro command. The following example shows you how you can use
the Z command to cause a brief pause each time ED finds the word
TEXT in a file.
A›*mfliving^Z0tt10z
To move a group of lines from one area of your data to another, use
an X command to write the text block into a temporary LIB file, then
a K command to remove these lines from their original location, and
finally an R command to read the block into its new location.
nX
nXfilespec^Z
where n is the number of lines from the CP towards the bottom of the
buffer that are to be transferred to a file. Therefore, n must always be a
positive number. The nX command with no file specified creates a tem-
porary file named X$$$$$$$.LIB. This file is erased when you terminate
the edit session. The nX command with a file specified creates a file of
the specified name. If no filetype is specified, LIB is assumed. This file
is saved when you terminate the edit session. If the X command is not
the last command on the line, the command must be terminated by a
DIGITAL RESEARCH™
6-29
Advanced ED Commands CP/M 3 User’s Guide
The X command transfers the next n lines from the current line to
a library file. The R command can retrieve the transferred lines. The R
command takes the forms:
R
Rfilespec
DIGITAL RESEARCH™
6-30
CP/M 3 User’s Guide Advanced ED Commands
1: *41
: *R^ZB#T
1: "I find ecstasy in living -
2: the mere sense of living
3: is joy enough."
4: Emily Dickinson said,
1: *
You can save or abandon editing changes with the following three
commands.
DIGITAL RESEARCH™
6-31
Advanced ED Commands CP/M 3 User’s Guide
If you want to send the edited material to a file other than the original
file, use the following command:
A›ED filespec differentfilespec
If you then restart the edit with the H command, ED renames the
file differentfilename.$$$ to differentfilename.BAK and creates a new
file of differentfilespec when you finish editing.
O (Y/N)?
You must respond with either a Y or an N; if you press any other key,
ED repeats the question. When you enter Y, ED erases the temporary
file and the contents of the memory buffer. When the * prompt returns,
the character pointer is pointing to the beginning of an empty memory
buffer, just as it is when you start ED.
DIGITAL RESEARCH™
6-32
CP/M 3 User’s Guide ED Error Messages
Q (Y/N)?
You must respond with either a Y or an N; if you press any other key,
ED repeats the question. When you enter Y, ED erases the temporary
file, closes the source file, and returns control to CP/M 3.
BREAK “x” AT c
where x is one of the symbols defined in the following table and c is the
command letter where the error occurred.
DIGITAL RESEARCH™
6-33
ED Error Messages CP/M 3 User’s Guide
ED Error Symbols
Symbol Meaning
# Search failure. ED cannot find the string specified in
a F, S, or N command.
?c Unrecognized command letter c. ED does not recog-
nize the indicated command letter, or an E, H, O, or
Q command is not alone on its command line.
0 No. LIB file. ED did not find the LIB file specified in
an R command.
› Buffer full. ED cannot put anymore characters in the
memory buffer, or string specified in an F, N, or S
command is too long.
E Command aborted. A keystroke at the keyboard abort-
ed command execution.
F File error. Followed by either disk FULL or
DIRECTORY FULL.
BREAK "›" AT A
means that ED filled the memory buffer before completing the execution
of an A command. When this occurs, the character pointer is at the
end of the buffer and no editing is possible. Use the 0W command to
write out half the buffer or use an O or H command and reedit the file.
BREAK "#" AT F
means that ED reached the end of the memory buffer without matching
the string in an F command. At this point, the character pointer is at the
end of the buffer. Move the CP with a B or n: line number command
to resume editing.
DIGITAL RESEARCH™
6-34
CP/M 3 User’s Guide ED Error Messages
BREAK "F" AT F
DISK FULL
BREAK "F" AT n
DIRECTORY FULL
The following table defines the disk file error messages ED returns
when it cannot read or write a file.
End of Section 6
DIGITAL RESEARCH™
6-35
Appendix A
CP/M 3 Messages
DIGITAL RESEARCH™
A-1
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Bad character, re-enter
DIGITAL RESEARCH™
A-2
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Break "x" at c
DIGITAL RESEARCH™
A-3
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
CANNOT CLOSE:
Cannot close file
CANNOT CLOSE FILE.
CANNOT CLOSE DESTINATION FILE - filespec
DIGITAL RESEARCH™
A-4
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Cannot set both SYS and DIR.
DIGITAL RESEARCH™
A-5
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
.COM file required
DIGITAL RESEARCH™
A-6
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
CP/M Error on d: Invalid Drive
BDOS Function = xx File = filespec
DIGITAL RESEARCH™
A-7
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Device Reassignment Not Supported.
Enter new assignment or hit RETURN.
DIGITAL RESEARCH™
A-8
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Directory needs to be reformatted for date/time stamps.
DIGITAL RESEARCH™
A-9
CP/M 3 User’s Guide
Message Meaning
Drive defined twice in search path
DIGITAL RESEARCH™
A-10
CP/M 3 User’s Guide
Message Meaning
End of line expected
DIGITAL RESEARCH™
A-11
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
File already exists; Delete it? (Y/N)
file already exists, delete (Y/N)?
DIGITAL RESEARCH™
A-12
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
FILE NAME ERROR:
DIGITAL RESEARCH™
A-13
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Illegal Format Value.
DIGITAL RESEARCH™
A-14
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Invalid ASCII character
DIGITAL RESEARCH™
A-15
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Invalid drive.
DIGITAL RESEARCH™
A-16
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Invalid number.
DIGITAL RESEARCH™
A-17
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
INVALID PASSWORD
Invalid Password or Passwords not allowed.
DIGITAL RESEARCH™
A-18
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Invalid type for ORDER option.
DIGITAL RESEARCH™
A-19
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Memory conflict - cannot trim segment.
DIGITAL RESEARCH™
A-20
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Missing SCB value.
DIGITAL RESEARCH™
A-21
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
No disk space.
DIGITAL RESEARCH™
A-22
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
No more space in the header for RSXs or SCB
initialization.
DIGITAL RESEARCH™
A-23
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
No such file to rename.
DIGITAL RESEARCH™
A-24
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Option only for drives.
DIGITAL RESEARCH™
A-25
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Parameter Error.
DIGITAL RESEARCH™
A-26
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
QUIT NOT FOUND
DIGITAL RESEARCH™
A-27
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Requires CP/M 3.0 or higher.
DIGITAL RESEARCH™
A-28
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
START NOT FOUND
DIGITAL RESEARCH™
A-29
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
Unable to allocate Data deblocking buffer space.
DIGITAL RESEARCH™
A-30
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Unable to open: filename.SPR
DIGITAL RESEARCH™
A-31
CP/M 3 Messages CP/M 3 User’s Guide
Message Meaning
UNRECOGNIZED ITEM:
DIGITAL RESEARCH™
A-32
CP/M 3 User’s Guide CP/M 3 Messages
Message Meaning
Writing file: filespec
End of Appendix A
DIGITAL RESEARCH™
A-33
CP/M 3 User’s Guide
DIGITAL RESEARCH™
A-34
Appendix B
ASCII and Hexadecimal
Conversions
Table B-1 defines ASCII symbols, then Table B-2 lists the ASCII
and hexadecimal conversions. The table includes binary, decimal, hexa-
decimal, and ASCII conversions.
DIGITAL RESEARCH™
B-1
ASCII and Hexadecimal Conversions CP/M 3 User’s Guide
DIGITAL RESEARCH™
B-2
CP/M 3 User’s Guide ASCII and Hexadecimal Conversions
DIGITAL RESEARCH™
B-3
ASCII and Hexadecimal Conversions CP/M 3 User’s Guide
DIGITAL RESEARCH™
B-4
CP/M 3 User’s Guide ASCII and Hexadecimal Conversions
DIGITAL RESEARCH™
B-5
ASCII and Hexadecimal Conversions CP/M 3 User’s Guide
End of Appendix B
DIGITAL RESEARCH™
B-6
Appendix C
Filetypes
DIGITAL RESEARCH™
C-1
Filetypes CP/M 3 User’s Guide
Type Meaning
OVL Program overlay file. PL/I-80 compiler overlays files;
you can create overlay files with LINK-80.
PAS Pascal/MT+ source program filetype.
PLI PL/I-80 source program filetype.
PRL Page Relocatable file; a file that does not require an ab-
solute segment. It can be relocated in any Page Boundary
(256 Bytes).
PRN Printable file displayable on console or printer.
REL Relocatable file produced by RMAC and PL/I-80 that
can be linked by LINK-80.
SPR System Page Relocatable file; system files required to
generate CP/M 3, such as BNKBDOS.SPR, BDOS.
SPR, BIOS.SPR, and RESBDOS.SPR.
SUB Filetype required for submit file containing one or
more CP/M 3 commands. The SUBMIT program
executes commands in files of type SUB, providing a
batch execution mode for CP/M 3.
SYM Symbol table file. MAC, RMAC, and LINK-80 output
files of type SYM. SID and ZSID read files of type SYM.
SYS System file for CP/M 3.
TEX Source file for TEX-80™, the Digital Research text
formatter.
TOK Pascal/MT+ intermediate language file.
XRF Cross-reference file produced by XREF.
$$$ Temporary file.
End of Appendix C
DIGITAL RESEARCH™
C-2
Appendix D
CP/M 3 Control Character
Summary
DIGITAL RESEARCH™
D-1
CP/M 3 Control Character Summary CP/M 3 User’s Guide
Character Meaning
CTRL-P Echoes all console activity to the printer. The first
time you type CTRL-P, CP/M 3 rings a bell at your
console. You can use CTRL- P after you halt scrolling
with CTRL-S. A second CTRL-P ends printer echo;
no bell rings. CTRL-P has no effect if your system
does not include a printer.
CTRL-R Places a # at the current cursor location, moves the
cursor to the next line, and retypes any partial com-
mand you typed so far.
CTRL-S Stops screen scrolling. If a display scrolls by too fast
for you to read it, type CTRL-S. CTRL-Q restarts
screen scrolling.
CTRL-U Discards all the characters in the command line, places
a # at the current cursor position, and moves the cursor
to the next command line.
CTRL-X Discards all the characters in the command line, and
moves the cursor to the beginning of the current line.
DIGITAL RESEARCH™
D-2
CP/M 3 User’s Guide CP/M 3 Control Character Summary
Character Meaning
CTRL-E Forces a physical carriage return but does not send
the command line to CP/M 3. Moves the cursor to
the beginning of the next line without erasing the
previous input.
CTRL-F Moves the cursor one character to the right.
CTRL-G Deletes the character indicated by the cursor. The
cursor does not move.
CTRL-H Deletes a character and moves the cursor left one
character position.
CTRL-I Moves the cursor to the next tab stop. Tab stops are
automatically set at each eighth column. Has the same
effect as pressing the TAB key.
CTRL-J Sends the command line to CP/M 3 and returns the
cursor to the beginning of a new line. Has the same
effect as a RETURN or CTRL-M keystroke.
CTRL-K Deletes to the end of the line from the cursor.
CTRL-M Sends the command line to CP/M 3 and returns the
cursor to the beginning of a new line. Has the same
effect as a RETURN or CTRL-J keystroke.
CTRL-P Echoes all console activity to the printer. The first
time you type CTRL-P, CP/M 3 rings a bell at your
console. You can use CTRL-P after you halt scrolling
with CTRL-S. A second CTRL-P ands printer echo;
no bell rings. CTRL-P has no effect if your system
does not include a printer.
CTRL-R Retypes the command line. Places a # at the current
cursor location, moves the cursor to the next line, and
retypes any partial command you typed so far.
DIGITAL RESEARCH™
D-3
CP/M 3 Control Character Summary CP/M 3 User’s Guide
Character Meaning
CTRL-S Stops screen scrolling. If a display scrolls by too fast
for you to read it, type CTRL-S. CTRL-Q restarts
screen scrolling.
CTRL-U Discards all the characters in the command line, places
a # at the current cursor position, and moves the cursor
to the next line. However, you can use a CTRL-W to
recall any characters that were to the left of the cursor
when you pressed CTRL-U.
CTRL-W Recalls and displays previously entered command line
both at the operating system level and in executing
programs, if the CTRL-W is the first character en-
tered after the prompt. CTRL-J, CTRL-M, CTRL-U,
and RETURN define the command line contains
characters, CTRL-W moves the cursor to the end of
the command line. If you press RETURN, CP/M 3
executes the recalled command.
CTRL-X Discards all the characters left of the cursor and
moves the cursor to the beginning of the current
line. CTRL-X saves any characters right of the cursor.
End of Appendix D
DIGITAL RESEARCH™
D-4
Appendix E
User’s Glossary
back-up: Copy of a disk or file made for safe keeping, or the creation
of the back-up disk or file.
bit: Switch in memory that can be set to on (1) or off (0). Bits are
grouped into bytes.
DIGITAL RESEARCH™
E-1
User’s Glossary CP/M 3 User’s Guide
buffer: Area of memory that temporarily stores data during the transfer
of information.
DIGITAL RESEARCH™
E-2
CP/M 3 User’s Guide User’s Glossary
default: Currently selected disk drive and/or user number. Any com-
mand that does not specify a disk drive or a user number references
the default disk drive and user number. When CP/M 3 is first invoked,
the default disk drive is drive A, and the default user number is 0, until
changed with the USER command.
DIGITAL RESEARCH™
E-3
User’s Glossary CP/M 3 User’s Guide
DIR attribute: File attribute. A file with the DIR attribute can be
displayed by a DIR command. The file can be accessed from the default
user number only.
disk drive: Peripheral device that reads and writes on hard or floppy
disks. CP/M 3 assigns a letter to each drive under its control. For example,
CP/M 3 can refer to the drives in a four-drive system as A, B, C, and D.
editor: Utility program that creates and modifies text files. An editor
can be used for creation of documents or creation of code for computer
programs. The CP/M 3 editor is invoked by typing the command ED
next to the system prompt on the console. (See ED in Section 6 of this
manual).
DIGITAL RESEARCH™
E-4
CP/M 3 User’s Guide User’s Glossary
the computer cannot execute names and addresses, but it can execute
a program that prints all those names and addresses on mailing labels.
File Control Block: Structure used for accessing files on disk. Contains
the drive, filename, filetype and other information describing a file to
be accessed or created on the disk.
DIGITAL RESEARCH™
E-5
User’s Glossary CP/M 3 User’s Guide
input: Data going into the system, usually from an operator typing at
the terminal or by a program reading from the disk.
list device: Device such as a printer onto which data can be listed or
printed.
DIGITAL RESEARCH™
E-6
CP/M 3 User’s Guide User’s Glossary
megabyte: Over one million bytes; 1024 kilobytes. See byte and kilo-
byte. microprocessor: Silicon chip that is the Central Processing Unit
(CPU) of the microcomputer.
DIGITAL RESEARCH™
E-7
User’s Glossary CP/M 3 User’s Guide
DIGITAL RESEARCH™
E-8
CP/M 3 User’s Guide User’s Glossary
source file: ASCII text file that is an input file for a processing program,
such as an editor, text formatter, or assembler.
system attribute: File attribute. You can give a file the system attribute
by using the SYS option in the SET command. A file with the SYS
attribute is not displayed in response to a DIR command; you must
use DIRS (see Section 5). If you give a file with user number 0 the SYS
attribute, you can read and execute that file from anv user number on
the same drive. Use this feature to make your commonly used programs
available under any user number.
DIGITAL RESEARCH™
E-9
User’s Glossary CP/M 3 User’s Guide
utility: Tool. Program that enables the user to perform certain opera-
tions, such as copying files, erasing files, and editing files. Utilities are
created for the convenience of programmers and users.
End of Appendix E
DIGITAL RESEARCH™
E-10
Index
Symbols *M option (MAC™). . . . . . . . . . . . . . 5-68
-nL command (ED). . . . . . . . . . . . . . 5-35
:* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-39 -nP command (ED). . . . . . . . . . . . . . 5-36
? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 -nT command (ED). . . . . . . . . . . . . . 5-37
( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 [O] option (PIP) . . . . . . . . . . . . . . . . 5-78
[ ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 -Q option (MAC™). . . . . . . . . . . . . . 5-68
{ } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 -S option (MAC™). . . . . . . . . . . . . . . 5-69
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 -U command (ED). . . . . . . . . . . . . . . 5-37
as default drive. . . . . . . . . . . . . . . 5-114 -V command (ED). . . . . . . . . . . . . . . 5-37
# . . . . . . . . . . . . . . 3-4, 5-123, 5-127, 6-6
^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 A
as operator. . . . . . . . . . . . . . . . . . . 5-124
+1 option (MAC™). . . . . . . . . . . . . . 5-69 access mode. . . . . . . . . . . . . . . . . . . . 5-118
+L option (MAC™). . . . . . . . . . . . . . 5-68 ACCESS option (SET). . . . . . . . . . . 2-9
+M option (MAC™). . . . . . . . . . . . . 5-68 A command
+Q option (MAC™) . . . . . . . . . . . . . 5-68 ED. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34
+S option (MAC™). . . . . . . . . . . . . . 5-69 SID. . . . . . . . . . . . . . . . . . . . . . . . . 5-124
<cr>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 active text buffer. . . . . . . . . . . . . . . . . 5-33
< precedes input. . . . . . . . . . . . . . . . 5-131 add
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 line numbers. . . . . . . . . . . . . . . . . . 5-85
$$$ memory. . . . . . . . . . . . . . . . . . . . . . 5-64
filetype. . . . . . . . . . . . . . . . . . . . . . . . 5-4 RSX file. . . . . . . . . . . . . . . . . . . . . . 5-46
$Cd option (LINK™). . . . . . . . . . . . .5-65 address. . . . . . . . . . . . . . . . . . . . . . . . . . 5-65
$Id option (LINK™). . . . . . . . . . . . . .5-65 literal. . . . . . . . . . . . . . . . . . . . . . . . . 5-67
$ in SUB file. . . . . . . . . . . . . . . . . . . . 5-130 machine code. . . . . . . . . . . . . . . . . 5-67
$Ld option (LINK™). . . . . . . . . . . . . 5-65 ALL option
$Od option (LINK™) . . . . . . . . . . . . 5-66 DRIVES (DIR). . . . . . . . . . . . . . . 5-25
$P option (XREF™). . . . . . . . . . . . . 5-138 USERS (DIR). . . . . . . . . . . . . . . . 5-28
$Sd option (LINK™). . . . . . . . . . . . . 5-66 alter CPU state. . . . . . . . . . . . . . . . . 5-126
:00 records. . . . . . . . . . . . . . . . . . . . . . 5-85 alternative items. . . . . . . . . . . . . . . . . . 5-7
-1 option (MAC™). . . . . . . . . . . . . . . 5-69 ambiguous filespec. . . . . . . . . . . . . . . . 2-6
128-byte records. . . . . . . . . . . . . . . . . 5-26 A option
#A command (ED) . . . . . . . . . . . . . . 5-34 Input/Output. . . . . . . . . . . . . . . . . 5-68
[Gn] option (PIP). . . . . . . . . . 5-75, 5-78 LINK. . . . . . . . . . . . . . . . . . . . . . . . 5-64
-L option (MAC™). . . . . . . . . . . . . . . 5-68 PIP . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83
-M option (MAC™). . . . . . . . . . . . . . 5-68 Append command (ED). . . . . . . . . . 5-34
DIGITAL RESEARCH™
Index-1
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-2
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-3
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-4
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-5
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-6
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-7
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-8
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-9
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-10
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-11
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-12
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-13
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-14
CP/M 3 User’s Guide
DIGITAL RESEARCH™
Index-15