µPD70320
(4) Register bank switch instructions
• BRKCS ······ Used to switch register banks
A register bank is switched to the register bank indicated by the lower 3 bits in the 16-bit register
described in the operand. The program is also branched with this instruction to the address
obtained from the PS stored in advance in the new register bank and the vector PC.
The RETRBI instruction is used to return the program from the new register bank.
(Descriptive format)
Mnemonic
BRKCS
Operand
reg16
• TSKSW ······ Used to switch register banks
Just like the BRKCS instruction, this instruction is also executed to select a register bank. The
program is branched to the address obtained from the PS stored in advance in the new register
bank and the address obtained from the PC save area.
(Descriptive format)
Mnemonic
TSKSW
Operand
reg16
(5) Data transfer instructions
• MOVSPA ··· Used to transfer SS and SP values
This instruction is executed to transfer both SS and SP values before the register bank is switched
to SS and SP of the current (post-switching) register bank.
(Descriptive format)
Mnemonic
MOVSPA
Operand
None
• MOVSPB ··· Used to transfer SS and SP values
This instruction is executed to transfer the SS and SP values of the current (pre-switching)
register bank to the SS and SP of the new register bank indicated by the lower 3 bits in the 16-
bit register described in the operand.
(Descriptive format)
Mnemonic
MOVSPB
Operand
reg16
Some µPD70108/ 70116 instructions should be much cared as shown below when used for the µPD70320.
• I/O instruction, primitive I/O instruction
If PSW IBRK flag is reset (0), an interrupt is generated without executing this instruction. Be sure to set (1)
the IBRK flag when using the I/O instruction.
• FPO instruction
An interrupt is generated without executing this instruction.
10