home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / UTILS / DIRUTL / MENU.DOC < prev    next >
Text File  |  2000-06-30  |  7KB  |  199 lines

  1.  
  2.  
  3.         Menu                                              25 November 1982
  4.  
  5.  
  6.         
  7.         
  8.         Menu  is  a  general  purpose menu processor for CP/M. It can join
  9.         programs and systems written in various languages together into  a
  10.         single  coherent  menu-driven structure. Menu is invoked from CP/M
  11.         by typing: 
  12.         
  13.         menu <menufile>
  14.         
  15.         where <menufile> is expected to be a file whose file name ends  in
  16.         the  extension  '.MNU'.  The  '.MNU' extension does not need to be
  17.         given. The <menufile> must consist of lines  describing  a  screen
  18.         to  be  displayed,  a  set  of  single-character responses to that
  19.         screen, and a command  line  for  each  response.  The  associated
  20.         command  line  is  executed  by  Menu  when  the  user  has made a
  21.         permissible response. 
  22.         
  23.         The menu file consists of two main sections. First, the screen  to
  24.         be  displayed.  Second, the allowed responses to the menu and CP/M
  25.         command lines for these responses. 
  26.         
  27.         The first lines in the menu file  are  simply  the  screen  to  be
  28.         displayed.  The  first line will usually be a series of characters
  29.         to clear the screen. The next lines  are  an  image  of  the  menu
  30.         screen. 
  31.         
  32.         These  image lines are followed by a single period ('.') on a line
  33.         by itself. This line is not displayed; it is only used to end  the
  34.         screen  image.  The cursor is left on the screen at the end of the
  35.         last screen line; that is, at the character  position  immediately
  36.         following   the  last  character  in  the  line  before  the  line
  37.         containing a single period. 
  38.         
  39.         The last section is a series of  lines  describing  the  responses
  40.         allowed  and  the CP/M command lines to be executed based on those
  41.         responses. Each  line  consists  of  three  fields.  These  are  a
  42.         response character, a return character and a CP/M command line. 
  43.         
  44.         The  response  character is a single character representing one of
  45.         the allowable responses. This is the character to be typed by  the
  46.         user  to  select  that  particular  response. Upper and lower case
  47.         response characters are treated as  if  they  were  all  the  same
  48.         case.  A  blank  can  be  used  to  represent a response of just a
  49.         <RETURN>. 
  50.         
  51.         The response character is followed by a return character. This  is
  52.         a  '<'  if  the  system  is  to  return  to  this  particular menu
  53.         immediately after executing the CP/M command line. If  the  system
  54.         should  not  automatically  return  to  this  menu,  the character
  55.         following the allowable response character is a '>'. 
  56.         
  57.  
  58.  
  59.                                      - 1 -
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.         Menu                                              25 November 1982
  70.  
  71.  
  72.         The rest of the line, that portion following the '>'  or  '<',  is
  73.         the  CP/M  command  line  to  be invoked if the response character
  74.         which began this  line  is  the  actual  character  selected.  For
  75.         readability,   blanks  may  be  used  freely  after  the  response
  76.         character as well as the '<' and '>' characters. 
  77.         
  78.         For example : 
  79.         
  80.              =======================================================
  81.         
  82.                                 << End of Period Processing >>
  83.         
  84.         
  85.                                 < 1 >           End of Day
  86.         
  87.                                 < 2 >           End of Week
  88.         
  89.                                 < 3 >           End of Month
  90.         
  91.                                 < 4 >           End of Year
  92.         
  93.                                 < 5 >           Return to Master Menu
  94.         
  95.         
  96.                  Your Selection ? 
  97.          .
  98.          1 < ENDDAY
  99.          2 < ENDWEEK
  100.          3 < ENDMONTH
  101.          4 < ENDYEAR
  102.          5 > MASTMENU
  103.              =======================================================
  104.         
  105.         Everything from 
  106.         
  107.                                 "<< End of Period Processing >>" 
  108.         
  109.         through 
  110.         
  111.                 "Your Selection ? " 
  112.         
  113.         would appear on the screen. The cursor  would  appear  just  after
  114.         the '?' in "Your Selection ? ". 
  115.         
  116.         The  user  may  then  choose  one of the selections. The allowable
  117.         responses in this example are the characters '1', '2',  '3',  '4',
  118.         and  '5'.  Menu  will  not accept anything other than one of these
  119.         characters or a ^C. 
  120.         
  121.         If '1', '2', '3' or  '4'  is  typed,  the  programs  'ENDDAY.COM',
  122.         'ENDWEEK.COM',  'ENDMONTH.COM'  and  'ENDYEAR.COM',  respectively,
  123.  
  124.  
  125.                                      - 2 -
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.         Menu                                              25 November 1982
  136.  
  137.  
  138.         would be executed. For each  of  these,  this  menu  would  appear
  139.         again  after  the  selected  program is finished. If option '5' is
  140.         chosen,  the  program  'MASTMENU.COM'  is  called,  and  will  not
  141.         return. 
  142.         
  143.         Menus  can,  of course, invoke other menus for a heirarchical menu
  144.         structure. 
  145.         
  146.         Since Menu uses CP/M's submit facility, the system drive must  not
  147.         be  write  protected. Using the submit facility also means that if
  148.         CP/M detects  a  character  at  the  console  while  preparing  to
  149.         process  a submitted command line, the entire submitted batch will
  150.         be aborted. There seems to be  no  way  to  stop  this,  short  of
  151.         patching  CP/M.  To avoid this hole as much as possible, Menu will
  152.         execute CP/M command lines  directly,  and  will  use  the  submit
  153.         facility  only  to return to a menu afterwards. Menu may itself be
  154.         called  within  a  submit  file  without  disturbing  the  ongoing
  155.         submitted  process. However, the standard CP/M program Submit will
  156.         make it impossible to return to any previous menus. 
  157.         
  158.         For information or to report bugs, contact: 
  159.         
  160.                            Concept Development Systems
  161.                         Compuserve (Micronet) #70235,403
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                                      - 3 -
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.