
var F1, F2 : Text;
    C : char;
    Ufn : String[ 20 ];

BEGIN
  writeln( 'WordStar -> Text file converting program Vers. 1.0' );
  writeln;
  write( 'Source file name = ' ); readln( Ufn ); assign( F1, Ufn );
  write( 'Destination name = ' ); readln( Ufn ); assign( F2, Ufn );
  reset( F1 ); rewrite( F2 );
  while not eof( F1 ) do
    begin
      read( F1, C );
      if C in [ #$8a, #$8d, #$a0 ] then C := chr( ord( C ) and $7f  );
      write( F2, C );
    end;
  close( F2 );
END.
