Commodore 2001-8 User Manual page 72

Table of Contents

Advertisement

10 seconds of leader
192 character file header block
2 seconds of leader
192 character data block
Data file
2 seconds of leader
Last block of this file
10 seconds of leader
192 character file header block
2 seconds of leader
Program file
10 byte
t
32K byte
program block
2 seconds of leader
optional 192 characters
end of tape header
Figure 7.14. An example of multiple file structure.
LOGICAL FILE 110 OPERATIONS: GENERAL
These operations can be subdivided into three steps:
a) Open the file -tell the PET everything it needs to know about the file.
b) Read data from, or write data to the logical files.
c) Close the file - allow the PET to clear up the device and terminate the active file.
These steps are discussed in detail on the following pages.
OPENING FILES
In order to tell BASIC about the file you want to operate on, it is first necessary to open the file. This is
done by the following statement:
OPEN logical file, device, secondary address, file name
More specifically, the statement consists of the command OPEN followed by the logical file number,
then the device number to which the file is assigned, then the secondary address data (if any)
communicated during the interaction of BASIC with the file, and last, the name of the physical file (if any).
69

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pet 2001-8

Table of Contents