Bsr (Branch To Subroutine) - Renesas H8/300 Series Programming Manual

Table of Contents

Advertisement

BSR (Branch to SubRoutine)

<Operation>
PC → @–SP
PC + d:8 → PC
<Assembly-Language Format>
BSR d:8
<Examples>
BSR H'76
<Operand Size>
<Description>
This instruction pushes the program counter (PC) value onto the stack, then adds a specified
displacement to the program counter value and branches to the resulting address. The program
counter value used is the address of the instruction following the BSR instruction.
The displacement is a signed 8-bit value which must be even. The possible branching range is
–126 to +128 bytes from the address of the BSR instruction.
<Instruction Formats>
Addressing
mode
PC-relative
Mnem.
Operands
BSR
d:8
<Condition Code>
I
— — — — — — — —
I: Previous value remains unchanged.
H: Previous value remains unchanged.
N: Previous value remains unchanged.
Z: Previous value remains unchanged.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
Instruction code
1st byte
2nd byte
5
5
disp
61
H
N
Z
3rd byte
4th byte
BSR
V
C
No. of
states
6

Advertisement

Table of Contents
loading

Table of Contents