recategorized by
8,090 views
5 votes
5 votes

The content of the accumulator after the execution of the following 8085 assembly language program, is:

  MVI A, 42H
  MVI B, 05h
UGC: ADD B
  DCR B
  JNZ UGC
  ADI 25H
  HLT
  1. 82 H
  2. 78 H
  3. 76 H
  4. 47 H
recategorized by

2 Answers

Best answer
0 votes
0 votes
A is taking accumulator...

A= 4 * 16 + 2 = 66 in decimal

B= 5 in decimal

Loop runs from B=5 to 1

So 66 + 5 +4 +3+2+1

That is 81 + 25H = 81 + 37 =118

In binary ..

01110110 = 76H
selected by
3 votes
3 votes
A=42   B=05...

LOOP

B= 5................A=A+B=42+05=47

B=4................47+4=4B

B=3................4B+3=4E

B=2................4E+2=50

B=1.................50+1=51

--------------------------LOOP ENDS

ADI 25H

A=51+25=   76H......(3)
Answer:

Related questions

1 votes
1 votes
1 answer
1
4 votes
4 votes
1 answer
2