• edited by
2,575 views
0 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

1 Answer

1 1 vote
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
Position:
Show:

Related questions

0 0 votes
1 1 answer
3.5k
3.5k views
Abikkkaaa asked Oct 15, 2018
3,478 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
0 0 votes
3 3 answers
5.6k
5.6k views
go_editor asked Mar 24, 2020
5,646 views
The contents of Register $(BL)$ and Register $(AL)$ of $8085$ microprocessor are $49H$ and $3AH$ respectively. The contents of $AL$, the status of carry flag $(CF)$ and s...
0 0 votes
7 7 answers
3.0k
3.0k views
Pooja Khatri asked Jul 13, 2018
3,015 views
In 8085 microprocessor, what is the output of following program?LDA 8000H MVI B, 30H ADD B STA 8001 HRead a number from input port and store it in memoryRead a number fro...
1 1 vote
1 1 answer
2.2k
2.2k views
Arjun asked Nov 5, 2017
2,150 views
In the architecture of $8085$ microprocessor match the following :$\begin{array}{clcl} \text{(a)} & \text{Processing unit} & \text{(i)} & \text{Interrupt} \\ \text{(b)}...