547
CHAPTER 28 INSTRUCTION OPERATION
User’s Manual U12697EJ3V0UM
(18) Conditional branch instructions: BNZ, BNE, BZ, BE, BNC, BNL, BC, BL, BNV, BPO, BV, BPE, BP, BN,
BLT, BGE, BLE, BGT, BNH, BH, BF, BT, BTCLR, BFSET, DBNZ
Mnemonic
Operand
Bytes
Operation
Flag
S
Z
AC P/V CY
BNZ
$addr20
2
PC
←
PC + 2 + jdisp8 if Z = 0
BNE
BZ
$addr20
2
PC
←
PC + 2 + jdisp8 if Z = 1
BE
BNC
$addr20
2
PC
←
PC + 2 + jdisp8 if CY = 0
BNL
BC
$addr20
2
PC
←
PC + 2 + jdisp8 if CY = 1
BL
BNV
$addr20
2
PC
←
PC + 2 + jdisp8 if P/V = 0
BPO
BV
$addr20
2
PC
←
PC + 2 + jdisp8 if P/V = 1
BPE
BP
$addr20
2
PC
←
PC + 2 + jdisp8 if S = 0
BN
$addr20
2
PC
←
PC + 2 + jdisp8 if S = 1
BLT
$addr20
3
PC
←
PC + 3 + jdisp8 if P/V
S = 1
BGE
$addr20
3
PC
←
PC + 3 + jidsp8 if P/V
S = 0
BLE
$addr20
3
PC
←
PC + 3 + jdisp8 if (P/V
S)
Z = 1
BGT
$addr20
3
PC
←
PC + 3 + jidsp8 if (P/V
S)
Z = 0
BNH
$addr20
3
PC
←
PC + 3 + jdisp8 if Z CY = 1
BH
$addr20
3
PC
←
PC + 3 + jidsp8 if Z CY = 0
BF
saddr.bit, $addr20
4/5
PC
←
PC + 4
Note
+ jdisp8 if (saddr.bit) = 0
sfr.bit, $addr20
4
PC
←
PC + 4 + jdisp8 if sfr.bit = 0
X.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if X.bit = 0
A.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if A.bit = 0
PSWL.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if PSW
L
.bit = 0
PSWH.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if PSW
H
.bit = 0
!addr16.bit, $addr20
6
PC
←
PC + 3 + jdisp8 if !addr16.bit = 0
!!addr24.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if !!addr24.bit = 0
mem2.bit, $addr20
3
PC
←
PC + 3 + jdisp8 if mem2.bit = 0
Note
This is used when the number of bytes is four. When five, it becomes PC
←
PC + 5 + jdisp8.