ADDRESSING MODES KS57C2308/P2308/C2316/P2316
3-8
4-BIT ADDRESSING
Table 3-3. 4-Bit Direct and Indirect RAM Addressing
Operand
Notation Addressing Mode
Description EMB Flag
Setting Addressable
Area Memory
Bank Hardware I/O
Mapping
000H–07FH Bank 0
DA Direct: 4-bit address indicated
by the RAM address (DA) and
the memory bank selection
0F80H–FFFH Bank 15 All 4-bit
addressable
peripherals
1000H–FFFH SMB = 0, 1,15 (SMB = 15)
@HL Indirect: 4-bit address indi-
cated by the memory bank
selection and register HL
0000H–0FFH Bank 0
1000H–FFFH SMB = 0, 1,
15 All 4-bit
addressable
peripherals
(SMB = 15)
@WX Indirect: 4-bit address indi-
cated by register WX x000H–0FFH Bank 0
@WL Indirect: 4-bit address indi-
cated by register WL x000H–0FFH Bank 0
NOTE:“x” means don’t care.
++ PROGRAMMING TIP — 4-Bit Addressing Modes
4-Bit Direct Addressing
1. If EMB = "0":
ADATA EQU 46H
BDATA EQU 8EH
SMB 15 ;Non-essential instruction, since EMB = "0"
LD A,P3 ;A (P3)
SMB 0;Non-essential instruction, since EMB = "0"
LD ADATA,A ;(046H) A
LD BDATA,A ;(F8EH (LCON)) A
2. If EMB = "1":
ADATA EQU 46H
BDATA EQU 8EH
SMB 15
LD A,P3 ;A (P3)
SMB 0
LD ADATA,A ;(046H) A
LD BDATA,A ;(08EH) A