We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
FROM (Super FX): Difference between revisions
From SnesLab
(added syntax) |
(Added note on execution of MOVES.) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Addressing Mode''' | |||
|'''Opcode''' | |'''Opcode''' | ||
|'''Length''' | |'''Length''' | ||
Line 8: | Line 9: | ||
|'''Cache Speed''' | |'''Cache Speed''' | ||
|+ | |+ | ||
|[[Implied]] (type 1) | |||
|Bn | |Bn | ||
|1 byte | |1 byte | ||
Line 24: | Line 26: | ||
|[[Sign Flag|S]] | |[[Sign Flag|S]] | ||
|[[CY]] | |[[CY]] | ||
|Z | |[[Zero Flag|Z]] | ||
|+ | |+ | ||
|. | |. | ||
Line 35: | Line 37: | ||
|} | |} | ||
'''FROM''' is a [[Super FX]] register prefix instruction that specifies the [[source register]]. The exception is when the [[B Flag]] is set (i.e. a [[WITH]] instruction is executed immediately before) in which case a [[MOVES]] is executed instead with | '''FROM''' is a [[Super FX]] register prefix instruction that specifies the [[source register]]. The exception is when the [[B Flag]] is set (i.e. a [[WITH]] instruction is executed immediately before) in which case a [[MOVES]] is executed instead with FROM acting as the source and WTIH as the destination.<sup>[1]</sup> | ||
No flags are affected. | No flags are affected. | ||
Line 43: | Line 45: | ||
FROM Rn | FROM Rn | ||
</pre> | </pre> | ||
==== Example ==== | |||
To set R<sub>2</sub> as the source register, run: | |||
FROM R<sub>2</sub> | |||
=== See Also === | === See Also === | ||
Line 48: | Line 54: | ||
* [[WITH (Super FX)]] | * [[WITH (Super FX)]] | ||
* [[MOVES (Super FX)]] | * [[MOVES (Super FX)]] | ||
=== Notes === | |||
<sup>[1]</sup> The information in the developer manual is actually contradictory. The description of FROM claims the transfer happens from R<sub>n</sub> (set by FROM) to D<sub>reg</sub> (set by WITH) whereas that of MOVES R<sub>n</sub>, R<sub>n</sub>' claims to transfer from R<sub>n</sub>' (set by WITH) to R<sub>n</sub> (set by FROM) instead. According to [[fullsnes]], it's the description of MOVES which is wrong. | |||
=== External Links === | === External Links === |
Latest revision as of 12:48, 15 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Implied (type 1) | Bn | 1 byte | 3 cycles | 3 cycles | 1 cycle |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
. | . | . | . | . | . | . |
FROM is a Super FX register prefix instruction that specifies the source register. The exception is when the B Flag is set (i.e. a WITH instruction is executed immediately before) in which case a MOVES is executed instead with FROM acting as the source and WTIH as the destination.[1]
No flags are affected.
Syntax
FROM Rn
Example
To set R2 as the source register, run:
FROM R2
See Also
Notes
[1] The information in the developer manual is actually contradictory. The description of FROM claims the transfer happens from Rn (set by FROM) to Dreg (set by WITH) whereas that of MOVES Rn, Rn' claims to transfer from Rn' (set by WITH) to Rn (set by FROM) instead. According to fullsnes, it's the description of MOVES which is wrong.
External Links
- Official Nintendo documentation on FROM: 9.34 on page 2-9-48 of Book II
- Official Nintendo documentation on Register Prefixes: page 2-6-7 of Book II