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 / ZCPR2 / CFILES.HQP / CFILES.HLP
Text File  |  2000-06-30  |  22KB  |  560 lines

  1. Command File Processing
  2. Disk-Based Command Files -- SUB2
  3. SUB2 Error Messages
  4. SUB2 Command Summary
  5. Memory-Based Command Files -- ZEX
  6. ZEX Control Commands
  7. Restrictions on Command Files
  8. SUB2 and ZEX as Extended Command Processors Under ZCPR2
  9. :Command File Processing
  10.  
  11.      ┴ CommanΣ Filσ i≤ ß filσ containinτ commands¼á witΦ optiona∞ ì
  12. paramete≥á substitution¼á whicΦ caε bσ executeΣ b∙ ZCPR2«á  Thesσ ì
  13. command≤á arσá exactl∙ thσ samσ kind≤ oµ command≤á a≤á yo⌡á woulΣ ì
  14. issuσá a⌠á thσ console¼á anΣ an∙ commanΣ yo⌡ caε issuσá froφá thσ ì
  15. consolσá caεá bσ issueΣ froφ withiε ß CommanΣ Filσ (witΦá jus⌠á ß ì
  16. couple of restrictions).
  17.  
  18.      Thσá CommanΣ Filσ Facilitie≤ oµ SUB▓ anΣ ZE╪á arσá availablσ ì
  19. unde≥ ZCPR2«á  Simila≥ iε concep⌠ t∩ thσ SUBMI╘ facilit∙ oµ CP/M¼ ì
  20. botΦá SUB▓ anΣ ZE╪ arσ upward-compatablσ t∩ SUBMI╘ (an∙ SU┬á filσ ì
  21. caε ruε unde≥ theφ witΦ fe≈ restrictions).
  22.  
  23.      BotΦá SUB▓á anΣá ZE╪á begiε processinτá b∙á translatinτá thσ ì
  24. commanΣ file≤ the∙ arσ giveε int∩ slightl∙ differen⌠ forms«  BotΦ ì
  25. d∩ paramete≥ substitution¼ extractinτ parameter≤ froφ thσ commanΣ ì
  26. line≤á anΣ placinτ theφ int∩ thσ tex⌠ oµ thσ commanΣ streaφá the∙ ì
  27. arσ building«á  SUB▓ build≤ thσ commanΣ streaφ t∩ bσ executeΣá oε ì
  28. disδá drivσ ┴ unde≥ thσ curren⌠ use≥ number¼á anΣ ZE╪ build≤á thσ ì
  29. commanΣ streaφ iε memory.
  30.      A≤á thσ use≥ caε guess¼á ZE╪ i≤ generall∙ preferreΣ t∩ SUB2«  ì
  31. Unde≥ ZEX¼á thσ commanΣ streaφ i≤ executeΣ mucΦ morσ quickl∙ thaε ì
  32. unde≥ SUB▓ sincσ ZE╪ jus⌠ goe≤ int∩ memor∙ fo≥ thσ nex⌠ characte≥ ì
  33. whilσ ZCPR▓ ha≤ t∩ g∩ t∩ disk«  ZEX¼ however¼ doe≤ takσ u≡ memor∙ ì
  34. space¼ anΣ tha⌠ i≤ it≤ maiε drawback«  Thσ TP┴ (Transien⌠ Prograφ ì
  35. Area⌐á unde≥á ZE╪ i≤ smalle≥ thaε wha⌠ i≤á availablσá t∩á commanΣ ì
  36. file≤á runninτ unde≥ SUB2«á  Thi≤ i≤ you≥ basiπ trade-ofµ betweeε ì
  37. thσ tw∩ CommanΣ Filσ Processors.
  38.  
  39.      Anothe≥ differencσ betweeε SUB▓ anΣ ZE╪ i≤ tha⌠ SUB▓ commanΣ ì
  40. stream≤ arσ line-orienteΣ anΣ extracteΣ onl∙ b∙ ZCPR2«á  Tha⌠ is¼ ì
  41. SUB▓á build≤ ß commanΣ filσ nameΣ $$$.SU┬ likσ SUBMI╘á does¼á anΣ ì
  42. ZCPR▓á extract≤á ßá linσ froφ thσ $$$.SU┬ filσ eacΦá timσá i⌠á i≤ ì
  43. entered«  Wheε ZCPR▓ i≤ entereΣ b∙ eithe≥ ß ColΣ Boot¼ Warφ Boot¼ ì
  44. o≥á simplσ RETurε froφ ß loadeΣ program¼á i⌠ check≤ thσá Multiplσ ì
  45. CommanΣ Linσ Buffe≥ fo≥ ß pendinτ command«á  Iµ i⌠ find≤á it¼á i⌠ ì
  46. execute≤ it«  Iµ not¼ i⌠ check≤ thσ A║ drivσ (curren⌠ user⌐ fo≥ ß ì
  47. $$$.SU┬á file«á  Iµ i⌠ find≤ one¼á i⌠ extract≤ thσ nex⌠ linσ froφ ì
  48. thσ $$$.SU┬ file¼á processe≤ it¼á anΣ begin≤ executioε oµ i⌠ froφ ì
  49. thσ Multiplσ CommanΣ Linσ Buffer«á  Finally¼á iµ thσ $$$.SU┬ filσ ì
  50. is not found, ZCPR2 prompts the user for input.
  51.  
  52.      Tha⌠á i≤á ho≈á commanΣá streaφá processinτá unde≥á SUB▓áá i≤ ì
  53. performed«  ZEX¼ however¼ act≤ a≤ ß combinatioε oµ SUB▓ anΣ XSUB«  ì
  54. Oncσ commanΣ streaφ processinτ begin≤ unde≥ ZEX¼ thσ ZE╪ monitor¼ ì
  55. locateΣ unde≥ ZCPR▓ witΦ thσ associateΣ commanΣ stream¼á supplie≤ ì
  56. ßá characte≥ eacΦ timσ thσ BIO╙ Consolσ Inpu⌠ Routinσ i≤á called«  ì
  57. ZE╪ extract≤ thσ nex⌠ characte≥ froφ thσ commanΣ stream¼ examine≤ ì
  58. i⌠á t∩á seσá iµ i⌠ i≤ ß ZE╪ commanΣ anΣ execute≤ i⌠á iµá so¼á anΣ ì
  59. returns it to the calling program if it is not a ZEX command.
  60.  
  61.      Hence¼á ZCPR▓á itselµ doe≤ no⌠ realizσ tha⌠ ZE╪ i≤á running«  ì
  62. Neithe≥á d∩á thσá transien⌠á program≤á iεá general«á  ZE╪á simpl∙ ì
  63. intercept≤ al∞ call≤ t∩ thσ BIO╙ Consolσ Inpu⌠ (anΣ Inpu⌠ Status⌐ ì
  64. routinσ anΣ provide≤ aε inpu⌠ characte≥ iε it≤ place«á  Therσ arσ ì
  65. exceptions to this case, but they will be discussed later.
  66.  
  67.      BotΦ SUB▓ anΣ ZE╪ fi⌠ int∩ thσ ZCPR▓ Systeφ nicely¼ anΣ the∙ ì
  68. caεá bσá useΣ t∩ ac⌠ a≤ ExtendeΣ CommanΣ Processor≤á iµá desired«  ì
  69. This is discussed later.
  70.  
  71. :Disk-Based Command Files -- SUB2
  72.  
  73.      SUB2¼á commonl∙á calleΣá SUB¼á i≤á invokeΣá b∙á onσá oµá thσ ì
  74. following command lines:
  75.  
  76.           SUB or SUB //            <-- Print Help Message
  77.           SUB /A Text              <-- Abort $$$.SUB File
  78.                                         Processing at User's
  79.                                         Discretion
  80.           SUB /AB Text             <-- Same as /A but Ring Bell
  81.                                         to Alert User
  82.           SUB /D commands          <-- Perform Commands following
  83.                                         the /D
  84.           SUB /I                   <-- Enter Interactive Input
  85.                                         Mode
  86.           SUB filename params      <-- As in Standard SUBMIT
  87.  
  88.      Thσá "SU┬á /Aóá anΣá "SU┬á /ABóá form≤á allo≈á thσá use≥á t∩ ì
  89. gracefull∙á abor⌠ ß $$$.SU┬ file«á  ^├ a⌠ thσ consolσ caε bσ useΣ ì
  90. t∩á abor⌠ sucΦ processinτ a≤ unde≥ CP/M¼á bu⌠ thσ /┴ forφá allow≤ ì
  91. thσá luxur∙á oµá startinτá ß commanΣ streaφá anΣá stoppinτá a⌠á ß ì
  92. critica∞ poin⌠ t∩ allo≈ thσ use≥ t∩ takσ hi≤ time¼á inspec⌠á wha⌠ ì
  93. ha≤ happened¼ anΣ theε decidσ whethe≥ t∩ proceeΣ o≥ not.
  94.  
  95.      Thσá "SU┬á /Dóá forφá ha≤á littlσá utilit∙á unde≥á ßá fully-ì
  96. implementeΣá ZCPR▓á System«á  Yo⌡ caε obtaiε ß bette≥á effec⌠á b∙ ì
  97. simpl∙á issuinτá ßá conventiona∞ ZCPR▓ commanΣá stream«á  Thσá /─ ì
  98. optioεá i≤á gooΣ onl∙ iε environ≤ whicΦ d∩ no⌠á suppor⌠á multiplσ ì
  99. commands.
  100.  
  101.      Thσ "SU┬ /Ió forφ eliminate≤ thσ neeΣ fo≥ thσ use≥ t∩ usσ aε ì
  102. edito≥ t∩ creatσ ß .SU┬ file«á  Iµ thσ use≥ ha≤ ß commanΣá streaφ ì
  103. hσá want≤ t∩ executσ immediatel∙ anΣ doesn'⌠ carσ t∩ d∩ i⌠ again¼ ì
  104. hσ caε usσ thi≤ option«á  Iε response¼á SUB▓ allow≤ hiφ t∩á ente≥ ì
  105. hi≤á commanΣá streaφ (sorry¼á n∩ paramete≥ passing⌐ ß linσá a⌠á ß ì
  106. time«á  Wheεá i⌠ i≤ al∞ entereΣ (use≥ enter≤ aε empt∙ line)¼á thσ ì
  107. $$$.SU┬ filσ i≤ buil⌠ anΣ executed.
  108.      Thσ fina∞ form¼á "SU┬ filenamσ params"¼ i≤ identica∞ iε forφ ì
  109. t∩á thσá SUBMI╘á commanΣá supplieΣá witΦá CP/M«á  Thσá "filenameó ì
  110. specifie≤á thσá namσá oµ thσ .SU┬ filσ t∩ bσá executed¼á anΣá thσ ì
  111. parameter≤ arσ associateΣ witΦ thσ substitutioε variable≤ oµá $1¼ ì
  112. $2¼á etc«á  U≡á t∩ 2░ parameter≤ ma∙ bσ specified«á  Thσ sequencσ ì
  113. "$$óá place≤á ßá "$ó int∩ thσ commanΣá line¼á anΣá thσá characte≥ ì
  114. sequencσá "^cóá place≤ thσ indicateΣ contro∞ characte≥á int∩á thσ ì
  115. commanΣ linσ (uparro≈ ├ place≤ Control-C).
  116.  
  117.      Thσá SUB▓ commanΣ ma∙ bσ nesteΣ int∩ ß $$$.SU┬ file«á  Iµá ß ì
  118. "SU┬á filenamσ paramsó commanΣ i≤ encountereΣ iε ß $$$.SU┬á file¼ ì
  119. SUB▓á runs¼á realize≤á tha⌠ thi≤ ha≤ happened¼á anΣá insert≤á thσ ì
  120. indicateΣá commanΣ file¼á witΦ paramete≥ substitution¼á int∩á thσ ì
  121. runninτá commanΣá streaφ a⌠ thσ appropriatσ place«á  Thi≤ ma∙á bσ ì
  122. nesteΣ a≤ man∙ level≤ dee≡ a≤ desired.
  123.  
  124.      Unde≥ ZCPR2¼á iµ SUB▓ i≤ executeΣ witΦ thσ Multiplσá CommanΣ ì
  125. Linσá Facilit∙ invokeΣ anΣ morσ command≤ follo≈ thσ SUB▓ command¼ ì
  126. theε thσ res⌠ oµ thσ Multiplσ CommanΣ Linσ i≤ inserteΣ a⌠ thσ enΣ ì
  127. of the generated $$$.SUB file.
  128.  
  129.      Finally¼á SUB▓ follow≤ thσ ZCPR▓ patΦ wheε searchinτ fo≥ thσ ì
  130. indicateΣá commanΣ file«á  I⌠ i≤ full∙ integrateΣ int∩ thσá ZCPR▓ ì
  131. Systeφá anΣá i≤á ablσ t∩ emplo∙ thσ Externa∞á PatΦá anΣá Multiplσ ì
  132. Command Line Buffer features of ZCPR2.
  133.  
  134. :SUB2 Error Messages
  135.  
  136.      SUB▓á provide≤á ß numbe≥ oµ informativσ diagnostic≤á t∩á thσ ì
  137. user«á  Iε particular¼á wheε processinτ ß CommanΣ File¼á wheεá aε ì
  138. erro≥ i≤ encountered¼ thσ use≥ i≤ informeΣ oµ thσ linσ numbe≥ thσ ì
  139. error occurs at.
  140.  
  141.      Thσá followinτá summarize≤ thσ erro≥ message≤á presenteΣá b∙ ì
  142. SUB2:
  143.  
  144.           Disk Full
  145.                There is no room to write the $$$.SUB file
  146.  
  147.           Directory Full
  148.                There is no directory space for the $$$.SUB file
  149.  
  150.           Memory Full
  151.                There is not enough memory in which to build the
  152.                command stream to be placed into the $$$.SUB file
  153.  
  154. SUB2 Error Messages, Con't
  155.  
  156.           SUBMIT File Not Found
  157.                The .SUB file specified in the command line could
  158.                not be found along the ZCPR2 path
  159.  
  160.           Parameter
  161.                Invalid Parameter Specified
  162.  
  163.           Too Many Parameters
  164.                More than 20 parameters were on the command line
  165.  
  166.           Line too Long
  167.                The current line in the command stream exceeds
  168.                128 bytes
  169.  
  170.           SUBMIT File Empty
  171.                The .SUB file specified in the command line was
  172.                found to be empty
  173.  
  174. SUB2 Error Messages, Con't
  175.  
  176.           Control Character
  177.                The ^c form was not followed by a letter A-Z
  178.  
  179. :SUB2 Command Summary
  180.  
  181.      The following are valid SUB2 command line forms:
  182.  
  183.           SUB or SUB //            <-- Print Help Message
  184.  
  185.           SUB /A Text              <-- Abort $$$.SUB File
  186.                                         Processing at User's
  187.                                         Discretion
  188.  
  189.           SUB /AB Text             <-- Same as /A but Ring Bell
  190.                                         to Alert User
  191.  
  192.           SUB /D commands          <-- Perform Commands following
  193.                                         the /D
  194.  
  195.           SUB /I                   <-- Enter Interactive Input
  196.                                         Mode
  197.  
  198.           SUB filename params      <-- As in Standard SUBMIT
  199.  
  200. :Memory-Based Command Files -- ZEX
  201.  
  202.      Thσá Memory-BaseΣ CommanΣ Filσ Processo≥ oµ ZCPR2¼á ZEX¼á i≤ ì
  203. invoked by the following forms:
  204.  
  205.           ZEX //                   <-- Print Help
  206.  
  207.           ZEX                      <-- Enter Interactive Mode
  208.  
  209.           ZEX filename params      <-- Process .ZEX or .SUB
  210.                                         file as with SUBMIT
  211.  
  212.      Thσá Interactivσ Modσ oµ ZE╪ execute≤ likσá thσá Interactivσ ì
  213. Modσá oµá SUB2«á  Thσá use≥á enter≤ commanΣá line≤á unti∞á hσá i≤ ì
  214. satisfieΣá anΣá theε terminate≤ thσ proces≤ b∙ enterinτ aεá empt∙ ì
  215. linσ (simpl∙ hittinτ RETURN)«á  ZE╪ theε execute≤ thσ command≤ iε ì
  216. thσ sequencσ entered«á  N∩ paramete≥ passinτ i≤ permitteΣ iε thi≤ ì
  217. mode of operation.
  218.  
  219.  
  220.      Thσá "ZE╪á filenamσ paramsó forφ i≤ likσá thσá correspondinτ ì
  221. SUB▓ form«á  ZE╪ wil∞ searcΦ alonτ thσ ZCPR▓ Externa∞ PatΦ fo≥á ß ì
  222. commanΣá filσá oµ thσ forφ filename.ZE╪ o≥á filename.SUB«á  Iµá ß ì
  223. director∙ i≤ entereΣ whicΦ contain≤ botΦ sucΦ files¼á thσ filσ oµ ì
  224. type ZEX will be executed.
  225.  
  226.      Oncσá ZE╪ ha≤ beguε execution¼á i⌠ place≤ ß ZE╪ Monito≥ jus⌠ ì
  227. unde≥á ZCPR▓á anΣ build≤ thσ commanΣ streaφá unde≥á thσá monitor«  ì
  228. Oncσá complete¼á thσ addres≤ oµ thσ BDO╙ i≤ adjusteΣ s∩ tha⌠á thσ ì
  229. ZE╪á monito≥á anΣ it≤ commanΣ streaφ wil∞ no⌠ bσá overwritteεá b∙ ì
  230. transien⌠á programs¼á anΣ executioε begins«á  EacΦ timσ thσá BIO╙ ì
  231. Consolσáá Inpu⌠á routinσá i≤á called¼áá ZE╪á supplie≤á thσá inpu⌠ ì
  232. character.
  233.  
  234.      A≤ witΦ SUB2¼á ß ^├ froφ thσ consolσ wil∞ abor⌠ executioε oµ ì
  235. ß ZE╪ commanΣ stream«á  Also¼á a≤ witΦ SUB2¼ iµ ß commanΣ follow≤ ì
  236. ZE╪á iε ß Multiplσ CommanΣ Line¼á ZE╪ append≤ thi≤ commanΣ t∩ thσ ì
  237. command stream.
  238.  
  239.  
  240.      Unlikσ SUB2¼á ZE╪ doe≤ no⌠ permi⌠ nestinτ oµ commanΣá files«  ì
  241. ZE╪á wil∞á simpl∙á abor⌠ iµ ß ZE╪ commanΣ i≤ encountereΣá iεá thσ ì
  242. commanΣ streaφ i⌠ i≤ processing.
  243.  
  244.      Unlikσá SUB2¼á ZE╪á support≤ man∙á morσá embeddeΣá commands«  ì
  245. Combininτá thσá facilitie≤á oµ SUB▓ anΣ XSU┬ iεá thi≤á case¼á thσ ì
  246. embeddeΣá command≤ oµ ZE╪ reflec⌠ thσ XSUB-likσá capabilitie≤á oµ ì
  247. ZE╪ a≤ wel∞ a≤ somσ ne≈ ideas.
  248.  
  249.      Thesσá extendeΣá contro∞ command≤ arσ discusseΣ iε thσá nex⌠ ì
  250. information section.
  251.  
  252. :ZEX Control Commands
  253.  
  254.      The following summarizes the ZEX Control Commands:
  255.  
  256.           Cmd  Meaning                Cmd  Meaning
  257.            |   insert <CR>            ^|   insert <CRLF>
  258.           ^║   reruε commanΣ streaφ   ^«   togglσ prin⌠ suppress
  259.           ^#   toggle ZEX messages    ^$   define default params
  260.           ^?   wait for user input    ^/   ring bell and ^?
  261.           ^*   ring bell              ^"   accept user input
  262.           ^<   display chars only     ^>   stop display
  263.           ;;   ZEX comment            $n   1<=n<=9 for param
  264.           $$   $                      $^   ^
  265.           $|   |                      ^c   control char
  266.  
  267.  
  268.      This summary is also displayed via the built-in ZEX help.
  269.  
  270.  
  271.      Thσ followinτ command≤ simpl∙ inser⌠ character≤ int∩ thσ ZE╪ ì
  272. command stream and will not be discussed in any greater detail.
  273.  
  274.           | inserts a <CR>         ^| inserts a <CR> <LF> pair
  275.           $$ inserts a single $    $^ inserts a single ^
  276.           $| inserts a single |    ^c inserts a control character
  277.  
  278.      Thσ ^¬ commanΣ simpl∙ cause≤ ZE╪ t∩ rinτ thσ bell«á  I⌠ doe≤ ì
  279. no⌠á inser⌠á ßá BEL╠ characte≥ int∩ thσ commanΣ filσá likσá ßá ^╟ ì
  280. sequencσáá would«áá  I⌠á simpl∙á ring≤á thσá bel∞á anΣá continue≤ ì
  281. processing.
  282.  
  283.      Thσá ;╗á commanΣá i≤ ß ZE╪ comment«á  I⌠ anΣ al∞á character≤ ì
  284. followinτá i⌠á u≡á t∩ anΣ includinτ thσ followinτá <LF╛á arσá no⌠ ì
  285. includeΣ iε thσ ZE╪ commanΣ stream«  The∙ arσ simpl∙ treateΣ a≤ ß ì
  286. commen⌠á iεá thσá ZE╪á CommanΣá Filσá anΣá ignored«áá  Unlikσáá ß ì
  287. conventiona∞á ZCPR▓á comment¼á thσ ZE╪ commen⌠ doe≤ no⌠á takσá u≡ ì
  288. spacσá iε thσ commanΣ streaφ anΣ doe≤ no⌠ appea≥ wheε thσ commanΣ ì
  289. stream is executed.
  290.      Thσ ^╝ anΣ ^╛ command≤ arσ useΣ t∩ bracke⌠ character≤á whicΦ ì
  291. arσá simpl∙ echoeΣ b∙ thσ ZE╪ monito≥ anΣ no⌠ passeΣ bacδ t∩á thσ ì
  292. callinτá program«á  Thi≤á cause≤á thσá character≤á betweeεá thesσ ì
  293. command≤á t∩á bσá echoeΣá t∩ thσ use≥ durinτá executioεá bu⌠á no⌠ ì
  294. processeΣá b∙á an∙á program«á  Thi≤á featurσá i≤á ver∙á gooΣá fo≥ ì
  295. embeddinτá comment≤á t∩á bσ printeΣ a⌠ executioεá timσá int∩á thσ ì
  296. commanΣ stream«á  Unlikσ thσ ZCPR▓ commen⌠ form¼á whicΦ i≤ ß linσ ì
  297. beginninτá witΦ ß semicolon¼á comment≤ encloseΣ b∙ ^╝ anΣ ^╛á ma∙ ì
  298. appea≥ anywhere¼ sucΦ a≤ withiε aε edito≥ session.
  299.  
  300.      Thσá ^ú commanΣ toggle≤ suppressioε oµ informativσá message≤ ì
  301. generated by ZEX.
  302.  
  303.      Thσ ^« commanΣ cause≤ consolσ outpu⌠ t∩ ceasσ unti∞ thσ nex⌠ ì
  304. ^«áá i≤á encountered«á  Characte≥á inpu⌠á froφá thσá ZE╪á Monito≥ ì
  305. continues¼ bu⌠ thσ use≥ doe≤ no⌠ seσ wha⌠ i⌠ is.
  306.  
  307.      Thσ ^║á commanΣ cause≤ thσ ZE╪ monito≥ t∩ restar⌠á executioε ì
  308. oµá thσá loadeΣ commanΣ stream«á  Thσ entirσ commanΣá stream¼á a≤ ì
  309. initiall∙ processeΣ b∙ ZEX¼ i≤ executeΣ agaiε froφ thσ beginning.
  310.  
  311.      $n¼á wherσá 1<=n<=9¼á wil∞ causσ thσ indicateΣ specifieΣá o≥ ì
  312. default parameter to be substituted from the command line.
  313.  
  314.      Thσá ^ñá commanΣá i≤ useΣ t∩ definσ o≥ redefinσ thσá se⌠á oµ ì
  315. inpu⌠ commanΣ parameters«á  Thσ res⌠ oµ thσ linσ followinτ thσ ^ñ ì
  316. i≤ treateΣ a≤ ß se⌠ oµ parameter≤ separateΣ b∙ blanks.
  317.  
  318.      Thσá ^┐á anΣ ^» command≤ replacσ thσ /┴ anΣ /A┬á option≤á oµ ì
  319. SUB2«á  ^┐ cause≤ ZE╪ t∩ sto≡ processinτ anΣ wai⌠ fo≥ thσ use≥ t∩ ì
  320. strikσá eithe≥ thσ spacσ ba≥ o≥ thσ RETUR╬ ke∙ beforσ continuing«  ì
  321. Thσ use≥ caε takσ hi≤ timσ anΣ examinσ thσ display¼á and¼á iµá hσ ì
  322. doe≤á no⌠ wisΦ t∩ continue¼á ß ^├ wil∞ abor⌠ thσ commanΣá stream«  ì
  323. Thσ ^» commanΣ i≤ likσ ^?¼á bu⌠ i⌠ periodicall∙ ring≤ thσ bel∞ a⌠ ì
  324. the console, summoning the user in an alarm fashion.
  325.  
  326.  
  327.      Finally¼á thσá ^ó commanΣ cause≤ ZE╪ t∩ sto≡ providinτ inpu⌠ ì
  328. froφá thσ commanΣ streaφ anΣ allo≈ thσ use≥ t∩ inpu⌠ whateve≥á hσ ì
  329. wishe≤á unti∞ ß specia∞ characte≥ i≤ output¼á a⌠ whicΦá timσá ZE╪ ì
  330. wil∞ resumσ providinτ input«  Iε thi≤ case¼ ZE╪ caε bσ intimatel∙ ì
  331. linkeΣ witΦ ZCPR2¼á anΣ i⌠ i≤ intendeΣ tha⌠ thσ specia∞ characte≥ ì
  332. tha⌠ ZE╪ i≤ waitinτ fo≥ i≤ associateΣ witΦ thσ ZCPR▓ prompt«á  Iε ì
  333. m∙á case¼á ╔ madσ thσ ZCPR▓ promp⌠ t∩ bσ ß ">ó characte≥ witΦ thσ ì
  334. mos⌠ significan⌠ bi⌠ set«á  Thi≤ i≤ uniquσ anΣ appear≤ onl∙á wheε ì
  335. the prompt comes up on my system.
  336.  
  337.      No≈á tha⌠á ╔á havσá beateε thσ subjec⌠ oµá thσá ZE╪á Contro∞ ì
  338. Command≤ t∩ death¼ thσ followinτ example≤ illustratσ application≤ ì
  339. employinτ them«á  M∙ comment≤ appea≥ ou⌠ t∩ thσ side¼ prefixeΣ b∙ ì
  340. <--.
  341.  
  342.  
  343. B1>zex
  344. ZEX, Version 1.3
  345. 1: ^$ this is fun                  <-- I Define 3 params
  346. 2: echo $1 $2 $3
  347. 3: ^$ hello from happy acres       <-- I Define 4 params
  348. 4: echo $1 $2 $3 $4
  349. 5: 
  350. (ZEX Active)                       <-- ZEX is running now
  351. B1>echo this is fun
  352.  
  353. THIS IS FUN
  354. B1>echo hello from happy acres
  355.  
  356. HELLO FROM HAPPY ACRES
  357. B1>
  358. (ZEX Completed)
  359. By Your Command >
  360.  
  361.  
  362. B1>ed demo.zex                     <-- Demo Command File
  363.  
  364. NEW FILE
  365.      : *i
  366.     1:  ed demo.txt                <-- Edit DEMO.TXT
  367.     2:  i                          <-- Insert text while in ED
  368.     3:  This is a test
  369.     4:  This is only a test
  370.     5:  This is a demo of ZEX Control
  371.     6:  ^Z                         <-- ^Z is 2 chars, xlated into
  372.     7:  b0lt                       <-- Ctrl-Z by ZEX
  373.     8:  1l
  374.     9:  0lt
  375.    10:  i                          <-- Input More Text
  376.    11:  ^"                         <-- I now input text myself
  377.    12:  type demo.txt              <-- When ZEX continues, this
  378.    13:  era demo.txt               <--  is what it does next
  379.    14:  
  380.      : *e
  381.  
  382. B1>zex demo                        <-- Run the command file
  383. ZEX, Version 1.3
  384. (ZEX Active)
  385. B1>ed demo.txt
  386.  
  387. NEW FILE
  388.      : *i                          <-- ZEX is typing this in
  389.     1:  This is a test
  390.     2:  This is only a test
  391.     3:  This is a demo of ZEX Control
  392.     4:  
  393.      : *b0lt
  394.     1:  This is a test
  395.     1: *1l
  396.     2: *0lt
  397.     2:  This is only a test
  398.     2: *i                          <-- Now my input begins
  399.     2:  I am now typing this line of my own volition   <-- I type
  400.     3:  ZEX will allow me to continue doing this until
  401.     4:  it sees the ZCPR2 prompt
  402.     5:                                  <-- I type Ctrl-Z
  403.     5: *e                               <-- I type "e"
  404.  
  405. (ZEX Active)
  406. B1>type demo.txt                        <-- ZEX resumes
  407. This is a test
  408. I am now typing this line of my own volition
  409. ZEX will allow me to continue doing this until
  410. it sees the ZCPR2 prompt
  411. This is only a test
  412. This is a demo of ZEX Control
  413.  
  414. B1>era demo.txt
  415. DEMO    .TXT
  416. B1>
  417. (ZEX Completed)
  418. By Your Command >
  419.  
  420. B1>ed demo.mac                     <-- Now to use ZEX for
  421.                                    <--  program assembly
  422. NEW FILE
  423.      : *i                          <-- I type program
  424.     1:          ext     print
  425.     2:  
  426.     3:          call    print
  427.     4:          db      'Hello, World ... It''s Another Day',0
  428.     5:          ret
  429.     6:  
  430.     7:          end
  431.     8:  
  432.      : *e
  433.  
  434.  
  435. B1>type a:m80.zex                  <-- My M80.ZEX command file
  436. ;  M80.SUB -- MACRO-80 Assembler and Linker
  437. M80 =$1
  438. ;  Please Type $^C if Error(s) Exist - ^?
  439. ERA $1.BAK
  440. ERA $1.COM
  441. L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
  442. ERA $1.REL
  443. ;  Assembly Complete
  444.  
  445. B1>zex m80 demo                    <-- Run command file on my pgm
  446. ZEX, Version 1.3
  447. (ZEX Active)
  448. B1>;  M80.SUB -- MACRO-80 Assembler and Linker
  449. B1>M80 =DEMO
  450.  
  451. No Fatal errr(s)
  452.  
  453. (ZEX Active)
  454.  
  455. B1>;  Please Type ^C if Error(s) Exist -     <-- I can abort now
  456.                                              <--  if I wish
  457. B1>ERA DEMO.BAK
  458. DEMO    .BAK
  459. B1>ERA DEMO.COM
  460. No File
  461. B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E
  462.  
  463. Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
  464. Data    0100    01C5    <  197>
  465.  
  466. 35936 Bytes Free
  467.  
  468. Data    0100    01C5    <  197>
  469.  
  470. 35936 Bytes Free
  471. [0000   01C5        1]
  472.  
  473. (ZEX Active)
  474.  
  475. B1>ERA DEMO.REL
  476. DEMO    .REL
  477. B1>;  Assembly Complete
  478. B1>
  479. (ZEX Completed)
  480. By Your Command>demo                    <-- I run pgm now
  481. Hello, World ... It's Another Day
  482. B1>
  483.  
  484. :Restrictions on Command Files
  485.  
  486.      Thσá followinτá restriction≤á arσ applieΣ t∩á commanΣá file≤ ì
  487. processed by SUB2 and ZEX.
  488.  
  489.                         SUB2 Restrictions
  490.  
  491.      1«á  Yo⌡ ma∙ no⌠ loτ int∩ use≥ area≤ othe≥ thaε thσ onσá yo⌡ ì
  492. begaεá processinτ thσ commanΣ filσ in«á  Iµ yo⌡ do¼á ZCPR▓ loose≤ ì
  493. tracδá oµá thσ $$$.SU┬ filσ anΣ executioε i≤á aborteΣá unti∞á yo⌡ ì
  494. reenter the original user area, at which time execution resumes.
  495.  
  496.      2«á  U≡á t∩ 2░ parameter≤ arσ permitteΣ oε thσ SUB▓á commanΣ ì
  497. line.
  498.  
  499.      3.  You may nest SUB2 command files to any depth.
  500.  
  501.  
  502.  
  503.                         ZEX Restrictions
  504.  
  505.      1«á  Yo⌡á ma∙ movσ int∩ an∙ director∙ yo⌡ desirσ whilσ ß ZE╪ ì
  506. command stream is being executed.
  507.  
  508.      2«á  U≡á t∩á ╣ parameter≤ arσ permitteΣ oε thσá ZE╪á commanΣ ì
  509. line.
  510.  
  511.      3.  You may NOT nest ZEX command files.
  512.  
  513.  
  514. :SUB2 and ZEX as Extended Command Processors Under ZCPR2
  515.  
  516.      BotΦá SUB▓á anΣá ZE╪ makσ nicσ ExtendeΣá CommanΣá Processor≤ ì
  517. unde≥á ZCPR2«á  Wσá havσá alread∙á seeεá ho≈á SUB▓á anΣá ZE╪á arσ ì
  518. intimatel∙á linkeΣ witΦ ZCPR2«á  BotΦ usσ thσ Externa∞á PatΦá anΣ ì
  519. Multiplσá CommanΣá Linσ Buffe≥ Facilitie≤ oµ ZCPR2¼á anΣá ZE╪á i≤ ì
  520. further prompted for input by the ZCPR2 prompt if desired.
  521.  
  522.      T∩á refresΦ thσ reader¼á anΣ ExtendeΣ CommanΣ Processo≥ i≤ ß ì
  523. prograφ invokeΣ b∙ ZCPR▓ wheε i⌠ fail≤ t∩ finΣ thσ commanΣá alonτ ì
  524. it≤á path«á  ZCPR2¼á upoεá failinτá t∩ finΣ thσá CO═á filσá whicΦ ì
  525. correspond≤á t∩á thσ commanΣ namσ giveε t∩ it¼á caε bσ se⌠ u≡á t∩ ì
  526. eithe≥ searcΦ thσ patΦ o≥ g∩ directl∙ t∩ thσ roo⌠ oµ thσ patΦ anΣ ì
  527. looδá fo≥á aεá ExtendeΣá CommanΣá Processor«áá  Iµá found¼á ZCPR▓ ì
  528. simulate≤áá ßá commanΣá t∩á tha⌠á ExtendeΣáá CommanΣáá Processor¼ ì
  529. substitutinτ thσ user'≤ commanΣ linσ a≤ thσ argument≤ t∩ it.
  530.  
  531.      To illustrate my point, consider the following example:
  532.  
  533.  
  534.      ╔á havσ ß ZE╪ filσ nameΣ MASM.ZEX¼á anΣ i⌠ perform≤ thσ samσ ì
  535. set of commands that my M80.ZEX file did above, namely:
  536.  
  537. ;  MASM.ZEX -- MACRO-80 Assembler and Linker
  538. M80 =$1
  539. ;  Please Type $^C if Error(s) Exist - ^?
  540. ERA $1.BAK
  541. ERA $1.COM
  542. L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
  543. ERA $1.REL
  544. ;  Assembly Complete
  545.  
  546.      ╔ typσ iε m∙ program¼á nameΣ DEMO.MAC¼ anΣ issuσ thσ commanΣ ì
  547. "MAS═ DEMO"«á  WitΦ ZE╪ a≤ m∙ ExtendeΣ CommanΣá Processor¼á ZCPR▓ ì
  548. look≤ alonτ thσ patΦ fo≥ thσ commanΣ MASM¼á fail≤ t∩ finΣ it¼ anΣ ì
  549. theεá simulate≤ thσ commanΣ "ZE╪ MAS═ DEMO"«á  Thσ abovσá commanΣ ì
  550. file is then executed with DEMO as its passed parameter!
  551.  
  552.  
  553.      ╔á thinδá tha⌠ thσ abovσ examplσ illustrate≤ thσ utilit∙á oµ ì
  554. employinτ ZE╪ (o≥ SUB2⌐ a≤ aε ExtendeΣ CommanΣá Processor«á  Thi≤ ì
  555. i≤ donσ ver∙ simpl∙ iε thσ ZCPR▓ environment«  T∩ d∩ this¼ simpl∙ ì
  556. makσ ß cop∙ oµ ZEX.CO═ anΣ namσ i⌠ CMDRUN.COM«  Sincσ thi≤ i≤ thσ ì
  557. namσá iε thσ ZCPRHDR.LI┬ filσ anΣ thσ facilit∙ i≤ turneΣ on¼á yo⌡ ì
  558. now have ZEX as the Extended Command Processor.
  559.  
  560.