Open; Open Command - Commodore 2031 User Manual

Hide thumbs Also See for 2031:
Table of Contents

Advertisement

In order to perform verification of the last file saved without re-typing the
filename, confirm by following these steps:
STEP 1:
Write a short program and save it.
STEP 2:
Clear the screen.
STEP 3:
Type VERIFY"*",8
The VERIFY function will be performed comparing the last file saved
contents of memory.
This command sets up a correspondence between a logical file number and a file
which exists on disk. It also reserves the buffer space within the disk unit for
operations on the file being opened.
The format of the complete OPEN command is:
Where:
dn = the device number; in this case 8
sa = the secondary address. It may be any number from 2 to 14 and
dr = the drive number: 0
fn = the name of the file.
ft = the file type. It may be SEQ (for sequential), USR (for user),
mode describes how the channel is to be used. It may be either
READ (R) or WRITE (W).
Secondary address 15 is the command and error
channel and has special uses which are discussed in
subsequent chapters. Secondary addresses 0 and 1
are reserved by the operating systems (BASIC and
DOS) for LOADing and SAVEing programs.
Examples:
OPENlfn,dn,sa,"dr:fn,ft,mode"
lfn = the logical file number
may be used either for input or output as specified in mode. See
note below.
REL (for relative) or PRG (for program).
OPEN2,8,2,"0:FILE1,SEQ,WRITE"
OPEN3,8,9,"0:TESTDATA,PRG,WRITE"
OPEN8,8,8,"0:NUM,USR,READ"
NOTE
to the

OPEN

31

Advertisement

Table of Contents
loading

Table of Contents