SAM47 INSTRUCTION SET KS57C2308/P2308/C2316/P2316
5-84
SMB Select Memory Bank
SMB n
Operation: Operand Operation Summary Bytes Cycles
nSelect memory bank 2 2
Description: The SMB instruction sets the upper four bits of a 12-bit data memory address to select a specific
memory bank. The constants 0, n, and 15 are usually used as the SMB operand to select the
corresponding memory bank. All references to data memory addresses fall within the following
address ranges:
Please note that since data memory spaces differ for various devices in the SAM47 product
family, the “n” value of the SMB instruction will also vary.
Addresses Register Areas Bank SMB
000H–01FH Working registers 0 0
020H–0FFH Stack and general-purpose registers
n00H–7FFH General-purpose registers n
(n = 1–14) n
(n = 1–14)
F80H–FFFH I/O-mapped hardware registers 15 15
The enable memory bank (EMB) flag must always be set to "1" in order for the SMB instruction to
execute successfully for memory banks 0–15.
Format Binary Code Operation Notation
n 11011101SMB n
0 1 0 0 d3 d2 d1 d0
Example: If the EMB flag is set, the instruction
SMB 0
selects the data memory address range for bank 0 (000H–0FFH) as the working memory bank.