We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
XCN (SPC700): Difference between revisions
From SnesLab
(→External Links: hid archive URL) |
(made affected flags more prominent) |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width:40%" | |||
{| class="wikitable" style="float:right;clear:right;width: | |||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
Line 9: | Line 7: | ||
|'''Speed''' | |'''Speed''' | ||
|+ | |+ | ||
| | |[[Accumulator Addressing|Accumulator]] | ||
|9F | |9F | ||
|1 byte | |1 byte | ||
Line 16: | Line 14: | ||
{| 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 | ||
|+ | |||
|[[Negative Flag|N]] | |||
|[[Overflow Flag|V]] | |||
|[[Direct Page Flag|P]] | |||
|[[Break Flag|B]] | |||
|[[Half-Carry Flag|H]] | |||
|[[Interrupt Enable Flag|I]] | |||
|[[Zero Flag|Z]] | |||
|[[Carry Flag|C]] | |||
|+ | |+ | ||
|N | |N | ||
|. | |. | ||
|. | |. | ||
Line 33: | Line 31: | ||
|. | |. | ||
|. | |. | ||
| | |Z | ||
|. | |. | ||
|} | |} | ||
'''XCN''' is an [[SPC700]] instruction that swaps the high and low nibbles of the [[accumulator]]. Bits 0 to 3 become bits 4 to 7 and vice versa. | |||
==== Syntax ==== | |||
<pre> | |||
XCN | |||
XCN A | |||
</pre> | |||
[[File:xcn.png]] | |||
=== See Also === | === See Also === | ||
* [[XBA]] | * [[XBA]] | ||
* [[XCE]] | |||
* [[SWAP]] | * [[SWAP]] | ||
=== External Links === | === External Links === | ||
* Official Nintendo documentation on XCN: [https://archive.org/details/SNESDevManual/book1/page/n232 Appendix C-7 of Book I] | * Official Nintendo documentation on XCN: Table C-10 in [https://archive.org/details/SNESDevManual/book1/page/n232 Appendix C-7 of Book I] | ||
* anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L609 | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:SPC700]] | [[Category:SPC700]] | ||
[[Category:Shift Rotation Commands]] | [[Category:Shift Rotation Commands]] |
Latest revision as of 03:14, 25 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
Accumulator | 9F | 1 byte | 5 cycles |
Flags Affected | |||||||
---|---|---|---|---|---|---|---|
N | V | P | B | H | I | Z | C |
N | . | . | . | . | . | Z | . |
XCN is an SPC700 instruction that swaps the high and low nibbles of the accumulator. Bits 0 to 3 become bits 4 to 7 and vice versa.
Syntax
XCN XCN A
See Also
External Links
- Official Nintendo documentation on XCN: Table C-10 in Appendix C-7 of Book I
- anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L609