home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-24 | 39.2 KB | 1,056 lines |
-
- POPMAX!
- Interactive Ansi menus for Maximus BBS
-
-
- {:setup} -- Main Setup routines * Make sure to answer questions below *
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-
- Active BBS Port
- ~~~~~~~~~~~~~~~
- {setv active,4} <--------+ What port is your modem on?
- | Set this to your active BBS port number
-
- Loocked Baud Rate
- ~~~~~~~~~~~~~~~~~
- {setv locked,38400} <-----| What is your locked baud rate?
- | Set this to your locked baud rate.
- | If you have a 2400 baud or lower speed modem
- | this option should be set to 0. (0=disabled)
-
-
- Inactive Port
- ~~~~~~~~~~~~~
- {setv inact,2} <--------+ Which port is inactive on your system?
- | Set this to a number of an inactive port
- | on your system. This may be
- | any port on your system (1-4) that does not
- | have a modem hooked-up to it. ANSI sequences
- | will `bleed' on local display at high speeds.
- | Setting this to an inactive port will prevent
- | this from occuring. If you don't have one,
- | set this to your active port
-
- Mouse Port
- ~~~~~~~~~~
- {setv mousport,1} <------+ Which port is your mouse on?
- | Set this to your mouse port number. 0 = No Mouse
-
- Default Mouse Setting
- ~~~~~~~~~~~~~~~~~~~~~
- {setv mouseon,YES}<------+ Do you want to use the mouse online?
- | Mouse default setting.
- | `YES' if you want mouse operation online
- | `NO' if you want don't want to use the mouse
-
- Hide Sysop Control
- ~~~~~~~~~~~~~~~~~~
-
- {setv hide,NO} <-------+ When you move around menus while user is online,
- | do you want your movement to be hidden from user?
- | `YES' if you want your movements to be hidden
- | `NO' if you want movement to show to user
- {return}
-
-
-
- -----------------------------------------------------------------------------
- -end config section-
- No more questions to answer
- -----------------------------------------------------------------------------
-
- ■ Program Code ■
-
-
-
- ------------------------variable descriptions
-
- --> `...' denotes this varible is an array.
-
-
- active modem port number
- actval character position of LTR in KEY
- aftblank after-blank characters right of text (char)
- apenblank number of blanks used to add to display text (numeric)
- araynam array name to process (from,hold,count)
- barback ansi sequences that make an erase of selector bar
- barct menu bar option counter
- barcol... display column of menu bar options
- barrow... display row of menu bar options
- bblankx equal to SOL
- bcol menu bar column (left)
- biggest length of longest option-text
- blanks blank string to extract blanks from (constant)
- boxwid width of box, based on length of longest option-text
- brow current row option-text will be displayed on
- c1 corresponding letter from KEY based on value held in CC
- cc value of current number in array being processed
- chars current box text (with embedded blanks)
- city user's city (from Maximus)
- colref column wrap reference (last pos in menubar)
- clepoint current row position to clear to end of display line
- comport current port (from Maximus - unused)
- cop number of options in current menu
- copo number of options in current menu
- count... array for old subname (numeric)
- curspeed current modem speed detected when macro is initialized
- frame ansi sequences for box frame (middle)
- from... array of option subnames from which current menu was called
- graphics current graphics value (1=tty,2=ansi,3=avatar)
- hide default setting for hidden sysop control (yes,no)
- hilev highest possible menu level (constant)
- hold... array where new subname is assembled (numeric)
- inact default inactive com port for bleed control (1-4)
- key range of letters for data subroutine names (a-z)
- keypress value of last sysop arrow-key stroke (dna,rta,lfa,upa)
- key_cont who is in control of menus (sysop,user)
- laslev last menu level (numeric)
- lbd left mouse-button down sequence (constant)
- lchar length of text options for box sizing
- lentx length of text (numeric)
- lev current menu level (1-8)
- locked default locked value of modem port (0=not locked)
- lopt length of option (numeric)
- lrbu left or right button up sequence (constant)
- ltr current subroutine letter to be assembled from KEY (a-z)
- mbd middle mouse button down sequence (constant)
- mbu middle mouse button up sequence (constant)
- menbar current ansi menu bar attributes (B&W/white on cyan)
- menpop box attributes (B&W or Blue on White)
- minson user's minutes spent online re Maximus (numeric 0-?)
- mouseon current state of sysop mouse operation (yes,no)
- mouseport default mouse port (1-4)
- optc option counter (numeric 1-24)
- optnum current option number selector is positioned at (numeric)
- play current row display position based on option number (1-79)
- rbd right-button-down mouse sequence (constant)
- regcount registration screen row count (1-7)
- regline assembled ansi registration display line (constant)
- regline... registration screen display lines copied (1-7)
- regone registration screen read-once flag (yes,no)
- reveal assembled user information display bar info (char)
- rimframe rim of frame char attributes (B&W ansi/Color)
- rowref menu bar row pointer (usually 1-2)
- sol frame top chars for current box (char)
- selbar menu bar selector attributes (B&W or color)
- selpop box menu selector attributes (B&W or color)
- sendtxt ansi sequences to send for popdown box middle (old opt or new)
- solblank frame top chars for SOL to extract from (constant)
- speed current setting for adjusted active port speed (300-115200)
- state condition of use (local,online)
- subnam data subroutine name to begin gathering data from (ex. baaaaa)
- sur extracted IBM chars for box bottom (char)
- surblank frame bottom chars for SUR to extract from (constant)
- syscodpz character postion of {Commo} registration number in REGLINE...
- syspos character postion of registered user name in REGLINE..
- telefon listed user's phone number from Maximus
- tempcol current column position for box text display
- tempoint subroutine name poition pointer for use during assembly of new sub name (1-8)
- tex current option text from TEX... array (char)
- tex... gathered option texts from data file (char)
- textlen length of current option text from TEX (numeric)
- thetex text for menubar option (char)
- this... subnames for associated subroutine options
- topspeed top baud rate for given conditions (300-115200)
- tosub name of macro sub to goto based on keypress & menu display state
- txt... text options gathered from datafile (char)
- type current menu option command type (direct,indirect)
- type... associated menu option command-types for current menu
- ufirst user first name from Maximus
- ulast user last name from Maximus
- verpos character poistion of {Commo} version from registration screen
- wrap menu bar length guage for wrap of menu bar (1-80)
- writct position counter for array (dis)assembly of subname
- xblank extracted number of blanks for inside boxframe (char)
- xbrow left box row position
-
-
- ---------------------------------end variable descriptions
-
- ----- Mouse routines
-
- {:msonoff} is mouse on or off?
- {call sysskey}
- {comp mousport,0} is mouse port disabled?
- {ifco-e rit} if so, return
- {comp mouseon,YES} is mouse toggle on?
- {ifco mouseon,mouseoff} if so set mouse on, els turn off
-
- {:mouseoff} turn mouse driver off
- {setv mouseon,NO} set current mouse toggle setting
- {:offmouse} set mouse parms off
- {stat y} turn on status bar
- {parm %speed%,,%active%,,} return control to active port
- {ifca active,inact} ifcarrier on, make active else inactive
-
- {:inact} - set to inactive port
- {parm %curspe%,,%inact%,,} set inactive port to speed first recorded
- {call reveal} show user info
- {return}
-
- {:active} - reset to active port
- {parm %speed%,,%active%,,} set port active to online speed
- {call reveal} show user info
- {return}
-
- {:mouseon} -turn mouse on
- {comp key_cont,sysop} is sysop in control?
- {ifco ,rit} if not, return
- {pops-c} clear macrostack
- {setv mouseon,YES} set current mouse toggle ON
- {stat n} turn off status bar for display
- {disp 25,1,4a, Escape key exits : Keep mouse still : Use buttons only : Double-click if stuck }
- {spdc n} turn off serial port display
- {parm 1200,8n1,%mousport%,,} set mouse parms
- {call reveal} show user stats
- {sete-p0 nf1} if sysop hits esc, same as F1
- {golo prelfa,%lbd} if left button pressed prepare LFA
- {golo prerta,%rbd} if right button, prepare RTA
- {look %mbd} if middle button, prepare DNA
- {goto predna} prepare DNA
- {}
-
-
- {:prelfa} - pre left arrow for mouse
- {comp hide,NO}
- {ifco ,LFA}
- {call swprt}
- {goto lfa}
-
- {:predna} pre down arrow for mouse
- {comp hide,NO}
- {ifco ,DNA}
- {call swprt}
- {goto dna}
-
- {:prerta} pre right arrow for mouse
- {comp hide,NO}
- {ifco ,RTA}
- {call swprt}
- {goto rta}
-
- {:swprt} - swap ports to show output to user while sysop is in mouse
- {comp state,LOCAL}
- {ifco ,swonline}
- {parm %curspeed%,,%inact%,A,0}
- {call reveal}
- {return}
-
- {:swonline}
- {parm %speed%,,%active%,A,0}
- {call reveal}
- {return}
-
-
-
- {:mouseask}
- {setv _menu1,(X) Mouse Off}
- {setv _menu2,(O) Mouse On}
- {setv _mlabel,a,b,c,d,e,f,g,h,i,j,k,l,m,n,swxmOn,p,q,r,s,t,u,v,w,swXmoff,y,z}
- {menu 6,25, PopMax Menus}
- {return}
-
- {:swxmon} - switch mouse on
- {setv mouseon,YES}
- {call msonoff}
- {return}
-
- {:swxmoff}
- {setv mouseon,NO}
- {call msonoff}
- {return}
-
-
-
-
- ----------setup
-
-
-
- {:nf2} F2 calls this subroutine
- {setesc-p0 nf1}
- {call setup}
- {setg 30,exit}
- {setl 60,gbye}
- {auto} clear-out auto-recieve strings
- {sound n} sound off
- {:begin}
- {elap} reset the elapsed timer
- {setv graphics,1} set default graphics rendition to ansi
- {call r_grf} read dorhal information
- {call reveal}
- {call register}
- {return}
-
- ---registration info
-
- {:register}- take snapshot of registration
- {comp regline,}
- {ifco ,rit}
- {call writreg}
- {setv regcount,0}
- {ropen register.yes,rit}
- {call readreg}
- {rclos}
- {wclos}
- {call sortreg}
- {setv regone,yes}
- {return}
-
- {:writreg}
- {ifex %_hom%\register.yes,rit}
- {capm f}
- {scre y,register.yes}
- {return}
-
- {:sortreg}
- {instr regline2,to}
- {setv verpos,%_pos}
- {incr verpos,3}
- {subst regline2,%verpos%,100,%regline2}
- {inst regline6,to}
- {setv syspos,%_pos}
- {incr syspos,5}
- {subs regline6,%syspos%,100,%regline6}
- {inst regline7,Number}
- {setv syscodpz,%_pos}
- {incr syscodpz,09}
- {subs regline7,%syscodpz%,100,%regline7}
- {setv regline,^[[24;1H^[[1;33;41m `?' for Help ^[[0m^[[K %regline2% - Reg: #%regline7%, %regline6%^[[K^M}
- {return}
-
- {:readreg}
- {incr regcount}
- {comp regcount,8}
- {ifco-g rit}
- {read %regline%regcount}
- {goto readreg}
-
- ---------- get door information
-
- {:c_grf} This sub is for mono graphics users
- {comp graphics,0} is user graphics mode TTY?
- {ifco-e ,rit} if not, return
- {setv rimframe,^[[0m} set special frame chars' attributes
- {setv frame,^[[0m} set fram of pop-down box's attributes
- {setv selbar,^[[7m} set menu bar's selector bar attributes
- {setv menbar,^[[0m} set menu bar attributes
- {setv selpop,^[[7m} set selector bar attibutes, pop-down box
- {setv menpop,^[[0m} set set menu attributes, pop-down box
- {setv barback,^[[1;1H^[[0m%blanks} set background of selector bar
- {return}
-
- {:r_grf} read dorhal information & set ports
- {ropen popmax.def} read first line in .def
- {read %graphics} read type of graphics user has
- {read %comport} read the port number
- {read %speed} read the baud rate
- {read %key_cont} read security level of who is on (key control)
- {read %telefon} read phone number of user
- {read %ufirst} first name
- {read %ulast} last name
- {read %city} city
- {read %minson} minutes left
- {rclos} close the file
- {comp speed,0} is this a local login?
- {ifco-e setspe} if true, set the port to inactive
- {comp locked,0} is our locked baud rate disabled?
- {ifco-g setlock} if not, set to locked rate
- {setv state,ONLINE} set state to ONLINE
- {setv topspeed,%speed} non-locked, set top speed to actual baud rate
- {dparm %speed%,,%active%,a,} non-locked, set default parms to baudrate
- {parm %speed%,,%active%,a,} non-locked, set current parms to baudrate
- {return}
-
- {:setspe} - set speed for local login
- {setv state,LOCAL} set current state to LOCAL
- {setv speed,%topspeed} since local, set to top modem speed
- {parm %speed%,,%inact%,a,} set inactive port current parms to baudrate
- {dparm %speed%,,%inact%,a,} set inactive port default parms to baudrate
- {return}
-
- {:setlock} - set locked baud rate
- {setv state,ONLINE} current modem state is ONLINE
- {setv topspeed,%locked} set highest speed to locked rate
- {setv speed,%locked} since false, set to top modem speed
- {parm %speed%,,%active%,a,} set default parms to baudrate
- {dparm %speed%,,%active%,a,} set default parms to baudrate
- {return}
-
-
- ----- sysop menu
-
- {:nf1}
- {:sysmen}---sysop menu
- {setv _menu1,X eXit to max menus}
- {setv _menu2,S Sysop menu control (disables user)}
- {setv _menu3,U User menu control (disables sysop)}
- {setv _menu4,H Hangup}
- {setv _menu5,N Compile new outline file}
- {setv _menu6,E Edit outline file}
- {setv _menu7,D Read Popmax Documents}
- {setv _menu8,Q Halt Macro}
- {setv _mlabel,a,b,c,Docs,Edfile,f,g,gbye,i,j,k,l,Mouseask,Cofile,o,p,quitmac,r,sysopctl,t,Userctl,v,w,exitmen,y,z}
- {menu 12,45, PopMax Sysop Screen}
- {goto stt}
-
- {:quitmac}
- {pops-c}
- {}
-
- {:docs}
- {help}
- {goto nf1}
-
- {:Edfile} - Edit outline file
- {edit outline.pop}
- {goto sysmen}
-
- {:cofile} - compile outline file
- {macl compile.pop,alk}
- {}
-
- {:reveal} - reveal user stats
- {disp 23,1,1a, }
- {setv reveal, %ufirst% %ulast%, %city% : %minson% mins : %_por,%_fmt,%_spe : typed=> }
- {disp 23,1,1a,%reveal
- {return}
-
- {:sysopctl}----enable sysop keys
- {setv key_cont,sysop}
- {call mouseask}
- {call sysskey}
- {goto stt}
-
- {:userctl}----diable user keys
- {call swxmoff} switch out of mouse port if any
- {setv key_cont,user} restore key control to user
- {call sysskey}
- {comp hide,YES} was user restored just after sysop did hidden cmds?
- {ifco alj} if so, begin at top
- {goto stt} since not wait for input
-
- {:helpu} - Help file display
- {clear}
- {send ^[[2J}
- {ifca ,nousr} if user isn't there, recycle
- {ifex gui_hlp.pop,,nohelp} if file isn't there, say so
- {asci-e gui_hlp.pop,} send help file via askey upload
- {pops-c} clear out stack
- {goto alj} return to beginning of program
-
- {:nohelp} - No help file avail
- {send ^[[3;2H A help file is not Available.} Text
- {pops-c} clear stack
- {goto alj} recycle
-
- {:nousr}-no user online to show help screen to : sysop in local mode
- {clear} clear screen
- {display 2,1,2,This option is not available in local mode} Sysop is on, tell him
- {goto alj} recycle
-
- {:exitmen} - Exit menus back to Maximus
- {wopen choice.mec} open choice file
- {writ [key_poke]q} put in quit command
- {wclos} close
- {exit} leave Popmax
-
- {:endconfig}--execute this if person hit left arrow
- {exit}
- {}
-
- {:stt} stop----------------stop subroutines, waiting for keypress
- {call reveal}
- {call sysskey}
- {pops-c} clear out stack pointer
- {comp key_cont,user} does user have control?
- {ifco user_stt} if so, wait for remote input
- {call msonoff} if so, do mouse subroutines
- {} else, user is sysop no mouse, so wait here for key
-
- {:user_stt}-----------------user stop, if key control is under user
- {setesc-p0 nf1} if escapes hit, NF1 (for sysop)
- {comp lev,1} are we in menu bar?
- {ifco-e stt1} if so, goto different wait scheme
- {setl 60,gbye} in 60 seconds, hangup if no keypress
- {noca gbye} if no carrier, hangup
- {parm ,,,T,} set to TTY
- {golo lfa,^[} look for keypresses: escape (left-arrow)
- {golo upa,H} up-arrow keyboard doorway
- {golo dna,P} down-arrow keyboard doorway
- {golo lfa,K} left-arrow keyboard doorway
- {golo rta,M} right-arrow keyboard doorway
- {golo rta,|} enter key (right-arrow)
- {golo upa,8} #8 numeric keypad (Up)
- {golo dna,2} #2 numeric keypad (Down)
- {golo lfa,4} #4 numeric keypad (Left)
- {golo rta,6} #6 numeric keypad (Right)
- {golo dna, } Space (Down)
- {look ?} Question Mark (Help)
- {call helpu} go here is ? is pressed
- {goto alj} in timeout, recycle
-
- {:stt1} - This is very similar to above, but for menu bar at top
- {setl 60,gbye}
- {noca gbye}
- {parm ,,,T,}
- {golo upa,^[}
- {golo upa,H}
- {golo lfa,K}
- {golo dna,P}
- {golo rta,M}
- {golo dna,|}
- {golo upa,8}
- {golo dna,2}
- {golo lfa,4}
- {golo rta,6}
- {golo dna, }
- {look ?}
- {call helpu}
- {goto alj}
-
- {:gbye}---exit menus
- {sign-d0} hold DTR low
- {pause 3} pause for 3
- {sign-d1} DTR high
- {break} send break
- {wopen choice.mec} open choice file
- {writ [key_poke]qgyn} goodbye sequence
- {wclos} close
- {exit} Exit POPMAX
-
- {:execute}---exit to maximus with selected option
- {setv-s thisopt,opt%optnum} store selection in expanded var to normal var
- {wopen choice.mec} open choice file (willbe compiled)
- {writ %thisopt} write Mecca token associated with selection
- {wclos} close choice file
- {pops-c} clear return stack
- {rclos} close file
- {call exit} leave POPMAX to compile & execute token
-
- {:exit} - Exit POPMAX
- {send ^[[0m^[[2J} clear screen
- {exit} Exit
-
- {:useron} - user is online, set these vars
- {hflo n}
- {sflo n}
- {loca y}
- {spdc y}
- {spoc y}
- {return}
-
- {:wait}
- {call chekloc} see if sysop is using in local mode
- {:wait1}
- {setv copo,%optc} back up option counter
- {comp type,direct} is it a direct (not-to-another-menu command?)
- {ifco backup} if so, backup
- {setv optnum,1} reset option number for display
- {call disptxt} anyway, display text
- {setv optc,0} reset option counter for this set to 0
- {setv araynam,hold} set array pointer to the HOLD array
- {call setless} clear it out? (unsure)
- {setv araynam,count} set current array to COUNT
- {goto stt} wait for input
- {}
-
- {:chekloc} see if sysop is using in local mode
- {parm %speed%,%active%,,,} check modem port for user's carrier
- {ifca useron} if he's there, run commands for online user
- {sflo n} turn off XON XOFF (for ^S)
- {hflo n} hardware control off
- {loca y} Local echo on
- {spdc y} serial port display OK
- {spoc n} no serial port output
- {return}
-
- {:disptxt}---display text
- {setv biggest,0}
- {setv play,0}
- {setv cop,%optc}
- {comp lev,1}
- {ifco-e disbar}
- {call maxwid}
- {call disptxt1}
- {return}
-
- {:disptxt1}
- {setv boxwid,%biggest} set boxwidth to longest option text
- {incr boxwid,2} add two to this for margins
- {subst %xblank,1,%boxwid,%blanks} get correct number of blanks
- {setv %xblank,%xblank%} append these with frame ends
- {subs sol,1,%boxwid,%solblank} get proper number of frame bottoms
- {setv bblankx,%sol%} append top with frame ends
- {subs sur,1,%boxwid,%surblank} get proper number of frame bottoms
- {call disptxt2} call second display text sub
- {setv play,1}
- {call newcolor}
- {return}
-
- {:disptxt2}
- {setv play,1} reset
- {leng %tex} get length of text
- {setv lentx,%_len} put in lentx
- {incr brow,2} increment row
- {setv tempcol,%bcol} set left margin with left of selector bar option
- {send ^[[%brow%;%tempcol%H^[[s%rimframe%▌%frame%%bblankx%%rimframe%▐}
- {decr brow,2}
- {call disptxt3}
- {return}
-
- boxwid-textlen-3=#appendblanks
-
- {:disptxt3}
- {setv sendtxt,^[[s▌^[[%boxwid%C▐^[[u^[[B}
- {send ^[[u%rimframe%}
- {call sendblan}
- {send %sendtxt}
- {send %rimframe%▌%frame%%sur%%rimframe%▐}
- {send %menpop}
- {call sendopts}
- {return}
-
- {:sendblan}
- {send %sendtxt}
- {incr play}
- {comp play,%cop}
- {ifco-g rit}
- {goto sendblan}
-
- {:sendchar}
- {call newchars}
- {setv sendtxt,^[[%xbrow%;%tempcol%H%chars%}
- {send %sendtxt}
- {incr xbrow}
- {incr play}
- {comp play,%cop}
- {ifco-g rit}
- {goto sendchar}
-
- boxwid-textlen-3=#appendblanks
-
- {:newchars}
- {setv-s chars,txt%play}
- {leng %chars}
- {setv textlen,%_len}
- {setv apenblan,%boxwid}
- {decr apenblan,%textlen}
- {decr apenblan}
- {subs aftblank,1,%apenblan,%blanks}
- {setv chars, %chars%%aftblank}
- {return}
-
- {:sendopts}------send text options
- {setv play,1}
- {incr tempcol} increment left-margin for text
- {setv xbrow,%brow}
- {incr xbrow,3}
- {call newchars}
- {setv sendtxt,^[[%brow%;%tempcol%H%chars%}
- {call sendchar}
- {return}
-
- {:maxwid}-----get maximum width of longest string
- {incr play}
- {comp play,%cop}
- {ifco-g rit}
- {setv-s chars,txt%play}
- {leng %chars}
- {setv lchar,%_len}
- {comp lchar,%Biggest}
- {ifco-le maxwid}
- {setv biggest,%lchar}
- {goto maxwid}
-
-
- {:disbar}---- if menu level one, display menu bar
- {call setbar} call setup for this set of subroutines
- {call disbar1} define locations for bar menu
- {call barshow} show options at locations
- {call newco1} display newcolor at current pos
- {call sysskey}
- {comp regone,yes}
- {ifco onereg}
- {return}
-
- {:onereg}
- {setv regone}
- {send %regline}
- {return}
-
- {:sysskey}
- {comp key_cont,sysop}
- {ifco lokey,onlkey}
-
- {:onlkey} -- online
- {disp 24,1,4e, SysMenu <esc> }
- {call reveal}
- {return}
-
- {:lokey} - sysop info key, local
- {comp mouseon,NO}
- {ifco ,onlkey}
- {disp 24,1,4e, Sysop Menu F1 }
- {call reveal}
- {return}
-
- {:setbar}--setup for menu bar
- {setv wrap,1} establish wrap mesaurement guage WRAP as num
- {setv colref,1} set initial column reference pointer
- {setv rowref,1} initialize row refernce pointer
- {setv barct,0} reset bar option pointer
- {call disbar1} call main body of bar subroutines
- {return}
-
- {:disbar1}----main body of bar counter
- {incr %barct} bring up our option pointer
- {comp barct,%copo} compare pointer with highest option number
- {ifco-g rit} if it is over, return
- {call lenopt1} get the length of particular option, menu level 1
- {call getlox} assign screen locations for these options
- {goto disbar1} cycle until released
-
- {:lenopt1}----get length of test for menu option in menu bar
- {setv-s thetex,txt%barct} store the current option in THETEX
- {leng %thetex} get the length of the text
- {setv lopt,%_len} store in LOPT
- {incr lopt,2} increment this by two to get length with display spaces
- {return}
-
- {:getlox}---assign screen coordinates for the menu bar options
- {incr wrap,%lopt} add option text length to var WRAP
- {comp wrap,80} compare it to 80 (screen width)
- {ifco-ge wrapit} if greater or equal, wrap row
- {setv barcol%barct,%colref} assign current column refernce to array BARCOL
- {setv barrow%barct,%rowref} assign current row refernce to array BARROW
- {setv colref,%wrap} set the column refernce to the WRAP value
- {return}
-
- {:wrapit}----since we have reached end of row, wrap option to next line
- {setv colref,1} reset column pointer to first position
- {incr rowref} increment row pointer to next row
- {setv barcol%barct,%colref} assign current column refernce to array BARCOL
- {setv barrow%barct,%rowref} assign current row refernce to array BARROW
- {setv wrap,1} reset our wrap guage
- {incr wrap,%lopt} add this option's length to wrap guage
- {setv colref,%wrap} establish WRAP as the CURROW
- {return}
-
- {:barshow}---display current option atdefined location
- {setv barct,0} reset bar counter
- {send %barback} send background color for menu bar
- {send %menbar} set color for menu bar
- {call barshow1} cycle through options and display
- {return}
-
- {:barshow1}----cycle thru menu bar options, and display
- {incr barct} increment our bar option pointer
- {comp barct,%copo} compare pointer with highest option number
- {ifco-g rit} if it is over, return
- {setv-s brow,barrow%barct} assign option in array BARROW to static var
- {setv-s bcol,barcol%barct} assign option in array BARCOL to static var
- {setv-s thetex,txt%barct} assign text of option to static var THETEX
- {send ^[[%brow%;%bcol%H%thetex} display it
- {goto barshow1}
-
-
- {:backup}----back one level
- {call turnover}
- {setv subnam}
- {setv writct,0}
- {call asm}
- {call selcolor}
- {setv type,indirect}
- {return}
- {goto alj}
-
- -------------------------------------------------------------------------------
-
- {:sortspeed}
- {wclos}
- {parm ,,%active%,A,}
- {dpar ,,,A,}
- {comp locked,0}
- {ifco-e ,highspeed}
- {setv topspeed,%_spe}
- {return}
-
- {:highspeed}
- {setv topspeed,%locked}
- {return}
-
- {:alj}---- Begin here
- {wclos}
- {pops-c}
- {call nf2}
- {call set2} setup routines (reset vars)
- {setv writct,0}
- {call asm} assemble COUNT array into alphabetic labelname
- {setv from%lev,%subnam} store top option of current menu for recall
- {macl popdata.pop,top} load our data file at the TOP subroutine
- {} since macro reloads at :WAIT, no more here
-
-
-
-
- {:set2}---setvars
- {setv curspe,%_spe} get initial speed of modem
- {setv lbd,α@└} left button down
- {setv lrbu,└@└} left button up /right button up
- {setv mbd,@@Φ} middle button down
- {setv mbu,└@@α} middle button up
- {setv rbd,╨@└} right button down
- {curs n} turn cursor off
- {setv solblank,▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
- {setv surblank,▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄}
- {setv blanks, }
- {setv lchar,0} LCHAR, numeric length of text in box
- {setv biggest,0} BIGGEST numeric out of all Lchars
- {setv barback,^[[1;1H^[[1;46m%blanks} blanks colors
- {setv rimframe,^[[0;44;30m} rim-of-frame colors
- {setv frame,^[[0;34;47m} frame colors
- {setv selbar,^[[1;33;41m} selector bar colr for top menu bar
- {setv menbar,^[[0;30;47m} inactive color for top menu bar
- {setv selpop,^[[0;30;46m} selector bar color for pop-down menus
- {setv menpop,^[[0;47;31m} inactive color for pop-down menus
- {call c_grf} reset graphics to tty if neccesary
- {setv copo,0} reset couter of options COPO
- {setv hilev,8} set hilevel counter to four
- {setv araynam,count} assign array name COUNT for assembly
- {call setless} reset higher menu levels to zero
- {setv optc,0} reset option counter
- {setv type} clear command status value boolean (direct,indirect)
- {setv subnam} clear translated labelname (alphabetic)
- {setv key,abcdefghijklmnopqrstuvwxyz} define numeric-alphbetic conversion key
- {setv lev,1} set current menu level to one
- {setv optnum,1} set current option number to 1
- {setv cc,1} establish cc (temp var) as numeric
- {setv laslev,0} reset last level to zero
- {setv count1,1} first option to baaa (1000)
- {return}
-
- {:setless} ---set levels to the right in sublabel
- (higher levels) to zero
- ex: bcda -> baaa (or) 1230 -> 1000
- {setv writct,0} clear temporary counter
- {:setl1} find position
- {incr writct} increment counter
- {comp writct,%hilev} compare to last pointer pos
- {ifco-g rit} if less, letter pos to zap is found
- {setv %%araynam%%writct,0} reset value in current expanded var
- {goto setl1} repeat
-
- {:comp2}--compare level number read from file
- {comp laslev,%lev} compare val of lastlevel pointer to current level pointer
- {ifco-l rta} if last num < current, up level pointer
- {ifco-e upa} if last num=current increment value held at pointer
- {ifco-g lfa} if last num > current decrement level pointer
- {}
-
- {:cleol}-------clear out old options on screen
- {setv clepoint,24} we will clear from line 24
- {send ^[[0m^[[23;1H}
- {call cleol1}
- {call reveal} reveal user stats
- {return}
-
- {:cleol1}-----clear screen
- {decr clepoint} decrement screen row counter
- {comp clepoint,1} are we at menu bar?
- {ifco-e rit} if so, return
- {send ^[[K} clear to end of line
- {send ^[[A} move up
- {goto cleol1} repeat
-
- {:turnover}---turnover counter
- {comp lev,1}
- {ifco-e rit}
- {decr lev} drop one level
- {setv count%lev,1}
- {setv writct,%lev} mark beginning position of reset pointer
- {call setless} reset all vars to right back to zero
- {return}
-
- {:selcolor}---show an option has been selected
- {setv-s tex,txt%optnum}
- {send ^[[%optnum%;10H%menpop%%tex}
- {return}
-
- {:oldcol1}- for menu bar
- {setv-s tex,txt%optnum}
- {setv-s brow,barrow%optnum}
- {setv-s bcol,barcol%optnum}
- {send ^[[%brow%;%bcol%H%menbar%%tex}
- {return}
-
- {:oldcolor}
- {comp lev,1}
- {ifco-e oldcol1}
- {setv play,%optnum}
- {call newchars}
- {incr play,3}
- {send ^[[%play%;%tempcol%H%menpop%%chars}
- {return}
-
- {:newco1} -- for menu bar
- {setv-s tex,txt%optnum}
- {setv-s brow,barrow%optnum}
- {setv-s bcol,barcol%optnum}
- {send ^[[%brow%;%bcol%H%selbar%%tex}
- {return}
-
- {:newcolor}
- {comp lev,1}
- {ifco-e newco1}
- {setv play,%optnum}
- {call newchars}
- {incr play,3}
- {send ^[[%play%;%tempcol%H%selpop%%chars}
- {return}
-
-
-
- {:dna}
- {parm ,,,a,}
- {spdc y}
- {setv keypress,dna} set our keypress var to down-arrow
- {call testbar} test the keypress, and act
- {:barrta}
- {comp optnum,%copo} else compare with last menu option
- {ifco-ge totop} if equal, selector bar to top
- {call oldcolor} else print od color
- {incr optnum} increment our option numberr in this menu
- {setv-s subnam,thopt%optnum} reset sub name to reflect new option
- {call newcolor} call our new color
- {goto stt}
-
-
- {:totop}---back to top again
- {call oldcolor}
- {setv optnum,1}
- {setv count%lev,1}
- {setv subnam}
- {call asm}
- {setv araynam,count}
- {call newcolor}
- {goto stt}
-
- {:tobot}--back to bottom again
- {call oldcolor}
- {setv optnum,%copo}
- {setv count%lev,%copo}
- {setv subnam}
- {setv araynam,count}
- {call asm}
- {call newcolor}
- {goto stt}
-
- {:barupa}---check bar for option above it
- {goto alj}
-
-
- {:upa}
- {spdc y}
- {parm ,,,a,}
- {setv keypress,upa}
- {call testbar}
- {:barlfa}--let-arrow keypress
- {comp optnum,1}
- {ifco-le tobot}
- {call oldcolor}
- {decr optnum}
- {setv-s subnam,thopt%optnum}
- {call newcolor}
- {goto stt}
-
- {:testbar}---test boolean
- {comp lev,1}
- {ifco-g rit}
- {setv tosub,bar%keypress}
- {goto %tosub}
- {return}
-
- {:rta}
- {parm ,,,a,}
- {spdc y}
- {setv keypress,rta}
- {call testbar}
- {:uplev}---increment level pointer
- {:bardna}
- {comp lev,%hilev} have we reached highest menu level?
- {ifco-e rit} if equal, return
- {setv writct,0} reset assembly pointer
- {setv araynam,hold} set our array name to HOLD
- {setv-s subnam,this%optnum} set our subroutine name to current pos name
- {comp type%optnum,direct}
- {ifco execute}
- {call disasm} disassemble this sub name
- {incr lev} increment our menulevel in HOLD
- {incr hold%lev} and increment value held in that level
- {setv subnam} reset subroutine name
- {call asm} reassemble subroutine name
- {call setless} zero-out values stored in HOLD array
- {setv from%lev,%subnam} store top option of current menu for recall
- {macl popdata.pop,top} execute newly asssembled label
-
- {:lfa}
- {parm ,,,a,}
- {spdc y}
- {setv keypress,lfa}
- {call testbar}
- {:downlev}-- decrement level pointer
- {:barlfa}--let-arrow keypress
- {comp lev,1} is menu level at one?
- {ifco-e rit} if so, return
- {call cleol}
- {decr %lev} else, drop our level pointer by one level
- {setv-s subnam,from%lev} recall previous menu label at top option
- {setv araynam,from} set current array name to FROM
- {send %regline} send registration info
- {macl popdata.pop,top} execute a recall of previous menu
-
- {:asm}---assemble sub name
- {call assemble}
- {return}
-
- {:assemble}
- {incr writct} increment position counter
- {comp writct,%hilev} is counter greater than highest count?
- {ifco-g rit} if true display
- {setv-s cc,%araynam%%writct} store current val under temp pointer to cc
- {incr cc} add one to value so zero can be accounted for-count
- {subs c1,%cc%,1,%key} find the representative letter in key (count)
- {setv subnam,%subnam%%c1} append subroutine name
- {goto assemble}
-
- {:rit}
- {return}
-
-
- -----------disassemble alphabetic label
-
- input: subnam
- output: corresponding elements in HOLD array
-
-
- {:disasm}--setup for dissassemble
- {setv tempoint,0} reset temporary pointer variable
-
- {:disasm1}----cycle through each letter, and convert to numbers
- {incr tempoint} increment string positon pointer
- {comp tempoint,%hilev} compare temporary pointer with hilev
- {ifco-g rit} if it's greater, were done dissembling
- {subs %ltr%,%tempoint%,1,%subnam}get letter LTR at TEMPOINT position from SUBNAM
- {instr key,%ltr} what is position of this letter in KEY?
- {setv actval,%_pos} place corresponding (tempoint) element in array HOLD to the position of letter LTR in KEY
- {decr actval} decr ACTVAL to reflect actual numeric value
- {setv hold%tempoint,%actval} set corresponding (tempoint) element in array HOLD to the position of letter in KEY
- {goto disasm1}
-
- -----------------------------------------------------------------------------
- #####
- -----------------------------------------------------------------------------
-
-