BSR
|
Relative subroutine branch
|
BSR
|
Branch to SubRoutine
|
[Syntax]
BSR(.length) src
[Operation]
SP = SP - 4;
*SP = ( PC + n ) *;
PC = PC + src;
Notes 1. | 1. (PC + n) is the address of the instruction following the BSR instruction. |
Notes 2. | 2. "n" indicates the code size. For details, refer to "Instruction Format". |
[Function]
This instruction executes a relative branch to destination address specified by src.
[Instruction Format]
|
|
|
|
|
BSR(.length) src
|
|
pcdsp:16
|
-32768≦pcdsp≦32767
|
|
|
pcdsp:24
|
-8388608≦pcdsp≦8388607
|
|
|
Rs
|
-2147483648≦Rs≦2147483647
|
|
[Flag Change]
This instruction does not affect the states of flags.
[Description Example]
BSR label1
BSR.A label2
BSR R1
BSR.L R2
Note | For the RX Family assembler manufactured by Renesas Technology Corp., enter a destination address specified by a label or an effective address as the displacement value (pcdsp:16, pcdsp:24). The value of the specified address minus the address where the instruction is allocated will be stored in the pcdsp section of the instruction. |
BSR label
BSR 1000h