Technical information
Line Printer Output
LEVEL II BASIC
There are two statements for
output
to
the
Line Printer, LPRINT
and
LUST.
See
the
LEVEL II BASIC Reference Manual for details.
Note:
If
you
don't
have a line
printer
connected, LPRINT and
LUST
will cause
your
Computer
to
lock up, requiring
you
to
Reset
it. (Hold down BREAK while
you
press Reset.) Resetting
the
Computer
with
the
Expansion Interface connected will cause
you
to
lose any BASIC program in memory.
Assembly Language
Hex address 37E8
is
memory
mapped
to
the
Line Printer Card-Edge
and serves
as
an
input/output
port.
Before sending a
byte
to
this
port,
check enabled status bits:
PERIPHERALS
bit
7
6
5
4
if
set then status is
...
BUSY
OUT OF PAPER
DEVICE NOT SELECTED
NO FAULT
Note: Check
your
Line Printer Manual
to
see which status bits are
used.
When
the
Printer
is
READY, store
the
byte
(an ASCII code for
the
desired character)
in
hex address 37E8.
For
example,
if
the
ASCII coded character is stored in register C:
SUBROUTINE
TO
OUTPUT
A
BYTE
TO
A
LINE
PRINTER
LOAD
ASCII-CODED
CHARACTER
INTO
C-REGISTER,
THEN
CALL
PRTDVR
PRTDVR
LD
BIT
JP
LD
LD
RET
A,
(37E8H)
7,A
NZ
,PRTDVR
A,C
(37E8H)
,A
CHK
STATUS
BUSY
BIT
SET?
LOOP
WHILE
BUSY
GET
CHARACTER
SEND
IT
TO
LP
RETURN
15










