We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
AND1 (SPC700): Difference between revisions
From SnesLab
(created page) |
(made flags affected more prominent) |
||
(26 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''' | ||
|+ | |+ | ||
| | |[[Absolute Boolean Bit]] | ||
| | |4A | ||
|3 bytes | |||
|4 cycles | |||
|+ | |||
|[[Absolute Boolean Bit]] | |||
|6A | |||
|3 bytes | |3 bytes | ||
|4 cycles | |4 cycles | ||
Line 16: | Line 19: | ||
{| 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 34: | Line 37: | ||
|. | |. | ||
|. | |. | ||
| | |C | ||
|} | |} | ||
'''AND1''' is an [[SPC700]] instruction that performs a logical AND between a memory bit and the [[carry flag]], then stores the conjunction in the carry flag. The low 13 bits of the operand specify an absolute address. The high 3 bits of the operand specify which bit at that absolute address. | |||
The [[bit reversal]] operator may be prefixed to the memory bit address, in which case opcode 6A is assembled. | |||
==== Syntax ==== | |||
<pre> | |||
AND1 C, mem. bit | |||
AND1 C, /mem. bit | |||
</pre> | |||
=== See Also === | === See Also === | ||
* [[AND (SPC700)]] | |||
* [[OR1]] | * [[OR1]] | ||
* [[EOR1]] | |||
* [[MOV1]] | |||
* [[NOT1]] | |||
=== External Links === | |||
* Official Nintendo documentation on AND1: Table C-18 in [https://archive.org/details/SNESDevManual/book1/page/n234 Appendix C-9 of Book I] | |||
* subparagraph 8.2.3.3 of [https://archive.org/details/SNESDevManual/book1/page/n186 page 3-8-8], lbid. | |||
* anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L332 | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:SPC700]] | [[Category:SPC700]] | ||
[[Category:Bit Operation Commands]] | |||
[[Category:Three-byte Instructions]] |
Latest revision as of 13:52, 30 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
Absolute Boolean Bit | 4A | 3 bytes | 4 cycles | ||||
Absolute Boolean Bit | 6A | 3 bytes | 4 cycles |
Flags Affected | |||||||
---|---|---|---|---|---|---|---|
N | V | P | B | H | I | Z | C |
. | . | . | . | . | . | . | C |
AND1 is an SPC700 instruction that performs a logical AND between a memory bit and the carry flag, then stores the conjunction in the carry flag. The low 13 bits of the operand specify an absolute address. The high 3 bits of the operand specify which bit at that absolute address.
The bit reversal operator may be prefixed to the memory bit address, in which case opcode 6A is assembled.
Syntax
AND1 C, mem. bit AND1 C, /mem. bit
See Also
External Links
- Official Nintendo documentation on AND1: Table C-18 in Appendix C-9 of Book I
- subparagraph 8.2.3.3 of page 3-8-8, lbid.
- anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L332