LOOPNZ

LOOPNE

LOOPWHILE

NOT ZERO

LOOP WHILE NOT EQUAL

LOOPNZ

LOOPNE

Operation:

Flags Affected:

(ex) +- (eX)-1

None

if (ZF) = 0 and (eX) =1= 0 then

 

(lP) +- (IP) + disp (sign-extended

 

to 16-bits)

 

Description:

 

LOOPNE/LOOPNZ short-label

 

LOOPNE and LOOPNZ (Loop While Not Equal and Loop While Not Zero) are also synonyms for the same instruction. ex is decremented by 1, and control is transferred to the target operand if ex is not 0 and if ZF is clear; otherwise the next sequential instruction is executed.

Encoding:

1111 00000 1 disp

LOOPNE/LOOPNZ Operands Clocks Transfers Bytes LOOPNE Coding Example

short-label

19 or 5

-

2 LOOPNE AGAIN

2-115

Page 150
Image 150
Intel 210200-002 manual Loopwhile, LOOPNE/LOOPNZ short-label