Samsung S3C84E5 user manual Indexed Addressing Mode, Offset, Ldc

Models: S3C84E5

1 316
Download 316 pages 61.65 Kb
Page 63
Image 63

ADDRESSING MODES

S3C84E5/C84E9/P84E9

 

 

INDEXED ADDRESSING MODE (Continued)

 

 

 

Program Memory

 

 

 

 

 

 

 

 

4-bit Working

 

 

OFFSET

 

 

 

dst/src

 

x

 

Register Address

 

 

 

 

OPCODE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sample Instructions:

LDC

R4, #04H[RR2]

LDE R4,#04H[RR2]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Register File

 

MSB Points to

 

 

 

 

 

 

 

 

 

 

 

RP0 or RP1

 

 

 

 

 

 

RP0 or RP1

 

 

Selected

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RP points

~

~

to start of

working

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

block

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NEXT 2 Bits

Point to Working

Register

 

Pair

 

Register Pair

 

16-Bit

 

(1 of 4)

 

 

 

 

address

 

 

Program Memory

added to

LSB Selects

offset

or

 

 

+

Data Memory

 

 

 

 

8-Bits

16-Bits

 

 

 

16-Bits

OPERAND

Value used in

 

 

Instruction

;The values in the program address (RR2 + 04H) are loaded into register R4.

;Identical operation to LDC example, except that external program memory is accessed.

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

3-8

Page 63
Image 63
Samsung S3C84E5 user manual Indexed Addressing Mode, Offset, Ldc