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

DEC (SPC700): Difference between revisions

From SnesLab
Jump to: navigation, search
(added DEA)
(made flags affected more prominent)
 
Line 50: Line 50:
|[[Carry Flag|C]]
|[[Carry Flag|C]]
|+
|+
|
|N
|.
|.
|.
|.
Line 56: Line 56:
|.
|.
|.
|.
|Z
|.
|.
|
|}
|}



Latest revision as of 13:57, 30 July 2024

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

DEC is an SPC700 instruction that decrements its operand by one.

Syntax

DEC A
DEC dp
DEC dp+X
DEC !abs
DEC X
DEC Y

The above are official, but some people prefer alternate mnemonics like:

DEA
DEX
DEY

See Also

External Links