Question: The x86 architecture includes an instruction called Decimal Adjust after Addition (DAA).DAA performs the following sequence of instructions: if ((AL AND 0FH) >9) OR (AF

The x86 architecture includes an instruction called Decimal Adjust after Addition (DAA).DAA performs the following sequence of instructions:
if ((AL AND 0FH) >9) OR (AF = 1) then
AL ← AL + 6;
AF ← 1;
else
AF ← 0;
endif;
if (AL > 9FH) OR (CF = 1) then
AL ← AL + 60H;
CF ← 1;
else
CF ← 0;
endif.
"H" indicates hexadecimal. AL is an 8-bit register that holds the result of addition of two unsigned 8-bit integers. AF is a flag set if there is a carry from bit 3 to bit 4 in the result of an addition. CF is a flag set if there is a carry from bit 7 to bit 8. Explain the function performed by the DAA instruction.

Step by Step Solution

3.30 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The DAA instruction can be used following an ADD instruction to en... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

896-C-S-S-A-D (2515).docx

120 KBs Word File

Students Have Also Explored These Related Systems Analysis And Design Questions!