EasyManua.ls Logo

Radio Shack TRS-80 DWP-210 - Page 22

Radio Shack TRS-80 DWP-210
42 pages
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...
Sending
Control
Codes
from BASIC
Some
Printer
features
are
activated by
a
single
code,
but
many
functions
require
a
sequence
of two
or
more
codes.
Most
multiple
code
sequences
begin
with
de-
cimal
27
(referred
to as
the
"ESCape"
code).
The ESC
code
notifies
the
Printer
that a
special
sequence
is on its
way.
The
next
code(s)
sent
determine
which
Printer
feature is
selected.
In BASIC,
use CHR$
(
)
to
send
these
codes to
the
Printer.
For
instance,
set up
the
DWP-210
as
described
earlier
and
enter BASIC
in
the
normal way.
Then
type
the following
short
program:
10
LPRINT CHR$
(15);
"UNDERLINE" CHR$
(14);
"NO
UNDERLINE"
and
RUN
it.
Roll
the
paper
forward
and
look
at
the results.
The
word
UNDERLINE
was
underlined
and
the words
NO
UNDERLINE
were not
underlined.
Why?
The
codes CHR$
(15)
and
CHR$
(14)
are the
guilty
parties.
Take a
quick
look
at
the
following
chart.
This
chart
shows
the
various
code
sequences
understood
by
the
DWP-210.
DWP-210
Control
Codes
Code
decimal
Mnemonic
Hexa-
Decimal
Function
LF
OA
10
Feeds
the paper by
one line at a
time.
The line
spacing is
1/6".
CR
OD
13
Effects
Carriage
Return and Line
Feed
in normal
mode.
However,
if
the
Printer
receives this code
after
27
21,
it
performs
only Carriage
Return.
Returns to
normal
mode
when
a
27
22 is
received.
SP
20
32
Moves the
Carriage
one character
position.
However, two
or more SP
codes received
in
succession do
not
cause
successive spacing,
but
they
do
effect
high-sheed
tabulation. The
Carriage
moves
even if no
character
data
is received
within 50
ms
after an
SP code.
SO
OE
14
Ends
the automatic
underline
print
function.
The
Printer is in this
mode when you
turn it
on.
SI
OF
15
Starts
the automatic
underline
print
function.
Characters
except space
are
underlined.
ESC SO
1BOE
27
14
Sets
the character
spacing
to 1
/1
2"
pitch. It overrides
the Pitch
Select
Switch setup.
14
continued

Related product manuals