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
23
Instructions
ADC
Add to Accumulator with Carry, (A+M+C)
Æ
A, C
Available Instruction
& No. Cycles
Addressing
mode
Assembly
Language
Form
6502
Opcode
Sunplus
Opcode
No.
Bytes
65b02 65n02
65r02 65s02 CPU12
Immediate
ADC
#dd 69H 56H 2 2 2 2 2 2
Zero Page
ADC aa
65H
17H
2
3
3
3
3
3
Zero Page, X
ADC aa, X
75H
1FH
2
4
4
X
X
X
Absolute ADC
aaaa 6DH 57H 3 4 4 X X
X
Absolute, X
ADC aaaa, X
7DH
5FH
3
4 4* X X X
Absolute, Y
ADC aaaa, Y
79H
5EH
3
4 4* X X X
(Indirect, X)
ADC (aa, X)
61H
16H
2
6
6
X
X
X
(Indirect), Y
ADC (aa), Y
71H
1EH
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
V: Set if arithmetic overflow occurs.
Z: Set if result is 0
C: Set if there is a carry from the most significant bit of the result.
D: * if set to 1, the ADC performs decimal operation.