/* ------------------------------------------------------------------------

File   : float2bytes.c

Descr  : Asks for a 'float' number and prints the byte representation of it
         (4 bytes), for use by 'hexline' to create an INTEL-HEX formatted
	 string which can be used to 'repair' a 'broken' calibration constant
	 in a ZEUS HV-controller.
Author : Henk Boterenbrood, March 1997
--------------------------------------------------------------------------- */

#include <stdio.h>

int main( int argc, char **argv )
{
  float f;
  unsigned char  *c;

  printf( "Give float: " );
  scanf ( "%f", &f );

  c = (unsigned char *) (&f);

  printf( "%f => %2x %2x %2x %2x\n",
	  f, *c, *(c+1), *(c+2), *(c+3) );
}

/* ------------------------------------------------------------------------ */

