KS57C2308/P2308/C2316/P2316 SAM47 INSTRUCTION SET
5-85
SRB Select Register Bank
SRB n
Operation: Operand Operation Summary Bytes Cycles
nSelect register bank 2 2
Description: The SRB instruction selects one of four register banks in the working register memory area. The
constant value used with SRB is 0, 1, 2, or 3. The following table shows the effect of SRB
settings:
ERB Setting SRB Settings Selected Register Bank
3210
0 0 0 x x Always set to bank 0
0 0 Bank 0
1 0001 Bank 1
1 0 Bank 2
1 1 Bank 3
NOTE:“x” = not applicable.
The enable register bank flag (ERB) must always be set for the SRB instruction to execute
successfully for register banks 0, 1, 2, and 3. In addition, if the ERB value is logic zero, register
bank 0 is always selected, regardless of the SRB value.
Operand Binary Code Operation Notation
n 11011101SRB n (n = 0, 1, 2, 3)
0 1 0 1 0 0 d1 d0
Example: If the ERB flag is set, the instruction
SRB 3
selects register bank 3 (018H–01FH) as the working memory register bank.