You are here : assembly8086LOOPE

LOOPE - 8086

Decrease CX, jump to label if CX not zero and Equal (ZF = 1).

Algorithm:

  •  CX = CX - 1
  •  if (CX <> 0) and (ZF = 1) then
    •  jump
  • else
    •  no jump, continue


Syntax

LOOPE Label


Example

.model small
.data
  ...
.code
  ...
  ...
  mov cx,10h
  label:
    ...
    ...
    cmp ax,00h
  loope label		;check if ax==0 and cx>0 and then perform jump
  ...
  ...
  end   


Output / Return Value


Limitations


Alternatives / See Also


Reference