Function:

Compares two strings in memory.
Repeated version (REP CMPS) in early 286 protected mode has a bug that
shows when, during execution, a segment limit exception or IO Privilege
Level Exception occurs.
In that case the exception handler sees the value of CX as it was at the
start of the REP instruction. SI and DI however reflect the correct index
of the elements currently scanned at the time of the exception.

Workaround: Do not scan beyond segment limits or into memory mapped I/O
areas.




CMPXCHG op1,op2 Compare and Exchange
──────────────────────────────────────────────────────────────────────────────