qa.hlp (Table of Contents; Topic list)
REPcondition
   Summary  Detail  Example  Key to Flags
──────────────────────────────────────────────────────────────────────────────
 
Repeat String Conditionally                      Flags:  O D I T S Z A P C
                                                         ═════════════════
Syntax:  REPE instruction                                          ±
         REPNE instruction
 
  Repeats a string instruction as long as condition is true and the max-
  imum count has not been reached. REPE and REPZ (the names are
  synonyms) repeat while the zero flag is set. REPNE and REPNZ
  (the names are synonyms) repeat while the zero flag is cleared. The
  conditional repeat prefixes should only be used with SCAS and
  CMPS, since these are the only string instructions that modify
  the zero flag. Before executing the instruction, CX should be set
  to the maximum allowable number of repetitions. For each string element,
  the string instruction is performed, CX is decremented, and the zero
  flag is tested. On all processors except the 80386, combining a repeat
  prefix with a segment override may cause errors if an interrupt occurs
  during a string operation.
                                    -♦-