We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

MOVES (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
m (Jeffythedragonslayer moved page MOVES to MOVES (Super FX): Super FX in title)
(made flags affected more prominent)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''MOVES''' is a [[Super FX]] instruction that moves the value of a register.
{| class="wikitable" style="float:right;clear:right;width:50%"
 
{| class="wikitable" style="float:right;clear:right;width:40%"
!colspan="8"|Basic Info
!colspan="8"|Basic Info
|+
|+
|'''Addressing Mode'''
|'''Opcode'''
|'''Opcode'''
|'''Length'''
|'''Length'''
Line 10: Line 9:
|'''Cache Speed'''
|'''Cache Speed'''
|+
|+
|[[Implied]] (type 1)
|2n'Bn
|2n'Bn
|2 bytes
|2 bytes
Line 17: Line 17:
|}
|}


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:35%"
!colspan="9"|Flags Clobbered
!colspan="9"|Flags Affected
|+
|+
|B
|[[B Flag|B]]
|ALT1
|[[ALT1]]
|ALT2
|[[ALT2]]
|O/V
|[[O/V]]
|S
|[[Sign Flag|S]]
|CY
|[[CY]]
|Z
|[[Zero Flag|Z]]
|+
|+
|0
|0
|0
|0
|0
|0
|D7
|D15
|.
|.
|.
|Z
|
|.
|}
|}
'''MOVES''' (Move and Set flags) is a [[Super FX]] instruction that moves the value of a general register into another general register.
According to [[fullsnes]], the official documentation has the source and destination operands for MOVES mixed up. <sup>[2]</sup>
The flags are affected according to the datum moved.  [[O/V]] will reflect bit 7, the [[sign flag]] will reflect bit 15, and the [[zero flag]] will be set iff the datum moved is zero.
The [[ALT0]] state is restored.
==== Syntax ====
<pre>
MOVES Rn, Rn'
</pre>
==== Example ====
Let:
R<sub>7</sub> = 4983h
After executing MOVES R<sub>10</sub>, R<sub>7</sub>:
R<sub>10</sub> = 4983h
and the overflow flag is set.
=== See Also ===
* [[MOVE]]
* [[MOVEW]]
* [[MOVEB]]
* [[MOV]]


=== External Links ===
=== External Links ===
* Official Nintendo documentation on MOVES: https://archive.org/details/SNESDevManual/book2/page/n245
# Official Super Nintendo development manual on MOVES: 9.63 on [https://archive.org/details/SNESDevManual/book2/page/n245 Page 2-9-89 of Book II]
# https://problemkaputt.de/fullsnes.htm#snescartgsuncpumisc


[[Category:ASM]]
[[Category:ASM]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Data Transfer Instructions]]
[[Category:Data Transfer Instructions]]
[[Category:Two-byte Instructions]]

Latest revision as of 19:23, 30 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied (type 1) 2n'Bn 2 bytes 6 cycles 6 cycles 2 cycle
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0 D7 D15 . Z

MOVES (Move and Set flags) is a Super FX instruction that moves the value of a general register into another general register.

According to fullsnes, the official documentation has the source and destination operands for MOVES mixed up. [2]

The flags are affected according to the datum moved. O/V will reflect bit 7, the sign flag will reflect bit 15, and the zero flag will be set iff the datum moved is zero.

The ALT0 state is restored.

Syntax

MOVES Rn, Rn'

Example

Let:

R7 = 4983h

After executing MOVES R10, R7:

R10 = 4983h

and the overflow flag is set.

See Also

External Links

  1. Official Super Nintendo development manual on MOVES: 9.63 on Page 2-9-89 of Book II
  2. https://problemkaputt.de/fullsnes.htm#snescartgsuncpumisc