Motorola HC12 Refrence Manual page 109

Table of Contents

Advertisement

BSR
(SP) – $0002 ⇒ SP
Operation:
RTN
(PC) + Rel ⇒ PC
Description:
Sets up conditions to return to normal program flow, then transfers con-
trol to a subroutine. Uses the address of the instruction after the BSR as
a return address.
Subroutines are normally terminated with an RTS instruction, which re-
stores the return address from the stack.
Condition Codes and Boolean Formulas:
S
None affected.
Addressing Modes, Machine Code, and Execution Times:
Source Form
BSR rel8
CPU12
REFERENCE MANUAL
Branch to Subroutine
⇒ M
: RTN
H
L
(SP)
Decrements the SP by two, to allow the two bytes of the return ad-
dress to be stacked.
Stacks the return address (the SP points to the high order byte of the
return address).
Branches to a location determined by the branch offset.
X
H
I
N
Z
Address Mode
REL
INSTRUCTION GLOSSARY
: M
(SP + 1)
V
C
Object Code
07 rr
BSR
Cycles
Access Detail
4
PPPS
MOTOROLA
6-49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents