Differentiate SUI 8 bit data and CMP R
Answers
CMP: - (compare register or memory with accumulator) The contents of the operand register or memory are M compared with the contents of the accumulator. Both contents are preserved . The result of the comparison is shown by setting the flags of the PSW as follows:
if (A) < reg/mem: carry flag is set.
if (A) = reg/mem:
zero flag is set.
if (A) > reg/mem: carry and zero flags are reset.
Eg: - CMP B
CMP M
CMP: - (compare register or memory with accumulator) The contents of the operand register or memory are M compared with the contents of the accumulator. Both contents are preserved . The result of the comparison is shown by setting the flags of the PSW as follows:
if (A) < reg/mem: carry flag is set.
if (A) = reg/mem:
zero flag is set.
if (A) > reg/mem: carry and zero flags are reset.
Eg: - CMP B
CMP M