What is CMP instruction
Comparison instruction (CMP) is a subtraction that changes only the flag bits; destination operand never changes. A comparison is useful for checking the entire contents of a register or a memory location against another value. A CMP is generally followed by a conditional jump instruction, which tests condition of the flag bits.