We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
LEA: Difference between revisions
From SnesLab
(linkify Z) |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width: | {| 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 18: | Line 20: | ||
!colspan="9"|Flags Affected | !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: | ||
|} | |} | ||
'''LEA''' is a [[Super FX]] official macro that loads two immediate bytes. It is an alias for [[IWT]]. It | '''LEA''' is a [[Super FX]] official macro that loads two immediate bytes into a general register. It is an alias for [[IWT]]. It stands for "load effective address."<sup>[2]</sup> | ||
The [[ALT0]] state is restored. | |||
==== Syntax ==== | |||
<pre> | |||
LEA Rn, #xx | |||
</pre> | |||
==== Example ==== | |||
After executing LEA R<sub>3</sub>, #4853h: | |||
R<sub>3</sub> = 4853h | |||
=== See Also === | |||
* [[LDA]] | |||
* [[IBT]] | |||
=== External Links === | === External Links === | ||
* Official Nintendo documentation on LEA: [https://archive.org/details/SNESDevManual/book2/page/n223 Page 2-9-67 of Book II] | * Official Nintendo documentation on LEA: 9.47 on [https://archive.org/details/SNESDevManual/book2/page/n223 Page 2-9-67 of Book II] | ||
* Table 2-2-2 on page 2-2-8 of Book II, lbid. | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Super FX]] | [[Category:Super FX]] | ||
[[Category:Three-byte Instructions]] | [[Category:Three-byte Instructions]] |
Latest revision as of 02:12, 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 | . | . | . | . |
LEA is a Super FX official macro that loads two immediate bytes into a general register. It is an alias for IWT. It stands for "load effective address."[2]
The ALT0 state is restored.
Syntax
LEA Rn, #xx
Example
After executing LEA R3, #4853h:
R3 = 4853h
See Also
External Links
- Official Nintendo documentation on LEA: 9.47 on Page 2-9-67 of Book II
- Table 2-2-2 on page 2-2-8 of Book II, lbid.