What Is A File; Creating A File - Commodore 128 System Manual

Table of Contents

Advertisement

WHAT IS A FILE?

One of C P /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).

CREATING A FILE

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 following the
instructions on the coupon enclosed in the box in which the C128
computer is supplied.
12-3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents