jr


Unconditional branch (PC relative).

[Syntax]

-

jr disp22 (When -Xasm_far_jump option is not specified)

-

jr disp32 (When -Xasm_far_jump option is specified)

 

The following can be specified for disp22:

-

Absolute expression having a value of up to 22 bits

-

Relative expression having a PC offset reference of label

 

The following can be specified for disp32:

-

Absolute expression having a value of up to 32 bits

-

Relative expression having a PC offset reference of label

[Function]

-

Syntax "jr disp22"

Transfers control to the address attained by adding the current program counter (PC) value and the relative or absolute expression value specified by the first operand.

-

Syntax "jr disp32"

Transfers control to the address attained by adding the current program counter (PC) value and the relative or absolute expression value specified by the first operand.

[Description]

-

If the instruction is executed in syntax "jr disp22", the assembler generates one jr machine instructionNote if any of the following expressions are specified for disp22.

(a)

Absolute expression having a value in the range of -2,097,152 to +2,097,151

(b)

Relative expression that has a PC offset reference of label

Note

The jr machine instruction takes an immediate value in the range of -2,097,152 to +2,097,151 (0xFE00000 to 0x1FFFFF) as the displacement.

 

-

If the instruction is executed in syntax "jr disp32", the assembler generates one jr machine instruction (6-byte long instruction).

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

If an absolute expression having a value exceeding the range of -2,097,152 to +2,097,151 is specified as disp22, the assembler outputs the following message and stops assembling.

E0550230 : illegal operand (range error in displacement)

-

If an absolute expression having an odd-numbered value is specified as disp22/disp32, the assembler outputs the following message and stops assembling.

E0550226 : illegal operand (must be even displacement)