z80:Opcodes:DJNZ
From Learn @ Cemetech
Revision as of 22:33, 5 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
Decreases B and jumps to a label if not zero. Note that DJNZ does a relative jump, so it can only jump between 128 bytes back/ahead.
Contents
Syntax
djnz label
Effects
Preserves all flags.
Uses
DJNZ is a very useful instruction when it comes to creating loops. See Control Structures to find out more about loops.
T-States
B != 0 | 13 |
B == 0 | 8 |
See Also