8051 instruction :: Djnz

DJNZ


Operation:DJNZ
Function:Decrement and Jump if Not Zero
Syntax:DJNZ register,reladdr

InstructionsOpCodeBytesCyclesFlags
DJNZ iram addr,reladdr0xD532None
DJNZ R0,reladdr0xD822None
DJNZ R1,reladdr0xD922None
DJNZ R2,reladdr0xDA22None
DJNZ R3,reladdr0xDB22None
DJNZ R4,reladdr0xDC22None
DJNZ R5,reladdr0xDD22None
DJNZ R6,reladdr0xDE22None
DJNZ R7,reladdr0xDF22None


Description: DJNZ decrements the value of register by 1. If the initial value of register is 0, decrementing the value will cause it to reset to 255 (0xFF Hex). If the new value of register is not 0 the program will branch to the address indicated by relative addr. If the new value of register is 0 program flow continues with the instruction following the DJNZ instruction.









Post Your Comments Here :
 


User Login

Username :


Password :