' Hard Drive Menu System
' Version 1.02
' By, Richard Copeland 1996-99
' From: Copeland Software 1996-99

' Subs & Functions (34) total

DECLARE SUB Main.Screen ()
DECLARE SUB Menu.Bar.Title ()
DECLARE SUB Write.File.Loading ()
DECLARE SUB Get.Info.Screen.Saver ()
DECLARE SUB Get.Mouse.Select ()
DECLARE SUB Pages ()
DECLARE SUB Add.Icon ()
DECLARE SUB Delete.Icon ()
DECLARE SUB Properties ()
DECLARE SUB Rename.Icon ()
DECLARE SUB Show.Icons.YN ()
DECLARE SUB Page.1 ()
DECLARE SUB Page.2 ()
DECLARE SUB Page.3 ()
DECLARE SUB Page.4 ()
DECLARE SUB Page.5 ()
DECLARE SUB Page.Return ()
DECLARE SUB Info.For.Pages ()
DECLARE SUB Page.Icon.Info ()
DECLARE SUB SetUpFiles ()
DECLARE SUB Add.Page ()
DECLARE SUB Menu1 ()
DECLARE SUB Menu2 ()
DECLARE SUB LETTERS ()
DECLARE SUB NORMAL0 ()
DECLARE SUB TRANSLATE ()
DECLARE SUB MOUSEGETSTATUS (LBTN%, RBTN%, MBTN%, HPosn%, VPosn%)
DECLARE SUB MouseHide ()
DECLARE SUB MouseShow ()
DECLARE SUB MouseSetUp ()
DECLARE SUB MouseCall ()
DECLARE SUB Show.Icons.YN.File.Desc ()
DECLARE SUB Pages.No.Break ()
DECLARE FUNCTION MouseInit% ()

DEFINT A-Z   'The program starts here.

COMMON SHARED P$(), P$, SIZE$, C1$, BGC, DOT$, SPACING$, WORD$, PFT, PFL, F$, PGICON$
COMMON SHARED RS$, PG$ 'Redraw Screen, & Page Number (M, 1-5)
COMMON SHARED Screen.Saver$, SaverTim%, DTime%, Long.String$, Icon.Set$, ICNum$
COMMON SHARED ICNName1$, ICNName2$, ICNName3$, ICNName4$, ICNName5$, ICNName6$, ICNName7$, ICNName8$, ICNName9$, ICNName10$
COMMON SHARED ICNName11$, ICNName12$, ICNName13$, ICNName14$, ICNName15$, ICNName16$, ICNName17$, ICNName18$, ICNName19$, ICNName20$
COMMON SHARED ICNName21$, ICNName22$, ICNName23$, ICNName24$, ICNName25$, ICNName26$, ICNName27$, ICNName28$, ICNName29$, ICNName30$
COMMON SHARED ICNName31$, ICNName32$, ICNName33$, ICNName34$, ICNName35$
COMMON SHARED SIcon1$, SIcon2$, SIcon3$, SIcon4$, SIcon5$, SIcon6$, SIcon7$, SIcon8$, SIcon9$, SIcon10$, SIcon11$
COMMON SHARED SIcon12$, SIcon13$, SIcon14$, SIcon15$, SIcon16$, SIcon17$, SIcon18$, SIcon19$, SIcon20$, SIcon21$, SIcon22$
COMMON SHARED SIcon23$, SIcon24$, SIcon25$, SIcon26$, SIcon27$, SIcon28$, SIcon29$, SIcon30$, SIcon31$, SIcon32$, SIcon33$
COMMON SHARED SIcon34$, SIcon35$
COMMON SHARED File1$, File2$, File3$, File4$, File5$, File6$, File7$, File8$, File9$, File10$
COMMON SHARED File11$, File12$, File13$, File14$, File15$, File16$, File17$, File18$, File19$, File20$
COMMON SHARED File21$, File22$, File23$, File24$, File25$, File26$, File27$, File28$, File29$, File30$
COMMON SHARED File31$, File32$, File33$, File34$, File35$, TTitle$, PageTitle$
COMMON SHARED FileDes1$, FileDes2$, FileDes3$, FileDes4$, FileDes5$, FileDes6$, FileDes7$, FileDes8$, FileDes9$, FileDes10$
COMMON SHARED FileDes11$, FileDes12$, FileDes13$, FileDes14$, FileDes15$, FileDes16$, FileDes17$, FileDes18$, FileDes19$, FileDes20$
COMMON SHARED FileDes21$, FileDes22$, FileDes23$, FileDes24$, FileDes25$, FileDes26$, FileDes27$, FileDes28$, FileDes29$, FileDes30$
COMMON SHARED FileDes31$, FileDes32$, FileDes33$, FileDes34$, FileDes35$

CLEAR 'Close Everything
CLEAR , , 15000 ' Clear Enough Memory to Run Program

