Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
REP Instruction
 Detail Key Example                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Repeat String                         Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   REP instruction                                   -none-
 
  See also: MOVS, STOS, INS, OUTS, REPE
 
  Description:
 
     Repeats a string instruction the number of times indicated by CX.
     First CX is compared to zero; if it equals zero, execution
     proceeds to the next instruction. Otherwise, CX is decremented, the
     string instruction is performed, and the loop continues.
 
     REP is used with MOVS and STOS. REP can also be used with INS
     and OUTS on the 80186-80486 processors. On all processors except
     the 80386/486, combining a repeat prefix with a segment override
     may cause errors if an interrupt occurs during a string operation.
                                    -♦-