Special Printer-Associated Commands; The Open Command; The Cmd Command - Commodore CBM Printer 4022 User Manual

Hide thumbs Also See for CBM Printer 4022:
Table of Contents

Advertisement

SPECIAL PRINTER-ASSOCIATED
COMMANDS
When
you want
to
print
something on your
printer,
essentially
what you
are
doing
is
transferring the
video screen function
to
the
printer.
A
few
special
BASIC commands
allow
you
to
make
this transfer.
Most
othe
r
BASIC
considerations
and
rules
remain
the
same. Always
remember
to
press the [return]
key
after
you
type
each
command.
The
OPEN Command
The
syntax
of
the
OPEN
command
is:
OPEN
Ifn.
dn, [sa]
This
command
sets
a
correspondence between
a
file
number
and
a physical device.
The//nor
logical
file
number may
be any
number
you choose
to
assign
to
your
file
from
1
to 255.
It
doesn't matter
which
number
you choose
as long as
you
remain
consistent
throughout your
set of
commands. The
dn
or
device
number
(also
known
as the primary address)
refers to
the
device
to
which you
wish
to
send
the
file.
In
the
case
of
the
printer,
the
number
must
be 4
since
that
is
the
number
assigned
to
it
at
the
factory.
NOTE:
If
you
should want
to
change
a printer
number, you can have
it
changed
by an
authorized
Commodore
technician.
See
your
Commodore
dealer
about
this.
(You might want
to
have
a
printer's
device
number changed
if
you have
two
printers
attached
to
your computer.
You
need
to refer to
each
of
them
individually;
hence, the
need
to
change one
of
the device
numbers.)
The
sa or
secondary address
is
somewhat
of
a
unique
concept.
It
alerts
the
printer's
microprocessor system
that
formatting
is
to
occur.
Secondary
addresses
are
thoroughly
discussed
starting
on page
21,
under
FORMAT
CONTROL.
The
CMD
Command
The
syntax
of
this
command
is:
CMD
Ifn
CMD
transfers control
from
the
computer
to
the
printer.
The//n
must
be
the
same
as
that
in
the
OPEN
statement
with
which
it
is
associated.
Unlike a
PRINT command,
the
line
or
bus
to
the
receiving
device
is
left
open.
The
line
or
bus
to
the receiving device
(in
this
case, the
printer)
is
said
to
be
"listening."
When
you
give the
CMD
command,
the
printer prints
READY
and
the red
LED
in
the
paper feed
button
lights
up
to indicate
the
printer
is
waiting
for further
commands.
If
you
follow a
CMD
command
with a
PRINT
or a
LIST
command,
the output
is
directed
to
the
printer.
14-

Advertisement

Table of Contents
loading

Table of Contents