Instruction Address Addressing; Relative Addressing; Immediate Addressing - Renesas RL78/G1P Hardware User Manual

16-bit single-chip microcontroller
Hide thumbs Also See for RL78/G1P:
Table of Contents

Advertisement

RL78/G1P

3.3 Instruction Address Addressing

3.3.1 Relative addressing

[Function]
Relative addressing stores in the program counter (PC) the result of adding a displacement value included in the
instruction word (signed complement data: 128 to +127 or 32768 to +32767) to the program counter (PC)'s value
(the start address of the next instruction), and specifies the program address to be used as the branch destination.
Relative addressing is applied only to branch instructions.

3.3.2 Immediate addressing

[Function]
Immediate addressing stores immediate data of the instruction word in the program counter, and specifies the
program address to be used as the branch destination.
For immediate addressing, CALL !!addr20 or BR !!addr20 is used to specify 20-bit addresses and CALL !addr16 or
BR !addr16 is used to specify 16-bit addresses. 0000 is set to the higher 4 bits when specifying 16-bit addresses.
R01UH0895EJ0100 Rev.1.00
Nov 29, 2019
Figure 3-10. Outline of Relative Addressing
PC
Figure 3-11. Example of CALL !!addr20/BR !!addr20
PC
Figure 3-12. Example of CALL !addr16/BR !addr16
PC
PC
PC
PC
S
H
0000
CHAPTER 3 CPU ARCHITECTURE
Instruction code
OP code
DISPLACE
8/16 bits
Instruction code
OP code
Low Addr.
High Addr.
Seg Addr.
Instruction code
L
OP code
Low Addr.
High Addr.
48

Advertisement

Table of Contents
loading

Table of Contents