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

INC (SPC700): Difference between revisions

From SnesLab
Jump to: navigation, search
(→‎See Also: DEC (SPC700))
(linkify flags)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''INC''' is an [[SPC700]] instruction that increments a value.
{| class="wikitable" style="float:right;clear:right;width:40%"
 
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="8"|Basic Info
!colspan="8"|Basic Info
|+
|+
Line 9: Line 7:
|'''Speed'''
|'''Speed'''
|+
|+
|implied
|[[Accumulator Addressing | Accumulator]]
|BC
|BC
|1 byte
|1 byte
|2 cycles
|2 cycles
|+
|+
|
|[[Direct Page Addressing | Direct Page]]
|AB
|AB
|2 byte
|2 byte
|4 cycles
|4 cycles
|+
|+
|
|[[Direct Page Indexed by X]]
|BB
|BB
|2 byte
|2 byte
|5 cycles
|5 cycles
|+
|+
|
|[[Absolute Addressing | Absolute]]
|AC
|AC
|3 bytes
|3 bytes
|5 cycles
|5 cycles
|+
|+
|
|[[Implied]] (type 1)
|3D
|3D
|1 byte
|1 byte
|2 cycles
|2 cycles
|+
|+
|
|[[Implied]] (type 1)
|FC
|FC
|1 byte
|1 byte
Line 41: Line 39:


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="8"|Flags Clobbered
!colspan="8"|Flags Affected
|+
|+
|N
|[[Negative Flag|N]]
|V
|[[Overflow Flag|V]]
|P
|[[Direct Page Flag|P]]
|B
|[[Break Flag|B]]
|H
|[[Half-Carry Flag|H]]
|I
|[[Interrupt Enable Flag|I]]
|Z
|[[Zero Flag|Z]]
|C
|[[Carry Flag|C]]
|+
|+
|
|
Line 61: Line 59:
|
|
|}
|}
'''INC''' is an [[SPC700]] instruction that increments the operand by one.


=== See Also ===
=== See Also ===
* [[INC]]
* [[INC]]
* [[DEC (SPC700)]]
* [[DEC (SPC700)]]
* [[INX]]
* [[INY]]


=== External Links ===
=== External Links ===

Latest revision as of 05:01, 27 November 2023

Basic Info
Addressing Mode Opcode Length Speed
Accumulator BC 1 byte 2 cycles
Direct Page AB 2 byte 4 cycles
Direct Page Indexed by X BB 2 byte 5 cycles
Absolute AC 3 bytes 5 cycles
Implied (type 1) 3D 1 byte 2 cycles
Implied (type 1) FC 1 byte 2 cycles
Flags Affected
N V P B H I Z C
. . . . . .

INC is an SPC700 instruction that increments the operand by one.

See Also

External Links