User manual

Monitor12 (MON12) User Manual 05/30/01
5
OUTLHLF Convert left nibble of accumulator ‘A’ contents to ASCII and output
to terminal port.
OUTRHLF Convert right nibble of accumulator ‘A’ contents to ASCII and output
to terminal port.
OUTA Output accumulator A ASCII character.
OUTlBYT Convert binary byte at address in index register X to two ASCII
characters and output. Returns address in index register X pointing
to next byte.
OUTlBSP Convert binary byte at address in index register X to two ASCII
characters and output followed by a space. Returns address in index
register.
OUT2BSP Convert two consecutive binary bytes starting address in index
register X to four ASCII characters and output followed by a space.
Returns address in index register X pointing to next byte.
OUTCRLF Output ASCII carriage return followed by a line feed.
OUTSTRG Output string of ASCII bytes pointed to by address in index register
X until character is an end of transmission ($04).
OUTSTRGO Same as OUTSTRG except leading carriage return and line feed is
skipped.
INCHAR Input ASCII character to accumulator A and echo back. This routine
loops until character is actually received.
Utility jump subroutines for performing I/O tasks are shown below. These
subroutines are in ROM and are programmed as jumps. To use the jump subroutine,
execute a JSR to the applicable address shown below.
$FFAO JMP UPCASE Convert character to uppercase
$FFA3 JMP WCHEK Test character for whitespace
$FFA6 JMP DCHEK Check character for delimiter
$FFA9 JMP INIT Initialize I/O device
$FFAC JMP INPUT Read I/O device
$FFAF JMP OUTPUT Write I/O device
$FFB2 JMP OUTLHLF Convert left nibble to ASCII and output
$FFB5 JMP OUTRHLF Convert right nibble to ASCII and output
$FFB8 JMP OUTA Output ASCII character
$FFBB JMP OUTlBYT Convert binary byte to 2 ASCII characters and
output
$FFBE JMP OUT1BSP Convert binary byte to 2 ASCII characters and
output followed by space
$FFCl JMP OUT2BSP Convert 2 consecutive binary bytes to 4 ASCII
characters and output followed by space.
$FFC4 JMP OUTCRLF Output ASCII carriage return followed by line feed
$FFC7 JMP OUTSTRG Output ASCII string until end of transmission
(EOT / $04)
$FFCA JMP OUTSTRGO Same as OUTSTRG except leading carriage return and
line feed is skipped
$FFCD JMP INCHAR Input ASCII character and echo back