Z
ILOG
RST 20H Services
The monitor program offers a number of console I/O services using the RST 20 instruction. These
services have advantages over direct I/O to the ASCI or ESCC registers—they implicitly use the
console port that the user has selected.
Prior to the RST 20h, the user should set the B register to identify the services required, from the
following list. No registers are changed except as indicated.
The TSTRST20. HEX program, which is on the Z80185 Source Diskette, can be used to test the RST
20 instruction.
(B)
Name
0
out_char
1
in_char
2
test_char
3
out_a
4
out_hl
5
in_hl
6
message
3-16
Service Performed
Waits, if necessary, for monitor console device to be ready for output,
then outputs the ASCII character in A. A is not changed.
Waits, if necessary, for user to press a key on the monitor console
device; returns its ASCII value in A.
Returns NZ condition code if user has pressed a key on the monitor
console device, else returns Z. A is not changed.
Waits, if necessary, for monitor console device to be ready for output,
then outputs the 8-bit hexadecimal value in A. A is changed.
Waits, if necessary, for monitor console device to be ready for outputs,
then outputs the 16-bit value in HL. A is changed.
Waits for user to enter a hexadecimal value on the monitor console
device, and returns it in HL. Terminating characters are as in monitor
hex entry; the terminating character is returned in A.
Outputs a null-terminated string—pointed to by HL—on the monitor
console device. HL is advanced over the terminating null. A is not
changed.
Z80185/195 D
K
EVELOPMENT
IT
U
'
M
SER
S
ANUAL
UM951800100
Need help?
Do you have a question about the Z8018500ZCO and is the answer not in the manual?
Questions and answers