* remove "\r" nonsense
[mascara-docs.git] / i386 / i386.reference / AAM.htm
blob8ffe13ab34994a7789dac852b96bcdf732c33e86
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Opcode AAM</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="AAD.htm"> AAD ASCII Adjust AX before Division</A><BR>
10 <B>next:</B><A HREF="AAS.htm"> AAS ASCII Adjust AL after Subtraction</A>
11 <P>
12 <HR>
13 <P>
14 <H1>AAM -- ASCII Adjust AX after Multiply</H1>
16 <PRE>
17 Opcode Instruction Clocks Description
19 D4 0A AAM 17 ASCII adjust AX after multiply
20 </PRE>
22 <H2>Operation</H2>
24 <PRE>
25 AH := AL / 10;
26 AL := AL MOD 10;
27 </PRE>
29 <H2>Description</H2>
31 Execute AAM only after executing a
32 <A HREF="MUL.htm">MUL</A> instruction between two unpacked
33 BCD digits that leaves the result in the AX register. Because the result is
34 less than 100, it is contained entirely in the AL register. AAM unpacks the
35 AL result by dividing AL by 10, leaving the quotient (most-significant
36 digit) in AH and the remainder (least-significant digit) in AL.
38 <H2>Flags Affected</H2>
40 SF, ZF, and PF as described in <A HREF="appc.htm">Appendix C</A>; OF, AF, and CF are undefined
42 <H2>Protected Mode Exceptions</H2>
44 None
46 <H2>Real Address Mode Exceptions</H2>
48 None
50 <H2>Virtual 8086 Mode Exceptions</H2>
52 None
55 <P>
56 <HR>
57 <P>
58 <B>up:</B> <A HREF="c17.htm">
59 Chapter 17 -- 80386 Instruction Set</A><BR>
60 <B>prev:</B><A HREF="AAD.htm"> AAD ASCII Adjust AX before Division</A><BR>
61 <B>next:</B><A HREF="AAS.htm"> AAS ASCII Adjust AL after Subtraction</A>
62 </BODY>