\
What Is A File?
Creating A File
Naming A File
One of CP/M's most important tasks is to access and maintain files
on your disks. Files in CP/M are fundamentally the same as in C128
or C64 modes—that is, they are collections of information. However,
CP/M handles files somewhat differently than do C128 and C64
modes. This section defines the two types of files used in CP/M; tells
how to create, name and access a file; and describes how files are
stored on your CP/M disks.
As noted above, a CP/M 3.0 file is a collection of information. Every
file must have a unique name by which CP/M identifies the file. A
directory is also stored on each disk. The directory contains a list of
the filenames stored on that disk and the locations of each file on the
disk.
There are two kinds of CP/M files: program (command) files, and
data files. A program file contains a series of instructions that the
computer follows step-by-step to achieve some desired result. A
data file is usually a collection of related information (e.g., a list of
names and addresses, the inventory of a store, the accounting
records of a business, the text of a document).
There are several ways to create a CP/M file. One way is to use a text
editor. The CP/M text editor ED is used to create and name a file. You
can also create a file by copying an existing file to a new location;
you can rename the file in the process. Under CP/M, you can use the
PIP command to copy and rename files. Finally, some programs
(such as MAC, a CP/M machine language program) create output
files as they process input files.
The ED and PIP commands are summarized in Section 14, together
with other commonly used CP/M commands. Details on these and all
other CP/M 3.0 commands may be found in the CP/M Plus User's
Guide, which you can obtain by responding to the off6r on the card
inserted in this chapter.
File Specification
CP/M identifies every file by a unique file specification. A file speci
fication can have four parts: a drive specifier, a filename, a file-
type and a password. The only mandatory part is the filename.
193
USING CP/M MODE—Files, Disks and Disk Drives In CP/M 3.0
Need help?
Do you have a question about the 128D and is the answer not in the manual?
Questions and answers