Program  DOSTUTOR_II;
uses graph, crt, dos, Printer;
const StringLength = 40;
      MenuStart = 1;
      MenuEnd =136;
      F1 = #59;
      F10 = #68;
      pgdn = #81;
      pgup = #73;
      CursorUp = #72;
      CursorDown = #80;
      Escape = #27;
      Enter = #13;
      y2    = #121;
      Y1   = #89;

TYPE
    MenuString = string[Stringlength];
    Index = MenuStart .. MenuEnd;
    MenuList = array[Index] of MenuString;


    
label VGA1,exit1;
VAR
   VGA, z,  a : string;
   i,y,x,            oldrowcounter,
   safty,            oldmenucounter,
   rowCounter,ende,GRA1,menucounter,check   :     integer;
   MenuChoice                               :     MenuList;

   year,month,day,dayofweek:word;
   weekday:string[10];


{========================================================}



procedure CursorOn;
   begin
      inline($B4/$01/$B9/$13/$12/$CD/$10);
   end;

procedure CursorOff;
   begin
      inline($B4/$01/$B9/$FF/$FF/$CD/$10);
   end;
PROCEDURE mainmenu;
BEGIN
    clrscr;
    textbackground (black);
    textcolor(LIGHTBLUE);
    gotoxy(24,1);
    writeln('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·');
    gotoxy(24,2);
    writeln('³                              º');
    gotoxy(24,3);
    writeln('³                              º');
    gotoxy(24,4);
    writeln('³                              º');
    gotoxy(24,5);
    writeln('³                              º');
    gotoxy(24,6);
    writeln('ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼');
    gotoxy(34,2);textcolor(LIGHTred);write('DOS 5.0 TUTOR');
    gotoxy(34,3);textcolor(cyan);write('Programmed by');
    gotoxy(33,4);textcolor(cyan);write('Carsten & Frank');
    getdate(year,month,day,dayofweek);
    case dayofweek of
    0:weekday:='Sunday';          1:weekday:='Monday';
    2:weekday:='Tuesday';         3:weekday:='Wednesday';
    4:weekday:='Thursday';        5:weekday:='Friday';
    6:weekday:='Saturday';
    end;
    gotoxy(26,5);textcolor(red);
    write('Today is: ',weekday,' ',MONTH,'/',DAY,'/',year);
    textcolor(LIGHTBLUE);
    gotoxy(51,7);
    write('Ú');
    for i:=1 to 25 DO
    write('Ä');
    write('·');
    for y:=8 to 24 do
    BEGIN
         gotoxy(51,y);write('³');
         gotoxy(77,y);write('º');
    end;
    gotoxy(51,25);write('Ô');
    for i:=1 to 25 Do
    write('Í');
    write('¼');
    gotoxy (4,4);
    write                ('Press F1 To Exit');
    gotoxy (4,5) ; write ('  And Register');
    GOTOXY (10,4); TEXTCOLOR (LIGHTRED); WRITE ('F1');
    textcolor (lightred);
    gotoxy (63,4);write (#24,' ',#25);
    textcolor (lightblue);write (' = Up, Down');
    gotoxy (63,5);textcolor (lightred);write ('<ÄÙ');
    textcolor (lightblue);write(' = Choose');

END;
{=================================================}
PROCEDURE viewwindow;
BEGIN
     textcolor (lightblue);
     textbackground (black);
     gotoxy (1,7); write ('Ú');
     gotoxy (50,7); write ('·');
     for x:=2 to 49 do
        begin
         gotoxy (x,7);     write ('Ä');
        end;
     for y:=8 to 25 do
     BEGIN
     gotoxy(1,y);write('³');
     gotoxy(50,y);write('º');
     end;
     gotoxy(1,25);write('Ô');
     for i:=1 to 48 do
     write('Í');
     write('¼');
END;

PROCEDURE viewwindow1;
BEGIN
     textcolor (lightblue);
     textbackground (black);
     gotoxy (1,7);
     write ('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·');
     gotoxy (1,8);
     write ('³                                                º');
     gotoxy (1,9);
     write ('³                                                º');
     gotoxy (1,10);
     write ('³                                                º');
     gotoxy (1,11);
     write ('³                                                º');
      gotoxy (1,12);
     write ('³                                                º');
     gotoxy (1,13);
     write ('³                                                º');
     gotoxy (1,14);
     write ('³                                                º');
      gotoxy (1,15);
     write ('³                                                º');
    gotoxy (1,16);
     write ('³                                                º');
       gotoxy (1,17);
     write ('³                                                º');
       gotoxy (1,18);
     write ('³                                                º');
     gotoxy (1,19);
     write ('³                                                º');
       gotoxy (1,20);
     write ('³                                                º');
      gotoxy (1,21);
     write ('³                                                º');
        gotoxy (1,22);
     write ('³                                                º');
     gotoxy (1,23);
     write ('³                                                º');
        gotoxy (1,24);
     write ('³                                                º');
      gotoxy (1,25);
     write ('ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼');
     textcolor (cyan);
END;
{====================================================}
PROCEDURE REGISTRATION;
BEGIN
clrscr;
gotoxy (1,1);
writeln('      ******DOS TUTOR II REGISTRATION FORM******    ');
writeln(' I wish to register the following PROGRAM:       ');
writeln;
writeln(' ____copies of Dos 5.0 TUTOR,   @ $9 (16 DM) each.   ');
writeln;
writeln('For a total of: $______  or  German Marks DM______ ');
writeln;
writeln('Please make the INTERNATIONAL MONEY ORDER payable to');
writeln('CARSTEN BOCKSTETTE.                            ');
writeln('                   *******************************');
writeln('Please send the    * G E R M A N Y, KRESSENWEG 2 *');
writeln('Registration to:   *       2842 LOHNE i. O.      *');
writeln('                   *******************************');
writeln;
writeln ('Please ship any updates to:      (Please print)');
writeln('Name:_____________________________________________________');
writeln('Street Address:___________________________________________');
writeln('City, State/Province:_____________________________________');
writeln('Zip Code:_____________     Country:_______________________');
writeln ;
writeln('Please let us know what we could do to improve the T U T O R:');
writeln('____________________________________________________________');
writeln('____________________________________________________________');
writeln('____________________________________________________________');

end;

{000000000000000000000000000000000000000000000000000000000}
procedure PRINT;


VAR
   Row, Column,
   SegmentNumber: word;

   function Videosegment : word;
   BEGIN
      if Mem [ $0040 : $0049 ] = 7 then
         Videosegment := $B000
      else
         Videosegment := $B800;
   END;
Begin
     SegmentNumber := Videosegment;
     for Row :=0 to 24 do begin
         for Column := 0 to 79 do
              write (lst, chr (Mem[ SegmentNumber : 2*Column + 160*Row ] ) );
         writeln (Lst );
         end;
      write (lst, #12);
      end;

{---------------------------------------------------------------}
procedure testprinter;


function PrinterReady (printer :byte) : boolean;

Var
   Regs : registers;
  x : integer;

Begin
     x:=1;

     Regs.AH :=$02;
     Regs.DX :=printer;
     Intr( $17, Regs );
     Printerready := (Regs.AH and $80 = $80) and
                     (Regs.AH and $10 = $10) and
                     (Regs.AH and $08 = $00);
end;

Function Printeroutofpaper ( Printer : byte) :boolean;
var

Regs : Registers;
begin


      Regs.AH := $02;
      Regs.DX := Printer;
      Intr ($17, Regs);
      printeroutofpaper:= Regs.AH and $20 = $20;
end;

Begin
check:=0;
x:=1;
while x=1 do
begin
     if PrinterReady (0) then
     begin
          x:=0;
          if Printeroutofpaper (0) then
          begin
             x:=1;
             textcolor (red);
             writeln ('Printer out of Paper!');
             readln;
          end;
     end
      else
      begin
           if not Printerready (0) then
           begin
                x:=1;
                cursoron;
                textcolor (Red);
                writeln ('Printer not ready!!');
                textcolor (cyan);
                writeln ('If you want to continue without printing');
                write ('enter "y"es, otherwise correct the problem:');
                readln (z);
                cursoroff;
                if (z='Y') or (z='y') then
                begin
                     x:=0;
                     check:=1;
                end;
          registration;
          end;
      end;

end;
end;

{=================================================}


PROCEDURE EXIT;
BEGIN
     a:=('C');
     WHILE  a <> ('') DO BEGIN
     GOTOXY (1,1);
     TEXTBACKGROUND(BLACK);
     TEXTCOLOR (LIGHTBLUE);
     CLRSCR;
     GOTOXY (13,5);
     WRITELN ('                ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
     GOTOXY (13,6);
     WRITELN ('             ÉÍÍ¹                         ÌÍÍ»');
     GOTOXY (13,7);
     WRITELN ('             º  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼  º');
     GOTOXY (13,8);
     WRITELN ('             º                               º');
     GOTOXY (13,9);
     WRITELN ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍ»');
     GOTOXY (13,10);
     WRITELN ('º                                                         º');
     GOTOXY (13,11);
     WRITELN ('º                                                         º');
     GOTOXY (13,12);
     WRITELN ('º                                                         º');
     GOTOXY (13,13);
     WRITELN ('º                                                         º');
     GOTOXY (13,14);
     WRITELN ('º                                                         º');
     GOTOXY (13,15);
     WRITELN ('º                                                         º');
     GOTOXY (13,16);
     WRITELN ('º                                                         º');
     GOTOXY (13,17);
     WRITELN ('º                                                         º');
     GOTOXY (13,18);
     WRITELN ('º                                                         º');
     GOTOXY (13,19);
     WRITELN ('º                                                         º');
     GOTOXY (13,20);
     WRITELN ('º                                                         º');
     GOTOXY (13,21);
     WRITELN ('º                                                         º');
     GOTOXY (13,22);
     WRITELN ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼');
     GOTOXY (13,23);
     GOTOXY (33,6);
     TEXTCOLOR (LIGHTRED);
     WRITE (' E X I T  M E N U ');
     TEXTCOLOR (CYAN);
     GOTOXY (20,13);
     WRITE ('If you want to exit, enter " "es.');
     TEXTCOLOR (RED);
     GOTOXY (48,13);
     WRITE ('Y');
     TEXTCOLOR (CYAN);
     GOTOXY (20,15);
     WRITE ('Press <     > to return to the TUTOR.');
     TEXTCOLOR (RED);
     GOTOXY (27,15);
     WRITE ('ENTER');
     GOTOXY (20,17);
     TEXTCOLOR (CYAN);
     WRITE ('Enter " " if you would like to register.');
     TEXTCOLOR (RED);
     GOTOXY (27,17);
     WRITE ('R');
     TEXTCOLOR (CYAN);
     GOTOXY (20,24);
     CURSORON;
     WRITE ('Your choice:');
     readln(a);
     CURSOROFF;
     if (a='R') or (a='r') then
     begin
           CLRSCR; WRITE ('Please turn on your PRINTER and press <ENTER>.');
           readln;
           registration;
           testprinter;
           if check<>1 then begin
           print;
           write ('Press <ENTER> to continue.'); end
           else write ('Press <ENTER> to continue.');readln;
     end;
     if (a='y') or (a='Y') then
     begin
          A:=('');
          ENDE:=1;
     end;
      END;
     END;
{================================================}
PROCEDURE CGAEXIT;
BEGIN
     CLRSCR;
     TEXTCOLOR (CYAN);TEXTBACKGROUND (BLACK);
     GOTOXY (36,2); WRITE (' THANK YOU');
     GOTOXY (30,3); WRITE ('     FOR USEING THE:');


     TEXTCOLOR (CYAN); GOTOXY (31,4); WRITE (' D O S  5.0  T U T O R ');
     TEXTCOLOR (LIGHTRED);GOTOXY (39,4); WRITE ('5.0');

     for i:=20 downto 1 do
    BEGIN
     IF ODD(I) THEN TEXTCOLOR (BLUE) ELSE TEXTCOLOR (CYAN);
     GOTOXY (27,1);  WRITE ('ÍÍ');         GOTOXY (31,1);  WRITE ('ÍÍ');
     GOTOXY (35,1);  WRITE ('ÍÍ');         GOTOXY (39,1);  WRITE ('ÍÍ');
     GOTOXY (43,1);  WRITE ('ÍÍ');         GOTOXY (47,1);  WRITE ('ÍÍ');
     GOTOXY (51,1);  WRITE ('ÍÍ');         GOTOXY (55,1);  WRITE ('ÍÍ');
     GOTOXY (25,2);  WRITE ('º');          GOTOXY (59,2);  WRITE ('º');
     GOTOXY (25,4);  WRITE ('º');          GOTOXY (59,4);  WRITE ('º');

     GOTOXY (27,5);  WRITE ('ÍÍ');         GOTOXY (31,5);  WRITE ('ÍÍ');
     GOTOXY (35,5);  WRITE ('ÍÍ');         GOTOXY (39,5);  WRITE ('ÍÍ');
     GOTOXY (43,5);  WRITE ('ÍÍ');         GOTOXY (47,5);  WRITE ('ÍÍ');
     GOTOXY (51,5);  WRITE ('ÍÍ');         GOTOXY (55,5);  WRITE ('ÍÍ');


     DELAY (50);
     IF ODD(I) THEN  TEXTCOLOR (CYAN) ELSE TEXTCOLOR (BLUE);
     GOTOXY (25,1);  WRITE ('ÉÍ');         GOTOXY (29,1);  WRITE ('ÍÍ');
     GOTOXY (33,1);  WRITE ('ÍÍ');         GOTOXY (37,1);  WRITE ('ÍÍ');
     GOTOXY (41,1);  WRITE ('ÍÍ');         GOTOXY (45,1);  WRITE ('ÍÍ');
     GOTOXY (49,1);  WRITE ('ÍÍ');         GOTOXY (53,1);  WRITE ('ÍÍ');
     GOTOXY (57,1);  WRITE ('ÍÍ»');
     GOTOXY (25,3);  WRITE ('º');          GOTOXY (59,3);  WRITE ('º');

     GOTOXY (25,5);  WRITE ('ÈÍ');         GOTOXY (29,5);  WRITE ('ÍÍ');
     GOTOXY (33,5);  WRITE ('ÍÍ');         GOTOXY (37,5);  WRITE ('ÍÍ');
     GOTOXY (41,5);  WRITE ('ÍÍ');         GOTOXY (45,5);  WRITE ('ÍÍ');
     GOTOXY (49,5);  WRITE ('ÍÍ');         GOTOXY (53,5);  WRITE ('ÍÍ');
     GOTOXY (57,5);  WRITE ('ÍÍ¼');

     DELAY (50);
     
    END;

END;
{-----------------------------------------------------}

procedure Initialize_MenuChoices(var MenuChoice: MenuList);
begin
   MenuChoice[1] := '1.   APPEND            ';
   MenuChoice[2] := '2.   ASSIGN            ';
   MenuChoice[3] := '3.   ATTRIB            ';
   Menuchoice[4] := '4.   BACKUP            ';
   MENUCHOICE[5] := '5.   BREAK             ';
   MenuChoice[6] := '6.   CHCP              ';
   MenuChoice[7] := '7.   CHDIR ( CD )      ';
   MenuChoice[8] := '8.   CHKDSK            ';
   Menuchoice[9] := '9.   CLS               ';
   MENUCHOICE[10] :='10.  COMMAND           ';
   MenuChoice[11] := '11.  COMP              ';
   MenuChoice[12] := '12.  COPY              ';
   MenuChoice[13] := '13.  CTTY              ';
   Menuchoice[14] := '14.  DATE              ';
   MENUCHOICE[15] := '15.  DEBUG             ';
   MenuChoice[16] := '16.  DEL ( ERASE )     ';
   MenuChoice[17] := '17.  DIR               ';
   TextColor(CYAN);
   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[1]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9);   writeln(MenuChoice[2]);
   gotoxy(52,10);  writeln(MenuChoice[3]);
   gotoxy(52,11);  writeln (Menuchoice[4]);
   GOTOXY(52,12);  WRITELN (MENUCHOICE[5]);
   gotoxy(52,13);  writeln(MenuChoice[6]);
   gotoxy(52,14);  writeln(MenuChoice[7]);
   gotoxy(52,15);  writeln (Menuchoice[8]);
   GOTOXY(52,16);  WRITELN (MENUCHOICE[9]);
   gotoxy(52,17);  writeln(MenuChoice[10]);
   gotoxy(52,18);  writeln(MenuChoice[11]);
   gotoxy(52,19);  writeln (Menuchoice[12]);
   GOTOXY(52,20);  WRITELN (MENUCHOICE[13]);
   gotoxy(52,21);  writeln(MenuChoice[14]);
   gotoxy(52,22);  writeln(MenuChoice[15]);
   gotoxy(52,23);  writeln (Menuchoice[16]);
   gOTOXY(52,24);  WRITELN (MENUCHOICE[17]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   end;
{================================================}

procedure Initialize_MenuChoices1(var MenuChoice: MenuList);
begin
   MenuChoice[18] := '18.  DISKCOMP          ';
   Menuchoice[19] := '19.  DISKCOPY          ';
   MENUCHOICE[20] := '20.  DOSKEY            ';
   MenuChoice[21] := '21.  DOSSHELL          ';
   MenuChoice[22] := '22.  EDIT              ';
   MenuChoice[23] := '23.  EDLIN             ';
   Menuchoice[24] := '24.  EMM386            ';
   MENUCHOICE[25] := '25.  EXE2BIN           ';
   MenuChoice[26] := '26.  EXIT              ';
   MenuChoice[27] := '27.  EXPAND            ';
   MenuChoice[28] := '28.  FASTOPEN          ';
   Menuchoice[29] := '29.  FC                ';
   MENUCHOICE[30] := '30.  FDISK             ';
   MenuChoice[31] := '31.  FIND              ';
   Menuchoice[32] := '32.  FOR               ';
   MENUCHOICE[33] := '33.  FORMAT            ';
   MENUCHOICE[34] := '34.  GRAFTABL          ';
   TextColor(CYAN);   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[18]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[19]);
   GOTOXY(52,10);WRITELN(MENUCHOICE[20]);
   gotoxy(52,11);writeln(MenuChoice[21]);
   gotoxy(52,12);writeln(MenuChoice[22]);
   gotoxy(52,13);writeln(Menuchoice[23]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[24]);
   gotoxy(52,15);writeln(MenuChoice[25]);
   gotoxy(52,16);writeln(MenuChoice[26]);
   gotoxy(52,17);writeln(Menuchoice[27]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[28]);
   gotoxy(52,19);writeln(MenuChoice[29]);
   gotoxy(52,20);writeln(MenuChoice[30]);
   gotoxy(52,21);writeln(Menuchoice[31]);
   gotoxy(52,22);writeln(MenuChoice[32]);
   gotoxy(52,23);writeln(Menuchoice[33]);
   gotoxy(52,24);writeln(MenuChoice[34]);
                       TextColor(CYAN);
   TextBackGround(BLACK);
end;
{==========================================}
procedure Initialize_MenuChoices2(var MenuChoice: MenuList);
begin
   MenuChoice[35] := '35.  GRAPHICS          ';
   Menuchoice[36] := '36.  HELP              ';
   MENUCHOICE[37] := '37.  JOIN              ';
   MenuChoice[38] := '38.  KEYB              ';
   MenuChoice[39] := '39.  LABEL             ';
   MenuChoice[40] := '40.  LOADHIGH ( LH )   ';
   Menuchoice[41] := '41.  MEM               ';
   MENUCHOICE[42] := '42.  MIRROR            ';
   MenuChoice[43] := '43.  MKDIR ( MD )      ';
   MenuChoice[44] := '44.  MODE              ';
   MenuChoice[45] := '45.  MORE              ';
   Menuchoice[46] := '46.  NLSFUNC           ';
   MENUCHOICE[47] := '47.  PATH              ';
   MenuChoice[48] := '48.  PRINT             ';
   Menuchoice[49] := '49.  PROMPT            ';
   MENUCHOICE[50] := '50.  QBASIC            ';
   MENUCHOICE[51] := '51.  RECOVER           ';
   TextColor(CYAN);    TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[35]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[36]);
   GOTOXY(52,10);WRITELN(MENUCHOICE[37]);
   gotoxy(52,11);writeln(MenuChoice[38]);
   gotoxy(52,12);writeln(MenuChoice[39]);
   gotoxy(52,13);writeln(Menuchoice[40]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[41]);
   gotoxy(52,15);writeln(MenuChoice[42]);
   gotoxy(52,16);writeln(MenuChoice[43]);
   gotoxy(52,17);writeln(Menuchoice[44]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[45]);
   gotoxy(52,19);writeln(MenuChoice[46]);
   gotoxy(52,20);writeln(MenuChoice[47]);
   gotoxy(52,21);writeln(Menuchoice[48]);
   gotoxy(52,22);writeln(MenuChoice[49]);
   gotoxy(52,23);writeln(Menuchoice[50]);
   gotoxy(52,24);writeln(MenuChoice[51]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{=======================================================}
procedure Initialize_MenuChoices3(var MenuChoice: MenuList);

begin
   MenuChoice[52] := '52.  RENAME ( REN)     ';
   Menuchoice[53] := '53.  REPLACE           ';
   MENUCHOICE[54] := '54.  RESTORE           ';
   MenuChoice[55] := '55.  RMDIR ( RD )      ';
   MenuChoice[56] := '56.  SET               ';
   MenuChoice[57] := '57.  SETVER            ';
   Menuchoice[58] := '58.  SHARE             ';
   MENUCHOICE[59] := '59.  SORT              ';
   MenuChoice[60] := '60.  SUBST             ';
   MenuChoice[61] := '61.  SYS               ';
   MenuChoice[62] := '62.  TIME              ';
   Menuchoice[63] := '63.  TREE              ';
   MENUCHOICE[64] := '64.  TYPE              ';
   MenuChoice[65] := '65.  UNDELETE          ';
   Menuchoice[66] := '66.  UNFORMAT          ';
   MENUCHOICE[67] := '67.  VER               ';
   MENUCHOICE[68] := '68.  VERIFY            ';
   TextColor(CYAN);
   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[52]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[53]);
   GOTOXY(52,10);WRITELN(MENUCHOICE[54]);
   gotoxy(52,11);writeln(MenuChoice[55]);
   gotoxy(52,12);writeln(MenuChoice[56]);
   gotoxy(52,13);writeln(Menuchoice[57]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[58]);
   gotoxy(52,15);writeln(MenuChoice[59]);
   gotoxy(52,16);writeln(MenuChoice[60]);
   gotoxy(52,17);writeln(Menuchoice[61]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[62]);
   gotoxy(52,19);writeln(MenuChoice[63]);
   gotoxy(52,20);writeln(MenuChoice[64]);
   gotoxy(52,21);writeln(Menuchoice[65]);
   gotoxy(52,22);writeln(MenuChoice[66]);
   gotoxy(52,23);writeln(Menuchoice[67]);
   gotoxy(52,24);writeln(MenuChoice[68]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{=======================================================}
procedure Initialize_MenuChoices4(var MenuChoice: MenuList);
begin
   MenuChoice[69] := '69.  VOL               ';
   Menuchoice[70] := '70.  XCOPY             ';
   MENUCHOICE[71] := '71.  CALL   {BATCH}    ';
   MenuChoice[72] := '72.  ECHO   {BATCH}    ';
   MenuChoice[73] := '73.  FOR    {BATCH}    ';
   MenuChoice[74] := '74.  GOTO   {BATCH}    ';
   Menuchoice[75] := '75.  IF     {BATCH}    ';
   MENUCHOICE[76] := '76.  PAUSE  {BATCH}    ';
   MenuChoice[77] := '77.  REM    {BATCH}    ';
   MenuChoice[78] := '78.  SHIFT  {BATCH}    ';
   MenuChoice[79] := '79.  BREAK     {CONFIG}';
   Menuchoice[80] := '80.  BUFFERS   {CONFIG}';
   MENUCHOICE[81] := '81.  COUNTRY   {CONFIG}';
   MenuChoice[82] := '82.  DEVICE    {CONFIG}';
   Menuchoice[83] := '83.  DEVICEHIGH{CONFIG}';
   MENUCHOICE[84] := '84.  DOS       {CONFIG}';
   MENUCHOICE[85] := '85.  DRIVPARM  {CONFIG}';
   TextColor(CYAN);    TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[69]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[70]);
   GOTOXY(52,10);WRITELN(MENUCHOICE[71]);
   gotoxy(52,11);writeln(MenuChoice[72]);
   gotoxy(52,12);writeln(MenuChoice[73]);
   gotoxy(52,13);writeln(Menuchoice[74]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[75]);
   gotoxy(52,15);writeln(MenuChoice[76]);
   gotoxy(52,16);writeln(MenuChoice[77]);
   gotoxy(52,17);writeln(Menuchoice[78]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[79]);
   gotoxy(52,19);writeln(MenuChoice[80]);
   gotoxy(52,20);writeln(MenuChoice[81]);
   gotoxy(52,21);writeln(Menuchoice[82]);
   gotoxy(52,22);writeln(MenuChoice[83]);
   gotoxy(52,23);writeln(Menuchoice[84]);
   gotoxy(52,24);writeln(MenuChoice[85]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{======================================================}
procedure Initialize_MenuChoices5(var MenuChoice: MenuList);

begin
   MenuChoice[86] := '86.  FCBS      {CONFIG}';
   Menuchoice[87] := '87.  FILES     {CONFIG}';
   MENUCHOICE[88] := '88.  INSTALL   {CONFIG}';
   MenuChoice[89] := '89.  LASTDRIVE {CONFIG}';
   MenuChoice[90] := '90.  REM       {CONFIG}';
   MenuChoice[91] := '91.  SHELL     {CONFIG}';
   Menuchoice[92] := '92.  STACKS    {CONFIG}';
   MENUCHOICE[93] := '93.  SWITCHES  {CONFIG}';
   MenuChoice[94] := '94.  A  {DEBUG}        ';
   MenuChoice[95] := '95.  C  {DEBUG}        ';
   MenuChoice[96] := '96.  D  {DEBUG}        ';
   Menuchoice[97]  := '97.  E  {DEBUG}        ';
   MENUCHOICE[98]  := '98.  F  {DEBUG}        ';
   MenuChoice[99]  := '99.  G  {DEBUG}        ';
   Menuchoice[100] :='100. H  {DEBUG}        ';
   MENUCHOICE[101] :='101. I  {DEBUG}        ';
   MENUCHOICE[102] :='102. L  {DEBUG}        ';
   TextColor(CYAN);
   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[86]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[87]);
   gotoxy(52,10); writeln (menuchoice[88]);
   gotoxy(52,11);writeln(MenuChoice[89]);
   gotoxy(52,12);writeln(MenuChoice[90]);
   gotoxy(52,13);writeln(Menuchoice[91]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[92]);
   gotoxy(52,15);writeln(MenuChoice[93]);
   gotoxy(52,16);writeln(MenuChoice[94]);
   gotoxy(52,17);writeln(Menuchoice[95]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[96]);
   gotoxy(52,19);writeln(MenuChoice[97]);
   gotoxy(52,20);writeln(MenuChoice[98]);
   gotoxy(52,21);writeln(Menuchoice[99]);
   gotoxy(52,22);writeln(MenuChoice[100]);
   gotoxy(52,23);writeln(Menuchoice[101]);
   gotoxy(52,24);writeln(MenuChoice[102]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{======================================================}
procedure Initialize_MenuChoices6(var MenuChoice: MenuList);

begin
   MenuChoice[103] := '103. M  {DEBUG}        ';
   Menuchoice[104] := '104. N  {DEBUG}        ';
   MENUCHOICE[105] := '105. O  {DEBUG}        ';
   MenuChoice[106] := '106. P  {DEBUG}        ';
   MenuChoice[107] := '107. Q  {DEBUG}        ';
   MenuChoice[108] := '108. R  {DEBUG}        ';
   Menuchoice[109] := '109. S  {DEBUG}        ';
   MENUCHOICE[110] := '110. T  {DEBUG}        ';
   MenuChoice[111] := '111. U  {DEBUG}        ';
   MenuChoice[112] := '112. W  {DEBUG}        ';
   MenuChoice[113] := '113. XA {DEBUG}        ';
   Menuchoice[114] := '114. XD {DEBUG}        ';
   MENUCHOICE[115] := '115. XM {DEBUG}        ';
   MenuChoice[116] := '116. XS {DEBUG}        ';
   Menuchoice[117] := '117. A   {EDLIN}       ';
   MENUCHOICE[118] := '118. C   {EDLIN}       ';
   MENUCHOICE[119] := '119. D   {EDLIN}       ';
   Textcolor(CYAN);
   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[103]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[104]);
   gotoxy(52,10); writeln (menuchoice[105]);
   gotoxy(52,11);writeln(MenuChoice[106]);
   gotoxy(52,12);writeln(MenuChoice[107]);
   gotoxy(52,13);writeln(Menuchoice[108]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[109]);
   gotoxy(52,15);writeln(MenuChoice[110]);
   gotoxy(52,16);writeln(MenuChoice[111]);
   gotoxy(52,17);writeln(Menuchoice[112]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[113]);
   gotoxy(52,19);writeln(MenuChoice[114]);
   gotoxy(52,20);writeln(MenuChoice[115]);
   gotoxy(52,21);writeln(Menuchoice[116]);
   gotoxy(52,22);writeln(MenuChoice[117]);
   gotoxy(52,23);writeln(Menuchoice[118]);
   gotoxy(52,24);writeln(MenuChoice[119]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{======================================================}
procedure Initialize_MenuChoices7(var MenuChoice: MenuList);

begin
   MenuChoice[120] := '120. E   {EDLIN}       ';
   Menuchoice[121] := '121. I   {EDLIN}       ';
   MENUCHOICE[122] := '122. L   {EDLIN}       ';
   MenuChoice[123] := '123. M   {EDLIN}       ';
   MenuChoice[124] := '124. P   {EDLIN}       ';
   MenuChoice[125] := '125. Q   {EDLIN}       ';
   Menuchoice[126] := '126. R   {EDLIN}       ';
   MENUCHOICE[127] := '127. S   {EDLIN}       ';
   MenuChoice[128] := '128. T   {EDLIN}       ';
   MenuChoice[129] := '129. W   {EDLIN}       ';
   MenuChoice[130] := '                       ';
   Menuchoice[131] := '                       ';
   MENUCHOICE[132] := '                       ';
   MenuChoice[133] := '                       ';
   Menuchoice[134] := '                       ';
   MENUCHOICE[135] := '                       ';
   MENUCHOICE[136] := '                       ';
   TextColor(CYAN);
   TextBackGround(BLUE);
   gotoxy(52,8); writeln(MenuChoice[120]);
   TextColor(CYAN);
   TextBackGround(BLACK);
   CURSOROFF;
   gotoxy(52,9); writeln(Menuchoice[121]);
   gotoxy(52,10); writeln (menuchoice[122]);
   gotoxy(52,11);writeln(MenuChoice[123]);
   gotoxy(52,12);writeln(MenuChoice[124]);
   gotoxy(52,13);writeln(Menuchoice[125]);
   GOTOXY(52,14);WRITELN(MENUCHOICE[126]);
   gotoxy(52,15);writeln(MenuChoice[127]);
   gotoxy(52,16);writeln(MenuChoice[128]);
   gotoxy(52,17);writeln(Menuchoice[129]);
   GOTOXY(52,18);WRITELN(MENUCHOICE[130]);
   gotoxy(52,19);writeln(MenuChoice[131]);
   gotoxy(52,20);writeln(MenuChoice[132]);
   gotoxy(52,21);writeln(Menuchoice[133]);
   gotoxy(52,22);writeln(MenuChoice[134]);
   gotoxy(52,23);writeln(Menuchoice[135]);
   gotoxy(52,24);writeln(MenuChoice[136]);
   TextColor(CYAN);
   TextBackGround(BLACK);
end;
{======================================================}
procedure Check_Keys(var MenuCounter: Integer);

var WhatKey:        char;
begin
   if safty = 0 then
   begin
   OldRowCounter := 8;
   OldMenuCounter := 1;
   MenuCounter := 1;
   RowCounter :=8 ;
   WhatKey := #0;
   end;
   while (WhatKey <> Enter) AND (ENDE<>1)do
      begin
         WhatKey := readkey;
         if whatkey = F1 then
         BEGIN
                EXIT;
                IF ENDE<>1 THEN BEGIN
                MAINMENU;
                VIEWWINDOW;
                
                   OldRowCounter := 8;
                   OldMenuCounter := 1;
                   MenuCounter := 1;
                   RowCounter :=8 ;
                   WhatKey := #0;
                   initialize_MenuChoices(MenuChoice);
                END;

        END;
        if WhatKey = CursorDown then
            begin
               RowCounter := RowCounter + 1;
               MenuCounter := MenuCounter + 1;
               OldRowCounter := RowCounter - 1;
               OldMenuCounter := MenuCounter - 1;
            end;
         if WhatKey = CursorUp then
            begin
               RowCounter := RowCounter - 1;
               MenuCounter := MenuCounter - 1;
               OldRowCounter := RowCounter + 1;
               OldMenuCounter := MenuCounter + 1;
            end;
         if (RowCounter =25) and (menucounter=18)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=34;
               Initialize_MenuChoices1(MenuChoice);
             end;
          if (RowCounter =25) and (menucounter=35)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=51;
               Initialize_MenuChoices2(MenuChoice);
             end;
           if (RowCounter =25) and (menucounter=52)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=68;
               Initialize_MenuChoices3(MenuChoice);
             end;
           if (RowCounter =25) and (menucounter=69)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=85;
               Initialize_MenuChoices4(MenuChoice);
             end;
           if (RowCounter =25) and (menucounter=86)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=102;
               Initialize_MenuChoices5(MenuChoice);
             end;
         if (RowCounter =25) and (menucounter=103)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=119;
               Initialize_MenuChoices6(MenuChoice);
             end;
         if (RowCounter =25) and (menucounter=120)then
            begin
               rowcounter:=8;
               oldRowCounter := 24;
               oldmenucounter:=136;
               Initialize_MenuChoices7(MenuChoice);
             end;
         
         if (RowCounter =18) and (menucounter=130)then
            begin
               rowcounter:=8;
               menucounter:=1;
               oldRowCounter := 24;
               oldmenucounter:=17;
               Initialize_MenuChoices(MenuChoice);
          end;
         if (RowCounter =7) and (menucounter=0)then
            begin
               RowCounter := 17;
               MenuCounter := 129;
               OldMenuCounter := 120;
              oldRowCounter := 8;
               Initialize_MenuChoices7(MenuChoice);
            end;
           if (RowCounter =7) and (menucounter=34)then
            begin
               RowCounter := 24;
               OldMenuCounter := 18;
              oldRowCounter := 8;
               Initialize_MenuChoices1(MenuChoice);
            end;
          if (RowCounter =7) and (menucounter=17)then
            begin
               RowCounter := 24;
               OldMenuCounter := 1;
               OldRowCounter := 8;
               Initialize_MenuChoices(MenuChoice);
            end;
         if (RowCounter =7) and (menucounter=51)then
            begin
               RowCounter := 24;
               OldMenuCounter := 35;
               OldRowCounter := 8;
               Initialize_MenuChoices2(MenuChoice);
            end;
         if (RowCounter =7) and (menucounter=68)then
            begin
               RowCounter := 24;
               OldMenuCounter := 52;
               OldRowCounter := 8;
               Initialize_MenuChoices3(MenuChoice);
            end;
         if (RowCounter =7) and (menucounter=85)then
            begin
               RowCounter := 24;
               OldMenuCounter :=69;
               oldRowCounter := 8;
               Initialize_MenuChoices4(MenuChoice);
            end;
         if (RowCounter =7) and (menucounter=102)then
            begin
               RowCounter := 24;
               OldMenuCounter :=86;
               OldRowCounter := 8;
               Initialize_MenuChoices5(MenuChoice);
            end;
         if (RowCounter =7) and (menucounter=119)then
            begin
               RowCounter := 24;
               OldMenuCounter :=103;
               OldRowCounter := 8;
               Initialize_MenuChoices6(MenuChoice);
            end;
         
         
         gotoxy(52, OldRowCounter);
         TextColor(CYAN);
         TextBackGround(BLACK);
         write(MenuChoice[oldMenuCounter]);
         gotoxy(52, RowCounter);
         TextColor(CYAN);
         TextBackGround(LIGHTBLUE);
         write(MenuChoice[MenuCounter]);
         
      end; 

end;
{----------------------------------------------}

PROCEDURE NEUNTE1;
BEGIN

     IF KEYPRESSED=FALSE THEN BEGIN
     sound(659);delay(416);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     sound(659);delay(416);
     IF KEYPRESSED=FALSE THEN BEGIN
     sound(698);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(784);delay(416);NOSOUND;END;
     END;IF KEYPRESSED=FALSE THEN BEGIN
     sound(784);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(698);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(659);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(587);delay(416);
     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND(523);DELAY(416);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND(523);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND(587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND(659);DELAY (416);NOSOUND;
     END;IF KEYPRESSED=FALSE THEN BEGIN
     {===============}
     SOUND (659);DELAY (624);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (208);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (425);
     {================}
     NOSOUND;
     end;

END;
{====================================================}
PROCEDURE NEUNTE2;
BEGIN
     IF KEYPRESSED=FALSE THEN BEGIN
     sound(659);delay(416);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     sound(659);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(698);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(784);delay(416);NOSOUND;
     END;IF KEYPRESSED=FALSE THEN BEGIN

     sound(784);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(698);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(659);delay(416);
     IF KEYPRESSED=FALSE THEN
     sound(587);delay(416);
     END;IF KEYPRESSED=FALSE THEN BEGIN

     SOUND (523);DELAY (416);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);NOSOUND;

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (587);DELAY (624);
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (208);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (624);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     END;IF KEYPRESSED=FALSE THEN BEGIN
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);NOSOUND;
    IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (208);
     IF KEYPRESSED=FALSE THEN
     SOUND (698);DELAY (208);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);
    IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (208);
    IF KEYPRESSED=FALSE THEN
     SOUND (698);DELAY (208);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (523);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (392);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (659);DELAY (625);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (698);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (784);DELAY (416);NOSOUND;

     END; IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (784);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (698);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (523);DELAY (416);NOSOUND;
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (587);DELAY (416);
     IF KEYPRESSED=FALSE THEN
     SOUND (659);DELAY (416);

     END;IF KEYPRESSED=FALSE THEN BEGIN
     SOUND (587);DELAY (624);
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (208);NOSOUND;DELAY (10);
     IF KEYPRESSED=FALSE THEN
     SOUND (523);DELAY (625);NOSOUND;
     END;
     nosound;

