Home  Site Map  Instruction Index 

CMPS  -  Compare Instruction


The CMPS instruction is used to compare the contents of memory addresses at SI and DI. This instruction is typically used with a CX counter and either REP or LOOP to repeat the task mutltiple times.

SI and DI are incremented or decremented depending on the direction flag.

This command has 1 part, the Instruction.

Assembly
Sample
Description   16 bit Machine
  Code
CMPSB;  8 bit version to compare and find non-matching
;  BYTES in SI and DI
  A6
CMPSW;  16 bit version to Compare and find non-matching
;  WORDS in SI and DI
  A7