long MSBINtolong( unsigned char *ms )
{
 int c,sign,ex;
 long a,*ax;
 float e,f;

 sign = ms[2] / 0x80;
 ex   = ms[3] - 0x81; //(ms[3] - 0x81 + 0x7f) & 0xff;
 ax=(long *)ms;
 a=(*ax) & ((1L<<24)-1);

 e=1;
 for (c=22,f=0.5;c>0;c--,f/=2)
  if (a & (1L<<c))
   e+=f;

 if (ex==-127)
  return 0;

 for (c=1;c<=ex;c++)
  e*=2;

 if (sign)
  e*=-1;

 return( e );
}