End;
{=================================================}
PROCEDURE titleCGA;
BEGIN
CLRSCR;
Textmode (co40);
CURSOROFF;
textcolor (lightblue);
     textbackground (black);
     gotoxy (9,8); write ('Ú'); DELAY (25);
      for x:=10 to 31 do
        begin
         gotoxy (x,8);     write ('Ä');DELAY (25);
        end;
     gotoxy (31,8); write ('·');DELAY (25);
     for y:=9 to 13 do
     BEGIN
        Gotoxy(31,y);write('º');
        DELAY (25);
    end;
      GOTOXY (31,14);
     write('¼');  DELAY (25);
     for i:=30 DOWNTO 10 do
     BEGIN
     GOTOXY (I,14);Write('Í');
     END;
    gotoxy(9,14);write('Ô');DELAY (25);
    for y:=13 DOWNTO 9 do
     BEGIN
     gotoxy(9,y);write('³');
     DELAY (25);
     end;

     GOTOXY (27,10); WRITE ('R');DELAY (45);
     GOTOXY (14,12);  WRITE ('V');DELAY (45);
     GOTOXY (26,10); WRITE ('O');DELAY (45);
     GOTOXY (15,12); WRITE ('E');DELAY (45);
     GOTOXY (25,10); WRITE ('T');DELAY (45);
     GOTOXY (16,12); WRITE ('R');DELAY (45);
     GOTOXY (24,10); WRITE ('U');DELAY (45);
     GOTOXY (17,12); WRITE ('S');DELAY (45);
     GOTOXY (23,10); WRITE ('T');DELAY (45);
     GOTOXY (18,12); WRITE ('I');DELAY (45);


     TEXTCOLOR (LIGHTRED); GOTOXY (19,10); WRITE ('0');DELAY (45);
     TEXTCOLOR (LIGHTBLUE);  GOTOXY (19,12); WRITE ('O');DELAY (45);
     TEXTCOLOR (LIGHTRED);GOTOXY (18,10); WRITE ('.');DELAY (45);
     TEXTCOLOR (LIGHTBLUE); GOTOXY (20,12); WRITE ('N');DELAY (45);
     TEXTCOLOR (LIGHTRED); GOTOXY (17,10); WRITE ('5');DELAY (45);
     TEXTCOLOR (LIGHTBLUE);



     GOTOXY (12,10); WRITE ('D');DELAY (45);
     GOTOXY (23,12); WRITE ('2');DELAY (45);
     GOTOXY (13,10); WRITE ('O');DELAY (45);
     GOTOXY (24,12); WRITE ('.');DELAY (45);
     GOTOXY (14,10); WRITE ('S');DELAY (45);
     GOTOXY (25,12); WRITE ('0');DELAY (45);

     NEUNTE1;
     TEXTMODE (CO80);
