ADDRESSING MODES

KS57C2308/P2308/C2316/P2316

 

 

DIRECT AND INDIRECT ADDRESSING

1-bit, 4-bit, and 8-bit data stored in data memory locations can be addressed directly using a specific register or bit address as the instruction operand.

Indirect addressing specifies a memory location that contains the required direct address. The KS57 instruction set supports 1-bit, 4-bit, and 8-bit indirect addressing. For 8-bit indirect addressing, an even-numbered RAM address must always be used as the instruction operand.

1-BIT ADDRESSING

Table 3-2. 1-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.b

Direct: a bit is indicated by the

0

F80H–FFFH

Bank 15

All 1-bit

 

 

RAM address (DA), memory

 

 

 

addressable

 

 

bank selection, and a the

 

 

 

peripherals

 

 

specified bit number (b).

 

 

 

(SMB = 15)

 

 

 

 

 

 

 

 

 

 

1

000H–FFFH

SMB = 0, 1,

 

 

 

 

 

 

15

 

 

 

 

 

 

 

 

 

mema.b

Direct: a bit is indicated by the

x

FB0H–FBFH

Bank 15

IS0, IS1, EMB,

 

 

addressable area (mema) and

 

FF0H–FFFH

 

ERB, IEx, IRQx,

 

 

a the bit number (b).

 

 

 

Pn.n

 

 

 

 

 

 

 

 

memb.@L

Indirect: a bit is indicated by

x

FC0H–FFFH

Bank 15

BSCn.x

 

 

the addressable area

 

 

 

Pn.n

 

 

(memb.7–2 (upper) + L.3–2

 

 

 

 

 

 

(lower)) and the bit number

 

 

 

 

 

 

(L.1–0).

 

 

 

 

 

 

 

 

 

 

 

 

@H + DA.b

Indirect: a bit is indicated by

0

000H–0FFH

Bank 0

 

 

the addressable area (H

 

 

 

 

 

 

(upper) + DA.3–0 (lower)) ,

 

 

 

 

 

 

memory bank selection, and

 

 

 

 

 

 

the bit number (b).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

000H–FFFH

SMB = 0, 1,15

All 1-bit

 

 

 

 

 

 

addressable

 

 

 

 

 

 

peripherals

 

 

 

 

 

 

(SMB = 15)

 

 

 

 

 

 

 

NOTE: “x” means don’t care.

 

 

 

 

3-6

Page 36
Image 36
Samsung KS57C2308 manual Direct and Indirect Addressing, BIT Addressing, Bank Mapping