SET TALK OFF
SET INTENSITY OFF
STORE T TO A
DO WHILE A
   STORE 0 TO COUNT  
   DO WHILE COUNT<>30
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
*  TEXT
 ? '         dBASE II INSTALLATION ASSISTANCE PROGRAM '
?
?
? '       MANY DISK FORMATS HAVE dBASE II PRE-INSTALLED.'
? 'THIS PROGRAM ALLOWS YOU TO TEST FOR CORRECT SCREEN INSTALLATION'
? '                    OF YOUR TERMINAL'

? '---------------------------------------------------------------'
? '                           MENU'
? '                           ===='
?
? '                  1 - RUN THIS TEST PROGRAM'
? '                  2 - RUN INSTALL PROGRAM'
? '                  3 - EXIT STARTUP TO dBASE II SYSTEM'
? '                  4 - EXIT STARTUP TO OPERATING SYSTEM'
?
?
? 
?
*  ENDTEXT
   ACCEPT "MAKE A SELECTION THEN HIT (RETURN) PLEASE"  TO ACTION
   DO CASE
      CASE ACTION="1"
        STORE F TO A 
        NOTE -- WE CONTINUE
      CASE ACTION="2"
        QUIT TO "INSTALL","DBASE STARTUP"
      CASE ACTION="3"
        ?
        ?
        ?
        ?
        ? "EXITING TO dBASE II"
        RETURN  
      CASE ACTION="4"
        QUIT  
      OTHERWISE      
        LOOP
   ENDCASE
ENDDO A
STORE 0 TO COUNT
DO WHILE COUNT<>25
   ?
   STORE COUNT+1 TO COUNT
ENDDO
STORE 0 TO COUNT
DO WHILE COUNT<>13
   ?
   STORE COUNT+1 TO COUNT
ENDDO
? "CLEAR AND HOME SHOULD WIPE ALL CHARACTERS FROM THE CONSOLE "
? "     AND PLACE THE CURSOR AT THE UPPER LEFT CORNER"
STORE 0 TO COUNT
DO WHILE COUNT<>10
   ?
   STORE COUNT+1 TO COUNT
ENDDO
ACCEPT "TO TEST CLEAR AND HOME SCREEN, HIT (RETURN)" TO CHOICE
ERASE
ACCEPT "DID THE SCREEN CLEAR AND THE CURSOR HOME ? (Y/N)" TO CHOICE
IF !(CHOICE)="N"
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
   ? "OK WE`LL MAKE A NOTE OF THAT !!"
   STORE F TO CLEARHOME
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO
ELSE
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
     ?
     STORE COUNT+1 TO COUNT
   ENDDO
   ? "OK, VERY GOOD LET`S CONTINUE !!"
   STORE T TO CLEARHOME
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO
ENDIF
STORE 0 TO COUNT
DO WHILE COUNT<>25
   ?
   STORE COUNT+1 TO COUNT
ENDDO
? "THE BACK-SPACE WILL ERASE ONE CHARACTER AND MOVE ONE SPACE TO THE"
? "          LEFT FOR EVERY TIME IT IS PRESSED.                                "
? 
?
? "FOR EXAMPLE, IF YOU TYPE 'ABCDE', PRESSING THE BACK SPACE KEY TWICE"
? "                  WILL LEAVE YOU WITH 'ABC'"
?
?
? "TO TEST BACK-SPACE, TYPE 5 CHARACTERS, HIT THE BACK SPACE KEY 3 TIMES,"
? "                     THEN HIT THE (RETURN) KEY "
STORE 0 TO COUNT
DO WHILE COUNT<>11
   ?
   STORE COUNT+1 TO COUNT
ENDDO
ACCEPT TO TEST
?
?
? "DID A CHARACTER ERASE EACH TIME YOU DEPRESSED THE BACK SPACE KEY " 
ACCEPT "? (Y/N)" TO CHOICE
IF !(CHOICE)="N"
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
   ? "OK, WE`LL FIX THAT LATER !" 
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO
  STORE F TO BACKSPACE
