What is the use of fild and imul opcode in assembly prog... I have program which has following instructions: fild qword ptr imul ecx,ecx,64h ; imul dest,src,immed8 Please explain use of above opecodes.... Your's faithfully, Trilok Soni...
Posted on 2001-04-06 14:05:00 by trilok
fild qword ptr as for your above example fild you can read below, qword mean quad word, ptr means pointer, and the i believe is what the pointer is pointing at whats contained at that memory location. well i pulled this from the Art Of Assembly for the fild instruction:


14.4.5.1 The FILD Instruction

------------------------------------------------------------
The fild (integer load) instruction converts a 16, 32, or 64 bit
two's complement integer to the 80 bit extended precision format
and pushes the result onto the stack. This instruction always
expects a single operand. This operand must be the address of a
word, double word, or quad word integer variable. Although the
instruction format for fild uses the familiar mod/rm fields, the
operand must be a memory variable, even for 16 and 32 bit
integers. You cannot specify one of the 80386's 16 or 32 bit
general purpose registers. If you want to push an 80x86 general
purpose register onto the FPU stack, you must first store it
into a memory variable and then use fild to push that value of
that memory variable.

The fild instruction sets the stack exception bit and C1
(accordingly) if stack overflow occurs while pushing the
converted value. Examples:

                fild    mem_16
                fild    mem_32
                fild    mem_64
;########################################################### You can read about the imul instruction here: IMUL INSTRUCTION smurf
Posted on 2001-04-06 16:14:00 by smurf