ADDRESSING MODES

S3C9228/P9228

 

 

REGISTER ADDRESSING MODE (R)

In Register addressing mode, the operand is the content of a specified register (see Figure 3-1). Working register addressing differs from Register addressing because it uses a 16-byte working register space in the register file and a 4-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 Point to One

Rigister 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)

 

 

4 LSBs

Point to the

Woking Register

(1 of 16)

Register File

.

.

.

.

OPERAND

CFH

C0H

Sample Instruction:

ADD R1, R2

; Where R1 = C1H and R2 = C2H

Figure 3-2. Working Register Addressing

3-2

Page 262
Image 262
Samsung S3C9228/P9228, 8-Bit CMOS Microcontroller user manual Register Addressing Mode R