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
(added official Nintendo doc link) |
(added IPL example) |
||
Line 1: | Line 1: | ||
'''MOVW''' is an [[SPC700]] instruction that moves a value to or from [[YA]]. | '''MOVW''' is an [[SPC700]] instruction that moves a 16-bit [[ARAM]] value to or from the [[YA]] register. | ||
=== Example === | |||
From the [[IPL ROM]], | |||
<pre> | |||
MOVW YA, $F6 ; load the byte at ARAM location $F6 into A and the byte at $F7 into Y | |||
MOVW $00, YA ; store the value in Y to ARAM location $01 and the value in A to $00 | |||
</pre> | |||
{| class="wikitable" style="float:right;clear:right;width:30%" | {| class="wikitable" style="float:right;clear:right;width:30%" |
Revision as of 02:43, 22 June 2023
MOVW is an SPC700 instruction that moves a 16-bit ARAM value to or from the YA register.
Example
From the IPL ROM,
MOVW YA, $F6 ; load the byte at ARAM location $F6 into A and the byte at $F7 into Y MOVW $00, YA ; store the value in Y to ARAM location $01 and the value in A to $00
Basic Info (to YA) | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
BA | 2 bytes | 5 cycles |
Flags Clobbered (to YA) | |||||||
---|---|---|---|---|---|---|---|
N | V | P | B | H | I | Z | C |
. | . | . | . | . |
Basic Info (from YA) | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
DA | 2 bytes | 4 cycles |
Flags Clobbered (from YA) | |||||||
---|---|---|---|---|---|---|---|
N | V | P | B | H | I | Z | C |
. | . | . | . | . | . | . | . |
See Also
External Links
- Official Nintendo documentation on MOVW: https://archive.org/details/SNESDevManual/book1/page/n233