EasyManua.ls Logo

Commodore Plus 4 - Page 384

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...
372
Using
Peripheral
Devices
chapter.
Commercial
software
may
or
may
not
be
able
to
access
an
RS232
printer.
When
selecting
a
printer,
make
sure
that
the
software
you
intend
to
use
will
access
it
properly.
Each
type
of
printer
accepts
a
different
set
of
commands.
Some
may
allow
the
printing
of
graphics
characters,
upper
and
lower
case,
custom
designed
charac
ters,
and
so
on.
It
is
not
possible
to
completely
describe
all
of
the
commands
accepted
by
every
type
of
printer
here.
Refer
to
the
manual
that
comes
with
your
printer
for
the
commands
it
accepts.
This
section
describes
the
method
of
accessing
any
printer
through
the
serial
port
and,
for
exemplary
purposes,
describes
the
commands
accepted
by
Commo
dore's
MPS-801
printer.
Using
a
Printer
with
BASIC
The
first
step
in
accessing
the
printer
is
to
issue
an
OPEN
statement:
OPEN
filenumber,devloe,seoondary
address
The
filenumber
is
the
logical
file
number
to
be
associated
with
the
printer.
It
can
be
0-255,
but
128-255
causes
a
linefeed
character
to
be
sent
after
the
carriage
return
at
the
end
of a
line.
The
MPS-801
does
a
carriage
return
and
linefeed
upon
receiving
a
carriage
return
character
or
a
linefeed
character.
As
a
result,
a
logical
file
number
from
128
to
255
causes
a
blank
line
after
each
printed
line.
Other
printers
may
react
differently
to
the
two
types
of
logical
file
numbers.
The
device
is
the
device
number;
it
is
generally
4
for
a
printer.
The
MPS-801
can
be
switched
between
4
and
5.
The
secondary
address
is
interpreted
by
the
printer.
Printers
generally
accept
commands
at
two
levels.
The
first
is
within
the
secondary
address
sent
to
the
printer
in
the
open
statement.
The
second
is
special
nonprinting
control
characters
that
the
printer
interprets.
The
MPS-801
accepts
only
two
values
for
the
secondary
address:
0
=
default
setting
is
upper
case/graphics
mode.
7
=
default
setting
is
upper/lower
case
mode.
Other
printers
may
accept
different
secondary
addresses
with
different
results.
Once
the
printer
file
is
open,
data
may
be
directed
to
the
printer
in
two
ways.
The
first
is
the
CMD
command.
This
is
particularly
useful
in
direct
mode
to
get
a
printout
of
the
program
currently
in
memory.
The
CMD
command
changes
the
default
output
device
to
the
file
named:
CMD
filenumber