
45
μ
PD78323, 78324
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
OP CODE
OP CODE
N
2
N
1
N
0
000
111
RBANK0
RBANK7
Register Bank Specification
(BRKCS)
Register
Banks
(0 to 7)
RBANK n (n = 0 – 7)
PC
PSW
Exchange
Save
A
B
R5
R7
D
H
X
C
R4
R6
E
L
VP
UP