END;


{===================================================}
PROCEDURE tscreen;
BEGIN
   CURSOROFF;
   IF NOT KEYPRESSED THEN
   BEGIN
     TEXTCOLOR (LIGHTBLUE);
     CLRSCR;
     gotoXY (27,1);
     WRITELN ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ');
     GOTOXY (27,2);
     WRITELN ('º  D O S         T U T O R  º ');
     GOTOXY (27,3);
     WRITELN ('º        VERSION 2.0        º');
     GOTOXY (27,4);
     WRITELN ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼ ');
     TEXTCOLOR (YELLOW + BLINK);
     GOTOXY (37,2);
     WRITELN (' 5.0');
     TEXTCOLOR (LIGHTGREEN);
     GOTOXY (26,5);
     WRITELN ('A C K N O W L E D G E M E N T S');
     TEXTCOLOR (YELLOW);
     GOTOXY (1,8);
     TEXTCOLOR (RED);
     WRITELN ('                               B A S I C  I D E A');
     TEXTCOLOR (YELLOW);
     WRITELN ('                               CARSTEN BOCKSTETTE             ');
     WRITELN;
     TEXTCOLOR (RED);
     WRITELN ('                              P R O G R A M I N G');
     TEXTCOLOR (YELLOW);
     WRITELN ('              THIS WAS DONE BY CARSTEN BOCKSTETTE AND FRANK DUCHNA.');
     WRITELN ('                        THE DEBUGGING WAS DONE BY CARSTEN. ');
     WRITELN;
     TEXTCOLOR (RED);
     WRITELN ('                           S C R E E N   D E S I G N S');
     TEXTCOLOR (YELLOW);
     WRITELN ('                     THE TITLE SCREEN WAS DESIGND BY CARSTEN.');
     WRITELN ('                  ALL THE OTHER SCREENS WERE DESIGND BY CARSTEN.');
     WRITELN;
     TEXTCOLOR (RED);
     WRITELN ('                            S O U N D  E F F E C T S');
     TEXTCOLOR (YELLOW);
     WRITELN ('                 ALL THE SOUND EFFECTS WERE PROGRAMED BY CARSTEN.');
     WRITELN ;
     TEXTCOLOR (LIGHTBLUE);
     WRITELN ('                  (c) COPYRIGHT 1991 BY GERMAN HACKERS SOFTWARE.');
     NEUNTE2;
     TEXTCOLOR (LIGHTBLUE);  GOTOXY (27,24);
     WRITE (' PRESS         TO CONTINUE!');
     TEXTCOLOR (YELLOW); GOTOXY    (34,24);
     WRITE ('<ENTER>');
     TEXTCOLOR (BLACK);
     GOTOXY (60,24);
   END
   ELSE
   NOSOUND;
