EasyManua.ls Logo

Commodore Plus 4 - Page 338

Commodore Plus 4
464 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...
326
Using
Peripheral
Devices
The
filenumber
is
the
logical
number
to
be
associated
with
this
file.
It
is
for
reference
purposes
only
and
can
be
0-127
(128-255
will
send
a
linefeed
character
following
every
carriage
return).
The
device
is
the
device
number
of
the
disk
drive.
The
secondary
address
is
the
channel
number
to
be
used.
For
a
data
file
it
should
be
2-14,
and
when
more
than
one
data
file
is
in
use,
each
must
use
a
different
channel.
Channel
numbers
0
and
1
are
used
by
the
DOS
for
saving
and
loading
and
are
not
normally
used
in
programs.
Channel
number
15
is
the
command
channel,
discussed
in
the
diskette
maintenance
and
direct-access
programming
sections.
The
last
parameter
consists
of
the
file
name
(a
string
expression
of
up
to
16
characters),
the
type
of
file,
and
the
mode
of
access
separated
by
commas.
If
omitted,
the
mode
is
assumed
to
be
read,
and
the
type of
file
is
the
same
as
when
the
file
was
created.
The
type
of
file
can
be
-
S
for
sequential
->
P
for
program
T
L
for
relative
~
U
for
user
The
mode
can
be
W
for write
R
for
read
After
the
file
is
open,
output
may
be
directed
to
it
by
referring
to
its
logical
file
number
in
a
PRINT#
or
CMD
command.
Input
may
be
received
from
it
by
referring
to
its
logical
file
number
in
an
INPUT#
or
GET#
command.
When
the
input
to
or
output
from
a
file
is
complete,
the
file
must
be
closed
with
CLOSE
filenumber
where
filenumber
is
the
logical
file
number
of
the
file
to
close.
Sequential
Files
The
most
straightforward
type
of
data
file
is
the
sequential
file.
It
is
opened
with
a
file
type
parameter
of
S.
After
a
sequential
file
is
opened,
each
byte
that
is
sent to
it
is
stored
sequentially
on
the
disk.
The
format
of
the bytes
written
to
a
sequential
file
must
be
designed
with
the
method
of
retrieval
in
mind.
If
they
are
to
be
read
one
at
a
time
by
the
GET#
command,
any
format
is
all
right.
However,
if
they
are
to
be
read
by
the
INPUT#
command,
care
must
be
taken
to
store
comma
characters
between
values
and
carriage
return
characters
between
lines
of
input.