* better
[mascara-docs.git] / hw / i386.reference / AAD.htm
blob764e8f827f23688778f7eee2eafa541ec5a84a2c
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Opcode AAD</TITLE>
5 </HEAD>
6 <BODY>
7 <B>up:</B> <A HREF="c17.htm">
8 Chapter 17 -- 80386 Instruction Set</A><BR>
9 <B>prev:</B><A HREF="AAA.htm"> AAA ASCII Adjust after Addition</A><BR>
10 <B>next:</B><A HREF="AAM.htm"> AAM ASCII Adjust AX after Multiply</A>
11 <P>
12 <HR>
13 <P>
14 <H1>AAD -- ASCII Adjust AX before Division</H1>
16 <PRE>
17 Opcode Instruction Clocks Description
19 D5 0A AAD 19 ASCII adjust AX before division
20 </PRE>
22 <H2>Operation</H2>
24 <PRE>
25 AL := AH * 10 + AL;
26 AH := 0;
27 </PRE>
29 <H2>Description</H2>
31 AAD is used to prepare two unpacked BCD digits (the least-significant
32 digit in AL, the most-significant digit in AH) for a division operation that
33 will yield an unpacked result. This is accomplished by setting AL to
34 AL + (10 * AH), and then setting AH to 0. AX is then equal to the binary
35 equivalent of the original unpacked two-digit number.
37 <H2>Flags Affected</H2>
39 SF, ZF, and PF as described in <A HREF="appc.htm">Appendix C</A>; OF, AF, and CF are undefined
41 <H2>Protected Mode Exceptions</H2>
43 None
45 <H2>Real Address Mode Exceptions</H2>
47 None
49 <H2>Virtual 8086 Mode Exceptions</H2>
51 None
54 <P>
55 <HR>
56 <P>
57 <B>up:</B> <A HREF="c17.htm">
58 Chapter 17 -- 80386 Instruction Set</A><BR>
59 <B>prev:</B><A HREF="AAA.htm"> AAA ASCII Adjust after Addition</A><BR>
60 <B>next:</B><A HREF="AAM.htm"> AAM ASCII Adjust AX after Multiply</A>
61 </BODY>