recategorized
1,581 views
0 votes
0 votes

In 8085 microprocessor, what is the output of following program?

LDA 8000H
MVI B, 30H
ADD B
STA 8001 H
  1. Read a number from input port and store it in memory
  2. Read a number from input device with address 8000H and store it in memory location 8001H
  3. Read a number from memory at location 8000H and store it in memory location 8001H
  4. Load A with data from input device with address 8000H and display it on the output device with address 8001H
recategorized

7 Answers

1 votes
1 votes
LDA 8000H,

- Above instruction transfer data from memory locatioon 8000H to Accumulator

MVI B, 30H

ADD B

- Above 2 instruction, moves 30H to Register B and add it to Accumulator. So basically the contents of Accumulator are incremented by 30H

STA 8001H

- Finally, the contents of Accumulator are stored in memory location 8001H

--

None of the choices include the 'addition operation'. *Choice 3 looks to be most appropriate*.

Generally IN/OUT are used for writing to devices port (8bit addresses), so I don't think Choice 4 is the best of available answer.
1 votes
1 votes
→ 1st instruction "LDA 8000H" transfers data from memory location 8000H to Accumulator.
→ 2nd instruction "MVI B, 30H" moves 30H to register B.
→ 3rd instruction "ADD B" adds contents of B with Accumulator and stores it back to Accumulator. So basically the contents of Accumulator are incremented by 30H.
→ 4th instruction "STA 8001H" stores the contents of Accumulator in memory location 8001H. As none of the choices include the 'addition operation', we need to choose appropriate option from the given options.
→ Option 4 mentions about loading the content from 8000H to accumulator A. Hence option 4 is more appropriate.
0 votes
0 votes
option (3) is correct answer.

Related questions

1 votes
1 votes
0 answers
2
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)}...