! SET925.BAS - little tricks for the Televideo 925
! a never ending saga
! March 21, 1983 (1st day of Spring) ske

map1 dummy,s,1
map1 choice,f
map1 ampm,s,1,"A"
map1 hour$,s,2
map1 minute$,s,2
map1 zero,s,2,"#Z"

? tab(-1,0);

call BORDER

the'top:
       choice = 0
       ? tab(5,30); "Televideo 925 setup"
       ? tab(8,15); "1. Turn on annoying click"
       ? tab(9,15); "2. Turn off annoying click"
       ? tab(10,15); "3. Make the background black"
       ? tab(11,15); "4. Make the background green"
       ? tab(12,15); "5. Set the terminal clock"
       ? tab(13,15); "6. Mess with the cursor (cursee?)"
       ? tab(18,15); "0 or RETURN for Exit"
       ? tab(21,15);
       input line "--> ", choice
       on choice call click'on, click'off, back'black, back'green, clock, &
         cursor
       if choice = 0 &
           then &
               goto quit
       call clear'window
       goto the'top

click'on:
       call clear'window
       ? chr(27); ">"
       ? tab(12,30); "keyboard click switched on"
       call pause
       return

click'off:
       call clear'window
       ? chr(27);"<"
       ? tab(12,30); "keyboard click switched off"
       call pause
       return

cursor:
       cursor'type = 0
       call clear'window
       ? tab(8,20) "Would you like"
       ? tab(10,20) "1. Blinking block"
       ? tab(11,20) "2. Steady block"
       ? tab(12,20) "3. Blinking underline"
       ? tab(13,20) "4. Steady underline"
       ? tab(17,20);
       input "(1-4) or RETURN to exit--> ", cursor'type
       if cursor'type # 0 &
            then &
               on cursor'type call block, slock, bline, sline :&
               goto cursor
       return


quit:
       call clear'window
       call NO'BORDER
       ? tab(22,36); "Exit"
       end


pause:
       ? tab(21,15);
       input line "--> ", dummy
       ? tab(21,15); space(50);
       return

clear'window:
       for n = 7 to 22
           ? tab(n,10); space(50);
       next n
       return

back'black:
       ! set back & squint yer eyes fer this one!
       ? chr(27); "d";
       return

back'green:
       ? chr(27); "b";
       return

clock:
       time'is'now = time
       hours = int(time'is'now/3600)
       minutes = int(time'is'now/60) - (hours * 60)
       chop'off'another'day:
           if hours > 24 &
               then &
                   hours = hours - 24 :&
                   goto chop'off'another'day
       if hours => 12 &
           then &
               hours = hours - 12 :&
               ampm = "P"
       hour$ = hours using zero
       minute$ = minutes using zero
       ? chr(27); " 1"; ampm; hour$; minute$
       call clear'window
       ? tab(12,23);
       ? "terminal clock set to "hour$;":";minute$;" "ampm;"M"
       call pause
       return


block:
       ? chr(27); ".1"
       call clear'window
       ? tab(12,20); "How's this? ";
       call pause
       return

slock:
       ? chr(27); ".2"
       call clear'window
       ? tab(12,20); "How's this? ";
       call pause
       return

bline:
       ? chr(27); ".3"
       call clear'window
       ? tab(12,20); "How's this? ";
       call pause
       return

sline:
       ? chr(27); ".4"
       call clear'window
       ? tab(12,20); "How's this? ";
       call pause
       return

++include BORDER
++include NOBRDR