
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;
}
}
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...