BVC

From C64-Wiki
Jump to: navigation, search

BVC (short for "Branch if oVerflow Clear") is the mnemonic for a machine language instruction which branches, or "jumps", to the address specified if, and only if the overflow flag is clear. If the overflow flag is set when the CPU encounters a BVC instruction, the CPU will continue at the instruction following the BVC rather than taking the jump.

Addressing mode[edit]

Opcode Addressing
mode
Assembler
format
Length
in bytes
Number of
cycles
Dec Hex
80 50 Relative BVC nnnn 2 2*

BVC only supports the Relative addressing mode, as shown in the table at right. In the assembler formats listed, nnnn is a two-byte (16-bit) address.
The execution time for BVC is not a fixed value, but depends on the circumstances. The listed time is valid only in cases where BVC does not take the branch. If it does take the branch, ececution takes one additional clock cycle. Furthermore, if the branching crosses a page boundary, yet another cycle must be added to the execution time listed.

CPU flags[edit]

BVC does not affect any of the CPU's status flags.