hi there. the imul has more than 2 operand and i'm abit c- onfused with it. I would like to know when and when not to use the imul and what advantage does it have over the ori- ginal MUL. by the way, does .586 represent Pentium I ?? thanx.
Excerpt from Vol. 2 of the Pentium manual (free online from Intel): • One-operand form. This form is identical to that used by the MUL instruction. Here, the source operand (in a general-purpose register or memory location) is multiplied by the value in the AL, AX, or EAX register (depending on the operand size) and the product is stored in the AX, DX:AX, or EDX:EAX registers, respectively. • Two-operand form. With this form the destination operand (the first operand) is multiplied by the source operand (second operand). The destination operand is a general-purpose register and the source operand is an immediate value, a general-purpose register, or a memory location. The product is then stored in the destination operand location. • Three-operand form. This form requires a destination operand (the first operand) and two source operands (the second and the third operands). Here, the first source operand (which can be a general-purpose register or a memory location) is multiplied by the second source operand (an immediate value). The product is then stored in the destination operand (a general-purpose register). When an immediate value is used as an operand, it is sign-extended to the length of the destina-tion operand format. .586 includes even the earliest Pentiums, I think. --Larry