67
2.2.18 BSR (branch to subroutine)
Operation
PC
→
@
−
SP
PC + d:8
→
PC
Assembly-Language Format
BSR d:8
Operand Size
−
Condition Code
I
H
N
Z
V
C
—
—
—
—
—
—
—
—
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.
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 and Number of Execution States
Instruction code
Addressing
mode
Mnem.
Operands
1st byte
2nd byte
3rd byte
4th byte
No of
states
PC-relative
BSR
d:8
5
5
disp
6
Summary of Contents for H8/300L Series
Page 1: ...H8 300L Series Programming Manual ...
Page 6: ...iv ...
Page 8: ...2 ...
Page 11: ......
Page 14: ......
Page 46: ......
Page 48: ......
Page 60: ......
Page 83: ......
Page 116: ......
Page 150: ...144 ...
Page 151: ......
Page 156: ...150 ...