{$M 2048, 0, 0}
PROGRAM install;

      USES dos, crt;
      LABEL 1,EXIT;

      VAR
        TEST : STRING[127];
        CONT :STRING;
        COMMAND:STRING[127];
{*************************************************}
PROCEDURE cursor(startingline, stoppingline : byte);
VAR
   regs : registers;
BEGIN
     with regs do begin
          AH := $01;
          CH := STARTINGLINE;
          CL := STOPPINGLINE;
          InTr($10, regs );
          end;
end;   
{**************************************************}
PROCEDURE MAKEDIR;
BEGIN
     TEXTCOLOR (CYAN);
     CURSOR ($6,$7);
     WRITELN('PLEASE ENTER WHERE YOU WANT TO INSTALL THE');
     WRITE('PROGRAM (DRIVE AND DIRECTORY), FOR EXAMPLE "C:\TUTOR" :');
     READLN(Command);
     CURSOR ($20,$00);
     If Command <> '' then
     BEGIN
       SWAPVECTORS;
       TEST:='MD ';
       Exec(GetEnv('COMSPEC'), '/C '+TEST+Command);
       SWAPVECTORS;
     END;
END;
{****************************************************}
PROCEDURE COPYFILES;
BEGIN
       TEXTCOLOR (CYAN);
       WRITELN ('NOW COPYING DATA FILES.');
       exec(getenv( 'COMSPEC' ), ' /C  copy *.dat '+COMMAND);
       exec(getenv( 'COMSPEC' ), ' /C  copy RE*.txt '+COMMAND);
       WRITELN ('NOW COPYING PROGRAM FILES.');
       exec(getenv( 'COMSPEC' ), ' /C  copy DOSTUTOR.exe '+COMMAND);
       WRITELN ('NOW COPYING INSTALL FILES.');
       exec(getenv( 'COMSPEC' ), ' /C  copy install.exe '+COMMAND);
       WRITELN ('NOW COPYING GRAPHIC FILES.');
       exec(getenv( 'COMSPEC' ), ' /C  copy *.BGI '+COMMAND);
       exec(getenv( 'COMSPEC' ), ' /C  copy *.CHR '+COMMAND);
       clrscr;
       CURSOR ($6,$7);
       GOTOXY (1,10);
       WRITELN ('FINISHED INSTALLING DOS 5.0 TUTOR VERSION 2.0.');
       WRITELN;
       WRITELN ('PLEASE CHANGE TO THE "',COMMAND,'" DIRECTORY');
       WRITELN ('BY ENTERING: " CD ',COMMAND,'"  THEN CHANGE TO ');
       WRITELN ('THE CORRESPONDING DRIVE.');
       WRITELN ;
       WRITELN ('TYPE "        " TO START THE PROGRAM.');
       TEXTCOLOR (YELLOW);
       GOTOXY (15,13); WRITE ('cd  ',COMMAND,'');
       TEXTCOLOR (YELLOW);
       GOTOXY (23,12);
       WRITE (COMMAND);
       GOTOXY (7,16);
       WRITE ('DOSTUTOR');
       GOTOXY (1,20);
       TEXTCOLOR (BLACK);
       SOUND (390);         DELAY (150);
       SOUND (430);         DELAY (150);
       SOUND (560);         DELAY (150);
       SOUND (350);         DELAY (170);
       NOSOUND;
       SwapVectors;
       CURSOR ($6,$7);
END;


{***********************MAIN PROGRAM********************}
BEGIN
     CLRSCR;
     TEXTCOLOR (WHITE);
     WRITELN ('                  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
     WRITELN ('                  º   I N S A L L I N G:   º');
     WRITELN ('                  º     DOS 5.0 TUTOR      º');
     WRITELN ('                  º      VERSION 2.0       º');
     WRITELN ('                  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼');
     TEXTCOLOR (LIGHTBLUE);
     GOTOXY (22,2);
     WRITE ('I N S T A L L I N G:');
     GOTOXY (1,5);
     WRITELN;
     WRITELN;
     TEXTCOLOR (CYAN);
     WRITELN ('IF YOU WISH TO CONTINUE INSTALLING');
     WRITELN ('ENTER " ", ELSE, PRESS <     > TO EXIT:');
     TEXTCOLOR (LIGHTRED);
     GOTOXY (8,8);
     WRITE ('Y');
     GOTOXY (25,8);
     WRITE ('ENTER');
     TEXTCOLOR (WHITE);
     GOTOXY (40,8);
     READLN (CONT);
     IF (CONT ='Y') OR  (CONT='y') THEN GOTO 1
     ELSE GOTO EXIT;
     clrscr;
   1:
     MAKEDIR;
     IF COMMAND<> '' THEN
     BEGIN
           COPYFILES;
     END;

EXIT:
     
     CURSOR ($6,$7);

END.


