LOOPE
LOOPZ
LOOPWHILE
EQUAL
LOOPWHILE
ZERO
LOOPE
LOOPZ
Operation: | Flags Affected: |
(ex) +- (ex) | None |
if (ZF) = 1 and (eX) =/; 0 then |
|
(lP) +- (lP) + disp |
|
to |
|
Description: |
|
LOOPE/LOOPZ |
|
LOOPE and LOOPZ (Loop While Equal and Loop While Zero) are different mnemonics for the same instruction (similar to the REPE and REPZ repeat prefixes). ex is decremented by 1, and control is transferred to the target operand if ex is not 0 and if ZF is set; otherwise the instruction following LOOPEI LOOPZ is executed.
Encoding:
1111 00001 disp
LOOPE/LOOPZ Operands Clocks Transfers Bytes LOOPE Coding Example
18 or 6 | - | 2 LOOPE AGAIN |