GMS81C1102 / GMS81C1202
System clock
Instruction Fetch
Address Bus
SP-2
PSW
V.L.
V.H.
New PC
SP
SP-1
PC
Not used
PCH
PCL
V.L.
ADL
ADH
OP code
Data Bus
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.
Figure 19-3 Timing chart of Interrupt Acceptance and Interrupt Return Instruction
The following method is used to save/restore the general-
Basic Interval Timer
Vector Table Address
purpose registers.
Entry Address
Example: Register save using push and pop instructions
012H
0E3H
0FFE6H
0FFE7H
0EH
2EH
0E312H
0E313H
INTxx: PUSH
PUSH
A
X
Y
;SAVE ACC.
;SAVE X REG.
;SAVE Y REG.
PUSH
interrupt processing
Correspondence between vector table address for BIT interrupt
and the entry address of the interrupt service program.
POP
POP
POP
RETI
Y
X
A
;RESTORE Y REG.
;RESTORE X REG.
;RESTORE ACC.
;RETURN
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.
General-purpose register save/restore using push and pop
instructions;
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 se-
lectively enabled by the individual interrupt enable flags.
main task
acceptance of
interrupt
interrupt
service task
Saving/Restoring General-purpose Register
saving
registers
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 registers 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.
restoring
registers
interrupt return
Jan. 2002 ver 2.0
59