Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->DJNZ

DJNZ                   Decrement operand, test and jump

The operand is decremented and then tested for zero.  If it is zero, then program control passes through to the next instruction.  Otherwise control jumps to the specified address.

An original value of 00H will underflow to 0FFH.

No flags are affected.

Formats:
    
DescriptionMnemonicBytesCycles
    
Decrement register:DJNZ Rn,<branch address>22
Decrement memory:DJNZ <direct address>,<branch address>32

where Rn is R0 - R7