home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
hex2file.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
523b
|
24 lines
/*--------------------------------------*/
/* */
/* HEX2FILE(X,X) */
/* */
/* Writes a number to a file in hex for-*/
/* mat. The first argument is the file */
/* descriptor and the second is the */
/* number to write. */
/* */
/* Written by John Callicotte */
/* */
/*--------------------------------------*/
# include "stdio.h"
void hex2file(fd,a)
int a;
FILE *fd;
{
int d,e;
e=a/256;
d=a-256*e;
putc(e,fd);
putc(d,fd);
}