program softwarepraktikum;

const   bel    =   7;     spmax  = 15;
        cr     =  13;     lvoben =  7;
        lf     =  10;

        drives : set of char = ['A','B','P','a','b','p'];

type    eintrag = record
           name : array [1..8] of char;
           ext  : array [1..3] of char;
           flag : boolean;
        end;
        fstring = string [12];

var     i, filez,
        offset, ptr,
        errflag  : integer;
        inhalt   : array [1..128] of eintrag;
        seiten,
        ignore   : boolean;
        key      : char;

{$I DUMMY }
{$I COPIEREN }
{$I DIRLESEN }
{$I LIST }
{$I PTR }
{$I SENDEN }

procedure topmenue;

begin

   clrscr;  gotoxy ( 0 , 1 );
   writeln(' Serielles Kopierprogramm fuer CP/M Rechner');
   writeln;
   writeln(' S/s = Senden       E/e = Empfangen       Q/q = Ende');
   writeln;
   commandzeile;
   clreol;
   write('   Druecken Sie eine Taste !' );
   commandzeile;

end; { topmenue }

{ ************************************************************************* }

begin { hauptprogramm }

   init;

   topmenue;
   repeat
         repeat until keypressed;
         key := chr ( bdos ( 6 , 255 ));

         case key of
         'S','s' : begin senden; topmenue; end;
         'E','e' : begin empfangen; topmenue; end;
         'Q','q' : ;
         else falschein;
         end;
   until ( key = 'Q' ) or ( key = 'q' );

   writeln;
   writeln(' Good bye! It was nice to work with you !');

end.
