[此贴子已经被作者于2007-8-11 21:55:38编辑过]
[此贴子已经被作者于2007-8-11 21:55:38编辑过]
看了,那个说法肯定是错误的,建议找一些比较正规的书籍教材来学习为好。
[QUOTE]
DIV INSTRUCTION
Purpose: Division without sign.
Syntax:
DIV source
The divider can be a byte or a word and it is the operator which is given the instruction.
If the divider is 8 bits, the 16 bits AX register is taken as dividend and if the divider is 16 bits the even DX:AX register will be taken as dividend, taking the DX high word and AX as the low.
If the divider was a byte then the quotient will be stored on the AL register and the residue on AH, if it was a word then the quotient is stored on AX and the residue on DX.
IDIV INSTRUCTION
Purpose: Division with sign.
Syntax:
IDIV source
It basically consists on the same as the DIV instruction, and the only difference is that this one performs the operation with sign.For its results it used the same registers as the DIV instruction.[/QUOTE]
这是intel开发手册上的内容,应该够权威了。
记得先清eax哦
这类代码我写过许多了,不会骗你的,^_^
[此贴子已经被作者于2007-8-13 22:55:27编辑过]