EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 48

Radio Shack TRS-80 Model III
274 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...
TRS-80 MODEL III
To prevent this from happening,
make sure BASIC'S maximum line
length
(stored
in
address
1
6427)
is no
greater than that of
your
printer.
You can
find
your printer'
s
maximum line
length in the printer
owner' s manual
.
To
do an automatic top of form
(advancing the paper to the top of the
next
page)
,
print the ASCII
"Form Feed" code, decimal
12. For example, execute
the BASIC
statement:
LPRINTCHR$(12)
The
paper
will
advance by the following
amount:
Top
of
Form
=
Max. lines/page
Lines already printed
Each time
you
print
a form feed,
CHR$(12), BASIC resets the line
count
automatically.
Sometimes you may want to
reset the line count, for
example, after
manually
advancing the
paper to the top of form.
To do
this,
store a one in 16425:
POKE
16425,
1
Checking
the Printer
Status
Unlike
the Video Display,
the printer is not always
available . It
may be
disconnected,
off-line,
out-of-paper, and
so
forth.
In such cases, when
you
try
printer
output, the
Computer will wait until the
printer becomes
available. It will
appear to be "locked
up"
.
To regain keyboard
control (and cancel
the printer
operation), press
(BREAK] ,
Suppose
you
have
a program which
uses printer output. If
a printer is not available,
you don't want the
Computer
to stop and
wait
for it to become
available. Instead,
you
may
want to
print a message
like "PRINTER UNAVAILABLE"
and stop.
To accomplish
this, you need to check the printer status . The status is stored in
address 14312. AND this value with
240.
The result should equal 48. If it doesn't, that
means the Printer is unavailable
for some
reason, and printer output is
not possible.
For example, your program
could execute these statements:
100 ST"/.
=
PEEK
(14312) AND
240
120
IF
ST7.
< > 46 THEN PRINT
"PRINTER
UNAVAILABLE."."
STOP
130
PRINT
"PRINTER
IS
AVAILABLE"
38

Other manuals for Radio Shack TRS-80 Model III

Related product manuals