Relative Address Mode (Ra); Immediate Mode (Im) - Samsung S3C9444 User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

ADDRESSING MODES

RELATIVE ADDRESS MODE (RA)

In Relative Address (RA) mode, a two's-complement signed displacement between – 128 and + 127 is specified
in the instruction. The displacement value is then added to the current PC value. The result is the address of the
next instruction to be executed. Before this addition occurs, the PC contains the address of the instruction
immediately following the current instruction.
The instructions that support RA addressing is JR.
Current Instruction
Sample Instructions:
JR

IMMEDIATE MODE (IM)

In Immediate (IM) addressing mode, the operand value used in the instruction is the value supplied in the
operand field itself. Immediate addressing mode is useful for loading constant values into registers.
3-12
Program Memory
Next OPCODE
Displacement
OPCODE
ULT,$ + OFFSET
;
Figure 3-12. Relative Addressing
Program Memory
OPERAND
OPCODE
(The Operand value is in the instruction)
Sample Instruction: LD
Figure 3-13. Immediate Addressing
Program Memory
Address Used
Current
PC Value
Signed
Displacement Value
Where OFFSET is a value in the range + 127 to - 128
R0,#0AAH
S3C9444/F9444_UM_REV1.10
+

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3f9444

Table of Contents