We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

BBC (SPC700): Difference between revisions

From SnesLab
Jump to: navigation, search
(added syntax)
(high nybble is y)
Line 78: Line 78:
|}
|}


'''BBC''' (Branch on Bit Clear) is an [[SPC700]] instruction that performs a branch when a bit in the [[direct page]] is clear.  The index to the direct page byte that bit lives in is the first operand byte.  Which bit within that byte is specified by the top 3 bits of the opcode.  The target relative address to jump to is the second operand byte.
'''BBC''' (Branch on Bit Clear) is an [[SPC700]] instruction that performs a branch when a bit in the [[direct page]] is clear.  The index to the direct page byte that bit lives in is the first operand byte.  Which bit within that byte is specified by the top 3 bits of the opcode.  The target relative address to jump to is the second operand byte.  In Nintendo's manual, the high nybble of the opcode is called y.


In assembly source, the two operands appear in the same order that they do in the instruction stream.
In assembly source, the two operands appear in the same order that they do in the instruction stream.

Revision as of 04:40, 8 July 2024

Basic Info
Addressing Mode Opcode Length Speed
Direct Page Bit Relative 13 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative 33 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative 53 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative 73 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative 93 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative B3 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative D3 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Direct Page Bit Relative F3 3 byte when condition is false: 5 cycles

when condition is true: 7 cycles

Flags Affected
N V P B H I Z C
. . . . . . . .

BBC (Branch on Bit Clear) is an SPC700 instruction that performs a branch when a bit in the direct page is clear. The index to the direct page byte that bit lives in is the first operand byte. Which bit within that byte is specified by the top 3 bits of the opcode. The target relative address to jump to is the second operand byte. In Nintendo's manual, the high nybble of the opcode is called y.

In assembly source, the two operands appear in the same order that they do in the instruction stream.

No flags are affected.

Syntax

BBC dp, bit, rel

See Also

External Links