[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

CMP

CMP Compare memory and accumulator

CMP

Operation: A - M N Z C I D V
/ / / _ _ _
(Ref: 4.2.1)
Addressing ModeAssembly Language FormOP CODENo. BytesNo. Cycles
Immediate CMP #Oper C9 2 2
Zero Page CMP Oper C5 2 3
Zero Page, X CMP Oper, X D5 2 4
Absolute CMP Oper CD 3 4
Absolute, X CMP Oper, X DD 3 4*
Absolute, Y CMP Oper, Y D9 3 4*
(Indirect, X) CMP (Oper, X) C1 2 6
(Indirect), Y CMP (Oper), Y D1 2 5*
* Add 1 if page boundary is crossed

CPX

CPX Compare memory and Index X

CPX

Operation: X - M N Z C I D V
/ / / _ _ _
(Ref: 7.8)
Addressing ModeAssembly Language FormOP CODENo. BytesNo. Cycles
Immediate CPX #Oper E0 2 2
Zero Page CPX Oper E4 2 3
Absolute CPX Oper EC 3 4

CPY

CPY Compare memory and Index X

CPY

Operation: Y - M N Z C I D V
/ / / _ _ _
(Ref: 7.9)
Addressing ModeAssembly Language FormOP CODENo. BytesNo. Cycles
Immediate CPX #Oper C0 2 2
Zero Page CPX Oper C4 2 3
Absolute CPX Oper CC 3 4


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated December 07, 2002.