EasyManua.ls Logo

Commodore 1570 - Page 49

Commodore 1570
132 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
l
----------------------
where:
"file
#"
is an integer (whole number) between I and 255. Do not open a disk
file
with a file number greater than
127
it will cause severe problems. After the
file
is open, all
other file commands will refer to it by the number given here. Only one
file
can use any
given
file
number at a time.
"device
#"
is
the number,
or
primary address,
of
the device to be used. This
number is
an
integer in the range 8-11, and
is
normally 8 on the 1571.
"channel
#"
is a secondary address, giving further instructions to the selected
device about how further commands are to be obeyed. In disk files, the channel number
selects a particular channel along which communications for this
file
can take place. The
possible range
of
disk channel numbers
is
0-15, but 0 is reserved for program loads, 1 for
program saves, and
15
for the disk command channel. Also be sure that no two disk files
have the same channel number unless they will never
be
open at the same time. (One way
to do this is to make the channel number for each
file
the same
as
its
file
number.)
"drive
#"
is the drive number, always 0 on the 1571. Do not omit it, or you will
only be able to use two channels at the same time instead
of
the normal maximum ofthree.
If
any pre-existing
file
of
the same name is
to
be replaced, precede the drive number with
the
"at"
sign
(@)
to request OPEN-WITH-REPLACE.
"file
name"
is the
file
name, maximum length
16
characters. Pattern matching
characters are allowed in the name when accessing existing files, but not when creating
new ones.
"file
type"
is the
file
type desired: S = sequential, P = program, U = user, A = ap-
pend and L
= length
of
a relative file.
"direction"
is the type
of
access desired. There are three possibilities: R = read,
W
= write, and M = modify. When creating a file, use
"w"
to write the data to diskette.
When viewing a completed file, use
"R"
to read the data from diskette. Only use the
"M"
(modify) option
as
a last ditch way
of
reading back data from
an
improperly closed
(Splat) file.
If
you try this, check every byte
as
it
is read to
be
sure the data is still valid,
as
such files always include some erroneous data, and have no proper end.
"file
type"
and
"direction"
don't have to be abbreviated. They can be spelled out
in full for clarity in printed listings.
"file
#"
,
"device
#"
and
"channel
#"
must be valid numeric constants, variables
or
expressions. The rest
of
the command must be a valid string literal, variable or
expression.
"w"
is an option that must be specified to write the sequential file, or the
file
will be
opened to read.
The maximum number
of
files that may be open simultaneously
is
10, including all
files to all devices. The maximum number
of
sequential disk files that can be open at once
is three (or two
if
you neglect to include the drive number in your OPEN statement), plus
the command channel.
41

Related product manuals