THE 80286 INSTRUCTION SET

IDIV-Signed Divide

Opcode

Instruction

Clocks

Description

F6

/7

IDIVeb

17,mem=20

Signed divide AX byEA byte (AL=Quo,

 

 

 

 

AH=Rem)

F7

/7

IDIVew

25,mem=28

Signed divide DX:AX by EA word (AX=Quo,

 

 

 

 

DX=Rem)

/

FLAGS MODIFIED

None

FLAGS UNDEFINED

Overflow, sign, zero, auxiliary carry, parity, carry

OPERATION

IDlY performs a signed divide. The dividend is implicit; only the divisor is given as an operand. If the source operand is a BYTE operand, divide AX by the byte. The quotient is· stored in AL, and the remainder is stored in AH. If the source operand is a WORD operand, divide DX:AX by the word. The high-order 16 bits of the dividend are in DX. The quotient is stored in AX, and the remainder is stored in DX. Non-integral quotients are truncated towards o. The remainder has the same sign as the dividend and always has less magnitude than the dividend.

PROTECTED MODE EXCEPTIONS

Interrupt 0 if the quotient is too big to fit in the designated register (AL or AX), 'or if the divisor is O. #GP(O) for an illegal memory operand effective address in the CS, DS, or ES segments; #SS(O) for an illegal address in the SS segment. . .

REAL ADDRESS MODE EXCEPTIONS

InterJillpt 0 if the quotient is too big to fit in. the designated register (AL or AX), orif the divisor is O. Interrupt 13 for a word operand at offset OFFFFH.

8-43

Page 253
Image 253
Intel 80286, 80287 manual IDIV-Signed Divide