Service manual

Page 6 LEVEL7 Non-Maskable Interrupt Debugger
Rev. B02
Support Functions
We provide the following macros, which interface to internal LEVEL7 routines to provide for I/O and
common conversions:
CHROUT
Outputs a character to the terminal. The character should be placed
in D1.
STROUT adr
Outputs a string to the terminal. adr is the address register or label
where the string is located. STROUT behaves like the TTYL monitor
call; it does NOT handle immediate strings like the TYPE monitor
call.
HEXOUT nib,{mem}
By default, HEXOUT outputs a hex value to the terminal. The value
should be placed in D1. The required nib argument can be a data
register or immediate value specifying the number of nibbles to
output. Specifying a value for the optional mem argument causes
HEXOUT to send its output to a buffer indexed by A2.
DECOUT {memory}
By default, DECOUT outputs a decimal value to the terminal. The
value should be placed in D1. The {memory} argument is optional.
Specifying a value for the optional memory argument causes
DECOUT to send its output to a buffer indexed by A2.
CHRIN
Reads a character from the keyboard and returns it in D1. If there is
a serial communications error, CHRIN returns NE status.
STRIN
Reads a string from the keyboard. The entered string is indexed with
A2 upon return. If ^C is entered, STRIN returns NE status.
HEXIN {memory}
By default, HEXIN inputs a hex value from the keyboard and returns
it in D1. If a ^C is entered or the input is invalid, HEXIN returns NE
status. Specifying a value for the optional memory argument causes
HEXIN to process input from a buffer indexed by A2.
A nice feature provided by HEXIN involves the use of stacked
registers. If a user specifies a data or address register in the input,
HEXIN automatically and transparently handles it.
DECIN {memory}
By default, DECIN inputs a decimal value from the keyboard and
returns it in D1. If a ^C is entered or the input is invalid, DECIN
returns NE status. Specifying a value for the optional memory
argument causes DECIN to process input from a buffer indexed by
A2.
UNPAK
Converts RAD50 to ASCII. The RAD50 value should be indexed
with A1. A2 should reference a buffer for the ASCII conversion. The
UNPAK call operates like the UNPACK monitor call.
PAK
Converts ASCII to RAD50. The ASCII value should be indexed with
A2. A1 should reference a buffer for the RAD50 conversion. The
PAK call operates like the PACK monitor call.