home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------*/
- /* */
- /* 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);
- }