HMS81032E/HMS81032TL
50
Nov. 2001 Ver 2.00
A interrupt request is not accepted until the I-flag is set to “1”
even if a requested interrupt has higher priority than that of the
current interrupt being serviced.
When nested interrupt service is required, the I-flag should be set
to “1” by “EI” instruction in the interrupt service program. In this
case, acceptable interrupt sources are selectively enabled by the
individual interrupt enable flags.
Saving/Restoring General-purpose Register
During interrupt acceptance processing, the program counter and
the program status word are automatically saved on the stack, but
accumulator and other registers are not saved itself. These regis-
ters are saved by the software if necessary. Also, when multiple
interrupt services are nested, it is necessary to avoid using the
same data memory area for saving registers.
The following method is used to save/restore the general-purpose
registers.
Example: Register save using push and pop instructions
General-purpose register save/restore using push and pop instruc-
tions;
Figure 14-4 Timing chart of Interrupt Acceptance and Interrupt Return Instruction
V.L.
System clock
Address Bus
PC
SP
SP-1
SP-2
V.H.
New PC
V.L.
Data Bus
Not used
PCH
PCL
PSW
ADL
OP code
ADH
Instruction Fetch
Internal Read
Internal Write
Interrupt Processing Step
Interrupt Service Task
V.L. and V.H. are vector addresses.
ADL and ADH are start addresses of interrupt service routine as vector contents.
External Interrupt1
012
H
0E3
H
0FFF8
H
0FFF9
H
0E
H
2E
H
0E312
H
0E313
H
Entry Address
Correspondence between vector table address for External Interrupt1
and the entry address of the interrupt service program.
Vector Table Address
INTxx:
PUSH
A
PUSH
X
PUSH
Y
;SAVE ACC.
;SAVE X REG.
;SAVE Y REG.
interrupt processing
POP
Y
POP
X
POP
A
RETI
;RESTORE Y REG.
;RESTORE X REG.
;RESTORE ACC.
;RETURN
Summary of Contents for HMS81004E
Page 4: ...HMS81032E HMS81032TL NOV 2001 Ver 2 00...
Page 84: ...HMS81032E HMS81032TL 80 Nov 2001 Ver 2 00...
Page 85: ...APPENDIX...