' $DYNAMIC      ' Do not remove the (REM ') character it is supose to be there

DIM P$(122)     ' Get Array for the Font characters
CALL LETTERS    ' Initiate font characters

TYPE MOUSEREGS
  AX AS INTEGER
  BX AS INTEGER
  CX AS INTEGER
  DX AS INTEGER
  ES AS INTEGER
END TYPE

DIM SHARED Horiz%, Vert%
DIM SHARED MouseReady%
DIM SHARED MREG AS MOUSEREGS
REDIM SHARED MOUSEROUTINE%(0 TO 19)
REDIM SHARED MenuD1%(60, 60), MenuD2%(70, 70), Extra%(50, 50)

MouseReady% = 0
MouseSetUp
MouseReady% = MouseInit

MOUSEINT:
DATA 55          : 'PUSH BP
DATA 89, E5      : 'MOVE BP,SP
DATA 56          : 'PUSH SI
DATA 8B, 76, 06  : 'MOV  SI,[BP+6]
DATA 8B, 04      : 'MOV  AX,[SI]
DATA 8B, 5C, 02  : 'MOV  BX,[SI+2]
DATA 8B, 4C, 04  : 'MOV  CX,[SI+4]
DATA 8B, 54, 06  : 'MOV  DX,[SI+6]
DATA 8E, 44, 08  : 'MOV  ES,[SI+8]
DATA CD, 33      : 'INT  33h
DATA 8C, 44, 08  : 'MOV  [SI+8],ES
DATA 89, 54, 06  : 'MOV  [SI+6],DX
DATA 89, 4C, 04  : 'MOV  [SI+4],CX
DATA 89, 5C, 02  : 'MOV  [SI+2],BX
DATA 89, 04      : 'MOV  [SI],AX
DATA 5E          : 'POP     SI
DATA 5D          : 'POP  BP
DATA CB          : 'RETF

DEFINT A-Z
CLS
TYPE TEXTMASK
  BG AS INTEGER
  FG AS INTEGER
  Char AS INTEGER
  MASK AS INTEGER
END TYPE

IF MouseReady% THEN
  GOTO Begin.Program
ELSE
  CLS
  PRINT "No mouse available (!)?..."
  PRINT
  PRINT "It is required that you have a mouse driver loaded in order"
  PRINT "to use HDMS Version 1.02.  If you are haveing trouble or think"
  PRINT "that this error is incorrect see Trouble Shooting in the help"
  PRINT "file from your \HDMS directory... Example:> C:\HDMS\HELP.EXE"
  PRINT
  PRINT "Do you want to load your mouse driver now"; YN$
  PRINT : PRINT : PRINT
 
  DO
    SELECT CASE UCASE$(INKEY$)
      CASE "Y"
        INPUT "Enter Mouse Directory ->", Mouse.Path$
        IF Mouse.Path$ = "" THEN SYSTEM
        SHELL Mouse.Path$ + "\MOUSE.COM" 'Change to find your mouse driver
        GOTO Begin.Program
      CASE "N"
        SYSTEM
      CASE ELSE
    END SELECT
  LOOP
END IF

Begin.Program:
ON TIMER(60) GOSUB Screen.Saver   'Set timer for 1-Minute and check
TIMER ON

Long.String$ = "                                                      "
Icon.Set$ = "False"

ON ERROR GOTO 1
 OPEN "\HDMS\Saver.Inf" FOR INPUT AS #1
  INPUT #1, Screen.Saver$, SaverTim%, SaverName$
 CLOSE #1
ON ERROR GOTO 0

COLOR 7, 0 'Reset Colors
CLS
ON ERROR GOTO 3
  SCREEN 9 'EGA Screen Mode
ON ERROR GOTO 0

' Got back to previous page if found
ON ERROR GOTO 1
 OPEN "\HDMS\Back.dat" FOR INPUT AS #1
  INPUT #1, PG$, ABC$
 CLOSE #1
Page.Return
ON ERROR GOTO 0

' Goto Main Screen if no page found
PG$ = "M" 'Main Page
Main.Screen 'Start screen

Screen.Saver:       ' This section will get screen saver values
DTime% = DTime% + 1 'Increase Delay Time by 1 each loop
IF Screen.Saver$ = "OFF" THEN
  MouseHide
  TIMER STOP   ' Reset Timer if OFF
  TIMER OFF
  TIMER ON '& turn it back on
  CALL Page.Return 'Look for page return
END IF
IF Screen.Saver$ = "ON" AND DTime% = SaverTim% THEN GOTO Screen.Saver.Start
IF Screen.Saver$ = "ON" AND DTime% < SaverTim% THEN
  MouseHide
  TIMER STOP
  TIMER OFF
  TIMER ON
  CALL Page.Return
END IF

Screen.Saver.Start:     ' This is the actual screen saver controler
DTime% = 0
VIEW (0, 0)-(639, 349)  ' Open up entire screen for view port
MouseHide
CLOSE
SHELL SaverName$   ' Load selected screen saver if found
TIMER STOP         ' Note if you don't have enough memory to load
TIMER OFF          ' selected screen saver HDMS will return as normal
TIMER ON
CALL Page.Return   ' Resume where left off before screen saver started

' Error Control
1 RESUME NEXT      ' Use when error is ok or expected

2 SC$ = "S8"       ' Set font scale to size eight
RESUME NEXT        ' & resume with next operation

3 CLS
BEEP
PRINT "ERROR:"
PRINT "The program was unable to sart!"
PRINT "The most common reason is you need a EGA, VGA or better monitor."
PRINT "HDMS needs at least 515k of free convtional memory to run some"
PRINT "features will not be available at that memory standard."
PRINT
PRINT "If you have the requirments then..."
PRINT "Check to make sure that your directory is Set to \HDMS"
PRINT "and that all files are found and placed correctly."
PRINT "It is recomended that you run trouble shooting in the help file"
PRINT "to acess the help file type HELP from the \HDMS directory."
DO
LOOP UNTIL INKEY$ <> ""
SYSTEM

4 CLS
BEEP
PRINT "ERROR:"
PRINT "A file was not found in Page "; PG$
PRINT "Please reinstall HDMS to fix the problem."
PRINT "Or create the missing file."
DO
LOOP UNTIL INKEY$ <> ""
SYSTEM

NoBreak:
RETURN

REM $STATIC
SUB Add.Icon
  OPEN "\HDMS\PAGEDAT.DAT" FOR OUTPUT AS #1
    WRITE #1, PG$, ICNum$
  CLOSE
  SHELL "\HDMS\ADDICON.EXE"
 Page.Return
END SUB

SUB Add.Page
  SHELL "\HDMS\AddPage.EXE"
  Page.Return
END SUB

SUB Delete.Icon
  OPEN "\HDMS\PAGEDAT.DAT" FOR OUTPUT AS #1
    WRITE #1, PG$, ICNum$
  CLOSE
SHELL "\HDMS\DELICON.EXE"
  Page.Return
END SUB

SUB Get.Info.Screen.Saver
  SHELL "\hdms\GISSaver.EXE"
Page.Return
END SUB

SUB Get.Mouse.Select
ON ERROR GOTO 1
DO
' Icon Files start hear each icon has a propertys feature with it
 ' File Loading Left Mouse Button
    IF Horiz% > 60 AND Horiz% < 105 AND Vert% > 60 AND Vert% < 105 AND SIcon1$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File1$
      Write.File.Loading
    END IF
 ' Propertys Right Mouse Button
    IF Horiz% > 60 AND Horiz% < 105 AND Vert% > 60 AND Vert% < 105 AND SIcon1$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "1"
      Properties
    END IF
 ' Set up a file Right Mouse Button
    IF Horiz% > 60 AND Horiz% < 105 AND Vert% > 60 AND Vert% < 105 AND SIcon1$ = "H" AND RBTN% THEN
      MouseHide
      ICNum$ = "1"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 117 AND Horiz% < 155 AND Vert% > 59 AND Vert% < 105 AND SIcon2$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File2$
      Write.File.Loading
    END IF
    IF Horiz% > 117 AND Horiz% < 155 AND Vert% > 59 AND Vert% < 105 AND SIcon2$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "2"
      Properties
    END IF
    IF Horiz% > 117 AND Horiz% < 155 AND Vert% > 59 AND Vert% < 105 AND SIcon2$ = "H" AND RBTN% THEN
      MouseHide
      ICNum$ = "2"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 175 AND Horiz% < 220 AND Vert% > 60 AND Vert% < 105 AND SIcon3$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File3$
      Write.File.Loading
    END IF
    IF Horiz% > 175 AND Horiz% < 220 AND Vert% > 60 AND Vert% < 105 AND SIcon3$ = "S" AND RBTN% THEN
      ICNum$ = "3"
      Properties
      MouseHide
    END IF
    IF Horiz% > 175 AND Horiz% < 220 AND Vert% > 60 AND Vert% < 105 AND SIcon3$ = "H" AND RBTN% THEN
      ICNum$ = "3"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 238 AND Horiz% < 290 AND Vert% > 60 AND Vert% < 105 AND SIcon4$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File4$
      Write.File.Loading
    END IF
    IF Horiz% > 238 AND Horiz% < 290 AND Vert% > 60 AND Vert% < 105 AND SIcon4$ = "S" AND RBTN% THEN
      ICNum$ = "4"
      Properties
      MouseHide
    END IF
    IF Horiz% > 238 AND Horiz% < 290 AND Vert% > 60 AND Vert% < 105 AND SIcon4$ = "H" AND RBTN% THEN
      ICNum$ = "4"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 298 AND Horiz% < 345 AND Vert% > 60 AND Vert% < 105 AND SIcon5$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File5$
      Write.File.Loading
    END IF
    IF Horiz% > 298 AND Horiz% < 345 AND Vert% > 60 AND Vert% < 105 AND SIcon5$ = "S" AND RBTN% THEN
      ICNum$ = "5"
      Properties
    END IF
    IF Horiz% > 298 AND Horiz% < 345 AND Vert% > 60 AND Vert% < 105 AND SIcon5$ = "H" AND RBTN% THEN
      ICNum$ = "5"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 360 AND Horiz% < 407 AND Vert% > 60 AND Vert% < 105 AND SIcon6$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File6$
      Write.File.Loading
    END IF
    IF Horiz% > 360 AND Horiz% < 407 AND Vert% > 60 AND Vert% < 105 AND SIcon6$ = "S" AND RBTN% THEN
      ICNum$ = "6"
      Properties
    END IF
    IF Horiz% > 360 AND Horiz% < 407 AND Vert% > 60 AND Vert% < 105 AND SIcon6$ = "H" AND RBTN% THEN
      ICNum$ = "6"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 418 AND Horiz% < 470 AND Vert% > 60 AND Vert% < 105 AND SIcon7$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File7$
      Write.File.Loading
    END IF
    IF Horiz% > 418 AND Horiz% < 470 AND Vert% > 60 AND Vert% < 105 AND SIcon7$ = "S" AND RBTN% THEN
      ICNum$ = "7"
      Properties
    END IF
    IF Horiz% > 418 AND Horiz% < 470 AND Vert% > 60 AND Vert% < 105 AND SIcon7$ = "H" AND RBTN% THEN
      ICNum$ = "7"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 120 AND Vert% < 147 AND SIcon8$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File8$
      Write.File.Loading
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 120 AND Vert% < 147 AND SIcon8$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "8"
      Properties
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 120 AND Vert% < 147 AND SIcon8$ = "H" AND RBTN% THEN
      ICNum$ = "8"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 120 AND Vert% < 147 AND SIcon9$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File9$
      Write.File.Loading
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 120 AND Vert% < 147 AND SIcon9$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "9"
      Properties
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 120 AND Vert% < 147 AND SIcon9$ = "H" AND RBTN% THEN
      ICNum$ = "9"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 120 AND Vert% < 147 AND SIcon10$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File10$
      Write.File.Loading
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 120 AND Vert% < 147 AND SIcon10$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "10"
      Properties
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 120 AND Vert% < 147 AND SIcon10$ = "H" AND RBTN% THEN
      ICNum$ = "10"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 241 AND Horiz% < 290 AND Vert% > 120 AND Vert% < 147 AND SIcon11$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File11$
      Write.File.Loading
    END IF
    IF Horiz% > 241 AND Horiz% < 290 AND Vert% > 120 AND Vert% < 147 AND SIcon11$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "11"
      Properties
    END IF
    IF Horiz% > 241 AND Horiz% < 290 AND Vert% > 120 AND Vert% < 147 AND SIcon11$ = "H" AND RBTN% THEN
      ICNum$ = "11"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 267 AND Horiz% < 330 AND Vert% > 120 AND Vert% < 147 AND SIcon12$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File12$
      Write.File.Loading
    END IF
    IF Horiz% > 267 AND Horiz% < 330 AND Vert% > 120 AND Vert% < 147 AND SIcon12$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "12"
      Properties
    END IF
    IF Horiz% > 267 AND Horiz% < 330 AND Vert% > 120 AND Vert% < 147 AND SIcon12$ = "H" AND RBTN% THEN
      ICNum$ = "12"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 120 AND Vert% < 147 AND SIcon13$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File13$
      Write.File.Loading
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 120 AND Vert% < 147 AND SIcon13$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "13"
      Properties
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 120 AND Vert% < 147 AND SIcon13$ = "H" AND RBTN% THEN
      ICNum$ = "13"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 120 AND Vert% < 147 AND SIcon14$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File14$
      Write.File.Loading
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 120 AND Vert% < 147 AND SIcon14$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "14"
      Properties
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 120 AND Vert% < 147 AND SIcon14$ = "H" AND RBTN% THEN
      ICNum$ = "14"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 180 AND Vert% < 220 AND SIcon15$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File15$
      Write.File.Loading
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 180 AND Vert% < 220 AND SIcon15$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "15"
      Properties
    END IF
    IF Horiz% > 60 AND Horiz% < 108 AND Vert% > 180 AND Vert% < 220 AND SIcon15$ = "H" AND RBTN% THEN
      ICNum$ = "15"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 180 AND Vert% < 220 AND SIcon16$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File16$
      Write.File.Loading
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 180 AND Vert% < 220 AND SIcon16$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "16"
      Properties
    END IF
    IF Horiz% > 118 AND Horiz% < 160 AND Vert% > 180 AND Vert% < 220 AND SIcon16$ = "H" AND RBTN% THEN
      ICNum$ = "16"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 180 AND Vert% < 220 AND SIcon17$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File17$
      Write.File.Loading
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 180 AND Vert% < 220 AND SIcon17$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "17"
      Properties
    END IF
    IF Horiz% > 178 AND Horiz% < 210 AND Vert% > 180 AND Vert% < 220 AND SIcon17$ = "H" AND RBTN% THEN
      ICNum$ = "17"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 235 AND Horiz% < 285 AND Vert% > 180 AND Vert% < 220 AND SIcon18$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File18$
      Write.File.Loading
    END IF
    IF Horiz% > 235 AND Horiz% < 285 AND Vert% > 180 AND Vert% < 220 AND SIcon18$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "18"
      Properties
    END IF
    IF Horiz% > 235 AND Horiz% < 285 AND Vert% > 180 AND Vert% < 220 AND SIcon18$ = "H" AND RBTN% THEN
      ICNum$ = "18"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 290 AND Horiz% < 345 AND Vert% > 180 AND Vert% < 220 AND SIcon19$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File19$
      Write.File.Loading
    END IF
    IF Horiz% > 290 AND Horiz% < 345 AND Vert% > 180 AND Vert% < 220 AND SIcon19$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "19"
      Properties
    END IF
    IF Horiz% > 290 AND Horiz% < 345 AND Vert% > 180 AND Vert% < 220 AND SIcon19$ = "H" AND RBTN% THEN
      ICNum$ = "19"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 180 AND Vert% < 220 AND SIcon20$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File20$
      Write.File.Loading
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 180 AND Vert% < 220 AND SIcon20$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "20"
      Properties
    END IF
    IF Horiz% > 357 AND Horiz% < 390 AND Vert% > 180 AND Vert% < 220 AND SIcon20$ = "H" AND RBTN% THEN
      ICNum$ = "20"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 180 AND Vert% < 220 AND SIcon21$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File21$
      Write.File.Loading
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 180 AND Vert% < 220 AND SIcon21$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "21"
      Properties
    END IF
    IF Horiz% > 417 AND Horiz% < 450 AND Vert% > 180 AND Vert% < 220 AND SIcon21$ = "H" AND RBTN% THEN
      ICNum$ = "21"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 240 AND Vert% < 285 AND SIcon22$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File22$
      Write.File.Loading
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 240 AND Vert% < 285 AND SIcon22$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "22"
      Properties
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 240 AND Vert% < 285 AND SIcon22$ = "H" AND RBTN% THEN
      ICNum$ = "22"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 117 AND Horiz% < 172 AND Vert% > 240 AND Vert% < 285 AND SIcon23$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File23$
      Write.File.Loading
    END IF
    IF Horiz% > 117 AND Horiz% < 172 AND Vert% > 240 AND Vert% < 285 AND SIcon23$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "23"
      Properties
    END IF
    IF Horiz% > 117 AND Horiz% < 172 AND Vert% > 240 AND Vert% < 285 AND SIcon23$ = "H" AND RBTN% THEN
      ICNum$ = "23"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 179 AND Horiz% < 230 AND Vert% > 240 AND Vert% < 285 AND SIcon24$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File24$
      Write.File.Loading
    END IF
    IF Horiz% > 179 AND Horiz% < 230 AND Vert% > 240 AND Vert% < 285 AND SIcon24$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "24"
      Properties
    END IF
    IF Horiz% > 179 AND Horiz% < 230 AND Vert% > 240 AND Vert% < 285 AND SIcon24$ = "H" AND RBTN% THEN
      ICNum$ = "24"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 238 AND Horiz% < 292 AND Vert% > 240 AND Vert% < 285 AND SIcon25$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File25$
      Write.File.Loading
    END IF
    IF Horiz% > 238 AND Horiz% < 292 AND Vert% > 240 AND Vert% < 285 AND SIcon25$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "25"
      Properties
    END IF
    IF Horiz% > 238 AND Horiz% < 292 AND Vert% > 240 AND Vert% < 285 AND SIcon25$ = "H" AND RBTN% THEN
      ICNum$ = "25"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 298 AND Horiz% < 350 AND Vert% > 240 AND Vert% < 285 AND SIcon26$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File26$
      Write.File.Loading
    END IF
    IF Horiz% > 298 AND Horiz% < 350 AND Vert% > 240 AND Vert% < 285 AND SIcon26$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "26"
      Properties
    END IF
    IF Horiz% > 298 AND Horiz% < 350 AND Vert% > 240 AND Vert% < 285 AND SIcon26$ = "H" AND RBTN% THEN
      ICNum$ = "26"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 356 AND Horiz% < 412 AND Vert% > 240 AND Vert% < 285 AND SIcon27$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File27$
      Write.File.Loading
    END IF
    IF Horiz% > 356 AND Horiz% < 412 AND Vert% > 240 AND Vert% < 285 AND SIcon27$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "27"
      Properties
    END IF
    IF Horiz% > 356 AND Horiz% < 412 AND Vert% > 240 AND Vert% < 285 AND SIcon27$ = "H" AND RBTN% THEN
      ICNum$ = "27"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 415 AND Horiz% < 470 AND Vert% > 240 AND Vert% < 285 AND SIcon28$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File28$
      Write.File.Loading
    END IF
    IF Horiz% > 415 AND Horiz% < 470 AND Vert% > 240 AND Vert% < 285 AND SIcon28$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "28"
      Properties
    END IF
    IF Horiz% > 415 AND Horiz% < 470 AND Vert% > 240 AND Vert% < 285 AND SIcon28$ = "H" AND RBTN% THEN
      ICNum$ = "28"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 298 AND Vert% < 345 AND SIcon29$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File29$
      Write.File.Loading
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 298 AND Vert% < 345 AND SIcon29$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "29"
      Properties
    END IF
    IF Horiz% > 60 AND Horiz% < 110 AND Vert% > 298 AND Vert% < 345 AND SIcon29$ = "H" AND RBTN% THEN
      ICNum$ = "29"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 117 AND Horiz% < 167 AND Vert% > 298 AND Vert% < 345 AND SIcon30$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File30$
      Write.File.Loading
    END IF
    IF Horiz% > 117 AND Horiz% < 167 AND Vert% > 298 AND Vert% < 345 AND SIcon30$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "30"
      Properties
    END IF
    IF Horiz% > 117 AND Horiz% < 167 AND Vert% > 298 AND Vert% < 345 AND SIcon30$ = "H" AND RBTN% THEN
      ICNum$ = "30"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 180 AND Horiz% < 228 AND Vert% > 298 AND Vert% < 345 AND SIcon31$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File31$
      Write.File.Loading
    END IF
    IF Horiz% > 180 AND Horiz% < 228 AND Vert% > 298 AND Vert% < 345 AND SIcon31$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "31"
      Properties
    END IF
    IF Horiz% > 180 AND Horiz% < 228 AND Vert% > 298 AND Vert% < 345 AND SIcon31$ = "H" AND RBTN% THEN
      ICNum$ = "31"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 239 AND Horiz% < 292 AND Vert% > 298 AND Vert% < 345 AND SIcon32$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File32$
      Write.File.Loading
    END IF
    IF Horiz% > 239 AND Horiz% < 292 AND Vert% > 298 AND Vert% < 345 AND SIcon32$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "32"
      Properties
    END IF
    IF Horiz% > 239 AND Horiz% < 292 AND Vert% > 298 AND Vert% < 345 AND SIcon32$ = "H" AND RBTN% THEN
      ICNum$ = "32"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 297 AND Horiz% < 352 AND Vert% > 298 AND Vert% < 345 AND SIcon33$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File33$
      Write.File.Loading
    END IF
    IF Horiz% > 297 AND Horiz% < 352 AND Vert% > 298 AND Vert% < 345 AND SIcon33$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "33"
      Properties
    END IF
    IF Horiz% > 297 AND Horiz% < 352 AND Vert% > 298 AND Vert% < 345 AND SIcon33$ = "H" AND RBTN% THEN
      ICNum$ = "33"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 358 AND Horiz% < 412 AND Vert% > 298 AND Vert% < 345 AND SIcon34$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File34$
      Write.File.Loading
    END IF
    IF Horiz% > 358 AND Horiz% < 412 AND Vert% > 298 AND Vert% < 345 AND SIcon34$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "34"
      Properties
    END IF
    IF Horiz% > 358 AND Horiz% < 412 AND Vert% > 298 AND Vert% < 345 AND SIcon34$ = "H" AND RBTN% THEN
      ICNum$ = "34"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
    IF Horiz% > 415 AND Horiz% < 471 AND Vert% > 298 AND Vert% < 345 AND SIcon35$ = "S" AND LBTN% THEN
      MouseHide
      F$ = File35$
      Write.File.Loading
    END IF
    IF Horiz% > 415 AND Horiz% < 471 AND Vert% > 298 AND Vert% < 345 AND SIcon35$ = "S" AND RBTN% THEN
      MouseHide
      ICNum$ = "35"
      Properties
    END IF
    IF Horiz% > 415 AND Horiz% < 471 AND Vert% > 298 AND Vert% < 345 AND SIcon35$ = "H" AND RBTN% THEN
      ICNum$ = "35"
      Icon.Set$ = "True"
      SetUpFiles
    END IF
' Pages Start Hear & No Break
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 50 AND Vert% < 100 AND LBTN% THEN
      MouseHide
      Page.1
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 50 AND Vert% < 100 AND RBTN% THEN
      MouseHide
      Add.Page
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 105 AND Vert% < 156 AND LBTN% THEN
      MouseHide
      Page.2
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 105 AND Vert% < 156 AND RBTN% THEN
      MouseHide
      Add.Page
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 160 AND Vert% < 210 AND LBTN% THEN
      MouseHide
      Page.3
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 160 AND Vert% < 210 AND RBTN% THEN
      MouseHide
      Add.Page
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 215 AND Vert% < 265 AND LBTN% THEN
      MouseHide
      Page.4
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 215 AND Vert% < 265 AND RBTN% THEN
      MouseHide
      Add.Page
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 270 AND Vert% < 320 AND LBTN% THEN
      MouseHide
      Page.5
    END IF
    IF PG$ = "M" AND Horiz% > 570 AND Horiz% < 630 AND Vert% > 270 AND Vert% < 320 AND RBTN% THEN
      MouseHide
      Add.Page
    END IF
' Page Return Main
    IF Horiz% > 570 AND Horiz% < 630 AND Vert% > 50 AND Vert% < 100 AND LBTN% THEN
      MouseHide
      RS$ = "Y"
      DTime% = 0
      Main.Screen
    END IF
    IF RBTN% THEN 'This Prevents Mouse Button Error
      MouseHide
      IF PG$ = "M" THEN EXIT SUB
    END IF

' Disable The Ctrl-Brk key by redirecting it to a gosub return if pressed.
    KEY 15, CHR$(4 + 128 + 32 + 64) + CHR$(70)
    ON KEY(15) GOSUB NoBreak: KEY(15) ON
    KEY 16, CHR$(4 + 128) + CHR$(70): ON KEY(16) GOSUB NoBreak: KEY(16) ON
    KEY 17, CHR$(4 + 128 + 32) + CHR$(70): ON KEY(17) GOSUB NoBreak
    KEY(17) ON: KEY 18, CHR$(4 + 128 + 64) + CHR$(70): ON KEY(18) GOSUB NoBreak
    KEY(18) ON: KEY 19, CHR$(4) + CHR$(70): ON KEY(21) GOSUB NoBreak
    KEY(21) ON: KEY 22, CHR$(4 + 64) + CHR$(70)
    ON KEY(22) GOSUB NoBreak: KEY(22) ON: KEY 23, CHR$(4 + 32) + CHR$(46)
    ON KEY(23) GOSUB NoBreak: KEY(23) ON: KEY 24, CHR$(4 + 64) + CHR$(46)
    ON KEY(24) GOSUB NoBreak: KEY(24) ON
    KEY 25, CHR$(4 + 32 + 64) + CHR$(46): ON KEY(25) GOSUB NoBreak: KEY(25) ON
    MouseShow
    CALL MOUSEGETSTATUS(LBTN%, RBTN%, MBTN%, Horiz%, Vert%)
    IF Horiz% > 49 AND Horiz% < 98 AND Vert% > 35 AND Vert% < 50 AND LBTN% THEN
      MouseHide
       GET (50, 51)-(135, 170), MenuD1%
      Menu1
      PUT (50, 51), MenuD1%
     MouseShow
    END IF
    IF Horiz% > 140 AND Horiz% < 195 AND Vert% > 36 AND Vert% < 50 AND LBTN% THEN
      MouseHide
       Menu2
      MouseShow
    END IF
    IF Horiz% > 480 AND Horiz% < 535 AND Vert% > 36 AND Vert% < 50 AND LBTN% THEN
      MouseHide
      OPEN "\HDMS\SOUNDING.DAT" FOR OUTPUT AS #1
       WRITE #1, "\HDMS\HELP.WAV"
      CLOSE
      OPEN "\HDMS\HDMSEDIT.DAT" FOR INPUT AS #1
       INPUT #1, Sound.Yes.No$, Menues.Yes.No$
      CLOSE
      IF Menues.Yes.No$ = "YES" THEN
        SHELL "\HDMS\SOUNDING.EXE"
      END IF
      OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
       WRITE #1, "\HDMS\HELP.EXE"
      SYSTEM
    END IF
SELECT CASE INKEY$
  CASE CHR$(27)
     END
  CASE "1"
      Page.1
  CASE "2"
      Page.2
  CASE "3"
      Page.3
  CASE "4"
      Page.4
  CASE "5"
      Page.5
  CASE "M", "0"
      Main.Screen
   CASE ELSE
END SELECT
LOOP
  ON ERROR GOTO 0
END SUB

SUB Info.For.Pages
' Files
  CLOSE 'Close all open files
ON ERROR GOTO 1
  OPEN "\HDMS\" + PG$ + "File1.Set" FOR INPUT AS #1
    INPUT #1, File1$, FileDes1$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File2.Set" FOR INPUT AS #1
    INPUT #1, File2$, FileDes2$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File3.Set" FOR INPUT AS #1
    INPUT #1, File3$, FileDes3$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File4.Set" FOR INPUT AS #1
    INPUT #1, File4$, FileDes4$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File5.Set" FOR INPUT AS #1
    INPUT #1, File5$, FileDes5$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File6.Set" FOR INPUT AS #1
    INPUT #1, File6$, FileDes6$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File7.Set" FOR INPUT AS #1
    INPUT #1, File7$, FileDes7$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File8.Set" FOR INPUT AS #1
    INPUT #1, File8$, FileDes8$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File9.Set" FOR INPUT AS #1
    INPUT #1, File9$, FileDes9$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File10.Set" FOR INPUT AS #1
    INPUT #1, File10$, FileDes10$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File11.Set" FOR INPUT AS #1
    INPUT #1, File11$, FileDes11$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File12.Set" FOR INPUT AS #1
    INPUT #1, File12$, FileDes12$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File13.Set" FOR INPUT AS #1
    INPUT #1, File13$, FileDes13$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File14.Set" FOR INPUT AS #1
    INPUT #1, File14$, FileDes14$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File15.Set" FOR INPUT AS #1
    INPUT #1, File15$, FileDes15$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File15.Set" FOR INPUT AS #1
    INPUT #1, File15$, FileDes15$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File16.Set" FOR INPUT AS #1
    INPUT #1, File16$, FileDes16$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File17.Set" FOR INPUT AS #1
    INPUT #1, File17$, FileDes17$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File18.Set" FOR INPUT AS #1
    INPUT #1, File18$, FileDes18$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File19.Set" FOR INPUT AS #1
    INPUT #1, File19$, FileDes19$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File20.Set" FOR INPUT AS #1
    INPUT #1, File20$, FileDes20$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File21.Set" FOR INPUT AS #1
    INPUT #1, File21$, FileDes21$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File22.Set" FOR INPUT AS #1
    INPUT #1, File22$, FileDes22$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File23.Set" FOR INPUT AS #1
    INPUT #1, File23$, FileDes23$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File24.Set" FOR INPUT AS #1
    INPUT #1, File24$, FileDes24$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File25.Set" FOR INPUT AS #1
    INPUT #1, File25$, FileDes25$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File26.Set" FOR INPUT AS #1
    INPUT #1, File26$, FileDes26$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File27.Set" FOR INPUT AS #1
    INPUT #1, File27$, FileDes27$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File28.Set" FOR INPUT AS #1
    INPUT #1, File28$, FileDes28$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File29.Set" FOR INPUT AS #1
    INPUT #1, File29$, FileDes29$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File30.Set" FOR INPUT AS #1
    INPUT #1, File30$, FileDes30$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File31.Set" FOR INPUT AS #1
    INPUT #1, File31$, FileDes31$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File32.Set" FOR INPUT AS #1
    INPUT #1, File32$, FileDes32$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File33.Set" FOR INPUT AS #1
    INPUT #1, File33$, FileDes33$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File34.Set" FOR INPUT AS #1
    INPUT #1, File34$, FileDes34$
  CLOSE
  OPEN "\HDMS\" + PG$ + "File35.Set" FOR INPUT AS #1
    INPUT #1, File35$, FileDes35$
  CLOSE
ON ERROR GOTO 0
END SUB

SUB LETTERS
  P$(32) = "BR4"   'space
  P$(33) = "BR1BD1U1BU2U5BD7BR3"   '!
  P$(34) = "BR0BU7D2BR2U2BD7BR3"   '"
  P$(35) = "BD1BR1U8D2L1R5L1U2D8U2L4R5BR2BD1"   '#
  P$(36) = "BD1BR3U8D8BL3BU5U1E1R3F1BD1BL5F1R3F1D1G1L3H1BR7BD1"   '$
  P$(37) = "BD1U1E6U1BL5BD2U1R1D1L1BD4BR4R1D1L1U1BD1BR5"   '%
  P$(38) = "BR1BU2BL1E3U1H1L1G1D1F6BU1BL5BU3G2D1F1R3E3BD2BR2"   '&
  P$(39) = "BR2BU7D1G1BD5BR4"   ''
  P$(40) = "BR1BD1BU2U4E2G2D4F2BU1BR4"   '(
  P$(41) = "BR2BD1BU2U4H2F2D4G2BU1BR5"   ')
  P$(42) = "BR2BU2U6D3L2R4BL4BD2E4BL4F4BD3BR4"   '*
  P$(43) = "BR2BD1U7D3L2R5BD3BR3"   '+
  P$(44) = "BD1U1R1D2G1BU3BR4"   ',
  P$(45) = "BR1BU3R3L3BD3BR5"   '-
  P$(46) = "BD1BR1L1BU1BR4"   '.
  P$(47) = "BR1E5G5BR7"   '/
  P$(48) = "BD1BU1U6E1R2F1D6G1L2H1BR6"   '0
  P$(49) = "BD1BR2U7BL1E1D1BD6BR3"   '1
  P$(50) = "BR1BU6E1R2F1D2G4D1R4BU1BR3"   '2
  P$(51) = "BU6E1R2F1D2G1L2R2F1D2G1L2H1BR7"   '3
  P$(52) = "BU3E4D8U4L4R5BD3BR3"   '4
  P$(53) = "BR1BU3U4R4L4D4E1R2F1D3G1L2H1BR7"   '5
  P$(54) = "BR1BD1BU4U3E1R2F1H1L2G1D6F1R2E1U3H1L2G1BD3BR6"   '6
  P$(55) = "BR1BU7R4D3G4D1BU1BR7"   '7
  P$(56) = "BR1BU6E1R2F1D2G1L2R2F1D2G1L2H1U2E1H1U2BD6BR7"   '8
  P$(57) = "BR1BU4U2E1R2F1D6G1L2H1BU4F1R3BD3BR3"   '9
  P$(58) = "BR1U1BU2U1BD4BR3"   ':
  P$(59) = "BD1BR1BU1U1BU2U1BD4G1BU1BR6"   ';
  P$(60) = "BU3E3G3F3BR3"   '<
  P$(61) = "BU3R4BD2L4BR7BD1"   '=
  P$(62) = "BU6BR1F3G3BR5"   '>
  P$(63) = "BR1BU5U1E1R2F1D2G1D1BD2D1BU1BR3"   '?
  P$(64) = "BD1BU1U6E1R3F1D5L2H1U2E1R1D3BD3L3H1F1R3E1BR3"   '@
  P$(65) = "BD1U7E1R3F1D3L5R5D4BR4BU1"   'A
  P$(66) = "BD1U8R4F1D2G1L4R4F1D2G1L4BU1BR9"   'B
  P$(67) = "BD1BU1U6E1R3F1BD6G1L3H1F1R3BR4BU1"   'C
  P$(68) = "BD1U8R4F1D6G1L4BR9BU1 "   'D
  P$(69) = "BD1U8R4L4D4R3L3D4R4BU1BR4"   'E
  P$(70) = "BD1U8R5L5D4R4L4D4BR8BU1"   'F
  P$(71) = "BD1BU1U6E1R3F1BD6G1L3H1F1R3E1U3L2R2D3BR4"   'G
  P$(72) = "BD1U8D4R4U4D8BR4BU1"   'H
  P$(73) = "BD1BR3U8L1R2L1D8L1R2BR4BU1"   'I
  P$(74) = "BD1BU1F1R2E1U7L1R2L1D7BR5"   'J
  P$(75) = "BD1BU8D8U4R1E4G4F4BR4BU1"   'K
  P$(76) = "BD1BU8D8R4BU1BR4"   'L
  P$(77) = "BD1U7E1R2F1D7U7E1R2F1D7BU1BR4"   'M
  P$(78) = "BD1U8F7D1U8D8BR4BU1"   'N
  P$(79) = "BD1BU1U6E1R3F1BD6G1L3H1BR5U6D6BR4"   'O
  P$(80) = "BD1U8R4F1D2G1L4D4BR9BU1"   'P
  P$(81) = "BD1BU1U6E1R3F1BD6G1L3H1BR5U6BL3BD5F3BG3BR7BU5"   'Q
  P$(82) = "BD1U8R4F1D2G1L4R1F4BR4BU1"   'R
  P$(83) = "BD1BU5U2E1R3F1BD2BL5F1R3F1D2G1L3H1BR9"   'S
  P$(84) = "BR3BD1BU8L4R6L3D8BR6BU1"   'T
  P$(85) = "BD1BU1U7D7F1R3E1U7D7BR4"   'U
  P$(86) = "BD1BU8D5F2D1U1E2U5D5BR5BD2"   'V
  P$(87) = "BD1BU1U7D7F1R2E1U7D7F1R2E1U7D7BD1BR4BU1"   'W
  P$(88) = "BD1BU8D1F3E3U1D1G6D1U1E3F3D1BU1BR5"   'X
  P$(89) = "BL1BU5U2D2F3E3U2D2G3D3BU1BR7"   'Y
  P$(90) = "BU7R5D2G5D1R5BR4BU1"   'Z
  P$(91) = "BR1BD1BR3L3U8R3BR3BD7"   '[
  P$(92) = "BU5F5BR3"   '\
  P$(93) = "BD1R3U8L3BR2BD7BR4"   ']
  P$(94) = "BR1BU5E2F2BD5BR2"   '^
  P$(95) = "BD1R4BU1BL2BR5"   '_
  P$(96) = "BR2BU7D1F1BD5BR2"   '`
  P$(97) = "U2E1R3U1H1L2G1E1R2F1D4G1L2H1F1BR2E1U2D3BR4BU1"   'a
  P$(98) = "BD1U8D8R3E1U4H1L2G1D4BR8"   'b
  P$(99) = "BR0U4E1R2F1BD4G1L2H1F1R2E1BR4"   'c
  P$(100) = "U4E1R2F1H1L2G1D4F1R2E1U7D7D1BU1BR4"   'd
  P$(101) = "U4E1R2F1D2L4D2F1R2E1BR4"   'e
  P$(102) = "BR1BD1U7E1R2F1H1L2G1D3L1R3BD3BR5"   'f
  P$(103) = "U4E1R2F1D4G1L2H1BD3F1R2E1U3BR4"   'g
  P$(104) = "BU7D8U5E1R2F1D5BU1BR4"   'h
  P$(105) = "BR3BD1U6BU2BD7BR4"   'i
  P$(106) = "BR1BD1U6BU2BD7D3G1L2BU4BR8"   'j
  P$(107) = "BD1BU8D8U3E3G3F3BU1BR3"   'k
  P$(108) = "BR1BD1U8L1R1D8L1R2BR4BU1"   'l
  P$(109) = "BD1U6D1E1R1F1D5U5E1R1F1D5BU1BR4"   'm
  P$(110) = "BD1U6D1E1R2F1D5U4BD3BR4"   'n
  P$(111) = "U4E1R2F1D4G1L2H1BR8"   'o
  P$(112) = "U4E1R2F1D4G1L2H1D4U4BR8"   'p
  P$(113) = "U4E1R2F1D4G1L2H1BR4D4L1R2L1U4BR5"   'q
  P$(114) = "BD1U6D1E1R2F1H1L2G1U1D6BU1BR7"   'r
  P$(115) = "BU3U1E1R2F1H1L2G1D1F1R2F1D1G1L2H1BR8"   's
  P$(116) = "BR1BU7D2L2R4L2D5F1R1E1BR4"   't
  P$(117) = "U5D5F1R2E1U5D5BR4"   'u
  P$(118) = "BD1BU6D3F2D1U1E2U3D3BD2BR4"   'v
  P$(119) = "BD1BU6D5F1R1E1U4D4F1R1E1U5D5BR4"   'w
  P$(120) = "BD1BU6D1F2E2U1D1G4D1U1E2F2D1BU1BR4"   'x
  P$(121) = "BU5D5F1R2E1U5D8G1L2H1BU3BR8"   'y
  P$(122) = "BU5R4D1G4D1R4BU1BR4"   'z
