How to convert an integer to a floating point value in x86 ASM?
- by George Edison
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?