Samsung S3F80JB manual Register Addressing Mode R

Models: S3F80JB

1 346
Download 346 pages 34.13 Kb
Page 55
Image 55

ADDRESSING MODES

S3F80JB

 

 

REGISTER ADDRESSING MODE (R)

In Register addressing mode, the operand is the content of a specified register or register pair (see Figure 3-1). Working register addressing differs from Register addressing because it uses a register pointer to specify an 8- byte working register space in the register file and an 8-bit register within that space (see Figure 3-2).

Program Memory

8-bit register

 

 

 

 

file address

 

 

 

dst

 

 

 

 

OPCODE

One-Operand

 

 

Instruction

 

 

 

 

(Example)

 

 

Sample Instruction:

 

Register File

OPERAND Points to one

register in register

file

Value used in instruction execution

DEC

CNTR

; Where CNTR is the label of an 8-bit register address

Figure 3-1. Register Addressing

 

Program Memory

4-bit

 

 

 

 

Working Register

 

 

dst

src

 

 

OPCODE

Two-Operand

 

 

Instruction

 

 

 

 

(Example)

Sample Instruction:

 

MSB Points to

RP0 ot RP1

3 LSBs

Points to the

woking register

(1 of 8)

Register File

RP0 or RP1

OPERAND

Selected RP points

to start

of working register block

ADD

R1, R2

; Where R1 and R2 are registers in the curruntly

 

 

selected working register area.

Figure 3-2. Working Register Addressing

3-2

Page 55
Image 55
Samsung S3F80JB manual Register Addressing Mode R