ELSE
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
   ? "OK GOOD, LET`S GO ON !!"
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO
   STORE T TO BACKSPACE
ENDIF
SET CONSOLE ON
STORE 0 TO COUNT
DO WHILE COUNT<>25
   ?
   STORE COUNT+1 TO COUNT
ENDDO
? "         NEXT, WE WILL TEST DIRECT CURSOR POSITIONING "
? "  THE NEXT SCREEN WILL HAVE AN 'X' POSITIONED AT ROW 10, COLUMN 17"
?
?
? 
?   
ACCEPT " HIT RETURN TO CONTINUE" TO CHOICE
ERASE
@  0, 0 SAY "0"
@  1, 0 SAY "1"
@  2, 0 SAY "2"
@  3, 0 SAY "3"
@  4, 0 SAY "4"
@  5, 0 SAY "5"
@  6, 0 SAY "6"
@  7, 0 SAY "7"
@  8, 0 SAY "8"
@  9, 0 SAY "9"
@ 10, 0 SAY "10"
@ 11, 0 SAY "11"
@ 12, 0 SAY "12"
@ 13, 0 SAY "13"
@ 14, 0 SAY "14"
@ 15, 0 SAY "15"
@ 16, 0 SAY "00000000001111111111222222222233333333334444444444"
@ 16,50 SAY "555555555566666666667777777777"
@ 17, 0 SAY "01234567890123456789012345678901234567890123456789"
@ 17,50 SAY "012345678901234567890123456789"
@ 10,2 SAY "---------------"
@ 11,17 SAY "|"
@ 12,17 SAY "|"
@ 13,17 SAY "|"
@ 14,17 SAY "|"
@ 15,17 SAY "|"
@ 10,17 SAY "X (10,17) <==============="
@ 18,0
? "DOES THIS SCREEN HAVE AN 'X' POSITIONED AT"
?? " ROW 10, COLUMN 17"
ACCEPT "? (Y/N) " TO CHOICE
IF !(CHOICE)="N"
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
   ? "WE`LL TAKE CARE OF THAT WHEN WE RUN THE INSTALL"
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO  
  STORE F TO CURSORPOS
ELSE
   STORE 0 TO COUNT
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
   ? "GREAT! LET`S MOVE ON !"
   STORE 0 TO COUNT2
   DO WHILE COUNT2<35
      STORE COUNT2+1 TO COUNT2
   ENDDO   ? "OK LET US GO ON !! " 
   STORE T TO CURSORPOS
   STORE 0 TO COUNT
ENDIF
STORE 0 TO COUNT
DO WHILE COUNT<>25
   ?
   STORE COUNT+1 TO COUNT
ENDDO
IF CURSORPOS
   ? "      NOW WE'LL TEST YOUR TERMINAL FOR SPECIAL VIDEO FEATURES "
   ACCEPT  "       HIT (RETURN) TO CONTINUE" TO CHOICE
   DO WHILE COUNT<>25
      ? 
      STORE COUNT+1 TO COUNT
   ENDDO
   ERASE
   @  0, 0 SAY "0"
   @  1, 0 SAY "1"
   @  2, 0 SAY "2"
   @  3, 0 SAY "3"
   @  4, 0 SAY "4"
   @  5, 0 SAY "5"
   @  6, 0 SAY "6"
   @  7, 0 SAY "7"
   @  8, 0 SAY "8"
   @  9, 0 SAY "9"
   @ 10, 0 SAY "10"
   @ 11, 0 SAY "11"
   @ 12, 0 SAY "12"
   @ 13, 0 SAY "13"
   @ 14, 0 SAY "14"
   @ 15, 0 SAY "15"
   @ 16, 0 SAY "00000000001111111111222222222233333333334444444444"
   @ 16,50 SAY "555555555566666666667777777777"
   @ 17, 0 SAY "01234567890123456789012345678901234567890123456789"
   @ 17,50 SAY "012345678901234567890123456789"
   @ 10,2 SAY "---------------"
   @ 11,17 SAY "|"
   @ 12,17 SAY "|"
   @ 13,17 SAY "|"
   @ 14,17 SAY "|"
   @ 15,17 SAY "|"
   SET INTENSITY ON
   @ 10,17 SAY "X (10,17) <==================="
   SET INTENSITY OFF
   @ 18,0
   ?
   ?
   ACCEPT "IS THE 'X' LIGHTER OR IN REVERSE VIDEO NOW ? (Y/N)" TO CHOICE
   IF !(CHOICE)="N"
      STORE 0 TO COUNT
      DO WHILE COUNT<>25
         ?
         STORE COUNT+1 TO COUNT
      ENDDO
      ? "WE MAY BE ABLE TO INSTALL THAT, IF YOUR TERMINAL ALLOWS IT."
      STORE 0 TO COUNT2
      DO WHILE COUNT2<35   
         STORE COUNT2+1 TO COUNT2
      ENDDO
     STORE F TO VIDEO
   ELSE
      STORE 0 TO COUNT
      DO WHILE COUNT<>25
         ?
         STORE COUNT+1 TO COUNT
      ENDDO
      ? "FINE, THAT'S THE LAST ONE !!"
      STORE 0 TO COUNT2
      DO WHILE COUNT2<35
         STORE COUNT2+1 TO COUNT2
      ENDDO
      STORE T TO VIDEO
   ENDIF
   STORE 0 TO COUNT 
   DO WHILE COUNT<>25
      ?
      STORE COUNT+1 TO COUNT
   ENDDO
