CMP performs a 'mental' subtraction of its second operand from
its first operand, and affects the flags as if the subtraction had
taken place, but does not store the result of the subtraction
anywhere.
In the forms with an 8-bit immediate second operand and a longer
first operand, the second operand is considered to be signed, and is
sign-extended to the length of the first operand. In these cases,
the BYTE qualifier is necessary to force NASM to generate this
form of the instruction.
The destination operand can be a register or a memory location. The source can be a register, memory location or an immediate value of the same size as the destination.