We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
MOVW (SPC700): Difference between revisions
From SnesLab
(→References: Table C-11) |
(linkify flags) |
||
Line 25: | Line 25: | ||
|+ | |+ | ||
|Direction | |Direction | ||
|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]] | ||
|+ | |+ | ||
|to YA | |to YA |
Revision as of 04:45, 27 November 2023
Basic Info | ||||
---|---|---|---|---|
Direction | Addressing Mode | Opcode | Length | Speed |
to YA | Direct Page | BA | 2 bytes | 5 cycles |
from YA | Direct Page | DA | 2 bytes | 4 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
Direction | N | V | P | B | H | I | Z | C |
to YA | . | . | . | . | . | |||
from YA | . | . | . | . | . | . | . | . |
MOVW (Move Word) is an SPC700 instruction that moves a 16-bit direct page value to or from the YA register. There are no variations of MOVW that do not operate on YA. MOVW performs a read cycle on the low byte of the destination, but not the source.[2]
The operands are stored in the instruction stream in the opposite order they appear in the assembler source. In the assembler source, the operand on the right is the source and the operand on the left is the destination.
Example
From the IPL ROM,
MOVW YA, $F6 ; load the byte at direct page location $F6 into A and the byte at direct page location $F7 into Y MOVW $00, YA ; store the value in Y to direct page location $01 and the value in A to direct page location $00
See Also
References
- Official Super Nintendo development manual on MOVW: Table C-11 in Appendix C-8 of Book I
- anomie's SPC700 doc