var I:LONGINT;
    B1:BYTE;
    INFILE,OUTFILE:FILE OF BYTE;

begin
writeln('This program restores BIN files from T64 files. This is useful when ');
writeln(' you want to convert BACK .T64 files to virtual or real C64 disk files.');
WRITELN;
writeln(' Parameters: t64tobin.exe INFILE.T64 OUTFILE.EXT');
WRITELN;
WRITELN(' COPYRIGHT BY WERNER ZSOLT. The source is freely modifiable, but please');
writeln('give me a congrats (I had rather lots of efforts to make these utizz.)');
WRITELN;
WRITELN(' Contact adress:  MTTT022@URSUS.BKE.HU   (Internet),');
writeln('                  36/1/1823513           (Voice & 14400 Modem)');
 
  ASSIGN(INFILE,PARAMSTR(1));
  RESET(INFILE);

  ASSIGN(OUTFILE,paramstr(2));
  REWRITE(OUTFILE);

i:=$42;
seek(infile,i);                        { reading back the first two bytes }
read(infile,b1);
write(outfile,b1);
read(infile,b1);
write(outfile,b1);

i:=1024;
seek(infile,i);

repeat
 read(infile,b1);
 write(outfile,b1);
until (eof(infile));

close(outfile);
close(infile);

end.
