Ok, here's an interesting one:
FMUL (I'm talking about the no operand version).
According to the intel manuals it uses the FPU registers like so:
st1 = st1 * st0
st0 is unchanged
I have a program that does this:
FMUL
FISTP <MEMORY>
and then the program does not use the FPU anymore, until later when it calls EMMS and clears and starts over.
I'm just wondering if the manuals are wrong and if not, why would this programmer even need to use the FMUL since it only affects st1??
The programmer stores ST0 and then goes on his merry way, leaving ST1 out of further calculations.
Later,
JEff
Hard to say without looking at the code, but that sounds like a fragment.
Cheers,
Paul
QuoteNote: FMUL without operands can also be used with the MASM assembler but such an instruction is coded as FMULP ST(1),ST(0).
You would find the above in the description of the FMUL instruction in the FPU tutorial which you can view/download at:
http://www.ray.masmcode.com/fpu.html
Switching to the FMULP instruction, you would then see:
QuoteThis instruction performs a signed multiplication of the contents from the ST(i) and ST(0) data registers. The result then overwrites the content of the ST(i) register and the TOP data register is popped.
Raymond