' CONFIG.EXE source

OPEN "HVSS.INI" FOR INPUT AS #10
 INPUT #10, ISCONFIG%
CLOSE 10

IF ISCONFIG% = 1 THEN
 CLS
 PRINT "HVSS appears to be already configured!"
 PRINT
 PRINT "Do you want to run it again?"
 PRINT "Press '1' to continue, '2' to exit!"
 DO: I$ = INKEY$: LOOP UNTIL I$ <> ""
 IF I$ = "1" THEN GOTO neu:
 END
END IF

ERRC$ = ""

neu:

CLOSE
OPEN "HVSS.INI" FOR OUTPUT AS #1
PRINT #1, "0"
CLOSE

SHELL "MD DICT"

FOR A% = 65 TO 90
 SHELL "MD DICT\" + CHR$(A%)
 CLS
 PRINT "HVSS Configuration 1.00"
 PRINT
 PRINT "(1) Creating dictionairy structure..."
 LOCATE 6, 1: PRINT "Please wait... This might take several minutes!"
 LOCATE 7, 1: PRINT "Hit any key to abort operation!"
 IF INKEY$ <> "" THEN END
 FOR B% = 65 TO 90
  OPEN "DICT\" + CHR$(A%) + "\" + CHR$(B%) + ".DAT" FOR OUTPUT AS #1
  LOCATE 4, 1: PRINT "DICT\" + CHR$(A%) + "\" + CHR$(B%) + ".DAT          "
  CLOSE
 NEXT
NEXT

FOR B% = 65 TO 90
 OPEN "DICT\" + CHR$(B%) + ".DAT" FOR OUTPUT AS #1
 LOCATE 4, 1: PRINT "DICT\" + CHR$(B%) + ".DAT                "
 CLOSE
NEXT

OPEN "CMUDIC.DAT" FOR BINARY AS #1

CLS

 LOCATE 1, 1
 PRINT "HVSS Configuration 1.00"
 PRINT
 PRINT "(2) Building dictionairy ..."
 LOCATE 6, 1: PRINT "Please wait... This might take several minutes!"
 LOCATE 7, 1: PRINT "Hit any key to abort operation!"

DO

 
 WRD$ = ""
 DO
  IF NOT EOF(1) THEN A$ = INPUT$(1, #1)
  IF EOF(1) THEN GOTO sample:
  WRD$ = WRD$ + A$
 LOOP UNTIL ASC(A$) = 10
 WRD$ = MID$(WRD$, 1, LEN(WRD$) - 1)

 l1$ = MID$(WRD$, 1, 1)
 l2$ = MID$(WRD$, 2, 1)
 
 IF ASC(l1$) >= 65 AND ASC(l1$) <= 90 THEN
  LOCATE 4, 1: PRINT l1$; l2$
  IF ASC(l2$) <= 65 OR ASC(l2$) >= 90 THEN
   OPEN "DICT\" + l1$ + ".DAT" FOR APPEND AS #2
   PRINT #2, WRD$
   CLOSE #2
  END IF
  
  IF ASC(l2$) >= 65 AND ASC(l2$) <= 90 THEN
   OPEN "DICT\" + l1$ + "\" + l2$ + ".DAT" FOR APPEND AS #2
   PRINT #2, WRD$
   CLOSE #2
  END IF
 END IF
 IF INKEY$ <> "" THEN END

LOOP WHILE NOT EOF(1)

sample:
SHELL "MD WAVE"

CLS
PRINT "HVSS Configuration 1.00"
PRINT
PRINT "(3) Creating phonetic wave files ..."
LOCATE 6, 1: PRINT "Please wait... This might take several minutes!"
LOCATE 7, 1: PRINT "Hit any key to abort operation!"

SHELL "DIR WAVE16 /B > FILES.TMP"

CLOSE #1: OPEN "FILES.TMP" FOR INPUT AS #1

DO
LINE INPUT #1, FILE$
LOCATE 4, 1: PRINT FILE$; "           "

OPEN "WAVE16\" + FILE$ FOR BINARY AS #2
OPEN "WAVE\" + FILE$ FOR OUTPUT AS #3
OPEN "WAVE\1" + FILE$ FOR OUTPUT AS #4
OPEN "WAVE\2" + FILE$ FOR OUTPUT AS #5

TEMP$ = INPUT$(44, #2)
DO

 S$ = INPUT$(1, #2)
 S2$ = INPUT$(1, #2)
 TEMP$ = INPUT$(2, #2)

 IF S2$ <> "" THEN S2& = ASC(S2$)
 IF S2$ = "" THEN S2& = 127

S2& = S2& + 128
IF S2& > 255 THEN S2& = S2& - 256
S2& = S2& - 128

Sp1& = S2& * 2.5
Sp1& = Sp1& + 128

Sp2& = S2& * 3
Sp2& = Sp2& + 128

S2& = S2& * 2
S2& = S2& + 128

 IF S2& > 255 THEN S2& = 255
 IF S2& < 0 THEN S2& = 0

 IF Sp1& > 255 THEN Sp1& = 255
 IF Sp1& < 0 THEN Sp1& = 0

 IF Sp2& > 255 THEN Sp2& = 255
 IF Sp2& < 0 THEN Sp2& = 0

 IF NOT EOF(2) THEN PRINT #3, CHR$(S2&);
 IF NOT EOF(2) THEN PRINT #4, CHR$(Sp1&);
 IF NOT EOF(2) THEN PRINT #5, CHR$(Sp2&);


LOOP WHILE NOT EOF(2)
CLOSE #2
CLOSE #3
CLOSE #4
CLOSE #5

IF INKEY$ <> "" THEN END

LOOP UNTIL EOF(1)

CLOSE
OPEN "HVSS.INI" FOR OUTPUT AS #1
PRINT #1, "1"
CLOSE

