edited by
2,001 views
0 votes
0 votes
What are the status of the ZERO flag and the contents of the accumulator after the execution of the following 8085 assembly code? Assume that contents of all other registers and memory locations are unknown.

 MOV A, 65H
MOV B, 32H
CMP B

 a. 0, 00H

 b. 0, 65H

 c. 1, 00H

 d. 1, 65H
edited by

1 Answer

1 votes
1 votes
CMP M/r means: Content of M/r is subtracted from Content of Accumulator and flags are set/reset accourding to result, but note that result of subtrction is discarded and content of Accumulator remains unchanged.

If [Acc] < [M/r] then Carry flag=1; Obviously Borrow will generate so cy=1

If [Acc] = [M/r] then Zero flag=1; bcoz both the content are same

If [Acc] > [M/r] then Carry flag=Zero flag=0; Otherwise

So Correct Option is b) 0, (65)H

Related questions

0 votes
0 votes
1 answer
1
Abikkkaaa asked Oct 15, 2018
2,983 views
Which of the following flags is not affected by a conditional branch statement in an 8085 microprocessor? a. Auxiliary Carry flag b. Sign flag c. Carry flag d. Zero flag
1 votes
1 votes
1 answer
4
Arjun asked Nov 5, 2017
1,656 views
In the architecture of $8085$ microprocessor match the following :$\begin{array}{clcl} \text{(a)} & \text{Processing unit} & \text{(i)} & \text{Interrupt} \\ \text{(b)}...