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
Jump to: navigation, search
(consolidate tables)
Line 1: Line 1:
{| class="wikitable" style="float:right;clear:right;width:40%"
{| class="wikitable" style="float:right;clear:right;width:40%"
!colspan="8"|Basic Info (to YA)
!colspan="5"|Basic Info
|+
|+
|'''Direction'''
|'''Addressing Mode'''
|'''Addressing Mode'''
|'''Opcode'''
|'''Opcode'''
Line 7: Line 8:
|'''Speed'''
|'''Speed'''
|+
|+
|to YA
|
|
|BA
|BA
|2 bytes
|2 bytes
|5 cycles
|5 cycles
|+
|from YA
|
|DA
|2 bytes
|4 cycles
|}
|}


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="8"|Flags Clobbered (to YA)
!colspan="9"|Flags Clobbered
|+
|+
|Direction
|N
|N
|V
|V
Line 25: Line 34:
|C
|C
|+
|+
|to YA
|
|
|.
|.
Line 33: Line 43:
|
|
|
|
|}
{| class="wikitable" style="float:right;clear:right;width:40%"
!colspan="8"|Basic Info (from YA)
|+
|'''Addressing Mode'''
|'''Opcode'''
|'''Length'''
|'''Speed'''
|+
|
|DA
|2 bytes
|4 cycles
|}
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="8"|Flags Clobbered (from YA)
|+
|N
|V
|P
|B
|H
|I
|Z
|C
|+
|+
|from YA
|.
|.
|.
|.
Line 70: Line 54:
|.
|.
|}
|}


'''MOVW''' (Move Word) is an [[SPC700]] instruction that moves a 16-bit [[ARAM]] value to or from the [[YA]] register.  There are no variations of MOVW that do not operate on YA.
'''MOVW''' (Move Word) is an [[SPC700]] instruction that moves a 16-bit [[ARAM]] value to or from the [[YA]] register.  There are no variations of MOVW that do not operate on YA.

Revision as of 18:10, 22 July 2023

Basic Info
Direction Addressing Mode Opcode Length Speed
to YA BA 2 bytes 5 cycles
from YA DA 2 bytes 4 cycles
Flags Clobbered
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 ARAM value to or from the YA register. There are no variations of MOVW that do not operate on YA.

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

See Also

External Links