var
  FromF1, FromF2, ToF: file;
  NumRead, NumWritten: Word;
  Buf: array[1..2048] of Char;

 procedure CopyFile( Var FromFile ,ToFile : File );

begin

  Writeln('Copying ', FileSize(FromFile), ' bytes...');
  repeat
    BlockRead(FromFile, Buf, SizeOf(Buf), NumRead);
    BlockWrite(ToFile, Buf, NumRead, NumWritten);
  until (NumRead = 0) or (NumWritten <> NumRead);

end;
begin
  Assign(FromF1, ParamStr(1)); { Open input file 1 }
  Reset(FromF1, 1);  { Record size = 1 }
  Assign(FromF2, ParamStr(2)); { Open input file 2}
  Reset(FromF2, 1);  { Record size = 1 }
  Assign(ToF, ParamStr(3)); { Open output file }
  Rewrite(ToF, 1);  { Record size = 1 }
  CopyFile( FromF1, ToF );
  CopyFile( FromF2, ToF );
  Close(FromF1);
  Close(FromF2);
  Close(ToF);
end.