ADDRESSING MODES

S3F80JB

 

 

INDEXED ADDRESSING MODE (Continued)

 

 

 

Program Memory

 

 

 

 

 

 

 

 

 

 

 

4-bit Working

 

 

OFFSET

 

 

 

 

 

 

 

 

dst/src

x

 

 

 

Register Address

 

 

 

 

 

OPCODE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sample Instructions:

Register File

MSB Points to

 

 

 

RP0 or RP1

RP0 or RP1

 

 

 

 

 

 

 

Selected

 

 

 

RP points

 

~

~

to start of

 

working

 

 

 

register

NEXT 2 BITS

 

block

Register

 

Point to Working

 

Pair

 

Register Pair

 

 

16-Bit

 

(1 of 4)

 

 

 

 

address

 

 

Program Memory

added to

LSB Selects

offset

or

 

 

+

Data Memory

 

 

 

 

8-Bit

16-Bit

 

 

 

 

 

 

 

Value used in

16-Bit

OPERAND

 

 

Instruction

 

 

 

LDC

R4, #04H[RR2]

;

The values in the program address (RR2 + 04H)

 

 

 

are loaded into register R4.

LDE

R4,#04H[RR2]

;

Identical operation to LDC example, except that

 

 

 

external data memory is accessed.

NOTE: LDE command is not available, because an external interface is not implemented for the S3F80JB.

Figure 3-8. Indexed Addressing to Program or Data Memory with Short Offset

3-8

Page 61
Image 61
Samsung S3F80JB manual Indexed Addressing Mode, Next 2 Bits