The x86 architecture includes an instruction called Decimal Adjust after Addition (DAA).DAA performs the following sequence of
Question:
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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Computer organization and architecture designing for performance
ISBN: 978-0136073734
8th edition
Authors: william stallings
Question Posted: