The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
804 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.6k points)
retagged by | 804 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.4k points)
selected by

Related questions

0 votes
0 answers
3
asked Sep 29, 2014 in Digital Logic by Kathleen Veteran (59.6k points) | 217 views


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

42,599 questions
48,598 answers
155,653 comments
63,718 users