Online HelpPC 2.10      Quick Reference Utility     Copyright 1991 David Jurgens
 
                        REP - Repeat String Operation                        
                                                                                         Usage:  REP                                                                      Modifies flags: None                                                                                                                                              Repeats execution of string instructions while CX != 0.  After                   each string operation, CX is decremented and the Zero Flag is                    tested.  The combination of a repeat prefix and a segment override               on CPU's before the 386 may result in errors if an interrupt occurs              before CX=0.  The following code shows code that is susceptible to               this and how to avoid it:                                                                                                                                          again:  rep movs  byte ptr ES:[DI],ES:[SI]   ; vulnerable instr.                             jcxz  next              ; continue if REP successful                             loop  again             ; interrupt goofed count                     next:                                                                                                                                                   
                                 Clocks                 Size                    
        Operands         808x  286   386   486          Bytes                   
                                                                                         none              2     2     2                   1                                                                                                                                                                                                - see Instruction Timing   REPE   REPNE                                                                                                                    
[helppc.bosbyte.nl]                   rep                     Home  Back  Topics