
Instruction Set
4-60
IDIV
Divide Integers
IDIV
What It Does
IDIV divides one integer by another integer.
Syntax
Description
IDIV operates on signed numbers (integers). The operand you specify is the divisor. IDIV
assumes that the number to be divided (the dividend) is in AX or DX::AX. (IDIV uses the
dividend that is twice the size of the divisor.)
IDIV replaces the high half of the dividend with the remainder and the low half of the dividend
with the quotient. As in traditional mathematics, the sign of the remainder is always the
same as the sign of the dividend.
If the quotient is too large to fit in the low half of the dividend (such as when dividing by 0),
IDIV generates Interrupt 0 instead of setting OF. IDIV truncates nonintegral quotients
toward 0.
Form
Opcode
Description
Clocks
Am186 Am188
IDIV
r/m8
F6
/7
AL=AX/(r/m byte); AH=remainder
44–52/50–58
44–52/50–58
IDIV
r/m16
F7
/7
AX=DX::AX/(r/m word); DX=remainder
53–61/59–67
53–61/63–71
IDIV
divisor
Содержание 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...