home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
F
/
GO-CPM.ZIP
/
CP_M-HOW.HLP
< prev
next >
Wrap
Text File
|
1987-06-26
|
12KB
|
298 lines
What the word "prompt" means when using CP/M
Specifying which disk drive
File names and file types
CP/M's built-in commands (always in memory)
Where to obtain books about using CP/M
:PROMPT.
The term "prompt" is used to describe the condition where the
computer has finished one task, and is waiting for you to tell
it what to do next.
After booting up CP/M, the first prompt you're likely to see is
the A> prompt, ...called the "A" prompt. This indicates that
CP/M is ready, and waiting for your command. The letter "A" means
that CP/M is going to assume your next command has to do with the
A: disk drive, unless you specify another one.
When you have the A> prompt, you can omit the A: prefix to any
program names or file names in your commands. In this case, the A:
disk drive is said to be the "default" drive, or the "logged-in"
drive. For example: A>DIR A: is equivalent to A>DIR.
Some programs have their own prompt, such as an asterisk or dash.
Sometimes they print a brief message to prompt you, such as;
"Enter your choice: (Y-N) ....meaning Yes or No.
When you reply to a prompt, you key in the information, look at it
on the display screen, and correct it if necessary using the backspace
key. When you have it correct on the display screen, press the
RETURN key to send the information into the computer.
:SPECIFYING WHICH DISK DRIVE.
The reason for having to specify the disk drive in your commands
is that the computer must be told WHERE to go look for you program
or file since there may be more than one disk drive on your computer.
CP/M accepts disk addresses A: through P:, but you probably do not
have more than a few.
No matter which command you give to CP/M, it will need to know which
disk you're referring to. So it makes sense for CP/M to "assume" you
mean one particular drive (such as A:) if you omit the information
from your command. This saves you time and effort. For this reason,
CP/M makes an assumption that the A: drive is the one you want as the
default/logged-in drive. You can change that easily if you like.
You may switch the default from drive A: to drive B: by typing:
A>B:<cr> ...'B:' followed by carriage return (RETURN key).
You may switch from drive B to drive A by typing:
B>A:<cr>
As you can see, you switch to a drive by typing its name,
(A or B) followed by a colon (:) and a carriage return <cr>.
The colon is very important; that is what tells CP/M that you
are referring to a disk drive. All device names under CP/M end
in a colon; for example CRT: is the display screen, and PRN:
refers to the printer.
:FILE NAMES AND FILE TYPES.
Information saved on disks is grouped under FILENAMEs. Just
as you might label a file folder in a meaningful way, so it
is with computer filenames. The computer USER makes-up the
filenames. It is important to do so with some scheme; there
are suggestions below.
EXAMPLES: MBASIC.COM
^ ^
| |
| ----FILETYPE---- optional 1-3 char.
|
|
----FILENAME---- required 1-8 characters.
JOHN1225 no filetype, so no period.
A FILENAME consists of a required "filename" portion, and
an optional "filetype" portion. The filename may be one to
eight characters in length, and may contain any letter A-Z,
any numeral 0-9, and a few "special characters" are allowed
such as an asterisk, ampersand, slash, and dash.
Note that certain characters ARE NOT allowed:
period used to divide the filename from filetype.
space CP/M treats this as the end of the filename.
..you may never use a space WITHIN a filename.
dollar sign should be avoided since CP/M uses these
for temporary names...until a job completes
successfully.
All the rules for filenames apply to "program" names. Properly
speaking, program names are filenames, too.
A FILETYPE is an optional one, two, or three character
extension to the filename. It is preceeded by a period.
There is no space before or after the period. The same
characters are allowed.
Common filetypes: .ASM assembly language source file.
.BAS Basic program (requires MBASIC.COM)
.COM a command file; this is a program
that is ready to execute at your
command.
.DOC documentation or instructions
on how to use some program(s).
:BUILT-IN COMMANDS WITH CP/M.
The following commands are NOT files on a disk, they are inside
the CP/M program which is always in the computer. You do not need
to have files by these names on some disk!
CP/M has 6 built in commands:
TYPE DIR USER ERA SAVE REN
^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^ ^^^^ These three are normally not
^^^^^^^^^^^^ ^^^^ operative on remote computers.
^^^^^^^^^^^^ ^^^^
^^^^^^^^^^^^ ^^^^
^^^^^^^^^^^^ User function often restricted on remote
^^^^^^^^^^^^ computers.. ie. 0 only, or 0-4 only.
^^^^^^^^^^^^ Password may be reqd for higher user numbers.
^^^^^^^^^^^^
^^^^^^^^^^^^
Type and Dir commands frequently use enhanced programs
to perform these functions. MLIST is often substituted for TYPE
to enable you to list more than one file with one command.
Enhanced DIR directory listings are usually alphabetical, and
show file sizes, space used on diskette, and space remaining.
TYPE is used to view any "ASCII" (American Standard Code for
Information Interchange) file. An ASCII file is readable by
humans; there is no computer gobbledegook in it. Documentation
files, and those created with a word processor are examples of
ASCII files.
The TYPE command followed by the filename and <cr> will cause
the file to be displayed on the CRT screen.
The display will tend to race past you very quickly, so have
your left hand ready to hold-down the CTRL (control) key, and
press S to start and stop the display movement.
This is referred to as CTL-S, or sometimes ^S since the ^ is
the symbol for the control character.
CTL-C ends the TYPE function and returns you to an A> prompt.
Example: TYPE SAMPLE.DOC<cr>
Note that CP/M can take lower case characters the same as
upper case. I'm just using UPPER CASE in the examples for
emphasis.
DIR is used to list the names of files on the current USER
area of the disk. Typing just DIR causes all file names on
the current drive to be typed. You can ask for specific
files or a specific drive by typing:
A>DIR drive:filename.filetype<cr>
For example:
A>DIR B:TEST.ASM<cr> ...will see if TEST.ASM is on drive B.
More commonly, DIR is used with "Wild Card" options: *
and/or ? may be used, where * means match any name from this
character on, ? means match any character in this particular
position.
Example: DIR *.ASM<cr> lists all .ASM files
DIR A*.ASM<cr> lists all .ASM files starting with A
DIR TEST.*<cr> lists all files (TEST.ASM, TEST.COM)
You will probably use a program called D.COM instead of DIR
because D.COM will sort the filenames alphabetically, show the
space used by each, show the total space used, and show the
total space remaining on that disk. Such programs may also be
called SD (for sorted directory), D4 for 4-up, etc.
The single advantage of DIR over D is that DIR lists the filenames
in the sequence they are on the disk rather than alphabetically. When
copying files with PIP.COM, they are copied in the DIR sequence rather
than alphabetically. Should the copying halt because of running out
of space, or an error, then using DIR on the source and destination
disks will show you where to continue, and which files are yet to
be copied.
USER is used to set the current "user number", which
determines what portion of each diskette you may currently
access. This enables you to group files according to project
or topic. CP/M can support up to 16 user numbers, 0 thru 15.
To set the user number to "2", type:
A>USER 2<cr>
To set the user number to "0", type:
A>USER 0<cr>
You usually make use of only USER 0 on a single-user system.
Some remote computers, or those with large disk capacity use
the USER numbering to partition the disks for convenience of
smaller directory listings, or for the protection of one user
from another where both may be using the same disk.
You are urged to avoid the USER command unless told to do so.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Often, access to higher user numbers requires a password. You
can request one by leaving a message for the SYSOP (System
Operator).
ERA erases one or more files. U S E W I T H C A R E ! !
For example:
A>ERA B:TEST.ASM<cr> ...erases TEST.ASM on the B: disk.
It also works with "wildcards", for example:
ERA B:ABC?????.* ...erases all files from B: which begin
with the letters ABC.
It is good practice to do a directory listing immediately before
any erasing. Be sure you will not accidentally erase some file(s)
that you intend to save. Be SURE you really have that backup copy
you "think" you have. If in doubt, don't erase. Once you do, it's gone!
>>>>>>>>>>>>>> THINK BEFORE YOU USE ERA. <<<<<<<<<<<<<<<<<<<<<<<
>>>>>> ARE YOU POINTING TO THE CORRECT DISK ???? <<<<<<<<<<<<<<<<
SAVE is used to save a block of memory on disk, such as
after modifying a program (xxx.COM file) with the debugger.
This command should be used ONLY by an experienced assembly
language programmer, or under the direction of one.
DO NOT use the SAVE command unless told to do so.
:::::::::::::::::::::::::::::::::::::::::::::::::
REN is used to rename a file, where the format is:
REN newname.newtype=oldname.oldtype<cr>
For example:
A>REN JUNK.ASM=TEST.ASM<cr> ...rename TEST to JUNK
------------------- Running Command Files ------------------
If you type a command which is NOT one of the built-in
commands, CP/M takes the name to be and executable program,
...that is, one with a .COM filetype assumed to be on it.
CP/M therefore tries to load a .COM file with the name you
specified in your command, and to pass control to it.
For example, A>D B: would cause CP/M to search on the
A: disk for a program called D.COM,
and if found to load it into the
computer and turn control over to it.
The B: in our example would tell the
D.COM program to do a directory of B:.
Note that you DO NOT include the .COM
in your entry.
For example, the program "SURVEY.COM" displays a system
survey, and shows details on disk and memory usage. To
execute it, A>B:SURVEY<cr>. CP/M looks up the name, finds
it is not a built-in command, and then goes to the B: disk,
finds SURVEY.COM, loads it in, and transfers control to it.
:---------- Where to Get More Information on CP/M ----------
For the "newcomer" to CP/M, the Digital Research
documentation is a little bit "heavy"...let me suggest that
you get a copy of:
The CP/M Handbook with MP/M(tm); by Rodnay Zaks, SYBEX, 2344
Sixth Street, Berkeley, CA 94710
CP/M Summary Guide for Version 1.4 & 2.0; by Bruce A.
Brigham, The Rosetta Stone P.O. Box 35, Glastonbury, CT
06025.
CP/M User Guide by Thom Hogan, Osborne/McGraw Hill, Berkeley,
California.
CP/M Primer by Steven M. Murtha & Mitchell Waite, Howard W.
Sams & Co., Inc. Indianapolis, Indiana.
Using CP/M - A Self Teaching Guide by Judi N. Fernandez & Ruth
Ashley, John Wiley & Sons, Inc. New York, New York.
*****************************************************************
th
Ashley, John Wiley & Sons, Inc. New Y