; The ZCPR3 MENU Shell -- ZCPR3 Utilities -- 1 - MENU 2 - MENUCK -- Using MENU -- -- Programming MENU -- U - Using MENU P - Programming *.MNU Files S - Summary of User Cmds C - *.MNU Internal Commands E - MENU Error Messages M - Programming Cmd Summary Z - MENU and ZCPR3 :1 Command: MENU 3.2 Syntax: MENU <-- run MENU.MNU or MENU ufn <-- run menu contained in file Function: MENՠ i th ZCPR men front-en processor I i ZCPR Shel whic read *.MN fil an processe command fro it. Options: None Comments: MENՠ i tru ZCPR Shell I i describe i thi HELP file. Selected Error Messages: "N Comman Line mean tha th ZCPR Syste doe no suppor a externa Comman Lin Buffer MENՠ mus hav thi t run. "N Shel Stack mean tha th ZCPR Syste doe no support a Shell Stack. MENU must have this to run. "Shel Stac Full mean tha th Shel Stac i ful and MENU cannot push itself onto the stack. "Shel Stac Entr Size mean tha th Shel Stac elements are too short for MENU to store its parameters. "TP Full mean tha ther i no enoug roo i th TPA to load the *.MNU file. Examples of Use: See this HELP file MENՠ i th ZCPR Menu-Oriente Comman Preprocessor I act a front-en t ZCPR3 providin menu-oriente use interfac t ZCPR3 It functio ca b represente b th followin diagram: ------ ------ ------ ------ |M | |Z | |B | |P | User | E | | C | | D | | g | Menu ---->| N |--->| P |--->| O |--->| m | Command | U| | R| | S| | s| | | | 2| | | | | ------ ------ ------ ------ Th "Use Men Command i singl characte tha th use strike whic instruct MEN t perfor function Onc MENՠ begin processin thi function i build comman lin fo ZCPR3 optionall askin th use fo furthe inpu (suc a fil name) an the passe th comman lin t ZCPR vi th Comman Lin Buffer ZCPR the run th comman lin return t MENU. MENՠ build comman line base o simpl inpu fro th user Th use nee neve kno wha th actua comman lin is Th comman lin itsel i alway o th form: A a example comman buil b MEN t ru XDI wit use inpu fo fil nam specification coul loo lik th following: XDIR Whe MEN i executed i look fo th fil MENU.MN i th curren directory I i find one i load i an begin processing I i doe no fin one i simpl exits fil nam ma b specifie i th MENՠ comman line to select a file other than MENU.MNU. Th MENU.MNՠ fil ca contai u t 25 menu t b processe b MENU Th MEN wil begi processin a th firs men i MENU.MNU. MEN itsel i CO file lik an othe progra unde ZCPR3 Unlik mos othe programs however i generate comman line t b execute b ZCPR an store it retur comman i th Shel Stack I thi wa loo i se up: -->--+->- MENU ->- ZCPR3 ->-+ ^ v | | +-<- Command Line -<---+ Onl MENՠ itsel ca terminat thi loop I th MEN programme wishes h ca se u th MENU.MNU fil s tha thi loo wil neve b exited o h ca se u th fil t allo anyon t exi a an tim o jus specia perso wh know passwor t exi whe h wishe to Ther i lo o flexibilit designe int th system an i wil b discusse later in the section on programming MENU.MNU files. MENU.MNՠ fil ca b se u t execut an ZCPR comman o sequenc o commands Th MENU.MN fil ca als b se u t no allo th use t leav MENU t allo hi t leav MEN a will o t allo hi t leav MEN onl i h know password. Thi HEL fil i divide int tw basi parts Th inf section o "Usin MENU an "Summar o MEN Commands ar designe t b rea b perso wantin t us MENՠ bu no wantin t lear ho MEN work o ho t progra it Thes section describ ho t mov fro on men t another ho t issu MEN commands an ho t leav MEN i th optio i presente t him. Th othe section o thi HELР fil describ th programmin aspect o MEN an ar intende t b use a a onlin referenc fo th MENՠ programmer Th MEN comman programmin summar i especiall usefu i tha i provide summar o th command whic th MEN programme ma issu t MEN withi *.MNU file. :U Whe MEN i firs invoked on o thre thing wil happen: 1 MENՠ wil appea an b page u t fil th screen comman promp wil appea a th botto o th menu 2 MEN wil appea an no b page u t fil th screen comman promp wil appea a th botto o th menu 3 comman promp wil appea wit n men (thi i called the Expert Mode) I a an tim Men Displa i garble o th use desire t se th curren Men (a sometime happen whe yo ar i Exper Mode) jus strik th RETURΠ key Th RETUR ke refreshe th men a al times. Th promp whic appear a th botto o you Men displa ha th followin genera form: Command (=Menu,^C=ZCPR3,*=1st Menu,<=Prev Menu,>=Next Menu) - Ther ca b u t 25 menu i on MENU.MN file Th MEN comman promp varie t reflec this Fo instance i onl on Men wa presen an th optio t abor ou o MENՠ t ZCPR wa no available the th Men Comman promp woul tak it simples form lookin like: Command (=Menu) - Strik th RETUR ke a thi tim t refres th Men Displa o strik th characte o Men Option Thes ar th onl choices an strikin characte whic i no th RETUR ke o men optio result i th bel sounding. I th th optio t exi t ZCPR wa availabl an ther i onl on Men i th MENU.MNՠ file the th comman lin wil loo lik this: Command (=Menu,^C=ZCPR3) - Th optio o abortin t ZCPR b strikin Control- (hol dow o th Control o CTRL ke an strik th lette C i no available Thi wil retur t ZCPR an exi MENU. On brie not o optio letter befor goin on I on o you option i lette i th rang fro t Z the cas i no significant an yo ca invok th optio A say b strikin a upper- o lower-cas A. I ther i mor tha on men i th *.MNՠ file th comman lin option becom slightl mor complex bu the ar stil quit eas t follow. I th followin examples assum tha th optio t exi t ZCPR i off s th "^C=ZCPR3 optio wil NO appear. Fro th firs men i th file th comman lin wil loo lik th following: Command (=Menu,>=Next Menu) - T advanc t th nex menu strik th "> o th ". character O mos keyboards "> i th shif o th "." s MEN permit eas movemen withou havin t worr abou shiftin th keyboar al th time. I a th las men i th file th comman lin wil loo lik th following: Command (=Menu,*=1st Menu,<=Prev Menu) - Thi allow th use t strik th "* characte t jum bac t th firs men i hi *.MN file I "< o ", i stuc ("< i usuall th shif o th ",") the th use wil bac u on men t th previou men i th file. I th use i somewher i th middl o th MENU.MN file hi comman lin wil loo lik this: Command (=Menu,*=1st Menu,<=Prev Menu,>=Next Menu) - Again "* wil g directl t th firs menu "< o ", wil g t th previou menu an "> o ". wil g t th nex menu Strikin th RETUR ke wil refres th men display. On las optio th use ha unde MEN involve acces t Syste Menu Thi men i specia i tha ther i onl on wa t ge t i -- vi th "$ command. Th Syste Men i intende t giv privelege user acces t specia command tha th res o th user can' run I Syste Men i available MEN wil respon t th "$ comman wit th prompt: Pass? Th use i give on chanc t typ i th correc passwor t ente th Syste Menu I h i wrong th messag "Passwor Error wil appea an h wil b returne t th men h cam from I h i correct h wil ente th Syste Menu Physically th Syste Men i alway th las men i th file an it comman promp is: Command (=Menu,*=1st Menu,<=Prev Menu) - I th use i a th men jus befor th Syste Menu th "> wil no functio t allo hi t ente it eve th ther technicall i "Nex Menu" Th "> optio i th comman lin wil no appear Th onl wa t ente Syste Men i thr th "$ command. I summary movin abou withi MEN i quit easy "* move th use t th firs menu "< t th previou menu "> t th nex menu an "$ t th Syste Menu. :S The full Menu Command Line looks like the following: Command (=Menu,^C=ZCPR3,*=1st Menu,<=Prev Menu,>=Last Menu) - The Menu Commands are: Command Function Refresh Menu Display (RETURN Key) ^C Exit to ZCPR3 (Control-C) * Jump to the First Menu < or , Jump to the Previous Menu > or . Jump to the Next Menu $ Jump to the System Menu (Password Required) other Menu Option or Invalid Command; letters are automatically capitalized, so a=A :P Programming *.MNU Files Th *.MNՠ fil i simpl tex fil whic ma b create䠠 wit an conventiona CP/͠ editor includin WordStar MENՠ ignore th Mos Significan Bi o al bytes s editor lik WordStar whic occasionall se thi bit ca b used. Al *.MN file hav th sam genera structure Th firs lin i eithe globa optio lin o th beginnin o men display I globa optio line i begin wit th characte "-" an thi characte i immediatel followe b globa optio characters Th globa optio line the look lik this: -options Afte th globa optio line i any come th firs menu Eac men i structure a follows: #options # menu commands The following are two sample Menu File structures: -options #options #options # # commands commands ## #options # commands ## Ther ar fou optio characters I usin them cas i no significant Thes optio character are: Option Function C Display Command Line to User D Display Menu to User P Page Out Menu Display X Allow User to Exit to ZCPR3 Th optio display th comman lin buil b MEN t th user Thi optio i primaril intende fo debuggin purposes t allo th programme t se wha command ar bein built I i instructiv t th user however an ma b employe fo tha purpos a well. Th optio display th men t th user I th displa functio i no turne on w ar i Exper Mode an th command ar availabl withou men display RETURN o course ca b use t invok th displa i necessary. Th optio page ou th men display I th pag functio i engaged the th MEN progra output o ". t got th nex men (Men 2) ^ t got ZCPR3 In the second menu, the user may strike: "3" to goto Menu 3 "*" or "<" or "," to goto Menu 1 ">" or "." to goto Menu 3 ^C to goto ZCPR3 In the third menu, the user may strike: "2" or "<" or "," to goto Menu 2 "*" to goto Menu 1 ! Opt Th "! optio cause MEN t paus an as th use t "Strik An Key befor continuin afte th comman lin ha bee processed I thi way i comman generate informatio t b rea b th use befor MEN clear hi screen th "! optio ma b use t giv th use al th tim h want t rea thi display. "prompt" Embedde withi an comman lin ma b promp fo user input. This prompt takes the form of "prompt to user" Whe encountered MENՠ wil advanc t th nex lin an prin th tex containe withi th quotes MEN wil the wai fo th use t inpu an tex h desire followe b RETURN A thi point th tex th use inpu i capitalize an place int th comman lin a th poin o the prompt. I th promp appear a th en o MENՠ comman line th trailin quot i no required A man prompt a desire ma appea withi MEN comman line Examples: "prompt" -dxp # A - Run XDIR without Pause or Input B - Run XDIR and Pause before Returning to MENU C - Run XDIR, Allow User Input, and Pause before Returning to MENU M - Run MCOPY, Allow User Input of Dest Dir, Allow User Input of Source Dir and File, and Pause before returning to MENU Z - Run Any ZCPR3 Command and Pause before Returning to MENU # m!mcopy "Destination Dir? "="Source DIR:AFN? " z!"Enter Command Line -- axdir b!xdir c!xdir "Enter Ambiguous File Name -- ## "prompt" Not th Spac righ befor th "Promp for i th command Thi spac i significan t kee th comman an use inpu fro runnin together Thi "ru together i desire fo th command Als not th dua promp fo the M command. Wit th command th followin prompt wil appea (and sample input): Destination Dir? BACKUP: Source DIR:AFN? *.TXT and the following command line is built: MCOPY BACKUP:=*.TXT Variables Th comman tex whic i specifie i th MEN comman lin ca contai embedde variable whic MEN wil expan whe th comman lin i processed Thes variables whic ar denote b dolla sig ($ followe b on o tw characters, are defined as follows: Variable Expands as -------- ---------- $D Current Disk $U Current User Area $Fn FILENAME.TYP for ZCPR3 System File n $Nn FILENAME for ZCPR3 System File n $Tn TYP for ZCPR3 System File n $$ Place a single $ in command line Thes variable ca als b use i th men displa itself an thei value wil b substitute whe th display is generated. Example: Variables -dpx # Menu to Run M80 Assembler Current File: $F1 Directory: $D$U F - Define File E - Edit $F1 P - Page $F1 A - Assemble $F1 # fsetfile 1 "Filename? " eedit $f1 azex m80 $n1 ppage $f1 ## Variables Notes: 1 Th ZCPR utilit SETFIL i use t defin th nam o ZCPR Syste File Ther ar fou Syste File available an the ca b reference b $F t $F4 $N t $N4, and $T1 to $T4. 2 Th comman show th executio o ZEX MEN i tru ZCPR Shell and a such ZE command ca b issue fro i an wil ru o to o it Th promp fo th ZE command lines will be "Menu>". 3 Assumin tha "MYFILE.MAC i assigne t th ZCPR Syste Fil an th use i logge int dis use 1 th followin scree show ho th displa an th resultin comman line wil b expande whe executio occurs: Variables Display Menu to Run M80 Assembler Current File: MYFILE.MAC Directory: B1 F - Define File E - Edit MYFILE.MAC P - Page MYFILE.MAC A - Assemble MYFILE.MAC Command Lines Menu Command Expansion fsetfile 1 "Filename? " SETFILE 1 "Filename? " eedit $f1 EDIT MYFILE.MAC azex m80 $n1 ZEX M80 MYFILE ppage $f1 PAGE MYFILE.MAC Highlighting Jus lik th HEL utilit ca tak advantag o th highlightin facilit provide i th Z3TCAP s ca MENU Fo thos ZCPR System wit properly-installe TCAP MEN wil us th clea scree comman t refres th user' scree an highlightin ca b enable an disable b embeddin ^ (t tur o highlighting an ^ (t tur of highlighting int th *.MN file. I i recommende tha whe highlightin i turne on i shoul b turne of i th sam lin fo consistenc sake and appearance. Example: Highlighting # ^AThis is highlighted^B and this is not # wil appea wit "Thi i highlighted i highlighte mod lik this: This is highlighted and this is not Closing Closing Notes A man command a th printabl ASCI characte se (withou lower-cas letter an th MEN comman characters wil allo ar permitte b MENU Th text however fo eac men mus b abl t fi o scree wit th comman promp a th bottom Thi mean tha th tex canno excee 2 lines. MENՠ fit i nicel t th ZCPR Syste o programs Th informatio sectio o "MENU' Relationshi t th ZCPR System explain ho MEN an th othe ZCPR program wor together. Th followin ASCIɠ character ma NOԠ b use a command sinc the ar use elsewhere: # % , . < > * :M MENU Programming Command Summary Eac MEN comman occupie onl on line an blan line i th comman grou ar no permitted Th comman lin i structure a follows: l[o][command] where: l is the single character used to invoke the command note that it may be upper- or lower-case o is an opening option, which is one of: :nn -- go to Menu nn ! -- have MENU wait when the command is finished command is an optional ZCPR3 command; note that if the option is ":nn", then a command here makes no sense The MENU commands are: Command Function :nn Goto Menu nn, where the first menu is Menu 1 ! Wait after command line is executed before processing the menu "Prompt" Prompt the user for input and accept it The MENU variables are: Variable Expands to $D Current Disk $U Current User $Fn FILENAME.TYP for System File n $Nn FILENAME for System File n $Tn TYP for System File n $$ $ Note Syste File ca b define b th SETFIL command. The Highlighting Embedded Characters are: ^A Turn ON Highlighting ^B Turn OFF Highlighting Note I i recommende tha i highlightin i turne on it should be turned off in the same line. Th followin ASCI character ma NO b use a command sinc the ar use elsewhere: # % , . < > * :Z MENU's Relationship to the ZCPR3 System MENU lik mos o th ZCPR utilities interact wit th syste a whol an canno b use wit system othe tha ZCPR3 I particular MEN require th ZCPR Multipl Comman Lin Buffe an Shel Stac facilitie t b availabl t i an canno ru withou them MEN invoke comman line vi th Comman Lin Buffe an return t itsel thr th Shel Stack I als use th ZCPR Syste File fo som o it variable an th Z3TCA facilit fo it scree manipulatio (highlighting). MENU is installed by Z3INS. Also C (Chang Directory an STARTU (or S fo CD ca com int pla wit MENU Whe C log int t ne directory i look fo th fil ST.CO an execute i i ther i one S i simpl STARTU renamed an STARTU wil loa th Multipl Comman Lin Buffe wit comman lin an the terminate. Fro th poin o vie o MENU th comman loade b SԠ coul b MENU Th effec o thi i t automaticall ente MENՠ whe th use employ CĠ t ente give directory. Hence b usin CD use ca ente director an suddenl fin himsel i men instea o a th ZCPR comman level Thi i goo fo application wher director i se asid fo specifi purpos an onl certai operation ar t b performe i it suc a catalogin disk o handlin accounts. No tha MEN i runnin fo th directory MEN comman coul b anothe C t anothe directory O i coul simpl b DU form Example: #dp A - Enter ZCPR Directory B - Enter A0: # acd zcpr: ba0: # Here i i issued the C wil mov int ZCPR an execut ST.CO i ther i on there I i issued th use i logge int A0: MEN i th nex comman i bot case (comman line ar "C ZCPR;MENU an "A0:;MENU") s MEN automaticall reinvoke an look fo MENU.MNU I i find it w ar i anothe MEN system and i i doesn't w ar bac t ZCPR comman level. Unde th option i C find ST.COM S wil execut it functio and unles thi functio pop th Shel Stac (SHPO command) MEN wil reinvok afte i i complete. Unde th option w wil ru MEN nex an simpl exi i MENU.MN fil i no found. :E MENU Error Messages I orde t mak MEN a smal a possible th erro message hav bee reduce t minimum MEN provide minimu indicatio tha somethin i wron an aborts. Th progra MENUCˠ i designe t tel yo mor specificall wha i wrong MENUC i *.MNՠ Synta Checker an i look fo al sort o erro condition tha ca occu i *.MN file. MEN provide th followin minima erro messages: Message Meaning No Shell Stack Shell Stack Not Available No Command Line Command Line Buffer Not Avail Shell Stack Full Shell Stack is Full Shell Stack Entry Size Shell Stack Entries are too short for MENU cmd line File x.typ Not Found Menu File Not Found TPA Full Memory is Full User Command is in Error Password Error Invalid Password Given Structure Error *.MNU File Structure Error :2 Command: MENUCK 1.0 Syntax: MENUCK dir:ufn <-- default file type is MNU Function: MENUCˠ i use t chec th synta o *.MN fil fo th ZCPR Men Shell MENU MEN i optimize fo siz an speed and i deepin i small built-i diagnostic wer reduce t th minimum MENUC i intende t b use t analyz *.MN file an provid informativ diagnostic o any syntactical errors with them. Options: None Comments: MENUCˠ check t se i th siz o th *.MN fil i to larg fo th TP availabl t th MENՠ command Thi is an additional check beyond the normal syntax check. MENUCˠ identifie th locatio o error b lin number. The first line in the file is line number 1. Selected Error Messages: Self-Explanatory. Examples of Use: MENUCK MYMENU -- perform check on MYMENU.MNU