END;


{===================================================}
Procedure titel2;
var
  graphdriver,graphmode : integer;
Begin

     graphdriver:=detect;
     initgraph(graphdriver,graphmode,'');
     cleardevice;
     setcolor(lightblue);
     settextstyle(gothicfont,horizdir,10);
     moveto(75,60);
     outtext('DOS 5.0');
     moveto(50,210);
     outtext(' TUTOR');
     settextstyle(smallfont,horizdir,5);
     setcolor(cyan);
     moveto(110,10);
     outtext('Copyright (c) August 1991 by German Hackers Software');
     settextstyle(smallfont,horizdir,5);
     neunte1;
     

end;
{======================================================}
Procedure acknowledge;
VAR graphdriver, graphmode:integer;
BEGIN

    graphdriver:=detect;
    cleardevice;
    settextstyle(sansseriffont,horizdir,5);
    setcolor(green);
    moveto(120,20);
    outtext('Acknowledgements');
    settextstyle(sansseriffont,horizdir,3);
    setcolor(red);
    moveto(230,100);
    outtext('Basic idea:');
    setcolor(cyan);
    moveto(190,130);
    outtext('Carsten Bockstette');
    setcolor(red);
    outtextxy(220,180,'Programming:');
    setcolor(cyan);
    outtextxy(120,210,'Carsten Bockstette & Frank Duchna');
    setcolor(red);
    outtextxy(220,260,'Sound effects:');
    setcolor(cyan);
    outtextxy(190,290,'Carsten Bockstette');
    setcolor(red);
    outtextxy(203,340,'Graphic screens:');
    setcolor(cyan);
    outtextxy(120,370,'Carsten Bockstette & Frank Duchna');
    settextstyle(smallfont,horizdir,5);
    neunte2;
    setcolor (red);
    outtextxy(200,450,'Press <ENTER> to continue');
    SETCOLOR (BLACK);
    readln;
    closegraph;
    clrscr;
