CHAPTER 5 EXPLANATION OF INSTRUCTIONS
115
User's Manual U12326EJ4V0UM
Decrement and Branch if Not Zero
DBNZ Conditional Loop (R1 0)
[Instruction format] DBNZ dst, $addr16
[Operation] dst dst1,
then PC PC+b+jdisp16 if dst R1 0
[Operand]
Mnemonic Operand(dst,$addr16) b(Number of bytes)
DBNZ B, $addr16 2
C, $addr16 2
saddr, $addr16 3
[Flag]
ZACCY
[Description]
One is subtracted from the destination operand (dst) contents specified by the 1st operand and the
subtraction result is stored in the destination operand (dst).
If the subtraction result is not 0, data is branched to the address indicated with the 2nd operand ($addr16).
When the subtraction result is 0, no processing is carried out and the subsequent instruction is executed.
The flag remains unchanged.
[Description example]
DBNZ B, $1215H; The B register contents are decremented. If the result is not 0, data is branched to 1215H
(with the start of this instruction set in the range of addresses 1194H to 1293H).