English
Language : 

UPD78320 Datasheet, PDF (46/88 Pages) NEC – 16/8-BIT SINGLE-CHIP MICROCONTROLLER
µPD78320, 78322
4.3.2 Context Switching Function by BRKCS Instruction
The context switching function can be started by executing BRKCS instruction.
The context switched register bank is specified by the lower 3-bit immediate data of the 2nd operation code of BRKCS
instruction. When BRKCS instruction is executed, the register bank specified by the 3-bit immediate data is selected, the
vector address prestored in the register bank is set and branched to the PC, and the PC and PSW contents are saved into
the register bank.
Return is by means of executing the RETCSB instruction.
Figure 4-4. Context Switching by Execution of BRKCS Instruction
(BRKCS)
OP CODE
OP CODE
N2 N1 N0
Register Bank Specification
000
RBANK0
111
RBANK7
PC
Exchange
Save
PSW
RBANK n (n = 0 – 7)
A
X
B
C
R5
R4
R7
R6
VP
UP
D
E
H
L
Register
Banks
(0 – 7)
46