#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
FILE * pFileShell;
FILE * pFileAsci;
int iOpCode;
pFileShell = fopen (argv[1] , "r");
pFileAsci = fopen (argv[2] , "w+");
if (pFileShell == NULL) perror ("Error opening file");
else
{
if(pFileAsci == NULL) perror ("Error creating file");
else
{rewind (pFileShell);
while ( ! feof (pFileShell) )
{
fscanf (pFileShell, "%x", &iOpCode);
fprintf (pFileAsci,"%c",iOpCode);
}
fclose (pFileAsci);
fclose (pFileShell);
}
}
return 0;
}