Category : Miscellaneous Language Source Code
Archive   : HACKROM.ZIP
Filename : UNSPLIT.C

 
Output of file : UNSPLIT.C contained in archive : HACKROM.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,c1;
FILE *fp1, *fp2, *fp3;

printf("Unsplit tempevn tempodd to file ROM\n");
if ((fp2 = fopen("tempevn","rb")) == NULL)
{
perror("Can't open TEMPEVN");
exit(0);
}
if ((fp3 = fopen("tempodd","rb")) == NULL)
{
perror("Can't open TEMPODD");
exit(0);
}

if ((fp1 = fopen("rom","wb")) == NULL)
{
perror("Can't open ROM");
exit(0);
}

while ((c = getc(fp2)) != EOF)
{
putc(c, fp1);
c1 = getc(fp3);
putc(c1,fp1);
}
fclose(fp1);
fclose(fp2);
fclose(fp3);
printf("Changes written to ROM\n");
exit(0);
}


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : HACKROM.ZIP
Filename : UNSPLIT.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/