2.5.6
Branching Instructions
Table 2.9 describes the branching instructions. Figure 2.8 shows their object code formats.
Table 2.9 Branching Instructions
Instruction
Size
Function
Bcc
—
Branches if condition cc is true.
Mnemonic
BRA (BT)
BRN (BF)
BHI
cc field
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
Description
Always (true)
Never (false)
High
Condition
Always
Never
C
C
Z = 0
Z = 1
BLS
Low or same
BCC (BHS)
Carry clear
C = 0
(High or same)
BCS (BLO)
BNE
BEQ
BVC
BVS
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
Carry set (low)
Not equal
C = 1
Z = 0
Z = 1
V = 0
V = 1
N = 0
N = 1
Equal
Overflow clear
Overflow set
Plus
BPL
BMI
Minus
BGE
BLT
Greater or equal
Less than
N
N
Z
Z
V = 0
V = 1
BGT
BLE
Greater than
Less or equal
(N V) = 0
(N V) = 1
JMP
JSR
BSR
—
—
—
Branches unconditionally to a specified address.
Branches to a subroutine at a specified address.
Branches to a subroutine at a specified displacement from the
current address.
RTS
—
Returns from a subroutine.
44