ELSE
   STORE T TO VIDEO
ENDIF
IF  .NOT. CLEARHOME .OR. .NOT. VIDEO .OR. .NOT. CURSORPOS .OR. .NOT. BACKSPACE
   IF .NOT. BACKSPACE
      ? "----------------------------------------------------------------------------"
      ? ">>>>>>>>>>>>  BACK-SPACE IS NOT YET INSTALLED"
      ? "TO INSTALL THE BACK-SPACE, USE INSTALL OPTION (Y) NUMBER (1)"
      ?
   ENDIF
   IF .NOT. CURSORPOS
      ? "----------------------------------------------------------------------------"
      ? ">>>>>>>>>> DIRECT CURSOR POSITIONING IS NOT YET INSTALLED." 
      ? "TO INSTALL DIRECT CURSOR POSITIONING USE INSTALL OPTION (Y) NUMBER (2)."
      ? "ALSO SOMETIMES IF THE CLEAR HOME SCREEN COMMAND IS WRONG IT MAY ALSO"
      ? "CAUSE THE CURSOR POSITIONING TO BE WRONG.  USE OPTION (Y) NUMBER (3)"
      ?
   ENDIF
   IF .NOT. CLEARHOME
      ? "----------------------------------------------------------------------------"
      ? ">>>>>>>>>> CLEAR+HOME SCREEN IS NOT YET INSTALLED "
      ? "TO INSTALL CLEAR+HOME SCREEN USE INSTALL OPTION (Y) NUMBER (3)"
      ?
   ENDIF
   IF .NOT. VIDEO
      ? "---------------------------------------------------------------------------"
      ? ">>>>>>> SPECIAL VIDEO FEATURES ARE NOT INSTALLED" 
      ? "IF YOUR TERMINAL SUPPORTS SPECIAL VIDEO FEATURES THEN CHECK "
      ? "      INSTALL OPTION (Y) NUMBER (4), (5) AND, (8)"
      ?
      ?
   ENDIF
   ? "------------------------------------------------------------------------------"
   ACCEPT "DO YOU WANT TO RUN THE INSTALL NOW ? (Y/N)" TO CHOICE
   IF !(CHOICE)="Y"
      ?
      QUIT TO "INSTALL","DBASE STARTUP"
   ELSE
      ?
      ? "RETURNING TO dBASE II SYSTEM"
      RETURN
   ENDIF
ENDIF
CLEAR
? "***   CONGRATULATIONS YOU HAVE NOW SUCCESSFULLY INSTALLED dBASE II  ***"
RETURN
ENDIF
* END OF STARTUP.CMD VERSION 1.2    JAN 26, 1983

