LOOPE
LOOPZ
LOOPWHILE
EQUAL
LOOPWHILE
ZERO
LOOPE
LOOPZ
Operation: Flags Affected:
(ex)
+-
(ex)
-1
None
if (ZF) = 1 and
(eX)
=/;
0
then
(lP)
+-
(lP) +
disp
(sign-extended
to
16-bits)
Description:
LOOPE/LOOPZ short-label
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
short-label
18
or
6
-
2-114
Bytes
2
LOOPE
Coding
Example
LOOPE AGAIN