Commodore 128 System Manual page 268

Table of Contents

Advertisement

This program opens file " SEQFILE" and gets data until the ST
system variable indicates all data is input. A value of 0 indicates a
FALSE condition, nonzero is true. ST is normally 0.
DOPEN
Open a disk file for a read and/or write operation.
DOPEN #logical file number,"filename[,<S|P>]"[,Lrecord
length] [.Ddrive number] [<ON | ,>Udevice number] [,w]
where:
S
= Sequential File Type
P
= Program File Type
L
= record length = the length of records in a relative file only
W
= Write Operation (if not specified a read operation occurs)
This statement opens a sequential, program or relative file for a
read or write operation. The record length (L) pertains to a
relative file, which can be as long as 254. The "W" parameter is
specified only during a write (PRINT #) operation in a sequential
file. If it is not specified, the disk drive assumes the disk operation
to be a READ operation. Relative files are open for both READ
and WRITE operations at the same time.
The logical file number associates a number to the file for future
disk operations such as a read (input #) or write (print #)
operation. The logical file number can range from 1 to 255.
Logical file numbers greater than 128 automatically send a
carriage return and linefeed with each write (print #) command.
Logical file numbers less than 128 send only a carriage RETURN,
which can be suppressed with a semi-colon at the end of the
print # command. The default device number is 8, and the default
drive is 0.
EXAMPLES:
DOPEN#1, "ADDRESS",W
Open the sequential file number 1 (ADDRESS) for a write
operation.
17-26

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents