home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / m.lbr / MENU.HLP < prev    next >
Encoding:
Text File  |  1991-11-18  |  29.6 KB  |  921 lines

  1. ;
  2.  
  3.  
  4.               The ZCPR3 MENU Shell
  5.  
  6.               -- ZCPR3 Utilities --
  7.              1 - MENU 
  8.              2 - MENUCK 
  9.  
  10.      -- Using MENU --         -- Programming MENU --
  11.      U - Using MENU               P - Programming *.MNU Files 
  12.      S - Summary of User Cmds       C - *.MNU Internal Commands 
  13.      E - MENU Error Messages        M - Programming Cmd Summary 
  14.                     Z - MENU and ZCPR3 
  15. :1
  16.  Command   MENU 3.9
  17.  
  18.  Syntax 
  19.      MENU        <-- run MENU.MNU
  20. or
  21.      MENU ufn        <-- run menu contained in file
  22.  
  23.  Function 
  24.  
  25.      MENU  is the ZCPR3 menu front-end processor.   It is  a
  26. ZCPR3  Shell which reads a *.MNU file and processes commands
  27. from it.
  28.  
  29.  Options 
  30.      None
  31.  
  32.  Comments 
  33.      MENU  is a true ZCPR3 Shell.   It is described in    this
  34. HELP file.
  35.  Selected Error Messages 
  36.  
  37.      "No  Command Line" means that the ZCPR3 System does not
  38. support  an external Command Line Buffer.   MENU  must    have
  39. this to run.
  40.  
  41.      "No  Shell Stack" means that the ZCPR3 System does  not
  42. support a Shell Stack.    MENU must have this to run.
  43.  
  44.      "Shell  Stack Full" means that the Shell Stack is    full
  45. and MENU cannot push itself onto the stack.
  46.  
  47.      "Shell  Stack  Entry Size" means that the    Shell  Stack
  48. elements are too short for MENU to store its parameters.
  49.  
  50.      "TPA  Full" means that there is not enough room in  the
  51. TPA to load the *.MNU file.
  52.  
  53.  Examples of Use 
  54.      See this HELP file
  55.  
  56.      MENU  is the ZCPR3 Menu-Oriented Command  Preprocessor.
  57. It  acts as a front-end to ZCPR3,  providing a menu-oriented
  58. user interface to ZCPR3.  Its function can be represented by
  59. the following diagram:
  60.             ------    ------    ------      ------
  61.             |M     |    |Z   |    |B   |      |P   |
  62.      User        | E  |    | C  |    | D  |      | g  |
  63.      Menu      ---->|  N |--->|  P |--->|  O |--->|  m |
  64.      Command        |    U|    |   R|    |   S|      |   s|
  65.             |     |    |   2|    |    |      |    |
  66.             ------    ------    ------      ------
  67.  
  68.      The  "User Menu Command" is a single character that the
  69. user  strikes  which instructs MENU to perform    a  function.
  70. Once  MENU  begins processing this  function,  it  builds  a
  71. command  line  for  ZCPR3,  optionally asking the  user  for
  72. further  input (such as a file name),  and then  passes  the
  73. command  line to ZCPR3 via the Command Line  Buffer.   ZCPR3
  74. then runs the command line returns to MENU.
  75.  
  76.      MENU  builds  command lines based on simple input    from
  77. the user.   The user need never know what the actual command
  78. line is.  The command line itself is always of the form:
  79.  
  80.           <command> <optional user input>
  81.  
  82.      As an example, a command built by MENU to run XDIR with
  83. user  input for a file name specification,  could look    like
  84. the following:
  85.  
  86.              XDIR <user input>
  87.  
  88.  
  89.      When MENU    is executed, it builds the list of  files to
  90. be displayed, and then looks for the  desired menu file.  It
  91. begins its search in  the current directory,  and  continues
  92. along  the system  path  until either  it has found the menu
  93. file,  or  all    directories in    the path  have been searched
  94. without success.  If the menu file is found, it will be read
  95. into  memory, and  the first menu displayed.   If it was not
  96. found, an error message will be generated.
  97.       If  no  menu file is specified, then MENU will default
  98. to MENU.MNU.  If the user  has supplied a file ID  with both
  99. the menu  file name and type,  MENU  will use this file.  If
  100. only  the file name is    specified, the default    file type of
  101. MNU is assumed.
  102.  
  103.      The  MENU.MNU  file can contain up to 255 menus  to  be
  104. processed  by MENU.   The MENU will begin processing at  the
  105. first menu in MENU.MNU.
  106.  
  107.  
  108.      MENU itself is a COM file, like any other program under
  109. ZCPR3.     Unlike most other programs,  however,    it generates
  110. command lines to be executed by ZCPR3 and stores its  return
  111. command in the Shell Stack.  In this way a loop is set up:
  112.  
  113.             -->--+->- MENU ->- ZCPR3 ->-+
  114.              ^            v
  115.              |            |
  116.              +-<- Command Line -<---+
  117.  
  118.      Only  MENU  itself  or a  ZCPR3 tool  like  SHCTRL  can
  119. terminate  this loop.  If the MENU programmer wishes, he can
  120. set  up  the MENU.MNU file so that this loop will  never  be
  121. exited, or he can set up the file to allow anyone to exit at
  122. any  time or just a special person who knows a    password  to
  123. exit  when  he    wishes to.   There is a lot  of  flexibility
  124. designed into the system,  and it will be discussed later in
  125. the section on programming MENU.MNU files.
  126.  
  127.      A MENU.MNU  file  can be set up to execute  any  ZCPR3
  128. command or sequence of commands.  The MENU.MNU file can also
  129. be set up to not allow the user to leave MENU,    to allow him
  130. to leave MENU at will, or to allow him to leave MENU only if
  131. he knows a password.
  132.  
  133.      This  HELP file is divided into two basic    parts.     The
  134. info sections on "Using MENU" and "Summary of MENU Commands"
  135. are designed to be read by a person wanting to use MENU  but
  136. not  wanting  to learn how MENU works or how to program  it.
  137. These  sections  describe  how    to move  from  one  menu  to
  138. another,  how to issue MENU commands,  and how to leave MENU
  139. if the option is presented to him.
  140.  
  141.      The  other  sections  of this HELP  file  describe  the
  142. programming  aspects of MENU and are intended to be used  as
  143. an  online  reference for the  MENU  programmer.   The    MENU
  144. command  programming summary is especially useful in that it
  145. provides a summary of the commands which the MENU programmer
  146. may issue to MENU within a *.MNU file.
  147. :U
  148.  
  149.      When MENU    is first invoked,  it will be installed as a
  150. Shell.    If commands are pending, control will return to  the
  151. ZCPR3  command processor for the next command in  the  line.
  152. When the command line is exhausted,  ZCPR3 will realize that
  153. a shell has been installed and invoke MENU as a shell.      If
  154. there are  no pending commands, however, MENU will begin the
  155. menu command processing immediately.
  156.  
  157.      When MENU    begins    execution as a    Shell,    it will load
  158. the menu file, and then one of three things will happen:
  159.  
  160.      1)  A  MENU  will appear and be paged up  to  fill  the
  161.       screen; a command prompt will appear at the bottom
  162.       of the menu
  163.  
  164.  
  165.      2)  A MENU will appear and not be paged up to fill  the
  166.       screen; a command prompt will appear at the bottom
  167.       of the menu
  168.  
  169.      3)  A command prompt will appear with no menu (this  is
  170.       called the Expert Mode)
  171.  
  172.      If  at  any time a Menu Display is garbled or the    user
  173. desires  to see the current Menu (as sometimes happens    when
  174. you are in Expert Mode),  just strike the RETURN  key.     The
  175. RETURN key refreshes the menu at all times.
  176.  
  177.  
  178.      The  prompt  which appears at the bottom of  your    Menu
  179. display has the following general form:
  180.  
  181. Command (CR=Menu,^C=Z3,*=1st Menu,<=Prev Menu,>=Next Menu) -
  182.  
  183.      There can be up to 255 menus in one MENU.MNU file.  The
  184. MENU command prompt varies to reflect this.   For  instance,
  185. if  only one Menu was present and the option to abort out of
  186. MENU  to  ZCPR3 was not available,  then  the  Menu  Command
  187. prompt would take its simplest form, looking like:
  188.  
  189. Command (CR=Menu) -
  190.  
  191.      Strike the RETURN key at this time to refresh the    Menu
  192. Display or strike the character of a Menu Option.  These are
  193. the only choices,  and striking a character which is not the
  194. RETURN key or a menu option results in the bell sounding.
  195.  
  196.  
  197.      If  the the option to exit to ZCPR3 was  available  and
  198. there  is  only  one Menu in the  MENU.MNU  file,  then  the
  199. command line will look like this:
  200.  
  201. Command (CR=Menu,^C=Z3) -
  202.  
  203.      The  option of aborting to ZCPR3 by striking  Control-C
  204. (hold  down  on the Control,  or CTRL,    key and  strike  the
  205. letter    C) is now available.   This will return to ZCPR3 and
  206. exit MENU.
  207.  
  208.      One brief note on option letters before going  on.   If
  209. one  of  your options is a letter in the range from A to  Z,
  210. then case is not significant,  and you can invoke the option
  211. A, say, by striking an upper- or lower-case A.
  212.  
  213.  
  214.      If there is more than one menu in the *.MNU  file,  the
  215. command line options become slightly more complex,  but they
  216. are still quite easy to follow.
  217.  
  218.      In  the following examples,  assume that the option  to
  219. exit  to  ZCPR3 is off,  so the "^C=Z3" option    will  NOT
  220. appear.
  221.  
  222.      From the first menu in the file,  the command line will
  223. look like the following:
  224.  
  225. Command (CR=Menu,>=Next Menu) -
  226.  
  227.      To advance to the next menu,  strike the ">" or the "."
  228. character.   On most keyboards, ">" is the shift of the ".",
  229. so  MENU permits easy movement without having to worry about
  230. shifting the keyboard all the time.
  231.  
  232.  
  233.      If at the last menu in the file,  the command line will
  234. look like the following:
  235.  
  236. Command (CR=Menu,*=1st Menu,<=Prev Menu) -
  237.  
  238.      This  allows  the user to strike the "*"  character  to
  239. jump  back to the first menu in his *.MNU file.   If "<"  or
  240. "," is stuck ("<" is usually the shift of the ","), then the
  241. user will back up one menu to the previous menu in the file.
  242.  
  243.      If the user is somewhere in the middle of the  MENU.MNU
  244. file, his command line will look like this:
  245.  
  246. Command (CR=Menu,*=1st Menu,<=Prev Menu,>=Next Menu) -
  247.  
  248.      Again,  "*" will go directly to the first menu,  "<" or
  249. "," will go to the previous menu,  and ">" or "." will go to
  250. the  next  menu.   Striking the RETURN key will refresh  the
  251. menu display.
  252.  
  253.      One last option the user has under MENU involves access
  254. to  a System Menu.   This menu is special in that  there  is
  255. only one way to get to it -- via the "$" command.
  256.  
  257.      The  System  Menu is intended to give priveleged  users
  258. access to special commands that the rest of the users  can't
  259. run.   If  a System Menu is available,    MENU will respond to
  260. the "$" command with the prompt:
  261.  
  262.       Pass?
  263.  
  264.      The  user    is given one chance to type in    the  correct
  265. password  to enter the System Menu.   If he  is  wrong,  the
  266. message "Password Error" will appear and he will be returned
  267. to the menu he came from.   If he is correct,  he will enter
  268. the System Menu.   Physically, the System Menu is always the
  269. last menu in the file, and its command prompt is:
  270.  
  271. Command (<CR>=Menu,*=1st Menu,<=Prev Menu) -
  272.  
  273.      If the user is at the menu just before the System Menu,
  274. the ">" will not function to allow him to enter it, even tho
  275. there  technically is a "Next Menu".   The ">" option in the
  276. command  line  will not appear.   The only way    to  enter  a
  277. System Menu is thru the "$" command.
  278.  
  279.      In  summary,  moving  about within MENU is quite  easy.
  280. "*"  moves the user to the first menu,    "<" to the  previous
  281. menu, ">" to the next menu, and "$" to the System Menu.
  282. :S
  283.  
  284.      The full Menu Command Line looks like the following:
  285.  
  286. Command (<CR>=Menu,^C=Z3,*=1st Menu,<=Prev Menu,>=Last Menu) -
  287.  
  288.      The Menu Commands are:
  289.  
  290.       Command   Function
  291.  
  292.       <CR>        Refresh Menu Display (RETURN Key)
  293.       ^C        Exit to ZCPR3 (Control-C)
  294.       *        Jump to the First Menu
  295.       < or ,    Jump to the Previous Menu
  296.       > or .    Jump to the Next Menu
  297.       $        Jump to the System Menu (Password Required)
  298.       other     Menu Option or Invalid Command; letters are
  299.              automatically capitalized, so a=A
  300. :P
  301.  
  302.          Programming *.MNU Files 
  303.  
  304.      The  *.MNU  file  is simply a text file  which  may  be
  305. created   with    any  conventional  CP/M  editor,   including
  306. WordStar.   MENU  ignores  the Most Significant Bit  of  all
  307. bytes, so editors like WordStar, which occasionally set this
  308. bit, can be used.
  309.  
  310.      All *.MNU files have the same general  structure.     The
  311. first  line is either a global option line or the  beginning
  312. of a menu display.   If a global option line, it begins with
  313. the  character    "-",   and  this  character  is  immediately
  314. followed  by  global option characters.   The global  option
  315. line, then looks like this:
  316.  
  317. -options
  318.  
  319.      After the global option line,  if any,  comes the first
  320. menu.  Each menu is structured as follows:
  321.  
  322.              #options
  323.                   <Text of Menu Display>
  324.              #
  325.              menu commands
  326.  
  327.      The following are two sample Menu File structures:
  328.  
  329.            -options         #options
  330.            #options              <Text>
  331.             <Text>        #
  332.            #            commands
  333.            commands         ##
  334.            #options
  335.             <Text>
  336.            #
  337.            commands
  338.            ##
  339.      There are four option characters. In using them, case
  340. is not significant.  These option characters are:
  341.  
  342.       Option    Function
  343.          C        Display Command Line to User
  344.          D        Display Menu to User
  345.          P        Page Out Menu Display
  346.          X        Allow User to Exit to ZCPR3
  347.  
  348.      The C option displays the command line built by MENU to
  349. the user.   This option is primarily intended for  debugging
  350. purposes,  to  allow the programmer to see what commands are
  351. being built.   It is instructive to the user,  however,  and
  352. may be employed for that purpose as well.
  353.  
  354.      The  D option displays the menu to the  user.   If  the
  355. display  function is not turned on,  we are in Expert  Mode,
  356. and  the  commands  are available without  a  menu  display.
  357. RETURN,  of  course,  can  be used to invoke the display  if
  358. necessary.
  359.  
  360.      The P option pages out the menu display.    If the    page
  361. function  is engaged,  then the MENU program outputs  <CRLF>
  362. combinations until 24 lines have been printed on the screen.
  363. This  is  somewhat more attractive and eliminates  old    text
  364. from previous commands,  allowing the user to concentrate on
  365. his current set of options.   However, it is annoying if the
  366. user  is accessing the system,    say,  at 300 baud via a dial
  367. up.  It is for this reason that the MENU programmer has this
  368. option.
  369.  
  370.      Finally,  the  X  option  enables    the  facility  which
  371. permits the user to type ^C and return to ZCPR3.
  372.  
  373.  
  374.      When MENU first comes up, all options are turned off:
  375.  
  376.       C is OFF -- no command display to user
  377.       D is OFF -- no menu display to user
  378.       P is OFF -- no menu display paging
  379.       X is OFF -- user cannot exit to CP/M
  380.  
  381.      The  global options line,    which,    if present,  is  the
  382. first  line  of the file,  turns on these  options  for  the
  383. course    of  the session in general.   That is,    if a  global
  384. options line like
  385.  
  386.       -DPx
  387.  
  388. is used (case is insignificant),  then menu display, paging,
  389. and  exit  to ZCPR3 will be available for  all    menus.     The
  390. global options line affects all menus.
  391.  
  392.  
  393.      The global options line turns on the indicated  options
  394. for all menus in general.   However, the same options may be
  395. presented  on the first line of each menu immediately  after
  396. the  "#"  character  to temporarily complement    the  current
  397. option for only that menu.
  398.  
  399.      If  an  option is NOT included in    the  global  options
  400. line,  it  is  turned  OFF for all menus  in  general.     The
  401. defaults  selected  by    using the global  options  line  are
  402. overridden on a per-menu basis by the local menu options.
  403.  
  404.      Example:
  405.  
  406.  
  407.     -dpx
  408.     #x
  409.      This menu is displayed and paged, but no
  410.      exit to ZCPR3 is permitted
  411.     #
  412.     commands
  413.     #dx
  414.      This menu is not displayed and the user may not
  415.      exit to ZCPR3.
  416.     #
  417.     commands
  418.     #c
  419.      This menu is displayed, paged, and the user may
  420.      exit to ZCPR3.  Additionally, the MENU-generated
  421.      commands are printed to the user.
  422.     #
  423.     commands
  424.     ##
  425.  
  426.      Any  option that may appear on the global options line
  427. may  also appear on the options line for a particular  menu.
  428. The menu options line supports one additional  option,    viz.
  429. "$".  This option declares the following menu to be a System
  430. Menu.
  431.      In  programming a *.MNU file,  the MENU programmer MUST
  432. place the System Menu as the last menu in the file if it  is
  433. going to have one.   To do otherwise is flagged as an error.
  434. The  following illustrates a *.MNU file containing a  System
  435. Menu:
  436.        -dp
  437.        #
  438.      This menu is displayed and paged, but the user may
  439.      not exit to ZCPR3.
  440.        #
  441.        commands
  442.        #$x
  443.      This is a System Menu, and it is displayed, paged,
  444.      and the user may exit to ZCPR3.
  445.        ##
  446.  
  447.      If  a  menu is a System Menu,  the "$"  character    must
  448. immediately  follow  the  "#".     In the case of  the  letter
  449. options in both the global and local cases, the order is not
  450. important ("dpx" means the same as "xpd").
  451.  
  452.      The  password used to enter a System Menu is hard-coded
  453. in.   It may be altered by reassembly or use of  DDT.    Note
  454. that this password can be upper- and lower-case, and case is
  455. significant.
  456.  
  457. :C
  458.  
  459.                  *.MNU Commands 
  460.  
  461.      This   section  describes    the  technique    and  options
  462. available  for creating command lines in *.MNU    files.     The
  463. information  herein is organized into the following  subject
  464. areas:
  465.  
  466.       o Syntax of the command line
  467.  
  468.       o :nn Option
  469.  
  470.       o ! Option
  471.  
  472.       o "text" prompts and input
  473.  
  474.       o Variables ($C, $D, $U, $Fn, $Nn, $Tn, $$)
  475.  
  476.       o Highlighting (^A, ^B)
  477.  
  478.  Syntax 
  479.  
  480.      The commands in a *.MNU file follow a simple structure.
  481. Each command occupies only one line,  and blank lines in the
  482. command  group    are  not permitted.   The  command  line  is
  483. structured as follows:
  484.  
  485.       l[o][command]
  486.  
  487. where:
  488.     l is the single character used to invoke the command
  489.      note that it may be upper- or lower-case
  490.     o is an opening option, which is one of:
  491.      :nn -- go to Menu nn
  492.      !   -- have MENU wait when the command is finished
  493.     command is an optional ZCPR3 command; note that if
  494.      the option is ":nn", then a command here makes no
  495.      sense
  496.  
  497.  nn Opt 
  498.  
  499.      The ":nn" option tells MENU to move to a different menu
  500. in the *.MNU file.  The first menu is number 1.  Example:
  501.  
  502.       -dpx
  503.       #
  504.            1st Menu:  A - Goto Menu 2     3 - Goto Menu 3
  505.       #
  506.       a:2
  507.       3:3
  508.       #
  509.             2nd Menu Command: 3 - Goto Menu 3
  510.       #
  511.       3:3
  512.       #x
  513.             3rd Menu Command: 2 - Goto Menu 2
  514.       #
  515.       2:2
  516.       ##
  517.  :nn Opt 
  518.  
  519.      In the first menu, the user may strike:
  520.  
  521.       "a" or "A" to goto Menu 2
  522.       "3" to goto Menu 3
  523.       ">"  or  "." to goto the next menu (Menu 2)
  524.       ^C to goto ZCPR3
  525.  
  526.      In the second menu, the user may strike:
  527.  
  528.       "3" to goto Menu 3
  529.       "*" or "<" or "," to goto Menu 1
  530.       ">" or "." to goto Menu 3
  531.       ^C to goto ZCPR3
  532.  
  533.      In the third menu, the user may strike:
  534.  
  535.       "2" or "<" or "," to goto Menu 2
  536.       "*" to goto Menu 1
  537.  
  538.  ! Opt 
  539.  
  540.      The "!" option causes MENU to pause and ask the user to
  541. "Strike  Any Key" before continuing after the  command    line
  542. has  been processed.   In this way,  if a command  generates
  543. information  to  be read by the user before MENU clears  his
  544. screen,  the "!" option may be used to give the user all the
  545. time he wants to read this display.
  546.  
  547.  "prompt" 
  548.  
  549.       Embedded  within any command line may be a  prompt  for
  550. user input.  This prompt takes the form of
  551.  
  552.       "prompt to user"
  553.  
  554. When  encountered,  MENU  will advance to the next line  and
  555. print the text contained within the quotes.   MENU will then
  556. wait for the user to input any text he desires followed by a
  557. RETURN.    At  this  point,  the  text    the  user  input  is
  558. capitalized and placed into the command line at the point of
  559. the prompt.
  560.  
  561.      If  the  prompt  appears at the end of a  MENU  command
  562. line,  the trailing quote is not required.   As many prompts
  563. as desired may appear within a MENU command line.  Examples:
  564.  
  565.  "prompt" 
  566.  
  567.     -dxp
  568.     #
  569.      A - Run XDIR without Pause or Input
  570.      B - Run XDIR and Pause before Returning to MENU
  571.      C - Run XDIR, Allow User Input, and Pause before
  572.           Returning to MENU
  573.      M - Run MCOPY, Allow User Input of Dest Dir, Allow
  574.           User Input of Source Dir and File, and Pause
  575.           before returning to MENU
  576.      Z - Run Any ZCPR3 Command and Pause before
  577.           Returning to MENU
  578.     #
  579.     m!mcopy "Destination Dir? "="Source DIR:AFN?  "
  580.     z!"Enter Command Line --
  581.     axdir
  582.     b!xdir
  583.     c!xdir "Enter Ambiguous File Name --
  584.     ##
  585.  
  586.  "prompt" 
  587.  
  588.      Note  the Space right before the "Prompt form in the  C
  589. command.   This space is significant to keep the command and
  590. user  input from running together.   This "run together"  is
  591. desired  for the Z command.   Also note the dual prompt  for
  592. the M command.
  593.  
  594.      With the M command,  the following prompts will  appear
  595. (and sample input):
  596.  
  597.       Destination Dir? BACKUP:
  598.       Source DIR:AFN?  *.TXT
  599.  
  600. and the following command line is built:
  601.  
  602.       MCOPY BACKUP:=*.TXT
  603.  
  604.  Variables 
  605.  
  606.      The command text which is specified in the MENU command
  607. line  can contain embedded variables which MENU will  expand
  608. when the command line is processed.   These variables, which
  609. are  denoted  by a dollar sign ($) followed by    one  or  two
  610. characters, are defined as follows:
  611.  
  612.      Variable  Expands as
  613.      --------  ----------
  614.        $C      Current DIR ('Noname' if not defined)
  615.        $D      Current Disk
  616.        $U      Current User Area
  617.        $Fn     FILENAME.TYP for ZCPR3 System File n
  618.        $Nn     FILENAME for ZCPR3 System File n
  619.        $Tn     TYP for ZCPR3 System File n
  620.        $$      Place a single $ in command line
  621.  
  622.      These  variables  can also be used in the menu  display
  623. itself,  and  their  values  will be  substituted  when  the
  624. display is generated.  Example:
  625.  
  626.  Variables 
  627.  
  628.    -dpx
  629.    #
  630.            Menu to Run M80 Assembler
  631.                   Current File: $F1
  632.                   Directory: $D$U
  633.       F - Define File
  634.       E - Edit $F1          P - Page $F1
  635.       A - Assemble $F1
  636.    #
  637.    fsetfile 1 "Filename? "
  638.    eedit $f1
  639.    azex m80 $n1
  640.    ppage $f1
  641.    ##
  642.  
  643.  Variables 
  644.  
  645. Notes:
  646.  
  647.      1. The ZCPR3 utility SETFILE is used to define the name
  648. of  a  ZCPR3  System  File.   There are  four  System  Files
  649. available,  and they can be referenced by $F1 to $F4, $N1 to
  650. $N4, and $T1 to $T4.
  651.  
  652.      2. The A command shows the execution of ZEX.  MENU is a
  653. true ZCPR3 Shell,  and,  as such, ZEX commands can be issued
  654. from it and will run on top of it.   The prompt for the  ZEX
  655. command lines will be "Menu>".
  656.  
  657.      3.  Assuming that "MYFILE.MAC" is assigned to the ZCPR3
  658. System File 1 and the user is logged into disk B user 1, the
  659. following  screen  shows how the display and  the  resulting
  660. command lines will be expanded when execution occurs:
  661.  
  662.  Variables 
  663.              Display 
  664.  
  665.            Menu to Run M80 Assembler
  666.                   Current File: MYFILE.MAC
  667.                   Directory: B1
  668.       F - Define File
  669.       E - Edit MYFILE.MAC         P - Page MYFILE.MAC
  670.       A - Assemble MYFILE.MAC
  671.  
  672.  
  673.          Command Lines 
  674.     Menu Command                Expansion 
  675.  
  676.    fsetfile 1 "Filename? "     SETFILE 1 "Filename? "
  677.    eedit $f1               EDIT MYFILE.MAC
  678.    azex m80 $n1            ZEX M80 MYFILE
  679.    ppage $f1               PAGE MYFILE.MAC
  680.  
  681.  Highlighting 
  682.  
  683.      Just  like  the HELP utility can take advantage of  the
  684. highlighting facility provided in the Z3TCAP,  so can  MENU.
  685. For those ZCPR3 Systems with a properly-installed TCAP, MENU
  686. will  use  the    clear screen command to refresh  the  user's
  687. screen    and  highlighting  can be enabled  and    disabled  by
  688. embedding  ^A (to turn on highlighting) and ^B (to turn  off
  689. highlighting) into the *.MNU file.
  690.  
  691.      It is recommended that when highlighting is turned  on,
  692. it  should  be turned off in the same line  for  consistency
  693. sake and appearance.
  694.  
  695.      Example:
  696.  
  697.  Highlighting 
  698.  
  699.    #
  700.       ^AThis is highlighted^B and this is not
  701.    #
  702.  
  703. will appear with "This is highlighted" in a highlighted mode
  704. like this:
  705.  
  706.       This is highlighted and this is not
  707.  
  708.  
  709.  Closing 
  710.  
  711.                     Closing Notes 
  712.  
  713.      As  many commands as the printable ASCII character  set
  714. (without lower-case letters and the MENU command characters)
  715. will allow are permitted by MENU.   The text,  however,  for
  716. each  menu must be able to fit on a screen with the  command
  717. prompt    at  the  bottom.   This means that the    text  cannot
  718. exceed 22 lines.
  719.  
  720.      MENU  fits in nicely to the ZCPR3 System  of  programs.
  721. The information section on "MENU's Relationship to the ZCPR3
  722. System"  explains how MENU and the other ZCPR3 programs work
  723. together.
  724.  
  725.      The  following  ASCII  characters may NOT    be  used  as
  726. commands since they are used elsewhere:
  727.  
  728.       <SPACE>   #     %    ,    .    <    >      *    <DEL>
  729.       <Any Char Less than Space>
  730. :M
  731.  
  732.           MENU Programming Command Summary 
  733.  
  734.      Each  MENU command occupies only one  line,  and  blank
  735. lines  in the command group are not permitted.     The command
  736. line is structured as follows:
  737.  
  738.       l[o][command]
  739.  
  740. where:
  741.     l is the single character used to invoke the command
  742.      note that it may be upper- or lower-case
  743.     o is an opening option, which is one of:
  744.      :nn -- go to Menu nn
  745.      !   -- have MENU wait when the command is finished
  746.     command is an optional ZCPR3 command; note that if
  747.      the option is ":nn", then a command here makes no
  748.      sense
  749.  
  750. The MENU commands are:
  751.  
  752.  Command       Function 
  753.  
  754.     :nn       Goto Menu nn, where the first menu is Menu 1
  755.     !          Wait after command line is executed before
  756.            processing the menu
  757.     "Prompt"  Prompt the user for input and accept it
  758.  
  759. The MENU variables are:
  760.  
  761.  Variable       Expands to 
  762.  
  763.     $C     Current DIR ('Noname' if not defined)
  764.     $D     Current Disk
  765.     $U     Current User
  766.     $Fn    FILENAME.TYP for System File n
  767.     $Nn    FILENAME for System File n
  768.     $Tn    TYP for System File n
  769.     $$     $
  770.  
  771. Note: System Files can be defined by the SETFILE command.
  772.  
  773. The Highlighting Embedded Characters are:
  774.      ^A   Turn ON Highlighting
  775.      ^B   Turn OFF Highlighting
  776.  
  777. Note:  It is recommended that if highlighting is turned  on,
  778. it should be turned off in the same line.
  779.  
  780.  
  781.  
  782. The  following ASCII characters may NOT be used as  commands
  783. since they are used elsewhere:
  784.  
  785.       <SPACE>   #     %    ,    .    <    >      *    <DEL>
  786.  
  787.       <Any Char Less than Space>
  788.  
  789. :Z
  790.  
  791.        MENU's Relationship to the ZCPR3 System 
  792.  
  793.      MENU,  like most of the ZCPR3 utilities, interacts with
  794. the system as a whole and cannot be used with systems  other
  795. than ZCPR3.  In particular, MENU requires the ZCPR3 Multiple
  796. Command  Line  Buffer  and  Shell  Stack  facilities  to  be
  797. available  to it and cannot run without them.    MENU invokes
  798. command  lines    via the Command Line Buffer and  returns  to
  799. itself thru the Shell Stack.   It also uses the ZCPR3 System
  800. Files for some of its variables and the Z3TCAP facility  for
  801. its screen manipulation (highlighting).
  802.  
  803.      MENU is installed by Z3INS.
  804.  
  805.  
  806.      Also, CD (Change Directory) and STARTUP (or, ST for CD)
  807. can  come  into play with MENU.   When CD logs into  to  new
  808. directory,  it    looks for the file ST.COM and executes it if
  809. there  is one.     ST is simply STARTUP renamed,    and  STARTUP
  810. will  load the Multiple Command Line Buffer with  a  command
  811. line and then terminate.
  812.  
  813.      From  the point of view of MENU,  the command loaded by
  814. ST  could be MENU.   The effect of this is to  automatically
  815. enter  MENU  when  the    user employs CD  to  enter  a  given
  816. directory.
  817.  
  818.      Hence,  by using CD,  a user can enter a directory  and
  819. suddenly  find    himself  in a menu instead of at  the  ZCPR3
  820. command  level.   This    is  good for  applications  where  a
  821. directory  is  set  aside for a specific  purpose  and    only
  822. certain  operations  are  to be performed  in  it,  such  as
  823. cataloging disks or handling accounts.
  824.  
  825.  
  826.      Now  that    MENU is running for the  directory,  a    MENU
  827. command  could be another CD to another  directory.   Or  it
  828. could simply be a DU: form.  Example:
  829.  
  830.       #dp
  831.            A - Enter ZCPR Directory
  832.            B - Enter A0:
  833.       #
  834.       acd zcpr:
  835.       ba0:
  836.       #
  837.  
  838.      Here,  if A is issued, then CD will move into ZCPR: and
  839. execute ST.COM if there is one there.    If B is issued,  the
  840. user  is logged into A0:.   MENU is the next command in both
  841. cases (command lines are "CD ZCPR;MENU" and "A0:;MENU"),  so
  842. MENU automatically reinvokes and looks for MENU.MNU.   If it
  843. finds it, we are in another MENU system, and, if it doesn't,
  844. we are back to ZCPR3 command level.
  845.  
  846.      Under the A option, if CD finds ST.COM, ST will execute
  847. its function and,  unless this function pops the Shell Stack
  848. (SHPOP command), MENU will reinvoke after it is complete.
  849.  
  850.      Under  the B option,  we will run MENU next and  simply
  851. exit if a MENU.MNU file is not found.
  852.  
  853. :E
  854.  
  855.             MENU Error Messages 
  856.  
  857.      In order to make MENU as small as possible,  the  error
  858. messages  have been reduced to a minimum.   MENU provides  a
  859. minimum indication that something is wrong and aborts.
  860.  
  861.      The  program  MENUCK  is  designed  to  tell  you    more
  862. specifically  what  is    wrong.     MENUCK is  a  *.MNU  Syntax
  863. Checker, and it looks for all sorts of error conditions that
  864. can occur in a *.MNU file.
  865.  
  866.      MENU provides the following minimal error messages:
  867.  
  868.  
  869.            Message             Meaning 
  870.  
  871.       No Shell Stack      Shell Stack Not Available
  872.       No Command Line     Command Line Buffer Not Avail
  873.       Shell Stack Full    Shell Stack is Full
  874.       Shell Stack Entry
  875.          Size          Shell Stack Entries are too
  876.                    short for MENU cmd line
  877.       File x.typ Not
  878.          Found          Menu File Not Found
  879.       TPA Full          Memory is Full
  880.       <Bell>          User Command is in Error
  881.       Password Error      Invalid Password Given
  882.       Structure Error     *.MNU File Structure Error
  883.  
  884. :2
  885.  
  886.  Command   MENUCK 1.3
  887.  
  888.  Syntax 
  889.      MENUCK dir:ufn     <-- default file type is MNU
  890.  
  891.  Function 
  892.  
  893.      MENUCK  is used to check the syntax of a *.MNU file for
  894. the ZCPR3 Menu Shell,  MENU.  MENU is optimized for size and
  895. speed,    and,  in keeping it small, built-in diagnostics were
  896. reduced  to the minimum.   MENUCK is intended to be used  to
  897. analyze  *.MNU files and provide informative diagnostics  on
  898. any syntactical errors with them.
  899.  
  900.  Options 
  901.      None
  902.  
  903.  Comments 
  904.  
  905.      MENUCK  checks to see if the size of the *.MNU file  is
  906. too large for the TPA available to the MENU  command.    This
  907. is an additional check beyond the normal syntax check.
  908.  
  909.      MENUCK  identifies  the  location    of  errors  by    line
  910. number.  The first line in the file is line number 1.
  911.  
  912.  Selected Error Messages 
  913.  
  914.      Self-Explanatory.
  915.  
  916.  Examples of Use 
  917.  
  918.      MENUCK MYMENU
  919.       -- perform check on MYMENU.MNU
  920.  
  921.