Appendix
75
5. BRANCH / JUMP OPERATION
NO.
MNEMONIC
OP
CODE
BYTE
NO
CYCLE
NO
OPERATION
FLAG
NVGBHIZC
1
BBC A.bit,rel
y2
2
4/6
Branch if bit clear :
--------
2
BBC dp.bit,rel
y3
3
5/7
if ( bit )
0 , then PC
( PC )
rel
3
BBS A.bit,rel
x2
2
4/6
Branch if bit set :
--------
4
BBS dp.bit,rel
x3
3
5/7
if ( bit )
1 , then PC
( PC )
rel
5
BCC rel
50
2
2/4
Branch if carry bit clear
if ( C )
0 , then PC
( PC )
rel
--------
6
BCS rel
D0
2
2/4
Branch if carry bit set
if ( C )
1 , then PC
( PC )
rel
--------
7
BEQ rel
D0
2
2/4
Branch if equal
if ( Z )
1 , then PC
( PC )
rel
--------
8
BMI rel
90
2
2/4
Branch if minus
if ( N )
1 , then PC
( PC )
rel
--------
9
BNE rel
70
2
2/4
Branch if not equal
if ( Z )
0 , then
--------
10
BPL rel
10
2
2/4
Branch if minus
if ( N )
0 , then PC
( PC )
rel
--------
11
BRA rel
2F
2
4
Branch always
PC
( PC )
rel
--------
12
BVC rel
30
2
2/4
Branch if overflow bit clear
if (V)
0 , then PC
( PC)
rel
--------
13
BVS rel
B0
2
2/4
Branch if overflow bit set
if (V)
1 , then PC
( PC )
rel
--------
14
CALL !abs
3B
3
8
Subroutine call
15
CALL [dp]
5F
2
8
M( SP)
( PC
H
), SP
SP - 1, M( SP)
( PC
L
), SP
SP - 1,
if !abs, PC
abs ; if [dp], PC
L
( dp ), PC
H
( dp+1 ) .
--------
16
CBNE dp,rel
FD
3
5/7
Compare and branch if not equal :
--------
17
CBNE dp+X,rel
8D
3
6/8
if ( A )
( M ) , then PC
( PC )
rel.
18
DBNE dp,rel
AC
3
5/7
Decrement and branch if not equal :
--------
19
DBNE Y,rel
7B
2
4/6
if ( M )
0 , then PC
( PC )
rel.
20
JMP !abs
1B
3
3
Unconditional jump
21
JMP [!abs]
1F
3
5
PC
jump address
--------
22
JMP [dp]
3F
2
4
23
PCALL upage
4F
2
6
U-page call
M( SP)
( PC
H
), SP
SP - 1, M( SP)
( PC
L
),
SP
SP - 1, PC
L
( upage ), PC
H
”
0FF
H
”
.
--------
24
TCALL n
nA
1
8
Table call : (SP)
( PC
H
), SP
SP - 1,
M( SP)
( PC
L
),SP
SP - 1,
PC
L
(Table vector L), PC
H
(Table vector H)
--------