892 views

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

MVIA, 55 H
MVI C, 25 H
DAA

1. 7AH
2. 80H
3. 50H
4. 22H
retagged | 892 views

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.

selected by

+1 vote
1
2