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

ADC (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
(linkify dest)
(blurb about specifying sreg/dreg in advance)
Line 45: Line 45:


'''ADC''' (Add with carry) is a [[Super FX]] instruction that performs an addition.  The [[source register]] is always the first addend.  The second addend may be any of the 16 R registers or an immediate value.  The third addend is [[CY]]. The sum is stored in the [[destination register]].
'''ADC''' (Add with carry) is a [[Super FX]] instruction that performs an addition.  The [[source register]] is always the first addend.  The second addend may be any of the 16 R registers or an immediate value.  The third addend is [[CY]]. The sum is stored in the [[destination register]].
The source and destination registers should be specified in advance using [[WITH]], [[FROM]], or [[TO]].  Otherwise, R<sub>0</sub> serves as the default.


==== Syntax ====
==== Syntax ====

Revision as of 18:29, 9 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied (type 1) 3D5n 2 bytes 6 cycles 6 cycles 2 cycles
Immediate 3F5n 2 bytes 6 cycles 6 cycles 2 cycles
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0

ADC (Add with carry) is a Super FX instruction that performs an addition. The source register is always the first addend. The second addend may be any of the 16 R registers or an immediate value. The third addend is CY. The sum is stored in the destination register.

The source and destination registers should be specified in advance using WITH, FROM, or TO. Otherwise, R0 serves as the default.

Syntax

ADC Rn
ADC #n

See Also

External Links