Package FileTest

Uses KbdCRT,Partition,Dir,Files

Sub Test(S as String)
Var
   Buf as Array[0..10000] Of Byte
   N,I,J as Word
   F as File
Enter
  ClearScreen
  SetDrive &H80
  ChDir("RESERVE ","   ")
  ChDir("PROJSYS ","   ") \
  ChDir("SOURCES ","   ")  \
  Open(F,S,"C  ",0)
  For I=0 To F.Size Do Buf[I]='';
  Buf[Word(F.Size)]='á'
  Read(F,Buf,F.Size)
  J=1:For I=0 To F.Size Do
  Begin
    If Buf[I]=&H0D Then
      I+=1:J+=1
      PrintCR
      If J=25 Then J=1:PrintS "-- Pressez une touche --":GetCar:PrintCR;
    Else
    If Buf[I]=&H0A Then PrintCR
    Else
    If Buf[I]=9 Then PrintS "        "
    Else
      PutCar Buf[I]
    End;
  Next
Leave

Enter
  Test("UNTAR   ")
Leave