The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
753 views

Contents of A register after the execution of the following 8085 microprocessor program is 

MVIA, 55 H
MVI C, 25 H
ADDC
DAA

 

  1. 7AH
  2. 80H
  3. 50H
  4. 22H
asked in CO & Architecture by Veteran (59.5k points)
retagged by | 753 views

1 Answer

+4 votes
Best answer

After ADD C accumulator becomes $01111010 = 7AH$

Then DAA instruction causes the value of Acc to be formatted as BCD. So it becomes $80H$

Below the description of DAA instruction from  

http://microprocessorforyou.blogspot.in/2012/05/instruction-4.html


The contents of the accumulator are changed from a binary value to two 4-bit binary coded decimal (BCD) digits. This is the only instruction that uses the auxiliary flag to perform the binary to BCD conversion, and the conversion procedure is described below. S, Z, AC, P, CY flags are altered to reflect the results of the operation. If the value of the low-order 4-bits in the accumulator is greater than 9 or if AC flag is set, the instruction adds 6 to the low-order four bits. If the value of the high-order 4-bits in the accumulator is greater than 9 or if the Carry flag is set, the instruction adds 6 to the high-order four bits.

answered by Veteran (57.2k points)
selected by


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,440 questions
46,623 answers
139,377 comments
57,024 users