END SUB

SUB Main.Screen
  VIEW (0, 0)-(639, 349)
  MouseHide
  PG$ = "M"
  CLOSE
  PRINT : COLOR 3
  SELECT CASE RS$
    CASE "N"
      GOTO Skip
    CASE "Y"
      CLS
    CASE ELSE
  END SELECT

  LINE (50, 50)-(535, 345), 1, BF      'Main Box1

  ReqSize = 67
  DIM Boxes(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(Boxes(1))
     BLOAD "\HDMS\Boxes.Scr", VARPTR(Boxes(1))
    DEF SEG
   PUT (565, 47), Boxes(1)
  ERASE Boxes

' Files
 PG$ = ""
  Info.For.Pages
  PG$ = "M"
 Pages 'Load Pages Image & Names

  ReqSize = 170
  DIM Title(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(Title(1))
     BLOAD "\HDMS\HDM.Tit", VARPTR(Title(1))
    DEF SEG
   PUT (105, 7), Title(1)
  ERASE Title
 
  DIM MenuBar(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(MenuBar(1))
     BLOAD "\HDMS\MenuBar.Tit", VARPTR(MenuBar(1))
    DEF SEG
   PUT (48, 34), MenuBar(1)
  ERASE MenuBar

' File  Descriptions
  PGICON$ = "1"
   Page.Icon.Info
  Show.Icons.YN 'Load Sub to decide to load icons to screen or not

Skip:
  RS$ = "N"
 Get.Mouse.Select 'Get Mouse selection for icons

Resets:
CLOSE : CLS
  RS$ = "Y"
 Main.Screen
END SUB

SUB Menu.Bar.Title
' Menu Bar
  ReqSize = 570
  DIM screenarrayMenuBar(1 TO (ReqSize - 1))   AS INTEGER
  DEF SEG = VARSEG(screenarrayMenuBar(1))
  BLOAD "\HDMS\MenuBar.Tit", VARPTR(screenarrayMenuBar(1))
  DEF SEG
  PUT (48, 34), screenarrayMenuBar(1), PRESET
  ERASE screenarrayMenuBar

' Page Title Custom Description
  WORD$ = PageTitle$
  SPACING$ = "R3"
  SIZE$ = " 8"
  DOT$ = "Y"
  CALL TRANSLATE
  C1$ = "C15"
  PFT = 20: PFL = 125: CALL NORMAL0
  LINE (49, 35)-(536, 49), , B

' Main Page Title Top of Page
  WORD$ = TTitle$
  SPACING$ = "R1"
  SIZE$ = " 8"
  DOT$ = "Y"
  CALL TRANSLATE
  C1$ = "C15"
  PFT = 20: PFL = 125: CALL NORMAL0

  WORD$ = "Main"
  SPACING$ = "L1"
  SIZE$ = "4"
  DOT$ = "N"
  CALL TRANSLATE
  C1$ = "C4"
  PFT = 65: PFL = 575: CALL NORMAL0
END SUB

SUB Menu1
ON ERROR GOTO 1
  OPEN "\HDMS\HDMSEDIT.DAT" FOR INPUT AS #1
    INPUT #1, Sound.Yes.No$, Menues.Yes.No$
  CLOSE
  IF Menues.Yes.No$ = "YES" THEN
    OPEN "\hdms\sounding.dat" FOR OUTPUT AS #1
      WRITE #1, "\HDMS\FILE.wav"
    CLOSE
   SHELL "\HDMS\Sounding.EXE"
  END IF
ON ERROR GOTO 0
 RS$ = "Y": DTime% = 0: ReqSize = 30
ON ERROR GOTO 4
DIM ScreenArrayL(1 TO (ReqSize - 1))   AS INTEGER
 DEF SEG = VARSEG(ScreenArrayL(1))
  BLOAD "\HDMS\Menu1.scr", VARPTR(ScreenArrayL(1))
   DEF SEG
 PUT (50, 51), ScreenArrayL(1), PSET
ERASE ScreenArrayL
ON ERROR GOTO 0

  DO
    MouseShow
    ON ERROR GOTO 1
    CALL MOUSEGETSTATUS(LBTN%, RBTN%, MBTN%, Horiz%, Vert%)
    IF Horiz% > 50 AND Horiz% < 130 AND Vert% > 50 AND Vert% < 65 AND LBTN% THEN
      MouseHide ' EXIT
       OPEN "\HDMS\Back.Dat" FOR OUTPUT AS #1 'Return To Page Info File
        WRITE #1, PG$, "FIRST"
       CLOSE
       OPEN "\HDMS\SoundTst.Dat" FOR OUTPUT AS #1
        WRITE #1, "FIRST"
       CLOSE
       OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
        WRITE #1, ""
       CLOSE
      SYSTEM
    END IF
    IF Horiz% > 50 AND Horiz% < 130 AND Vert% > 81 AND Vert% < 94 AND LBTN% THEN
      ' Screen Saver setup
      Get.Info.Screen.Saver
    END IF
    IF Horiz% > 50 AND Horiz% < 130 AND Vert% > 113 AND Vert% < 124 AND LBTN% THEN
      ' File Find
      MouseHide
      OPEN "\HDMS\Back.Dat" FOR OUTPUT AS #1 'Return To Page Info File
        WRITE #1, PG$, "FIRST"
      CLOSE
      OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
        WRITE #1, "\HDMS\FileFind.EXE"
      CLOSE
    SYSTEM
    END IF
    IF Horiz% > 50 AND Horiz% < 130 AND Vert% > 95 AND Vert% < 112 AND LBTN% THEN
      ' Properties
      ICNum$ = "0"
      Properties
    END IF
    IF Horiz% > 50 AND Horiz% < 130 AND Vert% > 60 AND Vert% < 81 AND LBTN% THEN
      ' File Setup
      MouseHide
      SetUpFiles
    END IF
    IF RBTN% THEN
      ' Close Menu
      MouseHide
      Page.Return
    END IF
    ON ERROR GOTO 0
  LOOP
END SUB

SUB Menu2
ON ERROR GOTO 1
  OPEN "\HDMS\HDMSEDIT.DAT" FOR INPUT AS #1
    INPUT #1, Sound.Yes.No$, Menues.Yes.No$
  CLOSE
  IF Menues.Yes.No$ = "YES" THEN
    OPEN "\hdms\sounding.dat" FOR OUTPUT AS #1
      WRITE #1, "\HDMS\EDIT.wav"
    CLOSE
    SHELL "\HDMS\Sounding.EXE"
  END IF
ON ERROR GOTO 0

ON ERROR GOTO 4
  RS$ = "Y": DTime% = 0: ReqSize = 6
DIM ScreenArrayL(1 TO (ReqSize - 1))   AS INTEGER
 DEF SEG = VARSEG(ScreenArrayL(1))
  BLOAD "\HDMS\Menu2.scr", VARPTR(ScreenArrayL(1))
DEF SEG
  PUT (140, 51), ScreenArrayL(1), PSET
 ERASE ScreenArrayL
  OPEN "\HDMS\Back.Dat" FOR OUTPUT AS #1 'Page Info File
   WRITE #1, PG$, "SECOND"
  CLOSE #1
ON ERROR GOTO 0

  DO
    ON ERROR GOTO 1
    MouseShow
    CALL MOUSEGETSTATUS(LBTN%, RBTN%, MBTN%, Horiz%, Vert%)
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 82 AND Vert% < 95 AND LBTN% THEN
      ' Rename Icon
      MouseHide
       CLS
      Rename.Icon
    END IF
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 51 AND Vert% < 65 AND LBTN% THEN
      ' Add Icon
      ICNum$ = "0"
       MouseHide
      CLS
      Add.Icon
    END IF
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 67 AND Vert% < 92 AND LBTN% THEN
      ' Delete Icon
      MouseHide
       CLS
      Delete.Icon
    END IF
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 95 AND Vert% < 111 AND LBTN% THEN
      ' Icon Draw
      MouseHide
      SHELL "\HDMS\IconDraw.EXE"
    END IF
    IF PG$ = "M" AND Horiz% > 141 AND Horiz% < 230 AND Vert% > 115 AND Vert% < 131 AND LBTN% THEN
      ' Add.Page
      MouseHide
      Add.Page
    END IF
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 148 AND Vert% < 159 AND LBTN% THEN
      ' Icon Converter Registred Users only
      MouseHide
      OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
        WRITE #1, "\HDMS\ICOCONVT.EXE"
      CLOSE
    SYSTEM
    END IF
    IF Horiz% > 141 AND Horiz% < 230 AND Vert% > 162 AND Vert% < 175 AND LBTN% THEN
      ' PCX Converter Registred Users only
      MouseHide
      OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
        WRITE #1, "\HDMS\PCXCONVT.EXE"
      CLOSE
    SYSTEM
    END IF
    IF RBTN% THEN
      ' Close Menu 2
      MouseHide
      Page.Return
    END IF
ON ERROR GOTO 0
  LOOP
END SUB

SUB MouseCall
  DEF SEG = VARSEG(MOUSEROUTINE%(0))
  ADDR% = VARPTR(MOUSEROUTINE%(0))
  CALL ABSOLUTE(MREG, ADDR%)
  DEF SEG
END SUB

SUB MOUSEGETPRESSINFO (LBTN%, RBTN%, MBTN%, COUNT%, HPosn%, VPosn%)
  IF MouseReady% THEN
    IF (LBTN% OR RBTN% OR MBTN%) <> 0 THEN
      MREG.AX = 5
      IF LBTN% THEN MREG.BX = 0
      IF RBTN% THEN MREG.BX = 1
      IF MBTN% THEN MREG.BX = 2
      MouseCall
      LBTN% = MREG.AX AND 1
      RBTN% = (MREG.AX AND 2) \ 2
      MBTN% = (MREG.AX AND 4) \ 4
      COUNT% = MREG.BX
      HPosn% = MREG.CX
      VPosn% = MREG.DX
    ELSE
      CALL MOUSEGETSTATUS(LBTN%, RBTN%, MBTN%, HPosn%, VPosn%)
      COUNT% = 0
    END IF
  ELSE
    LBTN% = 0: RBTN% = 0: MBTN% = 0
    COUNT% = 0
    HPosn% = -1: VPosn% = -1
  END IF
END SUB

SUB MOUSEGETRELEASEINFO (LBTN%, RBTN%, MBTN%, COUNT%, HPosn%, VPosn%)
  IF MouseReady% THEN
    IF (LBTN% OR RBTN% OR MBTN%) <> 0 THEN
      MREG.AX = 6
      IF LBTN% THEN MREG.BX = 0
      IF RBTN% THEN MREG.BX = 1
      IF MBTN% THEN MREG.BX = 2
      MouseCall
      LBTN% = MREG.AX AND 1
      RBTN% = (MREG.AX AND 2) \ 2
      MBTN% = (MREG.AX AND 4) \ 4
      COUNT% = MREG.BX
      HPosn% = MREG.CX
      VPosn% = MREG.DX
    ELSE
      CALL MOUSEGETSTATUS(LBTN%, RBTN%, MBTN%, HPosn%, VPosn%)
      COUNT% = 0
    END IF
  ELSE
    LBTN% = 0: RBTN% = 0: MBTN% = 0
    COUNT% = 0
    HPosn% = -1: VPosn% = -1
  END IF
END SUB

SUB MOUSEGETSTATUS (LBTN%, RBTN%, MBTN%, HPosn%, VPosn%)
  IF MouseReady% THEN
    MREG.AX = 3
    MouseCall
    LBTN% = MREG.BX AND 1
    RBTN% = (MREG.BX AND 2) \ 2
    MBTN% = (MREG.BX AND 4) \ 4
    HPosn% = MREG.CX
    VPosn% = MREG.DX
  ELSE
    LBTN% = 0: RBTN% = 0: MBTN% = 0
    HPosn% = -1: VPosn% = -1
  END IF
END SUB

SUB MouseHide
  IF MouseReady% THEN
    MREG.AX = 2
    MouseCall
  END IF
END SUB

FUNCTION MouseInit%
  DEF SEG = 0
  SUM% = 0
  FOR I% = &H33 * 4 TO &H33 * 4 + 3
    SUM% = SUM% + PEEK(I%)
  NEXT I%
  IF SUM% = 0 THEN
    MouseInit% = 0
    EXIT FUNCTION
  END IF
  MREG.AX = 0
  MouseCall
  IF MREG.AX = 0 THEN
    MouseInit% = 0
  ELSE
    MouseInit% = MREG.BX
  END IF
END FUNCTION

SUB MOUSEREADCOUNTERS (HCOUNT%, VCOUNT%)
  IF MouseReady% THEN
    MREG.AX = 11
    MouseCall
    HCOUNT% = MREG.CX
    VCOUNT% = MREG.DX
  END IF
END SUB

SUB MOUSESETHORIZRANGE (HMIN%, HMax%)
  IF MouseReady% THEN
    MREG.AX = 7
    MREG.CX = HMIN%
    MREG.DX = HMax%
    MouseCall
  END IF
END SUB

SUB MOUSESETPOSN (HPosn%, VPosn%)
  IF MouseReady% THEN
    MREG.AX = 4
    MREG.CX = HPosn%
    MREG.DX = VPosn%
    MouseCall
  END IF
END SUB

SUB MouseSetUp
  RESTORE MOUSEINT
  DEF SEG = VARSEG(MOUSEROUTINE%(0))
  ADDR% = VARPTR(MOUSEROUTINE%(0))
  FOR I = 0 TO 39
    READ A$
    POKE ADDR% + I, VAL("&H" + A$)
  NEXT I
  IF A$ <> "CB" THEN ERROR 255
  DEF SEG
END SUB

SUB MOUSESETVERTRANGE (VMIN%, VMAHoriz%)
  IF MouseReady% THEN
    MREG.AX = 8
    MREG.CX = VMIN%
    MREG.DX = VMAHoriz%
    MouseCall
  END IF
END SUB

SUB MouseShow
  IF MouseReady% THEN
    MREG.AX = 1
    MouseCall
  END IF
END SUB

SUB NORMAL0
  PSET (PFL + 0, PFT + 0), BGC: DRAW C1$ + P$
END SUB

SUB Page.1
  PG$ = "1": RS$ = "Y"
  CLS : PRINT : COLOR 3

  LINE (50, 50)-(535, 345), 1, BF      'Main Box
  LINE (565, 47)-(620, 95), 4, BF      'Shadow For QBox1
  LINE (570, 50)-(630, 100), 15, BF    'QBox1

' Page Descriptions
CALL Info.For.Pages

' Pages
ON ERROR GOTO 1
  OPEN "\HDMS\PAGE1.SET" FOR INPUT AS #1
   INPUT #1, A$, B$, TTitle$
    IF LEN(TTitle$) > 20 THEN TTitle$ = LEFT$(TTitle$, 20)
  CLOSE
ON ERROR GOTO 0

Show.IconsP1:
  CLOSE
  ReqSize = 70
ON ERROR GOTO 1
  DIM PicP1(1 TO (ReqSize - 1))   AS INTEGER
  DEF SEG = VARSEG(PicP1(1))
   BLOAD "\hdms\art\DvlFace.pad", VARPTR(PicP1(1))
  DEF SEG
  PUT (546, 260), PicP1(1)
  ERASE PicP1
ON ERROR GOTO 0
PGICON$ = "2"
 
  CALL Page.Icon.Info
  Show.Icons.YN

Menu.Bar.Title ' Load Menu Bar

' This is important for faster computers
' Prevents ERROR from returning to Main Screen
  IF Horiz% > 570 AND Horiz% < 630 AND Vert% > 50 AND Vert% < 100 THEN
    SLEEP 1 ' Adjust if needed
  END IF
 
  Get.Mouse.Select

Pg1Resets:
  ON ERROR GOTO 1
  CLOSE : CLS
  Page.1
  ON ERROR GOTO 0
END SUB

SUB Page.2
  CLOSE
  PG$ = "2": RS$ = "Y"
  CLS : PRINT : COLOR 3

  LINE (50, 50)-(535, 345), 1, BF      'Main Box
  LINE (565, 47)-(620, 95), 4, BF      'Shadow For QBox2
  LINE (570, 50)-(630, 100), 15, BF      'QBox2

' Pages
ON ERROR GOTO 1
  OPEN "\HDMS\PAGE2.SET" FOR INPUT AS #1
    INPUT #1, A$, B$, TTitle$
IF LEN(TTitle$) > 20 THEN TTitle$ = LEFT$(TTitle$, 20)
  CLOSE
ON ERROR GOTO 0

Show.IconsP2:
ReqSize = 70
ON ERROR GOTO 1
  DIM PicP2(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(PicP2(1))
   BLOAD "\HDMS\art\owl.pad", VARPTR(PicP2(1))
  DEF SEG
 PUT (545, 280), PicP2(1)
ERASE PicP2

CALL Info.For.Pages

PGICON$ = "3"
CALL Page.Icon.Info

CALL Show.Icons.YN

' Page Descriptions
  Menu.Bar.Title
  Get.Mouse.Select

Pg2Resets:
ON ERROR GOTO 1
CLS : CLOSE
  Page.2
  ON ERROR GOTO 0
END SUB

SUB Page.3
  CLOSE
  PG$ = "3": RS$ = "Y"
  CLS : PRINT : COLOR 3

  LINE (50, 50)-(535, 345), 1, BF      'Main Box
  LINE (565, 47)-(620, 95), 4, BF      'Shadow For QBox3
  LINE (570, 50)-(630, 100), 15, BF      'QBox3

CALL Info.For.Pages

' Pages
ON ERROR GOTO 1
  OPEN "\HDMS\PAGE3.SET" FOR INPUT AS #1
    INPUT #1, A$, B$, TTitle$
IF LEN(TTitle$) > 20 THEN TTitle$ = LEFT$(TTitle$, 20)
  CLOSE
 ON ERROR GOTO 0

Show.IconsP3:
  CLOSE
  ReqSize = 70
ON ERROR GOTO 1

  DIM PicP3(1 TO (ReqSize - 1))   AS INTEGER
     DEF SEG = VARSEG(PicP3(1))
   BLOAD "\HDMS\art\scarcrow.pad", VARPTR(PicP3(1))
  DEF SEG
 PUT (545, 260), PicP3(1)
ERASE PicP3

PGICON$ = "4"
CALL Page.Icon.Info

  Show.Icons.YN

' Page Descriptions
  Menu.Bar.Title
  Get.Mouse.Select

Pg3Resets:
ON ERROR GOTO 1
  CLS : CLOSE
  Page.3
ON ERROR GOTO 0
END SUB

SUB Page.4
  CLOSE
  PG$ = "4": RS$ = "Y"
  CLS : PRINT : COLOR 3

  LINE (50, 50)-(535, 345), 1, BF      'Main Box
  LINE (565, 47)-(620, 95), 4, BF      'Shadow For QBox4
  LINE (570, 50)-(630, 100), 15, BF      'QBox4

CALL Info.For.Pages

' Pages
ON ERROR GOTO 1
 OPEN "\HDMS\PAGE4.SET" FOR INPUT AS #1
  INPUT #1, A$, B$, TTitle$
IF LEN(TTitle$) > 20 THEN TTitle$ = LEFT$(TTitle$, 20)
 CLOSE
ON ERROR GOTO 0

Show.IconsP4:
ON ERROR GOTO 1
ReqSize = 70
  DIM PicP4(1 TO (ReqSize - 1))   AS INTEGER
     DEF SEG = VARSEG(PicP4(1))
   BLOAD "\HDMS\art\witch.pad", VARPTR(PicP4(1))
  DEF SEG
 PUT (545, 260), PicP4(1)
 PAINT (546, 261), 0
ERASE PicP4

PGICON$ = "5"
CALL Page.Icon.Info

  Show.Icons.YN

' Page Descriptions
  Menu.Bar.Title

  Get.Mouse.Select

Pg4Resets:
ON ERROR GOTO 1
  CLS : CLOSE
  Page.4
ON ERROR GOTO 0
END SUB

SUB Page.5
  CLOSE
  PG$ = "5"
  RS$ = "Y"
  CLS : PRINT : COLOR 3

  LINE (50, 50)-(535, 345), 1, BF      'Main Box
  LINE (565, 47)-(620, 95), 4, BF      'Shadow For QBox4
  LINE (570, 50)-(630, 100), 15, BF      'QBox4

CALL Info.For.Pages

' Pages
ON ERROR GOTO 1
  OPEN "\HDMS\PAGE5.SET" FOR INPUT AS #1
    INPUT #1, A$, B$, TTitle$
 IF LEN(TTitle$) > 20 THEN TTitle$ = LEFT$(TTitle$, 20)
 CLOSE
ON ERROR GOTO 0

Show.IconsP5:
ReqSize = 70
ON ERROR GOTO 1
  DIM PicP5(1 TO (ReqSize - 1))   AS INTEGER
     DEF SEG = VARSEG(PicP5(1))
   BLOAD "\HDMS\art\sunflowr.pad", VARPTR(PicP5(1))
  DEF SEG
 PUT (545, 260), PicP5(1)
 ERASE PicP5
ON ERROR GOTO 0

PGICON$ = "6"
CALL Page.Icon.Info

  Show.Icons.YN

' Page Descriptions
  Menu.Bar.Title

  Get.Mouse.Select

Pg5Resets:
ON ERROR GOTO 1
  CLS : CLOSE
  Page.5
ON ERROR GOTO 0
END SUB

SUB Page.Icon.Info
' This section determins whether to load the icon and show it or not.
ON ERROR GOTO 1
  OPEN "\hdms\" + PGICON$ + "Icon1.Set" FOR INPUT AS #1
   INPUT #1, SIcon1$, ICNName1$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon2.Set" FOR INPUT AS #1
   INPUT #1, SIcon2$, ICNName2$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon3.Set" FOR INPUT AS #1
   INPUT #1, SIcon3$, ICNName3$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon4.Set" FOR INPUT AS #1
  INPUT #1, SIcon4$, ICNName4$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon5.Set" FOR INPUT AS #1
  INPUT #1, SIcon5$, ICNName5$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon6.Set" FOR INPUT AS #1
  INPUT #1, SIcon6$, ICNName6$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon7.Set" FOR INPUT AS #1
  INPUT #1, SIcon7$, ICNName7$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon8.Set" FOR INPUT AS #1
  INPUT #1, SIcon8$, ICNName8$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon9.Set" FOR INPUT AS #1
  INPUT #1, SIcon9$, ICNName9$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon10.Set" FOR INPUT AS #1
  INPUT #1, SIcon10$, ICNName10$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon11.Set" FOR INPUT AS #1
  INPUT #1, SIcon11$, ICNName11$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon12.Set" FOR INPUT AS #1
  INPUT #1, SIcon12$, ICNName12$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon13.Set" FOR INPUT AS #1
  INPUT #1, SIcon13$, ICNName13$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon14.Set" FOR INPUT AS #1
  INPUT #1, SIcon14$, ICNName14$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon15.Set" FOR INPUT AS #1
  INPUT #1, SIcon15$, ICNName15$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon16.Set" FOR INPUT AS #1
  INPUT #1, SIcon16$, ICNName16$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon17.Set" FOR INPUT AS #1
  INPUT #1, SIcon17$, ICNName17$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon18.Set" FOR INPUT AS #1
  INPUT #1, SIcon18$, ICNName18$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon19.Set" FOR INPUT AS #1
  INPUT #1, SIcon19$, ICNName19$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon20.Set" FOR INPUT AS #1
  INPUT #1, SIcon20$, ICNName20$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon21.Set" FOR INPUT AS #1
  INPUT #1, SIcon21$, ICNName21$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon22.Set" FOR INPUT AS #1
  INPUT #1, SIcon22$, ICNName22$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon23.Set" FOR INPUT AS #1
  INPUT #1, SIcon23$, ICNName23$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon24.Set" FOR INPUT AS #1
  INPUT #1, SIcon24$, ICNName24$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon25.Set" FOR INPUT AS #1
  INPUT #1, SIcon25$, ICNName25$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon26.Set" FOR INPUT AS #1
  INPUT #1, SIcon26$, ICNName26$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon27.Set" FOR INPUT AS #1
  INPUT #1, SIcon27$, ICNName27$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon28.Set" FOR INPUT AS #1
  INPUT #1, SIcon28$, ICNName28$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon29.Set" FOR INPUT AS #1
  INPUT #1, SIcon29$, ICNName29$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon30.Set" FOR INPUT AS #1
  INPUT #1, SIcon30$, ICNName30$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon31.Set" FOR INPUT AS #1
  INPUT #1, SIcon31$, ICNName31$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon32.Set" FOR INPUT AS #1
  INPUT #1, SIcon32$, ICNName32$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon33.Set" FOR INPUT AS #1
  INPUT #1, SIcon33$, ICNName33$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon34.Set" FOR INPUT AS #1
  INPUT #1, SIcon34$, ICNName34$
  CLOSE
  OPEN "\hdms\" + PGICON$ + "Icon35.Set" FOR INPUT AS #1
  INPUT #1, SIcon35$, ICNName35$
  CLOSE
ON ERROR GOTO 0
END SUB

SUB Page.Return
  DO
    SELECT CASE PG$
      CASE "M"
        RS$ = "Y"
        Main.Screen
      CASE "1"
        CLS : Page.1
      CASE "2"
        CLS : Page.2
      CASE "3"
        CLS : Page.3
      CASE "4"
        CLS : Page.4
      CASE "5"
        CLS : Page.5
      CASE ELSE
        RS$ = "Y"
        Main.Screen
    END SELECT
  LOOP
END SUB

SUB Pages
ON ERROR GOTO 1
CLOSE
 OPEN "\HDMS\Page1.Set" FOR INPUT AS #1
   INPUT #1, Page1$, PageDes1$
  IF LEN(Page1$) > 7 THEN Page1$ = LEFT$(Page1$, 7)
  IF LEN(PageDes1$) > 10 THEN PageDes1$ = LEFT$(PageDes1$, 10)
 CLOSE
  OPEN "\HDMS\Page2.Set" FOR INPUT AS #1
    INPUT #1, Page2$, PageDes2$
   IF LEN(Page2$) > 7 THEN Page2$ = LEFT$(Page2$, 7)
   IF LEN(PageDes2$) > 10 THEN PageDes2$ = LEFT$(PageDes2$, 10)
  CLOSE
  OPEN "\HDMS\Page3.Set" FOR INPUT AS #1
    INPUT #1, Page3$, PageDes3$
   IF LEN(Page3$) > 7 THEN Page3$ = LEFT$(Page3$, 7)
   IF LEN(PageDes3$) > 10 THEN PageDes3$ = LEFT$(PageDes3$, 10)
  CLOSE
  OPEN "\HDMS\Page4.Set" FOR INPUT AS #1
    INPUT #1, Page4$, PageDes4$
   IF LEN(Page4$) > 7 THEN Page4$ = LEFT$(Page4$, 7)
   IF LEN(PageDes4$) > 10 THEN PageDes4$ = LEFT$(PageDes4$, 10)
  CLOSE
  OPEN "\HDMS\Page5.Set" FOR INPUT AS #1
    INPUT #1, Page5$, PageDes5$
   IF LEN(Page5$) > 7 THEN Page5$ = LEFT$(Page5$, 7)
   IF LEN(PageDes5$) > 10 THEN PageDes5$ = LEFT$(PageDes5$, 10)
  CLOSE
ON ERROR GOTO 0

' Page Descriptions
CLOSE
  WORD$ = PageDes1$
   SPACING$ = "L1"
    SIZE$ = "4"
     DOT$ = "Y"
    TRANSLATE
   C1$ = "C15"
  PFT = 65: PFL = 575: NORMAL0
 
  WORD$ = PageDes2$
   SPACING$ = "L1"
    SIZE$ = "4"
     DOT$ = "Y"
    TRANSLATE
   C1$ = "C15"
  PFT = 121: PFL = 575: NORMAL0
 
  WORD$ = PageDes3$
   SPACING$ = "L1"
    SIZE$ = "4"
     DOT$ = "Y"
    TRANSLATE
   C1$ = "C15"
  PFT = 176: PFL = 575: NORMAL0
 
  WORD$ = PageDes4$
   SPACING$ = "L1"
    SIZE$ = "4"
     DOT$ = "Y"
    TRANSLATE
   C1$ = "C15"
  PFT = 230: PFL = 575: NORMAL0
 
  WORD$ = PageDes5$
   SPACING$ = "L1"
    SIZE$ = "4"
     DOT$ = "Y"
    TRANSLATE
   C1$ = "C15"
  PFT = 286: PFL = 575: NORMAL0
END SUB

SUB Properties
  MouseHide
CLS
  OPEN "\HDMS\PageDat.Dat" FOR OUTPUT AS #1
    WRITE #1, PG$
  CLOSE
  OPEN "\HDMS\ICNum.INF" FOR OUTPUT AS #1
    WRITE #1, ICNum$
  CLOSE
  SHELL "\HDMS\Properts.EXE"
  RS$ = "Y"
 Page.Return
END SUB

SUB Rename.Icon
  OPEN "\HDMS\PAGEDAT.DAT" FOR OUTPUT AS #1
    WRITE #1, PG$
  CLOSE #1
  SHELL "\HDMS\RENICON.EXE"
 Page.Return
END SUB

SUB SetUpFiles

  MouseHide

  IF PG$ = "M" THEN NextICN$ = "NextIcnM": GOTO Write.Info
  IF PG$ = "1" THEN NextICN$ = "NextIcn1": GOTO Write.Info
  IF PG$ = "2" THEN NextICN$ = "NextIcn2": GOTO Write.Info
  IF PG$ = "3" THEN NextICN$ = "NextIcn3": GOTO Write.Info
  IF PG$ = "4" THEN NextICN$ = "NextIcn4": GOTO Write.Info
  IF PG$ = "5" THEN NextICN$ = "NextIcn5": GOTO Write.Info

Write.Info:
  OPEN "\HDMS\PageDat.Dat" FOR OUTPUT AS #1
    WRITE #1, PG$
  CLOSE
  IF Icon.Set$ = "True" THEN
    OPEN "\HDMS\" + NextICN$ + ".DAT" FOR OUTPUT AS #1
      WRITE #1, ICNum$
    CLOSE
   GOTO Quick.Skip
  END IF
  IF Icon.Set$ = "False" THEN
    OPEN "\HDMS\" + NextICN$ + ".DAT" FOR INPUT AS #1
      INPUT #1, NICON%
    CLOSE
  END IF
NICON% = NICON% + 1
  IF NICON% < 0 THEN NICON% = 1
  IF NICON% > 35 THEN NICON% = 35
  OPEN "\HDMS\" + NextICN$ + ".DAT" FOR OUTPUT AS #1
    WRITE #1, NICON%
  CLOSE

Quick.Skip:
 SHELL "\HDMS\SetUpFil.EXE"
 Add.Icon
  RS$ = "Y"
 Page.Return
END SUB

SUB Show.Icons.YN
  CLOSE
' Icons
  ReqSize = 570
ON ERROR GOTO 1
IF SIcon1$ = "S" THEN 'If show icon is true then load and display it.
   DIM ICON1(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON1(1))
   BLOAD "\HDMS\icons\" + ICNName1$, VARPTR(ICON1(1))
   DEF SEG
  PUT (60, 57), ICON1(1)
 ERASE ICON1
END IF
IF SIcon2$ = "S" THEN
   DIM ICON2(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON2(2))
   BLOAD "\HDMS\icons\" + ICNName2$, VARPTR(ICON2(2))
   DEF SEG
  PUT (120, 57), ICON2(2)
 ERASE ICON2
END IF
IF SIcon3$ = "S" THEN
    DIM ICON3(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON3(3))
    BLOAD "\HDMS\icons\" + ICNName3$, VARPTR(ICON3(3))
   DEF SEG
  PUT (180, 57), ICON3(3)    'This icon was adjusted to fit screen
 ERASE ICON3
END IF
IF SIcon4$ = "S" THEN
   DIM ICON4(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON4(4))
    BLOAD "\HDMS\icons\" + ICNName4$, VARPTR(ICON4(4))
   DEF SEG
  PUT (240, 57), ICON4(4)
 ERASE ICON4
END IF
IF SIcon5$ = "S" THEN
   DIM ICON5(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON5(5))
     BLOAD "\HDMS\icons\" + ICNName5$, VARPTR(ICON5(5))
    DEF SEG
   PUT (300, 57), ICON5(5)
  ERASE ICON5
END IF
IF SIcon6$ = "S" THEN
  DIM ICON6(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON6(6))
     BLOAD "\HDMS\icons\" + ICNName6$, VARPTR(ICON6(6))
    DEF SEG
   PUT (360, 57), ICON6(6)
  ERASE ICON6
END IF
IF SIcon7$ = "S" THEN
   DIM ICON7(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON7(7))
    BLOAD "\HDMS\icons\" + ICNName7$, VARPTR(ICON7(7))
   DEF SEG
  PUT (420, 57), ICON7(7)
 ERASE ICON7
END IF
IF SIcon8$ = "S" THEN
   DIM ICON8(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON8(8))
    BLOAD "\HDMS\icons\" + ICNName8$, VARPTR(ICON8(8))
   DEF SEG
  PUT (60, 120), ICON8(8)
 ERASE ICON8
END IF
IF SIcon9$ = "S" THEN
   DIM ICON9(1 TO (ReqSize - 1))   AS LONG
     DEF SEG = VARSEG(ICON9(9))
    BLOAD "\HDMS\icons\" + ICNName9$, VARPTR(ICON9(9))
   DEF SEG
  PUT (120, 120), ICON9(9)
 ERASE ICON9
END IF
IF SIcon10$ = "S" THEN
   DIM ICON10(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON10(10))
     BLOAD "\HDMS\icons\" + ICNName10$, VARPTR(ICON10(10))
    DEF SEG
   PUT (180, 120), ICON10(10)
  ERASE ICON10
END IF
IF SIcon11$ = "S" THEN
  DIM ICON11(1 TO (ReqSize - 1))   AS LONG
   DEF SEG = VARSEG(ICON11(11))
    BLOAD "\HDMS\icons\" + ICNName11$, VARPTR(ICON11(11))
   DEF SEG
  PUT (240, 120), ICON11(11)
 ERASE ICON11
END IF
IF SIcon12$ = "S" THEN
  DIM ICON12(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON12(12))
     BLOAD "\HDMS\icons\" + ICNName12$, VARPTR(ICON12(12))
   DEF SEG
  PUT (300, 120), ICON12(12)
 ERASE ICON12
END IF
IF SIcon13$ = "S" THEN
  DIM ICON13(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON13(13))
     BLOAD "\HDMS\icons\" + ICNName13$, VARPTR(ICON13(13))
    DEF SEG
   PUT (360, 120), ICON13(13)
  ERASE ICON13
END IF
IF SIcon14$ = "S" THEN
  DIM ICON14(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON14(14))
     BLOAD "\HDMS\icons\" + ICNName14$, VARPTR(ICON14(14))
    DEF SEG
   PUT (420, 120), ICON14(14)
  ERASE ICON14
END IF
IF SIcon15$ = "S" THEN
  DIM ICON15(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON15(1))
     BLOAD "\HDMS\icons\" + ICNName15$, VARPTR(ICON15(15))
    DEF SEG
   PUT (60, 180), ICON15(15)
  ERASE ICON15
END IF
IF SIcon16$ = "S" THEN
  DIM ICON16(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON16(1))
     BLOAD "\HDMS\icons\" + ICNName16$, VARPTR(ICON16(16))
    DEF SEG
  PUT (118, 180), ICON16(16)
 ERASE ICON16
END IF
IF SIcon17$ = "S" THEN
  DIM ICON17(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON17(1))
     BLOAD "\HDMS\icons\" + ICNName17$, VARPTR(ICON17(17))
    DEF SEG
  PUT (178, 180), ICON17(17)
 ERASE ICON17
END IF
IF SIcon18$ = "S" THEN
  DIM ICON18(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON18(1))
     BLOAD "\HDMS\icons\" + ICNName18$, VARPTR(ICON18(18))
    DEF SEG
   PUT (241, 180), ICON18(18)
  ERASE ICON18
END IF
IF SIcon19$ = "S" THEN
  DIM ICON19(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON19(1))
     BLOAD "\HDMS\icons\" + ICNName19$, VARPTR(ICON19(19))
    DEF SEG
  PUT (304, 180), ICON19(19)
 ERASE ICON19
END IF
IF SIcon20$ = "S" THEN
  DIM ICON20(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON20(1))
     BLOAD "\HDMS\icons\" + ICNName20$, VARPTR(ICON20(20))
    DEF SEG
  PUT (357, 180), ICON20(20)
 ERASE ICON20
END IF
IF SIcon21$ = "S" THEN
  DIM ICON21(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON21(1))
     BLOAD "\HDMS\icons\" + ICNName21$, VARPTR(ICON21(21))
   DEF SEG
  PUT (417, 180), ICON21(21)
 ERASE ICON21
END IF
IF SIcon22$ = "S" THEN
  DIM ICON22(1 TO (ReqSize - 1))   AS LONG
    DEF SEG = VARSEG(ICON22(1))
     BLOAD "\HDMS\icons\" + ICNName22$, VARPTR(ICON22(22))
    DEF SEG
  PUT (60, 240), ICON22(22)
 ERASE ICON22
END IF
IF SIcon23$ = "S" THEN
  DIM ICON23(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON23(1))
     BLOAD "\HDMS\icons\" + ICNName23$, VARPTR(ICON23(23))
    DEF SEG
  PUT (120, 240), ICON23(23)
 ERASE ICON23
END IF
IF SIcon24$ = "S" THEN
  DIM ICON24(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON24(1))
     BLOAD "\HDMS\icons\" + ICNName24$, VARPTR(ICON24(24))
    DEF SEG
  PUT (180, 240), ICON24(24)
 ERASE ICON24
END IF
IF SIcon25$ = "S" THEN
  DIM ICON25(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON25(1))
     BLOAD "\HDMS\icons\" + ICNName25$, VARPTR(ICON25(25))
    DEF SEG
  PUT (240, 240), ICON25(25)
 ERASE ICON25
END IF
IF SIcon26$ = "S" THEN
  DIM ICON26(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON26(1))
     BLOAD "\HDMS\icons\" + ICNName26$, VARPTR(ICON26(26))
    DEF SEG
  PUT (300, 240), ICON26(26)
 ERASE ICON26
END IF
IF SIcon27$ = "S" THEN
  DIM ICON27(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON27(1))
     BLOAD "\HDMS\icons\" + ICNName27$, VARPTR(ICON27(27))
   DEF SEG
  PUT (360, 240), ICON27(27)
 ERASE ICON27
END IF
IF SIcon28$ = "S" THEN
  DIM ICON28(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON28(1))
     BLOAD "\HDMS\icons\" + ICNName28$, VARPTR(ICON28(28))
    DEF SEG
  PUT (420, 240), ICON28(28)
 ERASE ICON28
END IF
IF SIcon29$ = "S" THEN
  DIM ICON29(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON29(1))
     BLOAD "\HDMS\icons\" + ICNName29$, VARPTR(ICON29(29))
    DEF SEG
  PUT (60, 300), ICON29(29)
 ERASE ICON29
END IF
IF SIcon30$ = "S" THEN
  DIM ICON30(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON30(1))
     BLOAD "\HDMS\icons\" + ICNName30$, VARPTR(ICON30(30))
   DEF SEG
  PUT (120, 300), ICON30(30)
 ERASE ICON30
END IF
IF SIcon31$ = "S" THEN
  DIM ICON31(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON31(1))
     BLOAD "\HDMS\icons\" + ICNName31$, VARPTR(ICON31(31))
    DEF SEG
  PUT (180, 300), ICON31(31)
 ERASE ICON31
END IF
IF SIcon32$ = "S" THEN
  DIM ICON32(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON32(1))
     BLOAD "\HDMS\icons\" + ICNName32$, VARPTR(ICON32(32))
    DEF SEG
  PUT (240, 300), ICON32(32)
 ERASE ICON32
END IF
IF SIcon33$ = "S" THEN
  DIM ICON33(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON33(1))
     BLOAD "\HDMS\icons\" + ICNName33$, VARPTR(ICON33(33))
    DEF SEG
  PUT (300, 300), ICON33(33)
 ERASE ICON33
END IF
IF SIcon34$ = "S" THEN
  DIM ICON34(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON34(1))
     BLOAD "\HDMS\icons\" + ICNName34$, VARPTR(ICON34(34))
    DEF SEG
  PUT (360, 300), ICON34(34)
 ERASE ICON34
END IF
IF SIcon35$ = "S" THEN
  DIM ICON35(1 TO (ReqSize - 1))   AS INTEGER
    DEF SEG = VARSEG(ICON35(1))
     BLOAD "\HDMS\icons\" + ICNName35$, VARPTR(ICON35(35))
    DEF SEG
  PUT (420, 300), ICON35(35)
 ERASE ICON35
END IF
ON ERROR GOTO 0
Show.Icons.YN.File.Desc
END SUB

SUB Show.Icons.YN.File.Desc
' File Description
ON ERROR GOTO 1
  IF SIcon1$ = "S" THEN
    IF LEN(FileDes1$) > 8 THEN FileDes1$ = LEFT$(FileDes1$, 8)
    WORD$ = FileDes1$
    GOSUB Info.Data
    PFT = 100: PFL = 60: CALL NORMAL0
  END IF
  IF SIcon2$ = "S" THEN
    IF LEN(FileDes2$) > 8 THEN FileDes2$ = LEFT$(FileDes2$, 8)
    WORD$ = FileDes2$
    GOSUB Info.Data
    PFT = 100: PFL = 120: CALL NORMAL0
  END IF
  IF SIcon3$ = "S" THEN
    IF LEN(FileDes3$) > 8 THEN FileDes3$ = LEFT$(FileDes3$, 8)
    WORD$ = FileDes3$
    GOSUB Info.Data
    PFT = 100: PFL = 180: CALL NORMAL0
  END IF
  IF SIcon4$ = "S" THEN
    IF LEN(FileDes4$) > 8 THEN FileDes4$ = LEFT$(FileDes4$, 8)
    WORD$ = FileDes4$
    GOSUB Info.Data
    DOT$ = "Y"
    PFT = 100: PFL = 240: CALL NORMAL0
  END IF
  IF SIcon5$ = "S" THEN
    IF LEN(FileDes5$) > 8 THEN FileDes5$ = LEFT$(FileDes5$, 8)
    WORD$ = FileDes5$
    GOSUB Info.Data
    PFT = 100: PFL = 300: CALL NORMAL0
  END IF
  IF SIcon6$ = "S" THEN
    IF LEN(FileDes6$) > 8 THEN FileDes6$ = LEFT$(FileDes6$, 8)
    WORD$ = FileDes6$
    GOSUB Info.Data
    PFT = 100: PFL = 360: CALL NORMAL0
  END IF
  IF SIcon7$ = "S" THEN
    IF LEN(FileDes7$) > 8 THEN FileDes7$ = LEFT$(FileDes7$, 8)
    WORD$ = FileDes7$
    GOSUB Info.Data
    PFT = 100: PFL = 420: CALL NORMAL0
  END IF
  IF SIcon8$ = "S" THEN
    IF LEN(FileDes8$) > 8 THEN FileDes8$ = LEFT$(FileDes8$, 8)
    WORD$ = FileDes8$
    GOSUB Info.Data
    PFT = 160: PFL = 60: NORMAL0
  END IF
  IF SIcon9$ = "S" THEN
    IF LEN(FileDes9$) > 8 THEN FileDes9$ = LEFT$(FileDes9$, 8)
    WORD$ = FileDes9$
    GOSUB Info.Data
    PFT = 160: PFL = 120: NORMAL0
  END IF
  IF SIcon10$ = "S" THEN
    IF LEN(FileDes10$) > 8 THEN FileDes10$ = LEFT$(FileDes10$, 8)
    WORD$ = FileDes10$
    GOSUB Info.Data
    PFT = 160: PFL = 180: NORMAL0
  END IF
  IF SIcon11$ = "S" THEN
    IF LEN(FileDes11$) > 8 THEN FileDes11$ = LEFT$(FileDes11$, 8)
    WORD$ = FileDes11$
    GOSUB Info.Data
    PFT = 160: PFL = 240: NORMAL0
  END IF
  IF SIcon12$ = "S" THEN
    IF LEN(FileDes12$) > 8 THEN FileDes12$ = LEFT$(FileDes12$, 8)
    WORD$ = FileDes12$
    GOSUB Info.Data
    PFT = 160: PFL = 300: NORMAL0
  END IF
  IF SIcon13$ = "S" THEN
    IF LEN(FileDes13$) > 8 THEN FileDes13$ = LEFT$(FileDes13$, 8)
    WORD$ = FileDes13$
    GOSUB Info.Data
    PFT = 160: PFL = 360: NORMAL0
  END IF
  IF SIcon14$ = "S" THEN
    IF LEN(FileDes14$) > 8 THEN FileDes14$ = LEFT$(FileDes14$, 8)
    WORD$ = FileDes14$
    GOSUB Info.Data
    PFT = 160: PFL = 423: NORMAL0
  END IF
  IF SIcon15$ = "S" THEN
    IF LEN(FileDes15$) > 8 THEN FileDes15$ = LEFT$(FileDes15$, 8)
    WORD$ = FileDes15$
    GOSUB Info.Data
    PFT = 220: PFL = 60: NORMAL0
  END IF
  IF SIcon16$ = "S" THEN
    IF LEN(FileDes16$) > 8 THEN FileDes16$ = LEFT$(FileDes16$, 8)
    WORD$ = FileDes16$
    GOSUB Info.Data
    PFT = 220: PFL = 120: NORMAL0
  END IF
  IF SIcon17$ = "S" THEN
    IF LEN(FileDes17$) > 8 THEN FileDes17$ = LEFT$(FileDes17$, 8)
    WORD$ = FileDes17$
    GOSUB Info.Data
    PFT = 220: PFL = 180: NORMAL0
  END IF
  IF SIcon18$ = "S" THEN
    IF LEN(FileDes18$) > 8 THEN FileDes18$ = LEFT$(FileDes18$, 8)
    WORD$ = FileDes18$
    GOSUB Info.Data
    PFT = 220: PFL = 240: NORMAL0
  END IF
  IF SIcon19$ = "S" THEN
    IF LEN(FileDes19$) > 8 THEN FileDes19$ = LEFT$(FileDes19$, 8)
    WORD$ = FileDes19$
    GOSUB Info.Data
    PFT = 220: PFL = 300: NORMAL0
  END IF
  IF SIcon20$ = "S" THEN
    IF LEN(FileDes20$) > 8 THEN FileDes20$ = LEFT$(FileDes20$, 8)
    WORD$ = FileDes20$
    GOSUB Info.Data
    PFT = 220: PFL = 360: NORMAL0
  END IF
  IF SIcon21$ = "S" THEN
    IF LEN(FileDes21$) > 8 THEN FileDes21$ = LEFT$(FileDes21$, 8)
    WORD$ = FileDes21$
    GOSUB Info.Data
    PFT = 220: PFL = 420: NORMAL0
  END IF
  IF SIcon22$ = "S" THEN
    IF LEN(FileDes22$) > 8 THEN FileDes22$ = LEFT$(FileDes22$, 8)
    WORD$ = FileDes22$
    GOSUB Info.Data
    PFT = 280: PFL = 60: NORMAL0
  END IF
  IF SIcon23$ = "S" THEN
    IF LEN(FileDes23$) > 8 THEN FileDes23$ = LEFT$(FileDes23$, 8)
    WORD$ = FileDes23$
    GOSUB Info.Data
    PFT = 280: PFL = 120: NORMAL0
  END IF
  IF SIcon24$ = "S" THEN
    IF LEN(FileDes24$) > 8 THEN FileDes24$ = LEFT$(FileDes24$, 8)
    WORD$ = FileDes24$
    GOSUB Info.Data
    PFT = 280: PFL = 180: NORMAL0
  END IF
  IF SIcon25$ = "S" THEN
    IF LEN(FileDes25$) > 8 THEN FileDes25$ = LEFT$(FileDes25$, 8)
    WORD$ = FileDes25$
    GOSUB Info.Data
    PFT = 280: PFL = 240: NORMAL0
  END IF
  IF SIcon26$ = "S" THEN
    IF LEN(FileDes26$) > 8 THEN FileDes26$ = LEFT$(FileDes26$, 8)
    WORD$ = FileDes26$
    GOSUB Info.Data
    PFT = 280: PFL = 300: NORMAL0
  END IF
  IF SIcon27$ = "S" THEN
    IF LEN(FileDes27$) > 8 THEN FileDes27$ = LEFT$(FileDes27$, 8)
    WORD$ = FileDes27$
    GOSUB Info.Data
    PFT = 280: PFL = 360: NORMAL0
  END IF
  IF SIcon28$ = "S" THEN
    IF LEN(FileDes28$) > 8 THEN FileDes28$ = LEFT$(FileDes28$, 8)
    WORD$ = FileDes28$
    GOSUB Info.Data
    PFT = 280: PFL = 420: NORMAL0
  END IF
  IF SIcon29$ = "S" THEN
    IF LEN(FileDes29$) > 8 THEN FileDes29$ = LEFT$(FileDes29$, 8)
    WORD$ = FileDes29$
    GOSUB Info.Data
    PFT = 340: PFL = 60: NORMAL0
  END IF
  IF SIcon30$ = "S" THEN
    IF LEN(FileDes30$) > 8 THEN FileDes30$ = LEFT$(FileDes30$, 8)
    WORD$ = FileDes30$
    GOSUB Info.Data
    PFT = 340: PFL = 120: NORMAL0
  END IF
  IF SIcon31$ = "S" THEN
    IF LEN(FileDes31$) > 8 THEN FileDes31$ = LEFT$(FileDes31$, 8)
    WORD$ = FileDes31$
    GOSUB Info.Data
    PFT = 340: PFL = 180: NORMAL0
  END IF
  IF SIcon32$ = "S" THEN
    IF LEN(FileDes32$) > 8 THEN FileDes32$ = LEFT$(FileDes32$, 8)
    WORD$ = FileDes32$
    GOSUB Info.Data
    PFT = 340: PFL = 240: NORMAL0
  END IF
  IF SIcon33$ = "S" THEN
    IF LEN(FileDes33$) > 8 THEN FileDes33$ = LEFT$(FileDes33$, 8)
    WORD$ = FileDes33$
    GOSUB Info.Data
    PFT = 340: PFL = 300: NORMAL0
  END IF
  IF SIcon34$ = "S" THEN
    IF LEN(FileDes34$) > 8 THEN FileDes34$ = LEFT$(FileDes34$, 8)
    WORD$ = FileDes34$
    GOSUB Info.Data
    PFT = 340: PFL = 360: NORMAL0
  END IF
  IF SIcon35$ = "S" THEN
    IF LEN(FileDes35$) > 8 THEN FileDes35$ = LEFT$(FileDes35$, 8)
    WORD$ = FileDes35$
    GOSUB Info.Data
    PFT = 340: PFL = 420: NORMAL0
  END IF
Info.Data:
  SPACING$ = "L1"
  SIZE$ = "4"
  C1$ = "C15"
  DOT$ = "Y"
  CALL TRANSLATE
RETURN
ON ERROR GOTO 0
END SUB

SUB TRANSLATE
  SPACING$ = "B" + UCASE$(SPACING$)
  SIZE$ = "S" + UCASE$(SIZE$)
  P$(105) = "BR0BD1U6BU2BD7BR4"   'i
  P$(106) = "BR1BD1U6BU2BD7D3G1L2BU4BR8"   'j
  IF DOT$ = "Y" THEN P$(105) = "BR0BD1U6BU1U1BD7BR4"   'Dot over i.
  IF DOT$ = "Y" THEN P$(106) = "BR1BD1U6BU1U1BD7D3G1L2BU4BR8"   'Dot over j.
  P$ = SIZE$
  FOR J = 1 TO LEN(WORD$)
    P$ = P$ + P$(ASC(MID$(WORD$, J, 1))) + SPACING$
  NEXT J
END SUB

SUB Write.File.Loading
ON ERROR GOTO 1
' Return Page Info
  OPEN "\HDMS\Back.Dat" FOR OUTPUT AS #1 'Return To Page Info File
   WRITE #1, PG$, "SECOND"
  CLOSE

' Write File
OPEN "\HDMS\SllFile.Lod" FOR OUTPUT AS #1
  WRITE #1, F$
SYSTEM
ON ERROR GOTO 0
END SUB

