
Instruction Set
4-161
MUL
MUL
Operation It Performs
/* multiply multiplicand with accumulator */
if (size(
multiplicand) == 8)
/* unsigned byte multiplication */
{
temp =
multiplicand * AL;
if (size(temp) == size(AL))
/* byte result */
{
/* store result */
AL = temp;
/* extend into AX */
AH = 0x00;
/* clear overflow and carry flags */
OF = CF = 0;
}
else
/* word result */
{
/* store result */
AX = temp;
/* set overflow and carry flags */
OF = CF = 1;
}
}
if (size(
multiplicand) == 16)
/* unsigned word multiplication */
{
temp =
multiplicand * AX;
if (size(temp) == size(AX))
/* word result */
{
/* store result */
AX = temp;
/* extend into DX */
DX = 0x00;
/* clear overflow and carry flags */
OF = CF = 0;
}
else
/* doubleword result */
{
/* store result */
DX::AX = temp;
/* set overflow and carry flags */
OF = CF = 1;
}
}
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...