CHAPTER 3: PERIPHERAL CIRCUITS (Interrupt and Halt)
II-49
TI32RQ:
LD
Y,TMFSK
;
Address of timer factor flag buffer
FAN
MY,0001B ;
Check 8 Hz timer interrupt
JP
Z,IK0RQ
;
Jump if not 32 Hz timer interrupt
CALL
TINT32
;
Call 32 Hz timer interrupt service routine
IK0RQ:
LD
X,0EDH
;
Address of K00 to K03 input interrupt flag
FAN
MX,0001B ;
Check K00 to K03 input interrupt
JP
Z,INTEND ;
Jump if not K00 to K03 input interrupt
CALL
IK0INT
;
Call K00 to K03 input interrupt service
;
routine
INTEND:
EI
RET
The above program is normally used to restart the CPU
when in the halt state by interrupt and to return it to the
halt state again after the interrupt processing is completed.
The processing proceeds by repeating the
→
halt interrupt
→
halt
→
interrupt cycle.
The interrupt factor flag is reset when load by the software.
Thus, when using interrupts which interrupt factor flags are
in the same address at the same time, flag check must be
done after storing the data. For example, store the 1 word
including the factor flag in the RAM. (If check is directly
done by the FAN instruction, the factor flags of the same
address are all reset.)
Reading of interrupt factor flags is available at EI, but be
careful in the following cases.
If the interrupt mask register value corresponding to the
interrupt factor flags to be read is set to "1", an interrupt
request will be generated by the interrupt factor flags set
timing, or an interrupt request will not be generated.
Содержание E0C6001
Страница 4: ...Hardware E0C6001 I Technical Hardware ...
Страница 79: ...Software E0C6001 II Technical Software ...