ADDRESSING MODESKS57C2308/P2308/C2316/P2316

4-BIT ADDRESSING

Table 3-3. 4-Bit Direct and Indirect RAM Addressing

Operand

Addressing Mode

EMB Flag

Addressable

Memory

Hardware I/O

Notation

Description

Setting

Area

Bank

Mapping

 

 

 

 

 

 

 

 

 

000H–07FH

Bank 0

 

 

 

 

 

 

DA

Direct: 4-bit address indicated

0

F80H–FFFH

Bank 15

All 4-bit

 

by the RAM address (DA) and

 

 

 

addressable

 

the memory bank selection

 

 

 

peripherals

 

 

 

 

 

 

 

 

1

000H–FFFH

SMB = 0, 1,15

(SMB = 15)

 

 

 

 

 

 

@HL

Indirect: 4-bit address indi-

0

000H–0FFH

Bank 0

 

cated by the memory bank

 

 

 

 

 

selection and register HL

 

 

 

 

 

 

 

 

 

 

 

 

1

000H–FFFH

SMB = 0, 1,

All 4-bit

 

 

 

 

15

addressable

 

 

 

 

 

peripherals

 

 

 

 

 

(SMB = 15)

 

 

 

 

 

 

@WX

Indirect: 4-bit address indi-

x

000H–0FFH

Bank 0

 

cated by register WX

 

 

 

 

 

 

 

 

 

 

@WL

Indirect: 4-bit address indi-

x

000H–0FFH

Bank 0

 

 

cated by register WL

 

 

 

 

 

 

 

 

 

 

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

3-8

Page 38
Image 38
Samsung KS57C2308 manual @Hl, @Wl, Adata EQU, Bdata EQU 8EH SMB, Bdata,A, Smb Adata,A