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
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
The DAA instruction can be used following an ADD instruction to en... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
896-C-S-S-A-D (2515).docx
120 KBs Word File
