EasyManua.ls Logo

Commodore Plus 4 - Page 153

Commodore Plus 4
234 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...
OPEN
0PEN
ffle
#.
device
#
[.secondary
address
\
[/'filename,
type,
mode"]
-
-
-
The
OPEN
statement
allows
the
Plus/4
to
access
devices
such
as
the
cassette
recorder
and
disk
for
data,
a
printer,
or
even
the
screen
of
the
Plus/4.
The
word
OPEN
is
followed
by
a
logical
file
number,
which
is
the
number
to
which
all
other
BASIC
statements
will
refer.
This
number
is
from
1
to
255.
There
is
always
a
second
number
after
the
first
called the
device
number.
Device
number
0
is
the
Plus/4
keyboard,
3
is
the
Plus/4
screen,
1
is
the
cassette
recorder.
4
is
the
printer.
8
is
usually
the
disk.
A
zero
(0)
may
be
included
in
front
of
the
device
number
digit
(e.g.,
08
for
8,
which
are
interchangeable
for
the
Plus/4).
It
is
often
a
good
idea
to
use
the
same
file
number
as
the
device
number
because
it
makes
it
easy
to
remember
which
is
which.
Following
the
second
number
may
be
a
third
number
called
the
secondary
address.
In
the
case
of
the
cassette,
this
can be
0
for
read,
1
for
write,
and
2
for
write
with
end-
of-tape
marker
at
the
end.
in
the
case
of
the
disk,
the
number
refers
to
the
channel
number.
In
the
printer,
the
secondary addresses
are
used
to
set
the
mode
of
the
printer.
See
the Plus/4
Programmer's
Reference
Manual
or
the
manua^
for
each
specific
device
for
more
information
for
more
on secondary
addresses.
There
may
also
be
a
string
following
the
third
number,
which
could
be
a
command
to
the
disk
drive
or
the
name
of
the
file
on
tape
or
disk.
The
type
and
mode
refer
to
disk
files
only,
(File
types
are
prg.seq,
rel,
and
usr;
modes
are
read
and
write.)
EXAMPLES;
10
OPEN
3,3
10
OPEN
1,0
20
OPEN
1,1,0,"DOT"
OPEN
4,4
OPEN
15,8,15
OPENS
the
SCREEN
as a
device.
OPENs
the
keyboard
as
a
device.
OPENs
the
cassette
for
reading,
file
to
be
searched
for
is
named
DOT
OPENs
a
channel
to
use
the
printer.
OPENs
the
command
channel
on
the
disk.
144

Other manuals for Commodore Plus 4

Related product manuals