Online HelpPC 2.10      Quick Reference Utility     Copyright 1991 David Jurgens
 
                       CMPXCHG - Compare and Exchange                       
                                                                                         Usage:  CMPXCHG dest,src  (486+)                                                 Modifies flags: AF CF OF PF SF ZF                                                                                                                                                                                                                  Compares the accumulator (8-32 bits) with "dest".  If equal the                  "dest" is loaded with "src", otherwise the accumulator is loaded                 with "dest".                                                                                                                                                                                                                              
                                 Clocks                 Size                    
        Operands         808x  286   386   486          Bytes                   
                                                                                         reg,reg           -     -     -     6             2                              mem,reg           -     -     -     7             2                                                                                                                                                                                                - add 3 clocks if the "mem,reg" comparison fails                                 - see Instruction Timing                                                                                                                                                                                                                    
[helppc.bosbyte.nl]                 cmpxchg                   Home  Back  Topics