ADDRESSING MODES
KS57C2308/P2308/C2316/P2316
3-4
ENABLE MEMORY BANK SETTINGS
EMB = "1"
When the enable memory bank flag EMB is set to logic one, you can address the data memory bank specified by
the select memory bank (SMB) value (0, 1 or 15) using 1-, 4-, or 8-bit instructions. You can use both direct and
indirect addressing modes. The addressable RAM areas when EMB = "1" are as follows:
If SMB = 0,
000H–0FFH
If SMB = 1,
100H–1FFH
If SMB = 15,
F80H–FFFH
EMB = "0"
When the enable memory bank flag EMB is set to logic zero, the addressable area is defined independently of
the SMB value, and is restricted to specific locations depending on whether a direct or indirect address mode is
used.
If EMB = "0", the addressable area is restricted to locations 000H–07FH in bank 0 and to locations F80H–FFFH
in bank 15 for direct addressing. For indirect addressing, only locations 000H–0FFH in bank 0 are addressable,
regardless of SMB value.
To address the peripheral hardware register (bank 15) using indirect addressing, the EMB flag must first be set to
"1" and the SMB value to "15". When a
RESET
occurs, the EMB flag is set to the value contained in bit 7 of ROM
address 0000H.
EMB-Independent Addressing
At any time, several areas of the data memory can be addressed independent of the current status of the EMB
flag. These exceptions are described in Table 3-1.
Table 3-1. RAM Addressing Not Affected by the EMB Value
Address
Addressing Method
Affected Hardware
Program Examples
000H–0FFH
4-bit indirect addressing using WX
and WL register pairs;
8-bit indirect addressing using SP
Not applicable
LD
PUSH
POP
A,@WX
EA
EA
FB0H–FBFH
FF0H–FFFH
1-bit direct addressing
PSW, SCMOD,
IEx, IRQx, I/O
BITS
BITR
EMB
IE4
FC0H–FFFH
1-bit indirect addressing using the
L register
BSC, I/O
BTST
BAND
FC3H.@L
C,P3.@L
Summary of Contents for C2316
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......