BBC (SPC700): Difference between revisions
(added all opcodes) |
(→External Links: added anomie link) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|'''Speed''' | |'''Speed''' | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|13 | |13 | ||
|3 byte | |3 byte | ||
Line 13: | Line 13: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|33 | |33 | ||
|3 byte | |3 byte | ||
Line 19: | Line 19: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|53 | |53 | ||
|3 byte | |3 byte | ||
Line 25: | Line 25: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|73 | |73 | ||
|3 byte | |3 byte | ||
Line 31: | Line 31: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|93 | |93 | ||
|3 byte | |3 byte | ||
Line 37: | Line 37: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|B3 | |B3 | ||
|3 byte | |3 byte | ||
Line 43: | Line 43: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|D3 | |D3 | ||
|3 byte | |3 byte | ||
Line 49: | Line 49: | ||
when condition is true: 7 cycles | when condition is true: 7 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Bit Relative]] | ||
|F3 | |F3 | ||
|3 byte | |3 byte | ||
Line 57: | Line 57: | ||
{| class="wikitable" style="float:right;clear:right;width:30%" | {| class="wikitable" style="float:right;clear:right;width:30%" | ||
!colspan="8"|Flags | !colspan="8"|Flags Affected | ||
|+ | |+ | ||
|N | |[[Negative Flag|N]] | ||
|V | |[[Overflow Flag|V]] | ||
|P | |[[Direct Page Flag|P]] | ||
|B | |[[Break Flag|B]] | ||
|H | |[[Half-Carry Flag|H]] | ||
|I | |[[Interrupt Enable Flag|I]] | ||
|Z | |[[Zero Flag|Z]] | ||
|C | |[[Carry Flag|C]] | ||
|+ | |+ | ||
|. | |. | ||
Line 78: | Line 78: | ||
|} | |} | ||
'''BBC''' (Branch on Bit Clear) is an [[SPC700]] instruction that performs a branch when the [[direct page | '''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 ==== | |||
<pre> | |||
BBC dp, bit, rel | |||
</pre> | |||
=== See Also === | === See Also === | ||
* [[BBS]] | * [[BBS]] | ||
* [[BBR]] | |||
=== External Links === | === External Links === | ||
* Official Super Nintendo development manual on BBC: [https://archive.org/details/SNESDevManual/book1/page/ | * Official Super Nintendo development manual on BBC: Table C-15 [https://archive.org/details/SNESDevManual/book1/page/n233 Appendix C-8 of Book I] | ||
* anomie: https://github.com/yupferris/TasmShiz/blob/8fabc9764c33a7ae2520a76d80ed7220bb939f12/spc700.txt#L340 | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:SPC700]] | [[Category:SPC700]] | ||
[[Category:Branching Commands]] | [[Category:Branching Commands]] |
Latest revision as of 22:32, 13 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
- Official Super Nintendo development manual on BBC: Table C-15 Appendix C-8 of Book I
- anomie: https://github.com/yupferris/TasmShiz/blob/8fabc9764c33a7ae2520a76d80ed7220bb939f12/spc700.txt#L340