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
5
Revision History
Revision Date
By
Remark
V2.1
09/13/2005
Joe Chuang 1. Added SPCP bodies in the 65N02 and CPU12 body lists (page.7)
2. Changed the name
“
Sunplus code
"
to
“
CPU12
"
in the tables of
the Instructions
V2.0
12/08/2004
Bean Wang Page 9: Remove B Flag of status register(P)
Was: P: {N,V,X,B,D,I,Z,C}. (X: Not Used)
Now: P: {N,V,X,X,D,I,Z,C}. (X: Not Used)
Page 27: Remove BRK instruction
Page 23~57: Add 65b02 instruction.
Page 25: ASL aaaa, X
Modify: No. Cycle of 65n02 from 7 to 6*.
Page 36: JMP(aaaa)
Modify: No. Cycle of 65n02, 65r02, 65s02, Sunplus Code from 3 to 6.
Page 39: LSR aaaa, X
Modify: No. Cycle of 65n02 from 7 to 6*.
Page 42: ROL aaaa, X
Modify: No. Cycle of 65n02 from 7 to 6*.
Page 43: ROR aaaa, X
Modify: No. Cycle of 65n02 from 7 to 6*.
V1.9
02/06/2004
J. K. Chen Page 30: CMP
Was: C: Set if a “borrow” not occurred. (A > M)
Now: C: Set if a “borrow” not occurred. (A > = M)
Page 31: CPX
Was: C: Set if a “borrow” occurred (data > X).
Now: C: Set if a “borrow” not occurred. (X > = data)
Page 31: CPY
Was: C: Set if a “borrow” occurred (data > Y).
Now: C: Set if a “borrow” not occurred. (Y > = data)
Page 7: remove the CPU type table
Page 38: LDX
Zero Page, (
LDX aa, Y), Sunplus Opcode changed from E9H to B9H.
Page 38:
65r02 and Sunplus Code supports LDX aaaa.
Page 44: SBC
Was: C: Set if there is no “borrow” occurred. (M > A).
Now: C: Set if there is no “borrow” occurred. (A > M).
V1.8
12/25/2002
Michael Lin Page 27: BIT:
Set if the bit7 of the result is 1
Æ
set if the memory bit7 of the result is 1.
Set if the bit6 of the result is 1
Æ
set if the memory bit6 of the result is 1.
Correct the STA, STX, STY, TXS to no effect on status register
V1.7
01/07/2002
Michael Lin Page 41
Origin: “PLA” takes no effect on any status flag
Modified: “PLA” affect the “N” and “Z” flags.
Origin: “PLP” takes no effect on any status flag.
Modified: “PLP” affects all status flags.
V1.6
08/30/2001
Michael Lin Page 31
Modify:
From: C: Set if a “borrow” occurred. (M > A)
To: C: Set if a “borrow” not occurred (A > M)