English
Language : 

HMS81C2012A Datasheet, PDF (75/107 Pages) List of Unclassifed Manufacturers – CMOS Single-Chip 8-Bit Microcontroller with A/D Converter & VFD Driver
HMS81C2012A/2020A
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 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 register save/restore using push and pop
instructions;
main task
acceptance of
interrupt
interrupt
service task
saving
registers
interrupt return
restoring
registers
16.2 BRK Interrupt
Software interrupt can be invoked by BRK instruction,
which has 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 16-5.
BRK or
TCALL0
B-FLAG
=1
BRK
INTERRUPT
ROUTINE
=0
TCALL0
ROUTINE
RETI
RET
Figure 16-5 Execution of BRK/TCALL0
SEP. 2004 Ver 2.00
71