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