Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>loopz loop while zero flags: not altered</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LOOPZ            Loop While Zero                     Flags: not altered


LOOPZ short-label

          Logic:    CX . CX - 1
                    If CX <> 0 and ZF = 1
                    JMP short-label

    Used after a CMP or SUB, LOOPZ decrements CX by 1, then transfers
    control to short-label if the first operand of the CMP or SUB is equal
    to the second operand. Short-label must be within -128 to +127 bytes
    of the next instruction.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
   short-label              18 or 6       -        2     LOOPZ AGAIN
  --------------------------------------------------------------------------

       Note:          LOOPE, Loop if Equal, is the same instruction.

See Also: LOOP LOOPE LOOPNE LOOPNZ JCXZ

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson