3.5.7 Branching Instructions
Table 3-15 describes the 11 branching instructions.
Table 3-15 Branching Instructions
Instruction
Branch
Bcc
JMP
PJMP
BSR
JSR
PJSR
RTS
Downloaded from
Elcodis.com
electronic components distributor
Size
Function
—
Branches if condition cc is true.
Mnemonic
BRA (BT)
BRN (BF)
BHI
BLS
BCC (BHS)
BCS (BLO)
BNE
BEQ
BVC
BVS
BPL
BMI
BGE
BLT
BGT
BLE
—
Branches unconditionally to a specified address in the same page.
—
Branches unconditionally to a specified address in a specified page.
—
Branches to a subroutine at a specified address in the same page.
—
Branches to a subroutine at a specified address in the same page.
—
Branches to a subroutine at a specified address in a specified page.
—
Returns from a subroutine in the same page.
Description
Always (true)
Never (false)
High
Low or Same
Carry Clear
(High or Same)
Carry Set (Low)
Not Equal
Equal
Overflow Clear
Overflow Set
Plus
Minus
Greater or Equal
Less Than
Greater Than
Less or Equal
57
Condition
True
False
C ∨ Z = 0
C ∨ Z = 1
C = 0
C = 1
Z = 0
Z = 1
V = 0
V = 1
N = 0
N = 1
N ⊕ V = 0
N ⊕ V = 1
Z ∨ (N ⊕ V) = 0
Z ∨ (N ⊕ V) = 1