English
Language : 

GMS81C5108 Datasheet, PDF (70/102 Pages) Hynix Semiconductor – HYNIX SEMICONDUCTOR INC. 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C5108
System clock
Instruction Fetch
Address Bus
PC
SP SP-1
SP-2
V.L. V.H.
New PC
Data Bus
Not used
PCH PCL PSW V.L. ADL ADH
OP code
Internal Read
Internal Write
Interrupt Processing Step
V.L. and V.H. are vector addresses.
ADL and ADH are start addresses of interrupt service routine as vector contents.
Interrupt Service Routine
Figure 17-3 Timing chart of Interrupt Acceptance and Interrupt Return Instruction
Basic Interval Timer
Vector Table Address
0FFFAH
0FFFBH
012H
0E3H
Entry Address
0E312H
0EH
0E313H
2EH
Correspondence between vector table address for BIT interrupt
and the entry address of the interrupt service program.
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
INTxx: PUSH A
PUSH X
PUSH Y
interrupt processing
POP
Y
POP
X
POP
A
RETI
;SAVE ACC.
;SAVE X REG.
;SAVE Y REG.
;RESTORE Y REG.
;RESTORE X REG.
;RESTORE ACC.
;RETURN
General-purpose registers are saved or restored by using
push and pop instructions.
main routine
acceptance of
interrupt
interrupt
service routine
saving
registers
interrupt return
restoring
registers
JUNE 2001 Ver 1.0
67