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

IWT (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
(trivia about misspelling)
(→‎See Also: LDX, LDY)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable" style="float:right;clear:right;width:40%"
{| class="wikitable" style="float:right;clear:right;width:50%"
!colspan="8"|Basic Info
!colspan="8"|Basic Info
|+
|+
|'''Addressing Mode'''
|'''Opcode'''
|'''Opcode'''
|'''Length'''
|'''Length'''
Line 8: Line 9:
|'''Cache Speed'''
|'''Cache Speed'''
|+
|+
|[[Immediate]]
|Fnxxxx
|Fnxxxx
|3 bytes
|3 bytes
Line 16: 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 35: Line 37:
|}
|}


'''IWT''' is a [[Super FX]] instruction that loads two immediate bytes.
'''IWT''' (Immediate Word Transfer) is a [[Super FX]] instruction that loads two immediate bytes into a register. Any register from R<sub>0</sub> to R<sub>15</sub> may be specified.
 
The [[ALT0]] state is restored.
 
==== Syntax ====
<pre>
IWT Rn, #xx
</pre>
 
==== Example ====
When:
IWT R<sub>0</sub>, #4583h
is executed:
R<sub>0</sub> = 4583h


=== Trivia ===
=== Trivia ===
The official Super Nintendo development manual mispells the mnemonic as "ITW" in the opcode diagram.<sup>[1]</sup>
The official Super Nintendo development manual mispells the mnemonic as "ITW" in the opcode diagram.<sup>[1]</sup> The low byte of the immediate value is loaded before the high byte.


=== See Also ===
=== See Also ===
* [[IBT]]
* [[IBT]]
* [[LDA]]
* [[LDA]]
* [[LDX]]
* [[LDY]]
* [[LEA]]
* [[LEA]]


=== External Links ===
=== External Links ===
# Official Nintendo documentation on IWT: [https://archive.org/details/SNESDevManual/book2/page/n218 Page 2-9-62 of Book II]
# Official Nintendo documentation on IWT: 9.43 on [https://archive.org/details/SNESDevManual/book2/page/n218 Page 2-9-62 of Book II]


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

Latest revision as of 01:55, 16 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Immediate Fnxxxx 3 bytes 9 cycles 9 cycles 3 cycle
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0 . . . .

IWT (Immediate Word Transfer) is a Super FX instruction that loads two immediate bytes into a register. Any register from R0 to R15 may be specified.

The ALT0 state is restored.

Syntax

IWT Rn, #xx

Example

When:

IWT R0, #4583h

is executed:

R0 = 4583h

Trivia

The official Super Nintendo development manual mispells the mnemonic as "ITW" in the opcode diagram.[1] The low byte of the immediate value is loaded before the high byte.

See Also

External Links

  1. Official Nintendo documentation on IWT: 9.43 on Page 2-9-62 of Book II