title: convert 32 int to float in Assembler
body: <p>I have found this code for converting float to int.</p>
  
  <pre><code>int ftoi(float flt)
  {
      int i;
      _asm
      {
          mov  eax,flt; //loaded mem to acc
          rcl  eax,1;   //left shift acc to remove the sign
          mov  ebx,eax; //save the acc
          mov  edx,4278190080; //clear reg edx;
          and  eax,edx; //and acc to retrieve the exponent
          shr  eax,24;
          sub  eax,7fh; //subtract 7fh(127) to get the actual power 
          mov  edx,eax; //save acc val power
          mov  eax,ebx; //retrieve from ebx
          rcl  eax,8;     //trim the left 8 bits that contain the power
          mov  ebx,eax; //store
          mov  ecx, 1fh; //subtract 17 h
          sub  ecx,edx; 
          mov  edx,00000000h;
          cmp  ecx,0;
          je   loop2;
          shr  eax,1;
          or   eax,80000000h;        
  loop1:    
          shr  eax,1; //shift (total bits - power bits);
          sub  ecx,1;
          add  edx,1;
          cmp  ecx,0;
          ja   loop1;
  loop2:  
          mov  i, eax;        
  
  //check sign +/-        
  sign:
          mov  eax,flt;
          and  eax,80000000h;
          cmp  eax,80000000h;
          je     putsign;
      }
  
      return i;
  
  putsign:
      return -i;
  }
  </code></pre>
  
  <p>Do you think that's possible to edit this piece of code to convert 32 Int to float?</p>
  
  <p>If it is could you give me some advice how to do it?</p>
  
  <p>Thank you very much for all suggestions and answers.</p>