•
The pause flag
The pause flag is a one-bit flag used to pause the playing. If it is set, the
performance is stopped temporarily until it is reset. The following pro-
gram use port A bit 0 to toggle pause mode when playing.
; Example of toggling the pause flag
; Pa.0 is configured as input, pull-high and a switch button is
; connected
; between pa.0 and VSS.
pa
equ
[12h]
acc
equ
[05h]
#include voice.inc
code .section at 0 ’code’
org
0
jmp
begin
org
8
jmp
AdpcmISR
begin:
set
[22H]
again:
speech 0, 12H, 1
waiting:
sz
standby
jmp
again
sz
pa.0
jmp
waiting
clr
acc
Loop:
sdz
acc
jmp
Loop
sz
pa.0
jmp
waiting
sz
pause
; toggle pause
jmp
ps1
set
pause
jmp
Pa0Release
ps1:
clr
pause
Pa0Release:
; wait until pa.0 release
snz
pa.0
jmp
Pa0Release
jmp
waiting
end
•
The stop flag
The stop flag is a one-bit flag used to terminate the playing. If it is set,
the performance is stopped. Playing has to be restarted if this flag is used
to terminate playing. In the following program, the playing is terminated
if port A bit 0 is set low for a short period of time.
HT-IDE User’s Guide
154
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...