end;
 {============================================================}

PROCEDURE THEEND;
VAR
   graphdriver,graphmode:Integer;
   color,x,y:Integer;
   radius:word;
BEGIN
     graphdriver:=detect;
     InitGraph(graphdriver,Graphmode,'');
     X:=getmaxx DIV 2;
     y:=getmaxy DIV 3+30;
     radius:=y;
     FOR color:=1 TO 20 DO
     BEGIN
          setcolor(LIGHTBLUE);
          Arc(x,y,0,360,radius);
          y:=y+3
     END;
    settextstyle(DEFAULTFONT,horizdir,2);
    setcolor(cyan);
    moveto(240,130);
    outtext('Thanks for');
    moveto (240,160);
    Outtext('using the:');
    settextstyle(TRIPLEXFONT,horizdir,5);
    setcolor (lightred);
    MOVETO(165,210);
    outtext('DOS 5.0 TUTOR');
    setcolor(cyan);
    settextstyle(smallfont,horizdir,5);
    moveto (220,300);
    outtext('(c) copyright 1991 by G.H.S.');
    delay (2100);
    CloseGraph;
END;
{-----------------------------------------------------}
PROCEDURE READFILE(F:string);
const
cr=chr(13);
lf=chr(10);
var
CH:CHAR;
x,y:integer;
  d:text;
