what flid and fdiv are supposed to do ?

thx
Posted on 2001-07-30 16:03:31 by Bobogrid
i think you mean: fild instead of flid (i don't think this instruction exist...)

FILD loads and stores binary integers
FLD load and store real number. example:


.data
Bobogrid real4 911.005
.code
start:

fild real4

end start


that's what it does, i'm still confused by those two instruction. i have no idea what the differences are... and fdiv divides the dest by the source. there's a special discussion on FPU. check this out: FPU
Posted on 2001-07-30 16:49:57 by disease_2000
Ok, I'm sorry to always have to have my say on every maths related post, but...

Disease the difference between fld and fild is sort of similar to the difference between mul reg and imul reg. They both proform (sort of) the same task but they interept the binary representations of numbers differently.

In your example you declare Bobogrid as a floating point number because you use a decimal point however you loaded it with the integer loading fild, hence the value loaded on the the fpu would actualy be completely different. You should have used fld.

The need for two instructions stems from the fact that 1 and 1.0 look completly differently in binary from eachother.
Posted on 2001-07-30 17:00:14 by Eóin