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

SMS (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
m (Jeffythedragonslayer moved page SMS to SMS (Super FX): Super FX in title)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''SMS''' is a [[Super FX]] instruction that stores a value to the [[Game Pak]].
{| 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 Indirect]]
|3EAnkk
|3EAnkk
|3 bytes
|3 bytes
Line 18: Line 18:


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:30%"
!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
Line 36: Line 36:
|.
|.
|}
|}
'''SMS''' (Store to raM Short address) is a [[Super FX]] instruction that stores a value to the [[Game Pak]].  The bank must be specified with [[RAMB]].
The selectable RAM address must be an even number between 0 and 510.
The number of cycles varies because of the [[RAM buffer]].
The [[ALT0]] state is restored.
==== Syntax ====
<pre>
SMS (yy), Rn
</pre>
==== Example ====
Let:
R<sub>11</sub> = abcdh
RAMBR = 71h
After executing this program:
<pre>
Syntax              Opcode
SMS (194h), R11    3e ab ca
</pre>
We have:
(71:0194h) = cdh
(71:0195h) = abh
=== See Also ===
* [[SM]]
* [[ALT2]]
* [[LMS]]
* [[LM]]


=== External Links ===
=== External Links ===
* Official Nintendo documentation on SMS: https://archive.org/details/SNESDevManual/book2/page/n269
* Official Nintendo documentation on SMS: 9.82 on [https://archive.org/details/SNESDevManual/book2/page/n269 page 2-9-113 of Book II]
* example: [https://archive.org/details/SNESDevManual/book2/page/n270 Page 2-9-114], lbid.


[[Category:ASM]]
[[Category:ASM]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Data Transfer Instructions]]
[[Category:Data Transfer Instructions]]

Latest revision as of 05:45, 16 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied Indirect 3EAnkk 3 bytes 9 to 14 cycles 13 to 17 cycles 3 to 8 cycles
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0 . . . .

SMS (Store to raM Short address) is a Super FX instruction that stores a value to the Game Pak. The bank must be specified with RAMB.

The selectable RAM address must be an even number between 0 and 510.

The number of cycles varies because of the RAM buffer.

The ALT0 state is restored.

Syntax

SMS (yy), Rn

Example

Let:

R11 = abcdh
RAMBR = 71h

After executing this program:

 Syntax              Opcode
 SMS (194h), R11     3e ab ca

We have:

(71:0194h) = cdh
(71:0195h) = abh

See Also

External Links