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

B Flag (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
m (Xetheria moved page B Flag to B Flag (Super FX): there is a b flag on the 6502 too)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''B flag''' is on the [[Super FX]], and is set when [[WITH]] runs.
The '''B Flag''' is on the [[Super FX]], and is set when [[WITH]] runs.  It is bit 4 of SFR.
 
These instructions change their behaviour on the B flag:
 
*  [[TO]] R<sub>n'</sub> as [[MOVE]] R<sub>n</sub>,R<sub>n'</sub>
*  [[FROM]] R<sub>n'</sub> as [[MOVES]] R<sub>n</sub>,R<sub>n'</sub>
 
For both of them, the R<sub>n</sub> is set by the preceeeding WITH R<sub>n</sub>.


Many instructions clear the B flag, including:
Many instructions clear the B flag, including:


* ADC Rn
* [[GSU/ADC|ADC]] R<sub>n</sub>
* ADC #n
* [[GSU/ADC|ADC]] #n
* ADD Rn
* [[ADD]] R<sub>n</sub>
* ADD #n
* [[ADD]] #n
* AND Rn
* [[GSU/AND|AND]] R<sub>n</sub>
* AND #n
* [[GSU/AND|AND]] #n
* ASR
* [[ASR]]
* BIC Rn
* [[BIC]] R<sub>n</sub>
* BIC #n
* [[BIC]] #n
* CACHE
* [[CACHE]]
* CMODE
* [[CMODE]]
* CMP Rn
* [[GSU/CMP|CMP]] R<sub>n</sub>
* COLOR
* [[COLOR]]
* DEC Rn
* [[GSU/DEC|DEC]] R<sub>n</sub>
* DIV2
* [[DIV2]]
* FMULT
* [[FMULT]]
* GETB
* [[GETB]]
* GETBH
* [[GETBH]]
* GETBL
* [[GETBL]]
* GETBS
* [[GETBS]]
* GETC
* [[GETC]]
* HIB
* [[HIB]]
* IBT Rn, #pp
* [[IBT]] R<sub>n</sub>, #pp
* INC Rn
* [[GSU/INC|INC]] R<sub>n</sub>
* IWT Rn, #xx
* [[IWT]] R<sub>n</sub>, #xx
* JMP Rn
* [[GSU/JMP|JMP]] R<sub>n</sub>
* LDB (Rm)
* [[LDB]] (R<sub>m</sub>)
* LDW (Rm)
* [[LDW]] (R<sub>m</sub>)
* LEA Rn, xx
* [[LEA]] R<sub>n</sub>, xx
* LINK #n
* [[LINK]] #n
* LJMP Rn
* [[LJMP]] R<sub>n</sub>
* LM Rn, (xx)
* [[LM]] R<sub>n</sub>, (xx)
* LMS Rn, (yy)
* [[LMS]] R<sub>n</sub>, (yy)
* LMULT
* [[LMULT]]
* LOB
* [[LOB]]
* LOOP
* [[LOOP]]
* LSR
* [[GSU/LSR|LSR]]
* MERGE
* [[MERGE]]
* MOVE Rn, Rn'
* [[MOVE]] R<sub>n</sub>, R<sub>n</sub>'
* MOVES Rn, Rn'
* [[MOVES]] R<sub>n</sub>, R<sub>n</sub>'
* MULT Rn
* [[MULT]] R<sub>n</sub>
* MULT #n
* [[MULT]] #n
* NOP
* [[GSU/NOP|NOP]]
* NOT
* [[NOT]]
* OR Rn
* [[OR]] R<sub>n</sub>
* OR #n
* [[OR]] #n
* PLOT
* [[PLOT]]
* RAMB
* [[RAMB]]
* ROL
* [[GSU/ROL|ROL]]
* ROMB
* [[ROMB]]
* ROR
* [[GSU/ROR|ROR]]
* RPIX
* [[RPIX]]
* SBC Rn
* [[GSU/SBC|SBC]] R<sub>n</sub>
* SBK
* [[SBK]]
* SEX
* [[SEX]]
* SM (xx), Rn
* [[SM]] (xx), R<sub>n</sub>
* SMS (yy), Rn
* [[SMS]] (yy), R<sub>n</sub>
* STB (Rm)
* [[STB]] (R<sub>m</sub>)
* STOP
* [[STOP]]
* STW (Rm)
* [[STW]] (R<sub>m</sub>)
* SUB Rn
* [[SUB]] R<sub>n</sub>
* SUB #n
* [[SUB]] #n
* SWAP
* [[SWAP]]
* UMULT Rn
* [[UMULT]] R<sub>n</sub>
* and presumably UMULT #n too
* and presumably UMULT #n too


Line 74: Line 81:
* [[ALT1]]
* [[ALT1]]
* [[ALT2]]
* [[ALT2]]
* [[ALT0]]


=== Reference ===
=== References ===
* [https://archive.org/details/SNESDevManual/book2/page/n158 page 2-9-2 of Book II] of the official Super Nintendo development manual
* [https://archive.org/details/SNESDevManual/book2/page/n158 page 2-9-2 of Book II] of the official Super Nintendo development manual
* [https://archive.org/details/SNESDevManual/book2/page/n110 page 2-4-4 of Book II], lbid.


[[Category:Flags]]
[[Category:Flags]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:ASM]]
[[Category:ASM]]

Latest revision as of 23:06, 21 July 2024

The B Flag is on the Super FX, and is set when WITH runs. It is bit 4 of SFR.

These instructions change their behaviour on the B flag:

For both of them, the Rn is set by the preceeeding WITH Rn.

Many instructions clear the B flag, including:

See Also

References