English
Language : 

GMS87C4060 Datasheet, PDF (77/102 Pages) Hynix Semiconductor – 8-BIT SINGLE-CHIP MICROCONTROLLERS
PRELIMINARY
GMS81C4040/87C4060
Basic Interval Timer
Vector Table Address
0FFE6H
0FFE7H
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.
A maskable interrupt is not accepted until the I-flag is set
to "1" even if a maskable interrupt of higher priority than
that of the current interrupt being serviced.
When nested interrupt service is necessary, the I-flag is set
to "1" in the interrupt service program. In this case, accept-
able interrupt sources are selectively enabled by the indi-
vidual 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 not the accumulator and other reg-
isters. These registers are saved by the program if neces-
sary. Also, when nesting multiple interrupt services, 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
INTxx: PUSH
PUSH
LDA
PUSH
A
X
DPGR
A
;SAVE ACC.
;SAVE X REG.
;SAVE DPGR
; Direct page
; accessable reg.
;
:
interrupt processing
:
POP
STA
POP
POP
RETI
A
DPGR
X
A
;RESTORE DPGR
;RESTORE X REG.
;RESTORE ACC.
;RETURN
General-purpose register save/restore using push and pop
instructions;
main task
acceptance of
interrupt
interrupt
service task
saving
registers
interrupt return
restoring
registers
19.2 BRK Interrupt
Software interrupt can be invoked by BRK instruction,
which is the lowest priority order.
Interrupt vector address of BRK is shared with the vector
of TCALL 0 (Refer to Program Memory Section). When
BRK interrupt is generated, B-flag of PSW is set to distin-
guish BRK from TCALL 0.
Each processing step is determined by B-flag as shown in
Figure 19-6 .
BRK or
TCALL0
B-FLAG
=1
BRK
INTERRUPT
ROUTINE
=0
TCALL0
ROUTINE
RETI
RET
Figure 19-6 Execution of BRK/TCALL0
Nov. 1999 Ver 1.0
PRELIMINARY
73