KS57C2308/P2308/C2316/P2316SAM47 INSTRUCTION SET

SRB — Select Register Bank

SRB

n

 

 

 

 

 

 

 

 

Operation:

Operand

Operation Summary

Bytes

Cycles

 

 

 

 

 

 

n

Select 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

 

 

 

 

 

 

 

3

2

1

0

 

 

 

 

 

 

 

0

0

0

x

x

Always set to bank 0

 

 

 

 

 

 

 

 

 

0

0

Bank 0

 

 

 

 

 

 

1

0

0

0

1

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

1

1

0

 

1

1

 

1

0

1

SRB 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.

5-85

Page 159
Image 159
Samsung KS57C2308 manual SRB Select Register Bank, Srb, ERB Setting SRB Settings Selected Register Bank