We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
ADD (Super FX): Difference between revisions
From SnesLab
(blurb about specifying sreg/dreg in advance) |
|||
Line 47: | Line 47: | ||
Unlike with [[ADC (Super FX)|ADC]], [[CY]] is not an addend. | Unlike with [[ADC (Super FX)|ADC]], [[CY]] is not an addend. | ||
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:30, 9 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Implied (type 1) | 5n | 1 bytes | 3 cycles | 3 cycles | 1 cycle | ||
Immediate | 3E5n | 2 bytes | 6 cycles | 6 cycles | 2 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
0 | 0 | 0 | . | . | . | . |
ADD is Super FX instruction that performs an addition. The source register is always an addend. The other addend may be any of the 16 R registers or an immediate value. The sum is stored in the destination register.
Unlike with ADC, CY is not an addend.
The source and destination registers should be specified in advance using WITH, FROM, or TO. Otherwise, R0 serves as the default.
Syntax
ADD Rn ADD #n
See Also
- ADC (65c816)
- ADC (Super FX)
- SUB
- ALT2
External Links
- Official Nintendo documentation on ADD: 9.6 Page 2-9-5 of Book II
- ADD with immediate addressing: 9.7 Page 2-9-6 of Book II