![Hynix Semiconductor GMS81C5108 User Manual Download Page 70](http://html1.mh-extra.com/html/hynix-semiconductor/gms81c5108/gms81c5108_user-manual_2192989070.webp)
GMS81C5108
JUNE 2001 Ver 1.0
67
Figure 17-3 Timing chart of Interrupt Acceptance and Interrupt Return Instruction
An 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 se-
lectively 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. If necessary, these registers should be
saved by the software. Also, when multiple interrupt ser-
vices 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 saving
General-purpose registers are saved or restored by using
push and pop instructions.
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 Routine
V.L. and V.H. are vector addresses.
ADL and ADH are start addresses of interrupt service routine as vector contents.
Basic Interval Timer
012
H
0E3
H
0FFFA
H
0FFFB
H
0E
H
2E
H
0E312
H
0E313
H
Entry Address
Correspondence between vector table address for BIT interrupt
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
main routine
interrupt
service routine
saving
registers
restoring
registers
acceptance of
interrupt
interrupt return
Downloaded from
Elcodis.com
electronic components distributor