How to convert an integer to a floating point value in x86 ASM?

You need the fild instruction. Here's one reference: website.masmforum.com/tutorials/fptute/f....

Up vote 0 down vote favorite share g+ share fb share tw.

I need to multiply an integer (two's compliment) by a floating point constant. Here is what I have: . Data pi dd 3.14 int dd 0ah .

Code fld pi? Fmul ST(1), ST How can I convert int to a floating point value for multiplying against pi? Assembly floating-point x86 link|improve this question edited Jun 12 '10 at 8:38starblue19.7k22258 asked Jun 12 '10 at 3:57George Edison6,57732267 89% accept rate.

You get pi 'for free'. – Jens Björnhager Jun 13 '10 at 18:24.

Great! And when were these instructions added to the x86 instruction set? (like with the 386/7, the 486/7...?) – George Edison Jun 12 '10 at 4:11 With the 8087 (en.wikipedia.org/wiki/X86_instruction_li...) – Artelius Jun 12 '10 at 4:26 @Art: Ah, I see.

Thanks! – George Edison Jun 12 '10 at 5:29.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions