MOTOROLA
5-12
INSTRUCTION SET
CPU16
REFERENCE MANUAL
5.6.1 Short Branch Instructions
Short branch instructions operate as follows. When a specified condition is met, a
signed 8-bit offset is added to the value in the program counter. If addition causes the
value in the PC to be greater than $FFFF or less than $0000, the PK extension field is
incremented or decremented. Program execution continues at the new extended ad-
dress.
Short branch instructions can be classified by the type of condition that must be satis-
fied in order for a branch to be taken. Some instructions belong to more than one clas-
sification.
Unary branch instructions always execute.
Simple branches are taken when a specific bit in the condition code register is in a spe-
cific state as a result of a previous operation.
Unsigned conditional branches are taken when comparison or test of unsigned quan-
tities results in a specific combination of condition code register bits.
Signed branches are taken when comparison or test of signed quantities results in a
specific combination of condition code register bits.
Table 5-20 Short Branch Summary
Mnemonic
BRA
BRN
Opcode
B0
B1
Simple Branches
Opcode
B4
B5
B7
BB
B6
BA
B8
B9
Unsigned Branches
Opcode
B4
B5
B7
B2
B3
B6
Equation
1
=
1
1
=
0
Condition
True
False
Mnemonic
BCC
BCS
BEQ
BMI
BNE
BPL
BVC
BVS
Equation
C
=
0
C
=
1
Z
=
1
N
=
1
Z
=
0
N
=
0
V
=
0
V
=
1
Condition
Equation
Equation
Equation
Equation
Equation
Equation
Equation
Equation
Mnemonic
BCC
BCS
BEQ
BHI
BLS
BNE
Equation
C
=
0
C
=
1
Z
=
1
C
Z
=
0
C
Z
=
1
Z
=
0
Condition
(X)
≥
(M)
(X)
<
(M)
(X)
=
(M)
(X)
>
(M)
(X)
≤
(M)
(X)
≠
(M)
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.