home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT36 / EMULSRC.ZIP / A99CONVR.C next >
Text File  |  1993-04-14  |  519b  |  28 lines

  1. /* This utility strips off the TIFILES header, produced by the LOADER
  2.    utility, and swaps the hi- and lo- order bytes.
  3. */
  4.  
  5. #include <stdio.h>
  6.  
  7.  
  8. main()
  9. {
  10.     int i,hibyte,lobyte;
  11.     FILE *infile,*outfile;
  12.  
  13.     infile=fopen("diskrom.bin","r+b");
  14.     outfile=fopen("diskr.bin","w+b");
  15.  
  16.     printf("\n\n\n");
  17.     for(i=0;i<134;i++) fgetc(infile);
  18.  
  19.     while(!feof(infile))
  20.     {
  21.         hibyte=fgetc(infile);
  22.         lobyte=fgetc(infile);
  23.         fputc(lobyte,outfile);
  24.         fputc(hibyte,outfile);
  25.     }
  26.     fclose(infile);
  27.     fclose(outfile);
  28. }