Computer Science, asked by Vikash5903, 1 year ago

Differentiate SUI 8 bit data and CMP R

Answers

Answered by DhArShU22
2

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

Answered by onlinewithmahesh
0

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

Similar questions