GMS81C5108 APPENDIX
Branch / Jump Operation
Op
Code
Byte
No
Cycle
No
Flag
NVGBHIZC
No.
Mnemonic
Operation
1
2
3
4
BBC A.bit,rel
BBC dp.bit,rel
BBS A.bit,rel
BBS dp.bit,rel
y2
y3
x2
x3
2
3
2
3
4/6
5/7
4/6
5/7
Branch if bit clear :
--------
--------
if ( bit ) = 0 , then pc ← ( pc ) + rel
Branch if bit set :
if ( bit ) = 1 , then pc ← ( pc ) + rel
Branch if carry bit clear
if ( C ) = 0 , then pc ← ( pc ) + rel
5
6
BCC rel
BCS rel
BEQ rel
BMI rel
BNE rel
BPL rel
BRA rel
BVC rel
50
D0
F0
90
70
10
2F
30
2
2
2
2
2
2
2
2
2/4
2/4
2/4
2/4
2/4
2/4
4
--------
--------
--------
--------
--------
--------
--------
--------
--------
Branch if carry bit set
if ( C ) = 1 , then pc ← ( pc ) + rel
Branch if equal
if ( Z ) = 1 , then pc ← ( pc ) + rel
7
Branch if minus
if ( N ) = 1 , then pc ← ( pc ) + rel
8
Branch if not equal
if ( Z ) = 0 , then pc ← ( pc ) + rel
9
Branch if minus
if ( N ) = 0 , then pc ← ( pc ) + rel
10
11
12
Branch always
pc ← ( pc ) + rel
Branch if overflow bit clear
if (V) = 0 , then pc ← ( pc) + rel
2/4
Branch if overflow bit set
if (V) = 1 , then pc ← ( pc ) + rel
13
14
15
BVS rel
B0
3B
5F
2
3
2
2/4
8
CALL !abs
CALL [dp]
Subroutine call
M( sp)←( pc ), sp←sp - 1, M(sp)← (pc ), sp ←sp - 1,
H
L
8
--------
--------
if !abs, pc← abs ; if [dp], pc ← ( dp ), pc ← ( dp+1 ) .
L
Compare and branch if not equal :
if ( A ) ≠ ( M ) , then pc ← ( pc ) + rel.
Decrement and branch if not equal :
if ( M ) ≠ 0 , then pc ← ( pc ) + rel.
Unconditional jump
H
16
17
18
19
20
21
22
CBNE dp,rel
CBNE dp+X,rel
DBNE dp,rel
DBNE Y,rel
JMP !abs
FD
8D
AC
7B
1B
1F
3F
3
3
3
2
3
3
2
5/7
6/8
5/7
4/6
3
--------
--------
JMP [!abs]
JMP [dp]
5
pc ← jump address
4
U-page call
M(sp) ←( pc ), sp ←sp - 1, M(sp) ← ( pc ),
23
24
PCALL upage
TCALL n
4F
nA
2
1
6
8
--------
--------
H
L
sp ← sp - 1, pc ← ( upage ), pc ← ”0FF ” .
L
H
H
Table call : (sp) ←( pc ), sp ← sp - 1,
H
M(sp) ← ( pc ),sp ← sp - 1,
L
pc ← (Table vector L), pc ← (Table vector H)
L
H
JUNE 2001 Ver 1.0
ix