We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
SBC (SPC700): Difference between revisions
From SnesLab
(direct page admode) |
(abs admode) |
||
Line 22: | Line 22: | ||
|3 cycles | |3 cycles | ||
|+ | |+ | ||
| | |[[Direct Page Indexed by X]] | ||
|B4 | |B4 | ||
|2 bytes | |2 bytes | ||
|4 cycles | |4 cycles | ||
|+ | |+ | ||
| | |[[Absolute Addressing | Absolute]] | ||
|A5 | |A5 | ||
|3 bytes | |3 bytes | ||
|4 cycles | |4 cycles | ||
|+ | |+ | ||
| | |[[Absolute Indexed by X]] | ||
|B5 | |B5 | ||
|3 bytes | |3 bytes | ||
|5 cycles | |5 cycles | ||
|+ | |+ | ||
| | |[[Absolute Indexed by Y]] | ||
|B6 | |B6 | ||
|3 bytes | |3 bytes |
Revision as of 18:58, 23 July 2023
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
immediate | A8 | 2 bytes | 2 cycles | ||||
A6 | 1 byte | 3 cycles | |||||
Direct Page | A4 | 2 bytes | 3 cycles | ||||
Direct Page Indexed by X | B4 | 2 bytes | 4 cycles | ||||
Absolute | A5 | 3 bytes | 4 cycles | ||||
Absolute Indexed by X | B5 | 3 bytes | 5 cycles | ||||
Absolute Indexed by Y | B6 | 3 bytes | 5 cycles | ||||
A7 | 2 bytes | 6 cycles | |||||
B7 | 2 bytes | 6 cycles | |||||
B9 | 1 byte | 5 cycles | |||||
A9 | 3 bytes | 6 cycles | |||||
B8 | 3 bytes | 5 cycles |
Flags Affected | |||||||
---|---|---|---|---|---|---|---|
N | V | P | B | H | I | Z | C |
. | . | . |
SBC (Subtract) is an SPC700 instruction that subtracts the right operand and the inverse of the carry flag from the left operand. Often, the left operand is the accumulator.
See Also
External Links
- Official Super Nintendo development manual on SBC: Appendix C-5 of Book I