Monitor Subroutines - Sharp MZ-700 Series Owner's Manual

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

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
CALL LETNL
(0006)
Moves the cursor to the beginning of the next line.
Other
than AF
CALL PRINTS
(000C)
Other
than A F
CALL PRINTS
(000C)
Displays a space at the cursor position.
Other
than A F
CALL PRINTS
(0012)
Displays the character corresponding to the ASCII code stored
in ACC at the cursor position. See Appendix A. 1 for the
ASCII codes. No character is displayed when code 0D (carriage
return) or 11 to 16 (the cursor control codes) is entered, but
the corresponding function is performed (a carriage return for
0D and cursor movement for 11 to 16).
Other
than A F
CALL MSG
(0015)
Displays a message, starting at the position of the cursor. The
starting address of the area in which the message is stored must
be set in the DE register before calling this subroutine, and the
message must end with a carriage return code (OD).
The carriage return is not executed.
The cursor is moved if any cursor control codes (11 to 16) are
included in the message.
All
registers
CALL BELL
(003E)
Briefly sounds high A (about 880 Hz).
Other
A F
CALL MELDY
(0030)
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-
ment of the BASIC, and must end with 0D or C8.
When play is completed, control is returned to the calling pro-
gram with the C flag set to 0; when play is interrupted with
the | BREAK | kev. control is returned with the C flag set
to 1.
Other
than A F
CALL XTEMP
(0041)
Sets the musical tempo according to the tempo data stored in
the accumulator (ACC).
ACC <-01
Slowest speed
ACC
04
Middle speed
ACC
07
Highest speed
Note that the data in the accumulator is not the ASCII code
corresponding to 1 to 7 but the binary code.
All
registers
CALL MSTA
(0044)
Generates a continuous sound of the specified frequency.
The frequency is given by the following equation,
freq. = 895 kHz/nn'.
Here, nn' is a 2-byte number stored in addresses 11A1 and
11A2 (n in 11A2 and n' in 11A1).
BC and
DE
Generates a continuous sound of the specified frequency.
The frequency is given by the following equation,
freq. = 895 kHz/nn'.
Here, nn' is a 2-byte number stored in addresses 11A1 and
11A2 (n in 11A2 and n' in 11A1).
151-

Advertisement

Table of Contents
loading

Table of Contents