begin
     textbackground (black);
     x:=3;
     y:=8;
     viewwindow1;
     assign(d,f);
     reset(d);
     read(d,ch);
     while NOT eof(d) OR NOT EOLN(D) Do
     begin
            gotoxy(x,y);
            write(ch);
            read(d,ch);
            X:=X+1;
            iF EOLN(D) tHEN
            BEGIN
                 WRITE(CH);
                 X:=1;
                 y:=y+1;
                 READ(D,CH);
            END;
     end;
     close (d);
      viewWINDOW;
     TEXTCOLOR (BLACK);
     textbackground (black);

end;


(****************** MAIN PROGRAM **********************)

Begin
GRA1:=5;
VGA:='';
  WHILE GRA1 <> 1 DO BEGIN
     cursoron;
     clrscr;
     textcolor (cyan);
     gotoxy (3,10);write ('MONO, CGA  =  1');
     GOTOXY (3,11);WRITE ('EGA, VGA   =  2');
     GOTOXY (3,16);WRITE ('PLEASE ENTER YOUR CHOICE:');
     READLN (VGA);
     IF VGA ='1' THEN
     BEGIN
          CLRSCR;
          CURSOROFF;
          TITLECGA;
          TSCREEN;
          CURSORON;
          GRA1 :=1;
     END;

     IF VGA='2' THEN BEGIN
     BEGIN
       titel2;
       acknowledge;
       GRA1:=1;
     END;

