home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PERFORM / DISKIO1.PAS < prev    next >
Pascal/Delphi Source File  |  1993-01-13  |  923b  |  46 lines

  1. {$IFDEF VER70}
  2. {$A+,B-,D-,E-,F-,G+,I-,L-,N-,O-,P-,Q-,R-,S+,T-,V-,X+}
  3. {$ELSE}
  4. {$A+,B-,D-,E-,F-,G+,I-,L-,N-,O-,R-,S+,V-,X+}
  5. {$ENDIF}
  6. {$M 16384,0,655360}
  7. {$DEFINE SetTextBuffer}
  8. Const BufSize = 4096;
  9. var BronBuffer,DoelBuffer: Array[1..BufSize] of Char;
  10.     Bron,Doel: Text;
  11.     t: Char;
  12.  
  13. var TimerTick: Word absolute $0040:$006C;
  14.     Time: Real;
  15.  
  16. begin
  17.   Time := TimerTick;
  18.  
  19.   Assign(Bron,'input');
  20.   {$IFDEF SetTextBuffer}
  21.   SetTextBuf(Bron,BronBuffer);
  22.   {$ENDIF}
  23.   Reset(Bron);
  24.   Assign(Doel,'output');
  25.   {$IFDEF SetTextBuffer}
  26.   SetTextBuf(Doel,DoelBuffer);
  27.   {$ENDIF}
  28.   Rewrite(Doel);
  29.  
  30.   while not eof(Bron) do
  31.   begin
  32.     while not eoln(Bron) do
  33.     begin
  34.       read(Bron,t);
  35.       write(Doel,t)
  36.     end;
  37.     readln(Bron);
  38.     writeln(Doel)
  39.   end;
  40.   Close(Bron);
  41.   Close(Doel);
  42.  
  43.   Time := (TimerTick - Time) / 18.2;
  44.   writeln(' Execution time was: ',Time:0:2,' sec.');
  45. end.
  46.