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
37
JSR
Jump to subroutine
Available Instruction
& No. Cycles
Addressing
mode
Assembly
Language
Form
6502
Opcode
Sunplus
Opcode
No.
Bytes
65b02
65n02
65r02 65s02
CPU12
Absolute
JSR
aaaa
20H
10H
3 6 6 6 6 6
With JSR instruction, the current address will be pushed on stack and then jumps to the
specified subroutine. At the end of subroutine procedure, the RTS (return from subroutine)
instruction can be used to return to the original program flow by popping saved address from
stack.
N V D I Z C
- - - - - -
LDA
Load memory data or data into Accumulator, A
Å
data
Available Instruction
& No. Cycles
Addressing
mode
Assembly
Language
Form
6502
Opcode
Sunplus
Opcode
No.
Bytes
65b02
65n02
65r02 65s02
CPU12
Immediate
LDA
#dd A9H
74H
2 2 2 2 2 2
Zero
Page
LDA
aa A5H
35H
2 3 3 3 3 3
Zero Page, X LDA aa, X
B5H
3DH
2
4
4
4
4
4
Absolute
LDA
aaaa
ADH
75H
3 4 4 4 4 4
Absolute, X LDA aaaa, X
BDH
7DH
3
4 4* 4* 4* 4*
Absolute, Y LDA aaaa, Y
B9H
7CH
3
4 4* X X X
(Indirect, X) LDA (aa, X)
A1H
34H
2
6
6
6
6
6
(Indirect), Y LDA (aa), Y
B1H
3CH
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
LDX