We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
ALT1: Difference between revisions
From SnesLab
(linkify status flag reg) |
(→External Links: added XOR ref) |
||
(15 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
|[[Sign Flag|S]] | |[[Sign Flag|S]] | ||
|[[CY]] | |[[CY]] | ||
|Z | |[[Zero Flag|Z]] | ||
|+ | |+ | ||
|. | |. | ||
Line 38: | Line 38: | ||
'''ALT1''' is both the name of a [[Super FX]] flag and the flag prefix instruction that sets it. It is bit 8 of the [[status flag register]]. | '''ALT1''' is both the name of a [[Super FX]] flag and the flag prefix instruction that sets it. It is bit 8 of the [[status flag register]]. | ||
==== Syntax ==== | |||
<pre> | |||
ALT1 | |||
</pre> | |||
The following instructions require ALT1: | |||
* [[ADC (Super FX)|ADC]] R<sub>n</sub> | |||
* [[BIC]] R<sub>n</sub> | |||
* [[CMODE]] | |||
* [[DIV2]] | |||
* [[GETBH]] | |||
* [[LDB]] (R<sub>m</sub>) | |||
* [[LJMP]] | |||
* [[LM (Super FX)|LM]] R<sub>n</sub>, (xx) | |||
* [[LMS]] R<sub>n</sub>, (yy) | |||
* [[LMULT]] | |||
* [[RPIX]] | |||
* [[SBC (Super FX)|SBC]] R<sub>n</sub> | |||
* [[STB]] (R<sub>m</sub>) | |||
* [[UMULT]] R<sub>n</sub> | |||
* [[XOR]] R<sub>n</sub> | |||
Many instructions clear the ALT1 flag, including: | |||
* [[GSU/ADC|ADC]] R<sub>n</sub> | |||
* [[GSU/ADC|ADC]] #n | |||
* [[ADD]] R<sub>n</sub> | |||
* [[ADD]] #n | |||
* [[GSU/AND|AND]] R<sub>n</sub> | |||
* [[GSU/AND|AND]] #n | |||
* [[ASR]] | |||
* [[BIC]] R<sub>n</sub> | |||
* [[BIC]] #n | |||
* [[CACHE]] | |||
* [[CMODE]] | |||
* [[GSU/CMP|CMP]] R<sub>n</sub> | |||
* [[COLOR]] | |||
* [[GSU/DEC|DEC]] R<sub>n</sub> | |||
* [[DIV2]] | |||
* [[FMULT]] | |||
* [[GETB]] | |||
* [[GETBH]] | |||
* [[GETBL]] | |||
* [[GETBS]] | |||
* [[GETC]] | |||
* [[HIB]] | |||
* [[IBT]] R<sub>n</sub>, #pp | |||
* [[GSU/INC|INC]] R<sub>n</sub> | |||
* [[IWT]] R<sub>n</sub>, #xx | |||
* [[GSU/JMP|JMP]] R<sub>n</sub> | |||
* [[LDB]] (R<sub>m</sub>) | |||
* [[LDW]] (R<sub>m</sub>) | |||
* [[LEA]] R<sub>n</sub>, xx | |||
* [[LINK]] #n | |||
* [[LJMP]] R<sub>n</sub> | |||
* [[GSU/LM|LM]] R<sub>n</sub>, (xx) | |||
* [[LMS]] R<sub>n</sub>, (yy) | |||
* [[LMULT]] | |||
* [[LOB]] | |||
* [[LOOP]] | |||
* [[GSU/LSR|LSR]] | |||
* [[MERGE]] | |||
* [[GSU/MOVE|MOVE]] R<sub>n</sub>, R<sub>n</sub>' | |||
* [[MOVES]] R<sub>n</sub>, R<sub>n</sub>' | |||
* [[MULT]] R<sub>n</sub> | |||
* [[MULT]] #n | |||
* [[GSU/NOP|NOP]] | |||
* [[NOT]] | |||
* [[OR]] R<sub>n</sub> | |||
* [[OR]] #n | |||
* [[PLOT]] | |||
* [[RAMB]] | |||
* [[GSU/ROL|ROL]] | |||
* [[ROMB]] | |||
* [[GSU/ROR|ROR]] | |||
* [[RPIX]] | |||
* [[GSU/SBC|SBC]] R<sub>n</sub> | |||
* [[SBK]] | |||
* [[SEX]] | |||
* [[SM]] (xx), R<sub>n</sub> | |||
* [[SMS]] (yy), R<sub>n</sub> | |||
* [[STB]] (R<sub>m</sub>) | |||
* [[STOP]] | |||
* [[STW]] (R<sub>m</sub>) | |||
* [[SUB]] R<sub>n</sub> | |||
* [[SUB]] #n | |||
* [[SWAP]] | |||
* [[UMULT]] R<sub>n</sub> | |||
* and presumably UMULT #n and XOR too | |||
=== See Also === | === See Also === | ||
* [[ALT2]] | * [[ALT2]] | ||
* [[ALT3]] | * [[ALT3]] | ||
* [[ALT0]] | |||
* [[Super_FX_Opcode_Matrices#ALT1_=_1,_ALT2_=_0]] | |||
=== External Links === | === External Links === | ||
* Official Nintendo documentation on ALT1: 9.8 on [https://archive.org/details/SNESDevManual/book2/page/n163 page 2-9-7 of Book II] | * Official Nintendo documentation on ALT1: 9.8 on [https://archive.org/details/SNESDevManual/book2/page/n163 page 2-9-7 of Book II] | ||
* Table 2-4-2 on [https://archive.org/details/SNESDevManual/book2/page/n110 page 2-4-4], lbid. | |||
* https://en.wikibooks.org/wiki/Super_NES_Programming/Super_FX_tutorial#Instruction_Set_Table | |||
[[Category:ASM]] | [[Category:ASM]] |
Latest revision as of 00:48, 22 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Implied (type 2) | 3D | 1 byte | 3 cycles | 3 cycles | 1 cycle |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
. | 1 | . | . | . | . | . |
ALT1 is both the name of a Super FX flag and the flag prefix instruction that sets it. It is bit 8 of the status flag register.
Syntax
ALT1
The following instructions require ALT1:
- ADC Rn
- BIC Rn
- CMODE
- DIV2
- GETBH
- LDB (Rm)
- LJMP
- LM Rn, (xx)
- LMS Rn, (yy)
- LMULT
- RPIX
- SBC Rn
- STB (Rm)
- UMULT Rn
- XOR Rn
Many instructions clear the ALT1 flag, including:
- ADC Rn
- ADC #n
- ADD Rn
- ADD #n
- AND Rn
- AND #n
- ASR
- BIC Rn
- BIC #n
- CACHE
- CMODE
- CMP Rn
- COLOR
- DEC Rn
- DIV2
- FMULT
- GETB
- GETBH
- GETBL
- GETBS
- GETC
- HIB
- IBT Rn, #pp
- INC Rn
- IWT Rn, #xx
- JMP Rn
- LDB (Rm)
- LDW (Rm)
- LEA Rn, xx
- LINK #n
- LJMP Rn
- LM Rn, (xx)
- LMS Rn, (yy)
- LMULT
- LOB
- LOOP
- LSR
- MERGE
- MOVE Rn, Rn'
- MOVES Rn, Rn'
- MULT Rn
- MULT #n
- NOP
- NOT
- OR Rn
- OR #n
- PLOT
- RAMB
- ROL
- ROMB
- ROR
- RPIX
- SBC Rn
- SBK
- SEX
- SM (xx), Rn
- SMS (yy), Rn
- STB (Rm)
- STOP
- STW (Rm)
- SUB Rn
- SUB #n
- SWAP
- UMULT Rn
- and presumably UMULT #n and XOR too
See Also
External Links
- Official Nintendo documentation on ALT1: 9.8 on page 2-9-7 of Book II
- Table 2-4-2 on page 2-4-4, lbid.
- https://en.wikibooks.org/wiki/Super_NES_Programming/Super_FX_tutorial#Instruction_Set_Table