END;
   cursoroff;
   END;





     textbackground (black);
     mainmenu;
     viewwindow;
{******  E V E N T   H A N D L E R *********}

     ende:=0;       safty :=0;          menucounter:=1;
     Initialize_MenuChoices(MenuChoice);
     IF ENDE=1 THEN GOTO EXIT1;
     while ENDE<> 1  do
     begin

         Check_Keys(MenuCounter);

         IF ENDE=1 THEN GOTO EXIT1;
         case MenuCounter of


1  : readfile ('append.dat')  ;2 :   readfile ('assign.dat');
3  : readfile ('attrib.dat')  ;4 :   readfile ('backup.dat');
5  : readfile ('break.dat')   ;6 :   readfile ('chcp.dat');
7  : readfile ('chdir.dat');   8 :   readfile ('chkdsk.dat');
9  : readfile ('cls.dat');     10:   readfile ('command.dat');
11 : readfile ('comp.dat');    12:   readfile ('copy.dat');
13 : readfile ('ctty.dat');    14:   readfile ('date.dat');
15 : readfile ('debug.dat');   16:   readfile ('del.dat');
17 : readfile ('dir.dat');     18:   readfile ('comp.dat');
19 : readfile ('diskcopy.dat');20:   readfile ('doskey.dat');
21:  readfile ('dosshell.dat');
22 : readfile ('edit.dat');23:   readfile ('edlin.dat');
24 : readfile ('emm386.dat');  25:   readfile ('exe2bin.dat');
26 : readfile ('exit.dat');    27:   readfile ('expand.dat');
28 : readfile ('fastopen.dat');29:   readfile ('fc.dat');
30 : readfile ('fdisk.dat');   31:   readfile ('find.dat');
32 : readfile ('for.dat');     33:   readfile ('format.dat');
34 : readfile ('graftabl.dat');35:   readfile ('graphics.dat');
36 : readfile ('help.dat');    37:   readfile ('join.dat');
38 : readfile ('keyb.dat');    39:   readfile ('label.dat');
40 : readfile ('loadhigh.dat');41:   readfile ('mem.dat');
42 : readfile ('mirror.dat');  43:   readfile ('mkdir.dat');
44 : readfile ('mode.dat');    45:   readfile ('more.dat');
46 : readfile ('nlsfunc.dat'); 47:   readfile ('Path.dat');
48 : readfile ('print.dat');   49:   readfile ('prompt.dat');
50 : readfile ('qbasic.dat');  51:   readfile ('recover.dat');
52 : readfile ('rename.dat');  53:   readfile ('replace.dat');
54 : readfile ('restore.dat'); 55:   readfile ('rmdir.dat');
56 : readfile ('set.dat');     57:   readfile ('setver.dat');
58 : readfile ('share.dat');   59:   readfile ('sort.dat');
60 : readfile ('subst.dat');   61:   readfile ('sys.dat');
62 : readfile ('time.dat');    63:   readfile ('tree.dat');
64 : readfile ('type.dat');    65:   readfile ('undelete.dat');
66 : readfile ('unformat.dat');67:   readfile ('ver.dat');
68 : readfile ('verify.dat');  69:   readfile ('vol.dat');
70 : readfile ('xcopy.dat');   71:   readfile ('bcall.dat');
72 : readfile ('becho.dat');    73:   readfile ('for.dat');
74 : readfile ('bgoto.dat');    75:   readfile ('bif.dat');
76 : readfile ('bpause.dat');   77:   readfile ('brem.dat');
78 : readfile ('bshift.dat');   79:   readfile ('cbreak.dat');
80 : readfile ('cbuffers.dat'); 81:   readfile ('ccountry.dat');
82 : readfile ('cdevice.dat');  83:   readfile ('devicehi.dat');
84 : readfile ('dos.dat');     85:   readfile ('cdrivparm.dat');
86 : readfile ('cfcbs.dat');    87:   readfile ('cfiles.dat');
88 : readfile ('cinstall.dat'); 89:   readfile ('lastdriv.dat');
90 : readfile ('crem.dat');     91:   readfile ('cshell.dat');
92 : readfile ('cstacks.dat');  93:   readfile ('switch.dat');
94 : readfile ('da.dat');      95:   readfile ('dc.dat');
96 : readfile ('dd.dat');      97:   readfile ('de.dat');
98 : readfile ('df.dat');      99:   readfile ('dg.dat');
100: readfile ('dh.dat');      101:  readfile ('di.dat');
102: readfile ('dl.dat');      103:  readfile ('dm.dat');
104: readfile ('dn.dat');      105:  readfile ('do.dat');
106: readfile ('dp.dat');      107:  readfile ('dq.dat');
108: readfile ('dr.dat');      109:  readfile ('ds.dat');
110: readfile ('dt.dat');      111:  readfile ('du.dat');
112: readfile ('dw.dat');      113:  readfile ('xa.dat');
114: readfile ('xd.dat');      115:  readfile ('xm.dat');
116: readfile ('xs.dat');      117:  readfile ('ea.dat');
118: readfile ('ec.dat');      119:  readfile ('ed.dat');
120: readfile ('ee.dat');      121:  readfile ('ei.dat');
122: readfile ('el.dat');      123:  readfile ('em.dat');
124: readfile ('ep.dat');      125:  readfile ('eq.dat');
126: readfile ('er.dat');      127:  readfile ('es.dat');
128: readfile ('et.dat');      129:  readfile ('ew.dat');
 
end;


safty :=1;

       
end;
CLRSCR;
exit1:
textbackground (black);
IF VGA='1' THEN
  BEGIN
    CGAEXIT;
  END
else
THeend;

CURSORON;

END.


