Operation: |
DJNZ |
Function: |
Decrement and Jump if Not Zero |
Syntax: |
DJNZ register,reladdr |
Instructions |
OpCode |
Bytes |
Cycles |
Flags |
DJNZ iram addr,reladdr |
0xD5 |
3 |
2 |
None |
DJNZ R0,reladdr |
0xD8 |
2 |
2 |
None |
DJNZ R1,reladdr |
0xD9 |
2 |
2 |
None |
DJNZ R2,reladdr |
0xDA |
2 |
2 |
None |
DJNZ R3,reladdr |
0xDB |
2 |
2 |
None |
DJNZ R4,reladdr |
0xDC |
2 |
2 |
None |
DJNZ R5,reladdr |
0xDD |
2 |
2 |
None |
DJNZ R6,reladdr |
0xDE |
2 |
2 |
None |
DJNZ R7,reladdr |
0xDF |
2 |
2 |
None |
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.
See Also: DEC, JZ, JNZ, Instruction Set |