home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 199.img / HYPE4.ZIP / SETVT.HP < prev    next >
Text File  |  1990-05-08  |  11KB  |  421 lines

  1. ; setvt.hp -- HyperACCESS/5, VT52,100,200,320 Emulator setup script
  2. ;
  3. ;    $Revision:   1.0  $
  4. ;    $Date:   13 Jul 1989 12:46:18  $
  5. ;
  6. ;
  7. ;
  8. ;
  9.  
  10.   option("temporary settings",yes)
  11.   option("ignore case", yes)
  12.   set flag(F(3),false)                              ;initialize VT52 flag
  13.   cursor save()
  14.   position(1,1)
  15.   save screen(24,80)
  16.   setting("foreground",11)
  17.   setting("background",0)
  18.   wipe screen()
  19.   position(2,34)
  20.   prompt("HyperACCESS//5")
  21.   position(3,29)
  22.   prompt("Terminal Emulation Setup")
  23.   position(5,29)
  24.   prompt("VT52, VT100, VT200, VT320")
  25.  
  26. label(10)
  27.   set flag(F(0),false)
  28.   branch subroutine(100)                            ;display main menu
  29.  
  30. label(15)
  31.   set string(S(0),"")
  32.   wait key(S(0),200)
  33.   length("/S(0)",I(0))
  34.   ifnot equal(I(0),1) branch(16)
  35.   if string match(S(0),"D") branch subroutine(200)  ;terminal display options
  36.   if flag(F(0)) branch(10)
  37.   if string match(S(0),"T") branch subroutine(250)  ;terminal mode options
  38.   if flag(F(0)) branch(10)
  39.   if string match(S(0),"C") branch subroutine(280)  ;set tabs
  40.   if flag(F(0)) branch(10)
  41.   if string match(S(0),"A") branch subroutine(290)  ;set application keys
  42.   if flag(F(0)) branch(10)
  43.   if string match(S(0),"Q") branch (350)            ;exit setup
  44. label(16)
  45.   prompt("/x07")                                    ;Beep on error and return
  46.   branch(15)
  47.  
  48. label(100)                  ;Main menu display
  49.   branch subroutine(110)
  50.   position(7,10)
  51.   draw box(8,62)
  52.   position(8,12)
  53.   setting("foreground",14)
  54.   prompt("D")
  55.   position(9,12)
  56.   prompt("T")
  57.   position(10,12)
  58.   prompt("C")
  59.   position(11,12)
  60.   prompt("A")
  61.   position(13,12)
  62.   prompt("Q")
  63.   setting("foreground",11)
  64.   position(8,13)
  65.   prompt("isplay options")
  66.   position(9,13)
  67.   prompt("erminal options")
  68.   position(10,13)
  69.   prompt("lear tabs")
  70.   position(11,13)
  71.   prompt("pplication keys")
  72.   position(13,13)
  73.   prompt("uit setup")
  74.   setting("foreground",15)
  75.   position(8,29)
  76.   prompt("-- select terminal display options")
  77.   position(9,29)
  78.   prompt("-- select terminal mode")
  79.   position(10,29)
  80.   prompt("-- clear tabs settings")
  81.   position(11,29)
  82.   prompt("-- select terminal application options")
  83.   position(13,29)
  84.   prompt("-- exit this setup using current settings")
  85.   setting("foreground",11)
  86.   position(17,17)
  87.   prompt("Press the first letter of the option to change")
  88.   position(17,15)
  89.   return()
  90.  
  91. label(110)                    ;Subroutine to clear partial screen
  92.   position(6,1)
  93.   wipe screen(19,80)
  94.   setting("foreground",11)
  95.   return()
  96.  
  97. label(200)                    ;Display options menu
  98.   branch subroutine(110)
  99.   set flag(F(1),false)
  100.   position(7,34)
  101.   prompt("Display options")
  102.   position(8,26)
  103.   draw box(9,30)
  104.   setting("foreground",14)
  105.   position(9,28)
  106.   prompt("8")
  107.   position(10,28)
  108.   prompt("1")
  109.   position(12,28)
  110.   prompt("D")
  111.   position(13,28)
  112.   prompt("N")
  113.   position(15,28)
  114.   prompt("R")
  115.   setting("foreground",11)
  116.   position(9,29)
  117.   prompt("0 column width (default)")
  118.   position(10,29)
  119.   prompt("32 column width")
  120.   position(12,29)
  121.   prompt("isplay cursor (default)")
  122.   position(13,29)
  123.   prompt("o cursor displayed")
  124.   position(15,29)
  125.   prompt("eturn to previous menu")
  126.   position(18,21)
  127.   prompt("Press the first letter of the option to set")
  128. label(205)
  129.   set string(S(0),"")
  130.   set flag(F(1),false)
  131.   position(18,19)
  132.   wait key(S(0),200)
  133.   length("/S(0)",I(0))
  134.   ifnot equal(I(0),1) branch(206)
  135.   if string match(S(0),"8") branch subroutine(207)
  136.   if flag(F(1)) branch(200)
  137.   if string match(S(0),"1") branch subroutine(209)
  138.   if flag(F(1)) branch(200)
  139.   if string match(S(0),"D") branch subroutine(211)
  140.   if flag(F(1)) branch(200)
  141.   if string match(S(0),"N") branch subroutine(213)
  142.   if flag(F(1)) branch(200)
  143.   if string match(S(0),"R") branch(219)
  144. label(206)
  145.   prompt("/x07")        ;Beep on error and return
  146.   branch(205)
  147. label(207)
  148.   prompt("/x1B[?3l")    ;Set 80 column width
  149.   set flag(F(1),true)
  150.   branch subroutine(330)
  151.   return()
  152. label(209)
  153.   prompt("/x1B[?3h")    ;Set 132 column width
  154.   set flag(F(1),true)
  155.   branch subroutine(330)
  156.   return()
  157. label(211)
  158.   prompt("/x1B[?25h")   ;Set display cursor
  159.   set flag(F(1),true)
  160.   return()
  161. label(213)
  162.   prompt("/x1B[?25l")   ;Set hide cursor
  163.   set flag(F(1),true)
  164.   return()
  165. label(219)              ;Return to main menu
  166.   set flag(F(0),true)
  167.   return()
  168.  
  169. label(250)                  ;Terminal options menu
  170.   branch subroutine(110)
  171.   position(7,34)
  172.   prompt("Terminal options")
  173.   position(8,25)
  174.   draw box(10,35)
  175.   setting("foreground",14)
  176.   position(9,27)
  177.   prompt("1")
  178.   position(10,27)
  179.   prompt("2")
  180.   position(11,27)
  181.   prompt("3")
  182.   position(12,27)
  183.   prompt("4")
  184.   position(13,27)
  185.   prompt("5")
  186.   position(14,27)
  187.   prompt("6")
  188.   position(16,27)
  189.   prompt("R")
  190.   setting("foreground",11)
  191.   position(9,29)
  192.   prompt("-- VT52 mode")
  193.   position(10,29)
  194.   prompt("-- VT100 mode")
  195.   position(11,29)
  196.   prompt("-- VT200 mode, 7-bit controls")
  197.   position(12,29)
  198.   prompt("-- VT200 mode, 8-bit controls")
  199.   position(13,29)
  200.   prompt("-- VT320 mode, 7-bit controls")
  201.   position(14,29)
  202.   prompt("-- VT320 mode, 8-bit controls")
  203.   position(16,28)
  204.   prompt("eturn to previous menu")
  205.   setting("foreground",11)
  206.   position(19,20)
  207.   prompt("Press 1 through 6, or R from the options above")
  208. label(255)
  209.   set string(S(0),"")
  210.   position(19,18)
  211.   wait key(S(0),200)
  212.   length("/S(0)",I(0))
  213.   ifnot equal(I(0),1) branch(256)
  214.   if string match(S(0),"1") branch(259)
  215.   if string match(S(0),"2") branch(261)
  216.   if string match(S(0),"3") branch(267)
  217.   if string match(S(0),"4") branch(269)
  218.   if string match(S(0),"5") branch(267)
  219.   if string match(S(0),"6") branch(269)
  220.   if string match(S(0),"R") branch(271)
  221. label(256)
  222.   prompt("/x07")          ;Beep on error and return
  223.   branch(255)
  224. label(259)
  225.   set flag(F(3),true)     ;Set VT52 mode
  226.   branch(271)
  227. label(261)
  228.   prompt("/x1B[61/"p")    ;Set VT100 mode
  229.   branch(271)
  230. label(267)
  231.   prompt("/x1B[63;1/"p")  ;Set VT200,320 mode, 7-bit
  232.   branch(271)
  233. label(269)
  234.   prompt("/x1B[62;1/"p")  ;Set Vt200,320 mode, 8-bit
  235. label(271)
  236.   set flag(F(0),true)
  237.   return()
  238.  
  239. label(280)                      ;Set tabs menu
  240.   branch subroutine(110)
  241.   position(7,37)
  242.   prompt("Set tabs")
  243.   position(8,27)
  244.   draw box(4,29)
  245.   setting("foreground",14)
  246.   position(9,29)
  247.   prompt("C")
  248.   position(10,29)
  249.   prompt("R")
  250.   setting("foreground",11)
  251.   position(9,30)
  252.   prompt("lear tab settings")
  253.   position(10,30)
  254.   prompt("eturn to previous menu")
  255.   position(13,21)
  256.   prompt("Press the first letter of the option to set")
  257. label(282)
  258.   set string(S(0),"")
  259.   position(13,19)
  260.   wait key(S(0),200)
  261.   length("/S(0)",I(0))
  262.   ifnot equal(I(0),1) branch(283)
  263.   if string match(S(0),"C") branch(284)
  264.   if string match(S(0),"R") branch(288)
  265. label(283)
  266.   prompt("/x07")          ;Beep on error and return
  267.   branch(282)
  268. label(284)
  269.   prompt("/x1B[3g")       ;Clear all tab settings
  270.   branch(282)
  271. label(288)
  272.   set flag(F(0),true)
  273.   return()
  274.  
  275. label(290)                      ;Application keys menu
  276.   branch subroutine(110)
  277.   position(6,33)
  278.   prompt("Application keys")
  279.   position(7,21)
  280.   draw box(17,41)
  281.   setting("foreground",14)
  282.   position(8,23)
  283.   prompt("U")
  284.   position(9,23)
  285.   prompt("L")
  286.   position(11,23)
  287.   prompt("M")
  288.   position(12,23)
  289.   prompt("N")
  290.   position(14,23)
  291.   prompt("1")
  292.   position(15,23)
  293.   prompt("2")
  294.   position(16,23)
  295.   prompt("3")
  296.   position(17,23)
  297.   prompt("4")
  298.   position(19,23)
  299.   prompt("S")
  300.   position(20,23)
  301.   prompt("O")
  302.   position(22,23)
  303.   prompt("R")
  304.   setting("foreground",11)
  305.   position(8,24)
  306.   prompt("nlock user defined keys (default)")
  307.   position(9,24)
  308.   prompt("ock user defined keys")
  309.   position(11,24)
  310.   prompt("ultinational char set mode (default)")
  311.   position(12,24)
  312.   prompt("ational char set mode")
  313.   position(14,25)
  314.   prompt("- Cursor keys normal (default)")
  315.   position(15,25)
  316.   prompt("- Cursor keys, application")
  317.   position(16,25)
  318.   prompt("- Keypad numeric (default)")
  319.   position(17,25)
  320.   prompt("- Keypad, application")
  321.   position(19,24)
  322.   prompt("end both CR & LF with ENTER (default)")
  323.   position(20,24)
  324.   prompt("nly send CR with ENTER")
  325.   position(22,24)
  326.   prompt("eturn to previous menu")
  327.   position(24,20)
  328.   prompt("Press the first letter of the option to set")
  329. label(292)
  330.   set string(S(0),"")
  331.   set flag(F(1),false)
  332.   position(24,18)
  333.   wait key(S(0),200)
  334.   length("/S(0)",I(0))
  335.   ifnot equal(I(0),1) branch(293)
  336.   if string match(S(0),"U") branch subroutine(294)
  337.   if flag(F(1)) branch(292)
  338.   if string match(S(0),"L") branch subroutine(296)
  339.   if flag(F(1)) branch(292)
  340.   if string match(S(0),"M") branch subroutine(298)
  341.   if flag(F(1)) branch(292)
  342.   if string match(S(0),"N") branch subroutine(300)
  343.   if flag(F(1)) branch(292)
  344.   if string match(S(0),"1") branch subroutine(302)
  345.   if flag(F(1)) branch(292)
  346.   if string match(S(0),"2") branch subroutine(304)
  347.   if flag(F(1)) branch(292)
  348.   if string match(S(0),"3") branch subroutine(306)
  349.   if flag(F(1)) branch(292)
  350.   if string match(S(0),"4") branch subroutine(308)
  351.   if flag(F(1)) branch(292)
  352.   if string match(S(0),"S") branch subroutine(310)
  353.   if flag(F(1)) branch(292)
  354.   if string match(S(0),"O") branch subroutine(312)
  355.   if flag(F(1)) branch(292)
  356.   if string match(S(0),"R") branch(320)
  357. label(293)
  358.   prompt("/x07")        ;Beep on error
  359.   branch(292)
  360. label(294)
  361.   prompt("/x1B[2l")     ;Unlock user defined keys
  362.   set flag(F(1),true)
  363.   return()
  364. label(296)
  365.   prompt("/x1B[2h")     ;Lock user defined keys
  366.   set flag(F(1),true)
  367.   return()
  368. label(298)
  369.   prompt("/x1B[?42l")   ;Set multinational character set mode
  370.   set flag(F(1),true)
  371.   return()
  372. label(300)
  373.   prompt("/x1B[?42h")   ;Set national character set mode
  374.   set flag(F(1),true)
  375.   return()
  376. label(302)
  377.   prompt("/x1B[?1l")    ;Set cursor keys normal
  378.   set flag(F(1),true)
  379.   return()
  380. label(304)
  381.   prompt("/x1B[?1h")    ;Set cursor keys application
  382.   set flag(F(1),true)
  383.   return()
  384. label(306)
  385.   prompt("/x1B>")       ;Set numeric keypad
  386.   set flag(F(1),true)
  387.   return()
  388. label(308)
  389.   prompt("/x1B=")       ;Set application keypad
  390.   set flag(F(1),true)
  391.   return()
  392. label(310)
  393.   prompt("/x1B[20l")    ;Send both CR & LF as new line
  394.   set flag(F(1),true)
  395.   return()
  396. label(312)
  397.   prompt("/x1B[20h")    ;Send only CR as new line
  398.   set flag(F(1),true)
  399.   return()
  400. label(320)
  401.   set flag(F(0),true)   ;Return to main menu
  402.   return()
  403.  
  404. label(330)
  405.   position(2,34)
  406.   prompt("HyperACCESS//5")
  407.   position(3,29)
  408.   prompt("Terminal Emulation Setup")
  409.   position(5,29)
  410.   prompt("VT52, VT100, VT200, VT320")
  411.   return()
  412.  
  413. label(350)                              ;Exit the VT's setup script
  414.   if flag(F(3)) prompt("/x1B[?2l")      ;Set VT52 mode if selected
  415.   wipe screen()
  416.   position(1,1)
  417.   restore screen()
  418.   cursor restore()
  419.  
  420.   end()
  421.