23 Dec 90 PDMSTK.COM (Shell Stack Version of PDMSHELL) This is a small shell for ZCPR3.x systems to demonstrate a method of using Pull-Down Menus using the ZCPR3.x Shell Stack in which the return invocation to the shell is placed on the stack. It serves the same purpose of enhancing (or at least changing) the appearance of our 8-bit systems using the Pull-Down Menu features provided in an earlier demonstration program which used the Multiple Command Line and the Version 4 libraries. This program overcomes a weakness in the Command Line method of causing program re-execution, in which a "vanilla" version of WordStar 4 would never exit. PDMSTK requires a Termcap correspon- ding to the definitions in VLIB4D and later versions. PDMSTK may be renamed, and will adapt itself to the new name for re- invocation. HOW IT WORKS. PDMSHZ accesses internal tables of program names and Menu Selection headings, and relates user selections using the VLIB Version 4 routines to program names. It then builds a Return String consisting of the DU where the Shell file is located, the name (if renamed) and the any specified DU as the "Home" location which was in the original invocation. This string is then stored on the top of the Shell Stack. A Command line is then constructed consisting of the selected COM file name and optional arguments. This command line is then prefixed into the Multiple Command Line buffer and execution is passed to ZCPR 3.x. An alternate way of doing the same thing is to add the re-invocation string after the selected program separated with a Semicolon as was done in a previous demonstration program. Because both the DU for the PDMSHZ program and the target DU may be entered, the program may be loaded from one location and logged into another so that directory scans of the default directory will only display files in the target DU. Invocation is of the form: PDMSHZ [du: | dir:] If any features needed by the pull-down menu system are absent as reflected in the Termcap, a message to that effect will be displayed, and the program will not operate. If all checks are satisfied, a prompt for any key to begin execution will be displayed. When any key is pressed, the screen will clear and the menu selection bar will be displayed with the current catagory shown in reverse or highlighted video. Different selections may be made by moving the cursor right (with Control-D) or left (with Control-S) until the desired catagory is reached. The selections in that catagory are displayed by pressing Return (or Enter). The currently selected item will be shown in reverse video or highlighted, and may be changed by moving the cursor up (with Control-E) or down (with Control-X). Pressing Return (or Enter) will begin the sequence of selecting that program. Some programs require or allow arguments and this may be specified for each entry in the shell (see Configuration section). If no arguments are required, the desired program is immediately loaded and executed, with control passed back to the shell after a pause marker to permit any screen output to be seen. If arguments are specified for the selected program, a prompt will be issued, and any arguments may be entered as if the program was entered directly from the command line. When entry of arguments is ended with a Return, the selected program is loaded and executed with the specified arguments. At any point in operation of the shell, pressing the ESCape key will abort to the main menu bar with the first selection chosen as current. The ESCape key may also abort the selection if it was chosen by mistake. To avoid inadvertant exitting of the shell, a confirmation is required, and a Return cause the shell to terminate, and return to ZCPR3.x in the directory selected as the target in the shell invocation. CONFIGURATION. Entries for each of the three pull-down selections may be changed by using the PDMSHELL.OVL source code, an assembler such as ZMAC which can produce standard Intel HEX files, and an overlay loader such as MYLOAD.COM or the older MLOAD. WARNING: Do not alter the length or positioning of the entry fields unless you make the corresponding chanes to the source code! Configuring the program is a three step process. 1. Edit PDMSHELL.OVL to reflect your entries heeding the above warning 2. Assemble it to PDMSHELL.HEX 3. Overlay it ondo PDMSTK.COM (or whatever you have named it) If you are using MYLOAD, Step 3 along with renaming may be combined as: MYLOAD PDMTEST=PDMSTK,PDMSHELL The command line indicated will create PDMTEST.COM by overlaying PDMSHELL.HEX over PDMSTK.COM without affecting either source file. COMMENTS/BLAME/ETC. This program was created to spark a little interest in the enhanced capabilities of the new libraries, and new user interfaces. I would be interested in any experiences and comments about your use of this program, but in the standard way, can make NO claims on useability for any specific purpose, reliability, or effects on any particular computer system, etc. Harold F. Bower