Category : Utilities for DOS and Windows Machines
Archive   : GETROM.ZIP
Filename : ROMSPLIT.C

 
Output of file : ROMSPLIT.C contained in archive : GETROM.ZIP
/* This program is designed to split a file into two files such
that each of the target files represents streams of bytes from
alternate locations in the source file. Used to make hi / lo
proms for 16 bit systems. Uses a file called temp as its input
and produces two files called tempevn and tempodd as its output.
*/
#include
#include
main(argc,argv)
{
int c;
FILE *fp1, *fp2, *fp3;
if ((fp1 = fopen("temp","rb")) == NULL)
{
perror("Can't open temp");
exit(0);
}
fp2 = fopen("tempevn","wb");
fp3 = fopen("tempodd","wb");
while ((c = getc(fp1)) != EOF)
{
putc(c, fp2);
if ((c = getc(fp1)) == EOF)
{
fclose(fp2);
fclose(fp3);
printf("Warning - odd number of bytes in temp\n");
exit(0);
}
putc(c, fp3);
}
fclose(fp2);
fclose(fp3);
exit(0);
}


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : GETROM.ZIP
Filename : ROMSPLIT.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/