
565
APPENDIX B Instructions
Note:
Count Correction Values for Counting Execution Cycles" for information on (a) to (d) in the
Table B.8-14 19 Branch 2 Instructions
Mnemonic
#
R
G
B
Operation
L
H
A
H
I
S
TN
ZV
C
R
M
W
CBNE
CWBNE
A,#imm8,rel
A,#imm16,rel
3
4
*1
0
Branch on byte (A) not equal to imm8
Branch on word (A) not equal to imm16
-
*
-
CBNE
CWBNE
ear,#imm8,rel
eam,#imm8,rel *9
ear,#imm16,rel
eam,#imm16,rel*9
4
4+
5
5+
*2
*3
*4
*3
1
0
1
0
(b)
0
(c)
Branch on byte (ear) not equal to imm8
Branch on byte (eam) not equal to imm8
Branch on word (ear) not equal to imm16
Branch on word (eam) not equal to
imm16
-
*
-
DBNZ
ear,rel
eam,rel
3
3+
*5
*6
2
0
2×(b)
Branch on byte (ear) = (ear) - 1, (ear)not
equal to 0
Branch on byte (eam) = (eam) - 1, (eam)
not equal to 0
-
*
-
*
DWBNZ
ear,rel
eam,rel
3
3+
*5
*6
2
0
2×(c)
Branch on word (ear) = (ear) - 1, (ear) not
equal to 0
Branch on word (eam) = (eam) - 1, (eam)
not equal to 0
-
*
-
*
INT
INTP
INT9
RETI
#vct8
addr16
addr24
2
3
4
1
20
16
17
20
*8
0
8×(c)
6×(c)
8×(c)
*7
Software interrupt
Return from interrupt
-
R
*
S
*
-
*
-
*
-
*
-
*
-
*
-
LINK
#imm8
2
6
0
(c)
Saves the old frame pointer in the stack
upon entering the function, then sets the
new frame pointer and reserves the local
pointer area.
-
-----
-
UNLINK
1
5
0
(c)
Recovers the old frame pointer from the
stack upon exiting the function.
-
-----
-
RET
RETP
*10
*11
1
4
6
0
(c)
(d)
Return from subroutine
-
*1: 5 when a branch is made; otherwise, 4
*2: 13 when a branch is made; otherwise, 12
*3: 7+(a) when a branch is made; otherwise, 6+(a)
*4: 8 when a branch is made; otherwise, 7
*5: 7 when a branch is made; otherwise, 6
*6: 8+(a) when a branch is made; otherwise, 7+(a)
*7: 3 x (b) + 2 x (c) when jumping to the next interruption request; 6 x (c) when returning from the current
interruption
*8: 15 when jumping to the next interruption request; 17 when returning from the current interruption
*9: Do not use RWj+ addressing mode with a CBNE or CWBNE instruction.
*10: Return from stack (word)
*11: Return from stack (long word)