S
un
pl
us
IT
C
on
fid
en
tia
l
F
or
A
D
D
In
te
rn
at
io
na
l L
im
ite
d
U
se
O
nl
y
CPU6502 Instruction Manual v2.1
Sunplus reserves the rights to change this documentation without prior notice.
09/13/2005
30
CLV
Clear overflow
Available Instruction
& No. Cycles
Addressing
mode
Assembly
Language
Form
6502
Opcode
Sunplus
Opcode
No.
Bytes
65b02 65n02
65r02 65s02
CPU12
Implied CLV B8H 78H 1 2 2 2 2 2
N V D I Z C
- ! - - - -
V: Unconditionally cleared.
CMP
Compare memory data with Accumulator, A - M
Available Instruction
& No. Cycles
Addressing
mode
Assembly
Language
Form
6502
Opcode
Sunplus
Opcode
No.
Bytes
65b02 65n02
65r02 65s02
CPU12
Immediate
CMP
#dd C9H 66H 2 2 2 2 2 2
Zero Page CMP aa
C5H
27H
2
3
3
3
3
3
Zero Page, X CMP aa, X
D5H
2FH
2
4
4
4
4
4
Absolute CMP
aaaa
CDH
67H
3
4
4
X
X
X
Absolute, X CMP aaaa, X
DDH
6FH
3
4 4* X X X
Absolute, Y CMP aaaa, Y
D9H
6EH
3
4 4* X X X
(Indirect, X) CMP (aa, X)
C1H
26H
2
6
6
X
X
X
(Indirect), Y CMP (aa), Y
D1H
2EH
2
6 5* X X X
* Add 1 clock cycle if page boundary is crossed.
X: Not available.
N V D I Z C
! - - - ! !
N: Set if result is negative
Z: Set if result is 0
C: Set if a “borrow” not occurred. (A > = M)