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

MOVEW (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
(added official doc link)
(→‎See Also: MOVEB)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''MOVEW''' is a [[Super FX]] macro instruction that loads data from the [[Game Pak]].
'''MOVEW''' (Move Word) is a [[Super FX]] macro instruction that loads data from the [[Game Pak]].
 
==== Syntax ====
<pre>
MOVEW Rn, (Rn')
MOVEW (Rn'), Rn
</pre>
 
==== Example 1 ====
Let:
R<sub>3</sub> = 6480h
(71:6480h) = 2eh
(71:6481h) = c0h
RAMBR = 71h
After executing this program:
MOVEW R<sub>5</sub>, (R<sub>3</sub>)
; (R<sub>3</sub>) -> R<sub>5</sub> (low byte)
; (R<sub>3</sub>+1) -> R<sub>5</sub> (high byte)
We have:
R<sub>5</sub> = c02eh
 
==== Example 2 ====
Let:
R<sub>6</sub> = 0822h
(70:0822h) = 43h
(70:0823h) = 96h
RAMBR = 70h
After executing this program:
MOVEW R<sub>0</sub>, (R<sub>6</sub>)
We have:
R<sub>0</sub> = 9643h
 
==== Example 3 ====
Let:
R<sub>9</sub> = bfa3h
R<sub>10</sub> = 4444h
RAMBR = 71h
After executing this program:
MOVEW (R<sub>10</sub>), R<sub>9</sub>
We have:
(71:4444h) = a3h
(71:4445h) = bfh
 
==== Example 4 ====
Let:
R<sub>0</sub> = 3151h
R<sub>6</sub> = 92a0h
RAMBR = 71h
After executing this program:
MOVEW (R<sub>6</sub>), R<sub>0</sub>
We have:
(71:92a0h) = 51h
(71:92a1h) = 31h
 
=== See Also ===
* [[MOVE]]
* [[MOVES]]
* [[MOVEB]]
* [[LDW]]
* [[TO]]
* [[FROM]]
* [[STW]]
* [[RAMB]]
* [[MOV]]


=== External Links ===
=== External Links ===
* Official Nintendo documentation on MOVEW: https://archive.org/details/SNESDevManual/book2/page/n246
* Official Super Nintendo development manual on MOVEW: 9.64 on [https://archive.org/details/SNESDevManual/book2/page/n246 Page 2-9-90 of Book II]


[[Category:ASM]]
[[Category:ASM]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Macro Instructions]]
[[Category:Macro Instructions]]

Latest revision as of 05:31, 16 July 2024

MOVEW (Move Word) is a Super FX macro instruction that loads data from the Game Pak.

Syntax

MOVEW Rn, (Rn')
MOVEW (Rn'), Rn

Example 1

Let:

R3 = 6480h
(71:6480h) = 2eh
(71:6481h) = c0h
RAMBR = 71h

After executing this program:

MOVEW R5, (R3)
; (R3) -> R5 (low byte)
; (R3+1) -> R5 (high byte)

We have:

R5 = c02eh

Example 2

Let:

R6 = 0822h
(70:0822h) = 43h
(70:0823h) = 96h
RAMBR = 70h

After executing this program:

MOVEW R0, (R6)

We have:

R0 = 9643h

Example 3

Let:

R9 = bfa3h
R10 = 4444h
RAMBR = 71h

After executing this program:

MOVEW (R10), R9

We have:

(71:4444h) = a3h
(71:4445h) = bfh

Example 4

Let:

R0 = 3151h
R6 = 92a0h
RAMBR = 71h

After executing this program:

MOVEW (R6), R0

We have:

(71:92a0h) = 51h
(71:92a1h) = 31h

See Also

External Links