I
5.3
Monitor Subroutines
The following subroutines are provided for Monitor 1Z-013A. Each subroutine name symbolically
represents
the
function
of
the corresponding subroutine. These subroutines can be called from user
programs.
Registers saved are those whose contents are restored when control is returned to the calling program.
The contents
of
other
registers are changed
by
execution
of
the subroutine.
Name
and
entry
point
(hex.)
Function
Register
saved
CALLLETNL
Moves
the
cursor
to
the beginning
of
the
next
line.
Other
(0006)
than AF
CALL
PRINTS
Displays a space
at
the cursor position.
Other
(OOOC)
than
AF
Displays the character corresponding
to
the ASCII code stored
in
ACC
at
the
cursor position. See Appendix
A.
1 for the
CALL
PRINTS
ASCII codes. No character
is
displayed when code
OD
(carriage
Other
(0012)
return)
or
11
to
16
(the
cursor control codes) is entered,
but
than
AF
the
corresponding function
is
performed (a carriage return for
OD
and
cursor movement for
11
to 16).
Displays a message, starting at the position
of
the cursor. The
starting address
of
the area in which the message
is
stored
must
CALLMSG
be set in
the
DE register before calling this subroutine, and the
All
(0015)
message
must
end with a carriage return code
(OD).
registers
The carriage
return
is
not
executed.
The cursor
is
moved
if
any cursor control codes (
11
to 16) are
included in
the
message.
CALL BELL
Briefly sounds high A (about
880 Hz).
Other
(003E)
AF
Plays music according
to
music data stored in the memory area
starting at the address indicated in the DE register. The music
data
must
be in
the
same format
as
that
for the MUSIC state-
CALLMELDY
ment
of
the
BASIC, and
must
end with
OD
or
C8.
Other
(0030)
When play
is
completed, control
is
returned
to
the calling pro-
than
AF
gram with
the
C flag set
to
0; when play
is
interrupted with
the
I BREAK I key, control is returned with the C flag set
to
1.
-
Sets the musical
tempo
according
to
the
tempo
data stored in
the accumulator (ACC).
CALLXTEMP
Acc~ol
Slowest speed
All
(0041)
ACC~04
Middle speed
registers
Acc~o7
Highest speed
Note
that
the
data in the accumulator
is
not
the ASCII code
corresponding
to
1
to
7
but
the
binary code.
Generates a continuous sound
of
the
specified frequency.
CALLMSTA
The frequency
is
given
by
the following equation.
BC
and
(0044)
freq. = 895
kHz/nn'
.
DE
Here,
nn'
is
a 2-byte
number
stored in addresses 11A1 and
11A2 (n in 11A2 and
n'
in
llAl).
----
--
--------------------
----
--------------
--
------
--
--------
-------151