Closing The Command Channel; Closing The Data Channel - Commodore vic-1540 User Manual

Table of Contents

Advertisement

maximum number of files available for use.
CLOSING THE COMMAND CHANNEL
Closing the command channel closes all channels associated with the disk drive.
No other part of the logical file environment is affected. That is, the computer
does not recognize that the files have been closed.
The following example illustrates a situation in which several channels are closed
down by a single CLOSE command.
Example:
The command channel is opened.
OPEN3, 8, 2, "0:FILE1,SEQ, WRITE"
Data Channels are opened for
OPEN4, 8, 5, "O:FILE2, SEQ,WRITE"
writing.
PRINT#3, "IMPORTANT DATA"
PRINT#4, "MORE DATA"
OPEN3, 4
A channel is opened to the printer
by mistake.
?FILE OPEN ERROR?
An error message is displayed on
READY.
the screen.
a
Since there was an error, all logical files in the computer are closed, but the
channels in the disk drive are still open. To close the disk channels, type:
OPEN1,8,15
CLOSE1
Now all data channels in the disk drive are properly closed.
CLOSING THE DATA CHANNEL
The CLOSE command closes a file and the data or command channel associated
with it. Whenever you close a file opened with a write channel, the closing of
that file writes the final block of data to the disk and updates the disk directory.
When you close a file opened with a read channel, that channel is simply closed
down.
NOTE: When a drive is initialized with INITIALIZE, NEW, or VALIDATE, all
30

Advertisement

Table of Contents
loading

Table of Contents