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 / ZSYS / SIMTEL20 / ZCPR3 / CMDFILES.HLP < prev    next >
Text File  |  2000-06-30  |  25KB  |  729 lines

  1. ;
  2.  
  3.  
  4.  
  5.                   Command File Processing
  6.  
  7.                         -- Basics --
  8.                       0 - Overview
  9.                       1 - Restrictions
  10.                       2 - Extended Cmd Procs
  11.  
  12. -- Disk-Based Command Files --  -- Memory-Based Command Files --
  13.     S - The SUB Utility             Z - The ZEX Utility
  14.     E - SUB Error Messages          D - ZEX Directives
  15.                                     G - GOTO Command
  16.  
  17.  
  18. :0
  19.  
  20.                  Overview of Command Files
  21.  
  22.      ┴á CommanΣá Filσ i≤ ß filσá containinτá commands¼á witΦ ì
  23. optiona∞á paramete≥ substitution¼á whicΦ caε bσ executeΣá b∙ ì
  24. ZCPR3«á  Thesσá command≤á arσá exactl∙á thσá samσá kind≤á oµ ì
  25. command≤ a≤ yo⌡ woulΣ issuσ a⌠ thσ console¼á anΣ an∙ commanΣ ì
  26. whicΦ caε bσ issueΣ froφ thσ consolσ caε als∩ bσ issueΣ froφ ì
  27. withiε ß CommanΣ Filσ (witΦ jus⌠ ß couplσ oµ restrictions).
  28.  
  29.      Thσáá CommanΣá Filσá Facilitie≤á oµá SU┬á anΣá ZE╪á arσ ì
  30. availablσá unde≥ ZCPR3«á  Simila≥ iε concep⌠ t∩á thσá SUBMI╘ ì
  31. facilit∙ oµ CP/M¼á botΦ SU┬ anΣ ZE╪ arσ upward-compatablσ t∩ ì
  32. SUBMI╘áá (an∙áá SU┬á filσá caεá ruεá unde≥á theφá witΦáá fe≈ ì
  33. restrictions).
  34.  
  35.  
  36.      BotΦá SU┬ anΣ ZE╪ begiε processinτ b∙á translatinτá thσ ì
  37. commanΣá file≤ the∙ arσ giveε int∩ slightl∙ differen⌠ forms«  ì
  38. BotΦ d∩ paramete≥ substitution¼á extractinτ parameter≤á froφ ì
  39. thσá commanΣá line≤á anΣ placinτ theφ int∩ thσ tex⌠á oµá thσ ì
  40. commanΣá streaφ the∙ arσ building«á  SU┬ build≤ thσá commanΣ ì
  41. streaφ t∩ bσ executeΣ oε disδ drivσ ┴ unde≥ thσ curren⌠ use≥ ì
  42. number¼ anΣ ZE╪ build≤ thσ commanΣ streaφ iε memory.
  43.  
  44.      ZE╪á i≤ generall∙ preferreΣ t∩á SUB«á  Unde≥á ZEX¼á thσ ì
  45. commanΣá streaφ i≤ executeΣ mucΦ morσ quickl∙ thaε unde≥ SU┬ ì
  46. sincσ ZE╪ accesse≤ memor∙ fo≥ thσ nex⌠ characte≥ whilσ ZCPR│ ì
  47. ha≤ t∩ g∩ t∩ disk«  ZEX¼ however¼ take≤ u≡ memor∙ space¼ anΣ ì
  48. tha⌠ i≤ it≤ maiε drawback«  Thσ TP┴ (Transien⌠ Prograφ Area⌐ ì
  49. unde≥ ZE╪ i≤ smalle≥ thaε wha⌠ i≤ availablσ t∩ commanΣ file≤ ì
  50. runninτ unde≥ SUB«á  Thi≤ i≤ thσ basiπ trade-ofµ betweeε thσ ì
  51. tw∩ CommanΣ Filσ Processors.
  52.  
  53.  
  54.      Anothe≥á differencσá betweeε SU┬ anΣ ZE╪á i≤á tha⌠á SU┬ ì
  55. commanΣá stream≤á arσá line-orienteΣ anΣ extracteΣá onl∙á b∙ ì
  56. ZCPR3«á  Tha⌠á is¼á SU┬ build≤ ß commanΣ filσ nameΣá $$$.SU┬ ì
  57. likσ SUBMI╘ does¼ anΣ ZCPR│ extract≤ ß linσ froφ thσ $$$.SU┬ ì
  58. filσá eacΦá timσ i⌠ i≤ entered«á  Wheε ZCPR│ i≤á entereΣá b∙ ì
  59. eithe≥á ßá ColΣ Boot¼á Warφ Boot¼á o≥ simplσ RETurεá froφá ß ì
  60. loadeΣ program¼á i⌠ check≤ thσ Multiplσ CommanΣ Linσá Buffe≥ ì
  61. fo≥á ß pendinτ command«á  Iµ ZCPR│ find≤ ß pendinτá command¼ ì
  62. thσ commanΣ i≤ executed«á  Iµ not¼ ZCPR│ check≤ thσ A║ drivσ ì
  63. (curren⌠á user⌐á fo≥ ß $$$.SU┬ file«á  Iµ ß $$$.SU┬ filσá i≤ ì
  64. found¼á ZCPR│ extract≤ thσ nex⌠ linσ froφ thσ $$$.SU┬á file¼ ì
  65. processe≤á it¼á anΣ begin≤ executioε oµ i⌠ froφ thσ Multiplσ ì
  66. CommanΣ Linσ Buffer«á  Finally¼á iµ thσ $$$.SU┬ filσ i≤á no⌠ ì
  67. found¼ ZCPR│ prompt≤ thσ use≥ fo≥ input.
  68.  
  69.      Tha⌠á i≤á ho≈á commanΣ streaφ processinτ unde≥á SU┬á i≤ ì
  70. performed«á  ZEX¼á however¼ act≤ a≤ ß combinatioε oµ SU┬ anΣ ì
  71. XSUB«á  Oncσ commanΣ streaφ processinτ begin≤ unde≥ ZEX¼ thσ ì
  72. ZE╪ monitor¼ locateΣ unde≥ ZCPR│ witΦ thσ associateΣ commanΣ ì
  73. stream¼á supplie≤á ßá characte≥ eacΦ timσ thσá BIO╙á Consolσ ì
  74. Inpu⌠á Routinσ i≤ called«á  ZE╪ extract≤ thσ nex⌠á characte≥ ì
  75. froφ thσ commanΣ stream¼á examine≤ i⌠ t∩ seσ iµ i⌠ i≤ ßá ZE╪ ì
  76. commanΣ anΣ execute≤ i⌠ iµ so¼ anΣ return≤ i⌠ t∩ thσ callinτ ì
  77. prograφ iµ i⌠ i≤ no⌠ ß ZE╪ command.
  78.  
  79.      Iε ß sense¼á ZCPR│ itselµ doe≤ no⌠ realizσ tha⌠ ZE╪á i≤ ì
  80. running«  Neithe≥ d∩ thσ transien⌠ program≤ iε general«  ZE╪ ì
  81. simpl∙á intercept≤ al∞ call≤ t∩ thσ BIO╙ Consolσ Inpu⌠á (anΣ ì
  82. Inpu⌠ Status⌐ routinσ anΣ provide≤ aε inpu⌠ characte≥ iε it≤ ì
  83. place«á  Therσ arσ exception≤ t∩ thi≤ case¼ bu⌠ the∙ wil∞ bσ ì
  84. discusseΣ later.
  85.  
  86.      BotΦ SU┬ anΣ ZE╪ fi⌠ int∩ thσ ZCPR│ Systeφ nicely¼á anΣ ì
  87. the∙á caεá bσ useΣ t∩ ac⌠ a≤ ExtendeΣ CommanΣ Processor≤á iµ ì
  88. desired«  Thi≤ i≤ discusseΣ later.
  89. :G
  90. Command:  GOTO 1.0
  91.  
  92. Syntax:
  93.      GOTO label
  94.  
  95. ;=label any_text
  96.  
  97. Function:
  98.  
  99.      GOT╧ i≤ ß ZCPR│ utility¼ designeΣ t∩ bσ ruε froφ withiε ì
  100. ßá ZE╪ commanΣ file¼á whicΦ permit≤ branching«á  I⌠á accept≤ ì
  101. onl∙ onσ argument¼á ß label¼ whicΦ i≤ defineΣ withiε thσ ZE╪ ì
  102. filσ a≤ ß specia∞ commen⌠ oµ thσ form:
  103.  
  104.           ;=label
  105.  
  106. An∙á tex⌠ whicΦ follow≤ thσ "labeló phrasσ i≤ considereΣá t∩ ì
  107. be comment and is not processed.
  108.  
  109.  
  110. Options:
  111.      None
  112.  
  113. Comments:
  114.  
  115.      GOT╧ wil∞ ONL┘ worδ correctl∙ iµ executeΣ withiε ßá ZE╪ ì
  116. command file.  GOTO will issue an error message otherwise.
  117.  
  118.      Withou⌠ thσ ZCPR│ Flo≈ Contro∞ facility¼á GOT╧ woulΣ bσ ì
  119. oµ littlσ value«  WitΦ IF¼ however¼ GOT╧ i≤ extremel∙ usefu∞ ì
  120. in setting up loops and other flow-control constructs.
  121.  
  122. Selected Error Messages:
  123.  
  124.      "ZE╪á No⌠á Runningó mean≤ tha⌠ GOT╧ wa≤á executeΣá froφ ì
  125. outside a ZEX command file.
  126.  
  127.      "Labe∞á xx°á No⌠ FounΣ -- Abortinτ ZEXó mean≤ tha⌠á thσ ì
  128. referenceΣ labe∞ wa≤ no⌠ founΣ withiε thσ commanΣá file¼á s∩ ì
  129. ZEX execution is terminated.
  130.  
  131. Examples of Use:
  132.  
  133.      ZEX Command File 1:
  134.  
  135.           REG S1 0;note  Register 1 = 0
  136.           ;=start
  137.           XIF;note       Exit all pending IFs
  138.           ECHO Hello, World
  139.           IF ~1 3;note    IF Register 1 <> 3
  140.              GOTO START
  141.           FI
  142.  
  143.      ZEX Command File 2:
  144.  
  145.       M80 =$1;note  Assemble File
  146.       ; Strike ^C if Errors Exist - ^?
  147.       if ~nul $3;note  IF there are 2 libs ...
  148.          L80 $1/N,$1,$2/S,$3/S,SYSLIB/S,/U/E;note link all
  149.          goto done
  150.       fi
  151.       if ~nul $2;note  IF there is a 2nd arg ...
  152.          L8░ $1/N,$1,$2/S,SYSLIB/S,/U/E;notσ linδ liΓ $2
  153.       else;note        IF there is no 2nd arg ...
  154.          L80 $1/N,$1,SYSLIB/S,/U/E;note link
  155.       ;=done
  156.       fi
  157.  
  158.  
  159.      ZEX Command File 3:
  160.  
  161.      if NEC=$2
  162.           echo Terminal is NEC
  163.           goto done
  164.      fi
  165.      if TTY=$2
  166.           echo Terminal is TTY
  167.           goto done
  168.      fi
  169.      if DIABLO=$2
  170.           echo Terminal is Diablo
  171.      else
  172.           echo Terminal is Undefined
  173.      fi
  174.      ;=done
  175.      xif;note  Exit all pending IFs
  176.      ws $1;note  Edit file
  177.  
  178. :S
  179. Command:  SUB 3.0
  180.  
  181. Syntax:
  182.  
  183.      SUB or SUB //            <-- Print Help Message
  184.      SUB /A Text              <-- Abort $$$.SUB File
  185.                                    Processing at User's
  186.                                    Discretion
  187.      SUB /AB Text             <-- Same as /A but Ring Bell
  188.                                    to Alert User
  189.      SUB /I                   <-- Enter Interactive Input
  190.                                    Mode
  191.      SUB filename params      <-- As in Standard SUBMIT
  192.  
  193.  
  194. Function:
  195.  
  196.      SU┬ build≤ ß commanΣ filσ oε disδ (nameΣ $$$.SUB⌐ whicΦ ì
  197. ZCPR│á look≤á fo≥ eacΦ timσ i⌠ i≤ read∙ fo≥ ß commanΣá line«  ì
  198. Iµá ZCPR│ find≤ sucΦ ß file¼á i⌠ extract≤ thσá nex⌠á commanΣ ì
  199. from this file.
  200.  
  201.      SUB can also be used to sound alarms to the user.
  202.  
  203. Options:
  204.  
  205.      As indicated above:
  206.           A  - Permit abort
  207.           AB - Permit Abort and Ring Bell
  208.           I  - Interactive Input
  209.  
  210.  
  211. Comments:
  212.  
  213.      Thσá "SU┬á /Aó anΣ "SU┬ /ABó form≤ allo≈á thσá use≥á t∩ ì
  214. gracefull∙á abor⌠ ß $$$.SU┬ file«á  ^├ a⌠ thσ consolσ caε bσ ì
  215. useΣ t∩ abor⌠ sucΦ processinτ a≤ unde≥ CP/M¼ bu⌠ thσ /┴ forφ ì
  216. allow≤ thσ luxur∙ oµ startinτ ß commanΣ streaφ anΣá stoppinτ ì
  217. a⌠á ßá critica∞á poin⌠ t∩ allo≈ thσ use≥ t∩ takσá hi≤á time¼ ì
  218. inspec⌠á wha⌠á ha≤á happened¼á anΣ theεá decidσá whethe≥á t∩ ì
  219. proceeΣ o≥ not.
  220.  
  221.      Thσá "SU┬ /Ió forφ eliminate≤ thσ neeΣ fo≥ thσ use≥á t∩ ì
  222. usσá aεá edito≥ t∩ creatσ ß .SU┬ file«á  Iµ thσ use≥á ha≤á ß ì
  223. commanΣá streaφ hσ want≤ t∩ executσ immediatel∙ anΣá doesn'⌠ ì
  224. carσ t∩ d∩ i⌠ again¼á hσ caε usσ thi≤ option«á  Iε response¼ ì
  225. SU┬á allow≤á hiφá t∩ ente≥ hi≤á commanΣá streaφá (sorry¼á n∩ ì
  226. paramete≥ passing⌐ ß linσ a⌠ ß time«  Wheε i⌠ i≤ al∞ entereΣ ì
  227. (use≥ enter≤ aε empt∙ line)¼á thσ $$$.SU┬ filσ i≤ buil⌠á anΣ ì
  228. executed.
  229.  
  230.  
  231.      Thσ fina∞ form¼á "SU┬ filenamσ params"¼ i≤ identica∞ iε ì
  232. forφá t∩á thσá SUBMI╘á commanΣá supplieΣá witΦá CP/M«áá  Thσ ì
  233. "filenameóá specifie≤á thσá namσá oµ thσá .SU┬á filσá t∩á bσ ì
  234. executed¼áá anΣá thσá parameter≤á arσá associateΣá witΦá thσ ì
  235. substitutioε variable≤ oµ $1¼á $2¼ etc«  U≡ t∩ 2░ parameter≤ ì
  236. ma∙ bσ specified«á  Thσ sequencσ "$$ó place≤ ß "$ó int∩á thσ ì
  237. commanΣá line¼á anΣá thσ characte≥ sequencσ "^có place≤á thσ ì
  238. indicateΣ contro∞ characte≥ int∩ thσ commanΣ linσ (uparro≈ ├ ì
  239. place≤ Control-C).
  240.  
  241.      Thσ SU┬ commanΣ ma∙ bσ nesteΣ int∩ ß $$$.SU┬ file«á  Iµ ì
  242. ß "SU┬ filenamσ paramsó commanΣ i≤ encountereΣ iε ßá $$$.SU┬ ì
  243. file¼ SU┬ runs¼ realize≤ tha⌠ thi≤ ha≤ happened¼ anΣ insert≤ ì
  244. thσá indicateΣá commanΣ file¼á witΦ paramete≥á substitution¼ ì
  245. int∩á thσ runninτ commanΣ streaφ a⌠ thσá appropriatσá place«  ì
  246. Thi≤ ma∙ bσ nesteΣ a≤ man∙ level≤ dee≡ a≤ desired.
  247.  
  248.  
  249.      Unde≥á ZCPR3¼á iµá SU┬á i≤ executeΣ witΦá thσá Multiplσ ì
  250. CommanΣá Linσ Facilit∙ invokeΣ anΣ morσ command≤ follo≈á thσ ì
  251. SU┬ command¼á theε thσ res⌠ oµ thσ Multiplσ CommanΣ Linσá i≤ ì
  252. inserteΣ a⌠ thσ enΣ oµ thσ generateΣ $$$.SU┬ file.
  253.  
  254.      Finally¼á SU┬ follow≤ thσ ZCPR│ patΦ wheε searchinτ fo≥ ì
  255. thσ indicateΣ commanΣ file«  I⌠ i≤ full∙ integrateΣ int∩ thσ ì
  256. ZCPR│á Systeφá anΣ i≤ ablσ t∩ emplo∙ thσ Externa∞á PatΦá anΣ ì
  257. Multiplσ CommanΣ Linσ Buffe≥ feature≤ oµ ZCPR3.
  258.  
  259.  
  260.  
  261. Selected Error Messages:
  262.  
  263.      "Paramó erro≥ mean≤ tha⌠ ß paramete≥ wa≤ referenceΣ anΣ ì
  264. nonσ wa≤ giveε oε thσ commanΣ line.
  265.  
  266.      "Linσ To∩ Longó mean≤ tha⌠ thσ inpu⌠ line¼á afte≥ beinτ ì
  267. expandeΣá witΦá thσá inpu⌠ parameters¼á wa≤á morσá thaεá 12╢ ì
  268. characters long.
  269.  
  270.      ┴á morσ completσ lis⌠ oµ erro≥ message≤ i≤ giveεá unde≥ ì
  271. the indicated section of the main menu.
  272.  
  273.  
  274. Examples of Use:
  275.  
  276.      SUB cmdfile p1 p2 p3
  277.           -- thσááá filσáá 'cmdfile.SUBºááá i≤ááá processed¼ ì
  278. substituting 'p1' for $1, 'p2' for $2, and 'p3' for $3
  279.  
  280.      SUB /AB
  281.           -- durinτá thσ executioε oµ ß commanΣá file¼á thi≤ ì
  282. commanΣá cause≤ thσ bel∞ t∩ rinτ a⌠ thσ consolσ anΣ thσ use≥ ì
  283. is given a chance to abort execution
  284.  
  285. :E
  286.  
  287.      SU┬ provide≤ ß numbe≥ oµ informativσ diagnostic≤ t∩ thσ ì
  288. user«á  Iε particular¼á wheε processinτ ß CommanΣ File¼ wheε ì
  289. aεá erro≥ i≤ encountered¼á thσ use≥ i≤ informeΣ oµ thσá linσ ì
  290. numbe≥ thσ erro≥ occur≤ at.
  291.  
  292.      Thσá followinτ summarize≤ thσ erro≥ message≤á presenteΣ ì
  293. b∙ SUB:
  294.  
  295.           Disk Full
  296.                There is no room to write the $$$.SUB file
  297.  
  298.           Directory Full
  299.                There is no directory space for the $$$.SUB file
  300.  
  301.           Memory Full
  302.                There is not enough memory in which to build the
  303.                command stream to be placed into the $$$.SUB file
  304.  
  305. SUB Error Messages, Con't
  306.  
  307.           SUBMIT File Not Found
  308.                The .SUB file specified in the command line could
  309.                not be found along the ZCPR3 path
  310.  
  311.           Parameter
  312.                Invalid Parameter Specified
  313.  
  314.           Too Many Parameters
  315.                More than 20 parameters were on the command line
  316.  
  317.           Line too Long
  318.                The current line in the command stream exceeds
  319.                128 bytes
  320.  
  321.           SUBMIT File Empty
  322.                The .SUB file specified in the command line was
  323.                found to be empty
  324.  
  325. SUB Error Messages, Con't
  326.  
  327.           Control Character
  328.                The ^c form was not followed by a letter A-Z
  329.  
  330.  
  331. :Z
  332.  
  333. Command:  ZEX 3.0
  334.  
  335. Syntax:
  336.  
  337.           ZEX //                   <-- Print Help
  338.  
  339.           ZEX                      <-- Enter Interactive Mode
  340.  
  341.           ZEX filename params      <-- Process .ZEX or .SUB
  342.                                         file as with SUBMIT
  343.  
  344. Function:
  345.  
  346.      ZE╪á i≤á ßá memory-baseΣ commanΣá filσá processor«á  I⌠ ì
  347. perform≤ function≤ likσ SU┬ anΣ XSU┬ combined¼ anΣ it≤ inpu⌠ ì
  348. sourcσ i≤ locateΣ iε memory¼á s∩ tha⌠ it≤ executioε speeΣ i≤ ì
  349. significantly greater.
  350.  
  351.  
  352. Options:
  353.  
  354.      A≤ indicateΣ above¼ therσ arσ n∩ option≤ t∩ ZEX.
  355.  
  356. Comments:
  357.  
  358.      Thσáá Interactivσáá Modσá oµá ZE╪á execute≤á likσáá thσ ì
  359. Interactivσá Modσá oµ SUB«á  Thσ use≥ enter≤á commanΣá line≤ ì
  360. unti∞á hσá i≤ satisfieΣ anΣ theε terminate≤ thσá proces≤á b∙ ì
  361. enterinτá aε empt∙ linσ (simpl∙ hittinτ RETURN)«á  ZE╪á theε ì
  362. execute≤ thσ command≤ iε thσ sequencσ entered«  N∩ paramete≥ ì
  363. passinτ i≤ permitteΣ iε thi≤ modσ oµ operation.
  364.  
  365.      Thσáá "ZE╪áá filenamσáá paramsóá forφáá i≤áá likσáá thσ ì
  366. correspondinτá SU┬ form«á  ZE╪ wil∞ searcΦ alonτá thσá ZCPR│ ì
  367. Externa∞ PatΦ fo≥ ß commanΣ filσ oµ thσ forφ filename.ZE╪ o≥ ì
  368. filename.SUB«  Iµ ß director∙ i≤ entereΣ whicΦ contain≤ botΦ ì
  369. sucΦ files¼ thσ filσ oµ typσ ZE╪ wil∞ bσ executed.
  370.  
  371.  
  372.      Oncσá ZE╪ ha≤ beguε execution¼á i⌠ place≤ ß ZE╪ Monito≥ ì
  373. jus⌠á unde≥á ZCPR│ anΣ build≤ thσ commanΣ streaφá unde≥á thσ ì
  374. monitor«  Oncσ complete¼ thσ addres≤ oµ thσ BDO╙ i≤ adjusteΣ ì
  375. s∩á tha⌠ thσ ZE╪ monito≥ anΣ it≤ commanΣ streaφ wil∞ no⌠á bσ ì
  376. overwritteεá b∙ transien⌠ programs¼á anΣá executioεá begins«  ì
  377. EacΦá timσá thσ BIO╙ Consolσ Inpu⌠ routinσá i≤á called¼á ZE╪ ì
  378. supplie≤ thσ inpu⌠ character.
  379.  
  380.      A≤ witΦ SUB¼ ß ^├ froφ thσ consolσ wil∞ abor⌠ executioε ì
  381. oµ ß ZE╪ commanΣ stream«á  Also¼á a≤ witΦ SUB¼á iµ ß commanΣ ì
  382. follow≤á ZE╪á iε ß Multiplσ CommanΣ Line¼á ZE╪ append≤á thi≤ ì
  383. commanΣ t∩ thσ commanΣ stream.
  384.  
  385.  
  386.      Unlikσá SUB¼á ZE╪á doe≤ no⌠ permi⌠ nestinτá oµá commanΣ ì
  387. files«áá  ZE╪á wil∞á simpl∙á abor⌠á iµá ßá ZE╪á commanΣáá i≤ ì
  388. encountereΣ iε thσ commanΣ streaφ i⌠ i≤ processing.
  389.  
  390.      Unlikσá SUB¼á ZE╪ support≤ man∙ morσ embeddeΣ commands«  ì
  391. Combininτ thσ facilitie≤ oµ SU┬ anΣ XSU┬ iε thi≤á case¼á thσ ì
  392. embeddeΣá command≤ oµ ZE╪ reflec⌠ thσ XSUB-likσ capabilitie≤ ì
  393. oµ ZE╪ a≤ wel∞ a≤ somσ ne≈ ideas.
  394.  
  395.      Thesσáá extendeΣá contro∞á command≤á arσá discusseΣá iε ì
  396. anothe≥ informatioε section.
  397.  
  398.  
  399. Selected Error Messages:
  400.  
  401.      None discussed
  402.  
  403.  
  404. Examples of Use:
  405.  
  406.      ZEX
  407.           -- the user now enters a group of commands
  408.  
  409.      ZEX mycmds p1 p2
  410.           -- processinτ oµ thσ filσ 'mycmds.ZEX'¼ or¼ iµ no⌠ ì
  411. found¼ 'mycmds.SUBº i≤ performed╗ 'p1º i≤ substituteΣ fo≥ $▒ ì
  412. and 'p2' for $2
  413.  
  414. :D
  415.  
  416.              ZEX Directives - Control Commands
  417.  
  418.      The following summarizes the ZEX Control Commands:
  419.  
  420.      Cmd  Meaning                Cmd  Meaning
  421.       |   insert <CR>            ^|   insert <CRLF>
  422.      ^║   reruε commanΣ streaφ   ^«   togglσ prin⌠ suppress
  423.      ^#   toggle ZEX messages    ^$   define default params
  424.      ^?   wait for user input    ^/   ring bell and ^?
  425.      ^*   ring bell              ^"   accept user input
  426.      ^<   display chars only     ^>   stop display
  427.      ;;   ZEX comment            $n   1<=n<=9 for param
  428.      $$   $                      $^   ^
  429.      $|   |                      ^c   control char
  430.  
  431.  
  432.      Thi≤á summar∙á i≤ als∩ displayeΣ viß thσá built-iεá ZE╪ ì
  433. help.
  434.  
  435.      Thσá followinτ command≤ simpl∙ inser⌠á character≤á int∩ ì
  436. thσá ZE╪á commanΣá streaφ anΣ wil∞ no⌠ bσ discusseΣá iεá an∙ ì
  437. greate≥ detail.
  438.  
  439.     | inserts a <CR>         ^| inserts a <CR> <LF> pair
  440.     $$ inserts a single $    $^ inserts a single ^
  441.     $| inserts a single |    ^c inserts a control character
  442.  
  443.      Thσ ^¬ commanΣ simpl∙ cause≤ ZE╪ t∩ rinτ thσ bell«á  I⌠ ì
  444. doe≤ no⌠ inser⌠ ß BEL╠ characte≥ int∩ thσ commanΣ filσá likσ ì
  445. ß ^╟ sequencσ would«  I⌠ simpl∙ ring≤ thσ bel∞ anΣ continue≤ ì
  446. processing.
  447.  
  448.      Thσ ;╗ commanΣ i≤ ß ZE╪ comment«  I⌠ anΣ al∞ character≤ ì
  449. followinτá i⌠ u≡ t∩ anΣ includinτ thσ followinτ <LF╛ arσ no⌠ ì
  450. includeΣ iε thσ ZE╪ commanΣ stream«  The∙ arσ simpl∙ treateΣ ì
  451. a≤ ß commen⌠ iε thσ ZE╪ CommanΣ Filσ anΣ ignored«á  Unlikσ ß ì
  452. conventiona∞ ZCPR│ comment¼ thσ ZE╪ commen⌠ doe≤ no⌠ takσ u≡ ì
  453. spacσá iεá thσ commanΣ streaφ anΣ doe≤ no⌠ appea≥á wheεá thσ ì
  454. commanΣ streaφ i≤ executed.
  455.  
  456.      Thσá ^╝ anΣ ^╛ command≤ arσ useΣ t∩ bracke⌠á character≤ ì
  457. whicΦá arσ simpl∙ echoeΣ b∙ thσ ZE╪ monito≥ anΣá no⌠á passeΣ ì
  458. bacδá t∩á thσ callinτ program«á  Thi≤ cause≤ thσá character≤ ì
  459. betweeεá thesσá command≤á t∩ bσ echoeΣ t∩á thσá use≥á durinτ ì
  460. executioε bu⌠ no⌠ processeΣ b∙ an∙ program«  Thi≤ featurσ i≤ ì
  461. ver∙ gooΣ fo≥ embeddinτ comment≤ t∩ bσ printeΣ a⌠á executioε ì
  462. timσá int∩á thσ commanΣ stream«á  Unlikσ thσá ZCPR│á commen⌠ ì
  463. form¼á whicΦ i≤ ß linσ beginninτ witΦ ß semicolon¼á comment≤ ì
  464. encloseΣ b∙ ^╝ anΣ ^╛ ma∙ appea≥ anywhere¼ sucΦ a≤ withiε aε ì
  465. edito≥ session.
  466.  
  467.      Thσá ^úá commanΣá toggle≤á suppressioεá oµá informativσ ì
  468. message≤ generateΣ b∙ ZEX.
  469.  
  470.      Thσ ^« commanΣ cause≤ consolσ outpu⌠ t∩ ceasσ unti∞ thσ ì
  471. nex⌠á ^«á i≤á encountered«á  Characte≥á inpu⌠ froφá thσá ZE╪ ì
  472. Monito≥ continues¼ bu⌠ thσ use≥ doe≤ no⌠ seσ wha⌠ i⌠ is.
  473.  
  474.  
  475.      Thσá ^║á commanΣá cause≤á thσ ZE╪á monito≥á t∩á restar⌠ ì
  476. executioε oµ thσ loadeΣ commanΣ stream«á  Thσ entirσ commanΣ ì
  477. stream¼á a≤á initiall∙ processeΣ b∙ ZEX¼á i≤ executeΣá agaiε ì
  478. froφ thσ beginning.
  479.  
  480.      $n¼á wherσ 1<=n<=9¼á wil∞ causσ thσ indicateΣ specifieΣ ì
  481. o≥á defaul⌠á paramete≥ t∩ bσ substituteΣá froφá thσá commanΣ ì
  482. line.
  483.  
  484.      Thσ ^ñ commanΣ i≤ useΣ t∩ definσ o≥ redefinσ thσ se⌠ oµ ì
  485. inpu⌠á commanΣ parameters«á  Thσ res⌠ oµ thσ linσá followinτ ì
  486. thσá ^ñá i≤á treateΣá a≤ ß se⌠ oµá parameter≤á separateΣá b∙ ì
  487. blanks.
  488.  
  489.  
  490.      Thσ ^┐á anΣ ^» command≤ replacσ thσ /┴ anΣ /A┬á option≤ ì
  491. oµ SUB«á  ^┐á cause≤ ZE╪ t∩ sto≡ processinτ anΣ wai⌠ fo≥ thσ ì
  492. use≥ t∩ strikσ eithe≥ thσ spacσ ba≥ o≥ thσ RETUR╬ ke∙ beforσ ì
  493. continuing«á  Thσá use≥á caε takσ hi≤ timσ anΣá examinσá thσ ì
  494. display¼á and¼á iµá hσ doe≤ no⌠ wisΦ t∩ continue¼á ß ^├ wil∞ ì
  495. abor⌠ thσ commanΣ stream«  Thσ ^» commanΣ i≤ likσ ^?¼ bu⌠ i⌠ ì
  496. periodicall∙á ring≤ thσ bel∞ a⌠ thσ console¼á summoninτá thσ ì
  497. use≥ iε aε alarφ fashion.
  498.  
  499.      Finally¼á thσá ^ó commanΣ cause≤ ZE╪ t∩ sto≡á providinτ ì
  500. inpu⌠á froφ thσ commanΣ streaφ anΣ allo≈ thσ use≥á t∩á inpu⌠ ì
  501. whateve≥á hσ wishe≤ unti∞ ß specia∞ characte≥ i≤ output¼á a⌠ ì
  502. whicΦ timσ ZE╪ wil∞ resumσ providinτ input«á  Iε thi≤á case¼ ì
  503. ZE╪ caε bσ intimatel∙ linkeΣ witΦ ZCPR3¼á anΣ i⌠ i≤ intendeΣ ì
  504. tha⌠á thσá specia∞á characte≥á tha⌠ ZE╪ i≤á waitinτá fo≥á i≤ ì
  505. associateΣ witΦ thσ ZCPR│ prompt«á  Iε m∙ case¼á ╔ madσá thσ ì
  506. ZCPR│ promp⌠ t∩ bσ ß ">ó characte≥ witΦ thσ mos⌠ significan⌠ ì
  507. bi⌠á set«á  Thi≤ i≤ uniquσ anΣ appear≤ onl∙ wheε thσá promp⌠ ì
  508. come≤ u≡ oε m∙ system.
  509.  
  510.      Thσáá followinτáá example≤áá illustratσááá application≤ ì
  511. employinτ them«á  Comment≤ appea≥ ou⌠ t∩ thσ side¼á prefixeΣ ì
  512. b∙ <--.
  513.  
  514.  
  515. B1>zex
  516. ZEX, Version 1.3
  517. 1: ^$ this is fun                  <-- Define 3 params
  518. 2: echo $1 $2 $3
  519. 3: ^$ hello from happy acres       <-- Define 4 params
  520. 4: echo $1 $2 $3 $4
  521. 5: 
  522. (ZEX Active)                       <-- ZEX is running now
  523. B1>echo this is fun
  524.  
  525. THIS IS FUN
  526. B1>echo hello from happy acres
  527.  
  528. HELLO FROM HAPPY ACRES
  529. B1>
  530. (ZEX Completed)
  531. By Your Command >
  532.  
  533.  
  534. B1>ed demo.zex                     <-- Demo Command File
  535.  
  536. NEW FILE
  537.      : *i
  538.     1:  ed demo.txt                <-- Edit DEMO.TXT
  539.     2:  i                          <-- Insert text while in ED
  540.     3:  This is a test
  541.     4:  This is only a test
  542.     5:  This is a demo of ZEX Control
  543.     6:  ^Z                         <-- ^Z is 2 chars, xlated into
  544.     7:  b0lt                       <-- Ctrl-Z by ZEX
  545.     8:  1l
  546.     9:  0lt
  547.    10:  i                          <-- Input More Text
  548.    11:  ^"                         <-- Allow user to input text
  549.    12:  type demo.txt              <-- When ZEX continues, this
  550.    13:  era demo.txt               <--  is what it does next
  551.    14:  
  552.      : *e
  553.  
  554. B1>zex demo                        <-- Run the command file
  555. ZEX, Version 1.3
  556. (ZEX Active)
  557. B1>ed demo.txt
  558.  
  559. NEW FILE
  560.      : *i                          <-- ZEX is typing this in
  561.     1:  This is a test
  562.     2:  This is only a test
  563.     3:  This is a demo of ZEX Control
  564.     4:  
  565.      : *b0lt
  566.     1:  This is a test
  567.     1: *1l
  568.     2: *0lt
  569.     2:  This is only a test
  570.     2: *i                          <-- Now user input begins
  571.     2║  ╔ aφ no≈ typinτ thi≤ linσ oµ m∙ owε volitioε   <-- User
  572.     3:  ZEX will allow me to continue doing this until
  573.     4:  it sees the ZCPR3 prompt
  574.     5:                                  <-- User types Ctrl-Z
  575.     5: *e                               <-- User types "e"
  576.  
  577. (ZEX Active)
  578. B1>type demo.txt                        <-- ZEX resumes
  579. This is a test
  580. I am now typing this line of my own volition
  581. ZEX will allow me to continue doing this until
  582. it sees the ZCPR3 prompt
  583. This is only a test
  584. This is a demo of ZEX Control
  585.  
  586. B1>era demo.txt
  587. DEMO    .TXT
  588. B1>
  589. (ZEX Completed)
  590. By Your Command >
  591.  
  592. B1>ed demo.mac                     <-- Now to use ZEX for
  593.                                    <--  program assembly
  594. NEW FILE
  595.      : *i                          <-- User types program
  596.     1:          ext     print
  597.     2:  
  598.     3:          call    print
  599.     4:          db      'Hello, World ... It''s Another Day',0
  600.     5:          ret
  601.     6:  
  602.     7:          end
  603.     8:  
  604.      : *e
  605.  
  606.  
  607. B1>type a:m80.zex                  <-- M80.ZEX command file
  608. ;  M80.SUB -- MACRO-80 Assembler and Linker
  609. M80 =$1
  610. ;  Please Type $^C if Error(s) Exist - ^?
  611. ERA $1.BAK
  612. ERA $1.COM
  613. L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
  614. ERA $1.REL
  615. ;  Assembly Complete
  616.  
  617. B1>zex m80 demo                    <-- Run command file on pgm
  618. ZEX, Version 1.3
  619. (ZEX Active)
  620. B1>;  M80.SUB -- MACRO-80 Assembler and Linker
  621. B1>M80 =DEMO
  622.  
  623. No Fatal errr(s)
  624.  
  625. (ZEX Active)
  626.  
  627. B1>;  Please Type ^C if Error(s) Exist -     <-- User can abort now
  628.                                              <--  if he wishes
  629. B1>ERA DEMO.BAK
  630. DEMO    .BAK
  631. B1>ERA DEMO.COM
  632. No File
  633. B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E
  634.  
  635. Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
  636. Data    0100    01C5    <  197>
  637.  
  638. 35936 Bytes Free
  639.  
  640. Data    0100    01C5    <  197>
  641.  
  642. 35936 Bytes Free
  643. [0000   01C5        1]
  644.  
  645. (ZEX Active)
  646.  
  647. B1>ERA DEMO.REL
  648. DEMO    .REL
  649. B1>;  Assembly Complete
  650. B1>
  651. (ZEX Completed)
  652. By Your Command>demo                    <-- Run pgm now
  653. Hello, World ... It's Another Day
  654. B1>
  655.  
  656. :1
  657.  
  658.      Thσ followinτ restriction≤ arσ applieΣ t∩ commanΣ file≤ ì
  659. processeΣ b∙ SU┬ anΣ ZEX.
  660.  
  661.                         SUB Restrictions
  662.  
  663.      1«á  Yo⌡ ma∙ no⌠ loτ int∩ use≥ area≤ othe≥ thaε thσ onσ ì
  664. yo⌡ begaε processinτ thσ commanΣ filσ in«á  Iµ yo⌡ do¼ ZCPR│ ì
  665. loose≤á tracδ oµ thσ $$$.SU┬ filσ anΣ executioεá i≤á aborteΣ ì
  666. unti∞á yo⌡á reente≥ thσ origina∞ use≥ area¼á a⌠á whicΦá timσ ì
  667. executioε resumes.
  668.  
  669.      2«á  U≡á t∩á 2░á parameter≤ arσ permitteΣá oεá thσá SU┬ ì
  670. commanΣ line.
  671.  
  672.      3«  Yo⌡ ma∙ nes⌠ SU┬ commanΣ file≤ t∩ an∙ depth.
  673.  
  674.  
  675.  
  676.                         ZEX Restrictions
  677.  
  678.      1«á  Yo⌡ ma∙ movσ int∩ an∙ director∙ yo⌡ desirσ whilσ ß ì
  679. ZE╪ commanΣ streaφ i≤ beinτ executed.
  680.  
  681.      2«  U≡ t∩ ╣ parameter≤ arσ permitteΣ oε thσ ZE╪ commanΣ ì
  682. line.
  683.  
  684.      3«  Yo⌡ ma∙ NO╘ nes⌠ ZE╪ commanΣ files.
  685.  
  686.  
  687. :2
  688.  
  689.      BotΦá SU┬ anΣ ZE╪ makσ nicσ ExtendeΣ CommanΣ Processor≤ ì
  690. unde≥á ZCPR3«á  BotΦá usσá thσ Externa∞á PatΦá anΣá Multiplσ ì
  691. CommanΣ Linσ Buffe≥ Facilitie≤ oµ ZCPR3¼á anΣ ZE╪ i≤ furthe≥ ì
  692. prompteΣ fo≥ inpu⌠ b∙ thσ ZCPR│ promp⌠ iµ desired.
  693.  
  694.      T∩ refresΦ thσ reader¼á anΣ ExtendeΣ CommanΣá Processo≥ ì
  695. i≤á ßá prograφá invokeΣ b∙ ZCPR│ wheε i⌠ fail≤ t∩á finΣá thσ ì
  696. commanΣ alonτ it≤ path«  ZCPR3¼ upoε failinτ t∩ finΣ thσ CO═ ì
  697. filσ whicΦ correspond≤ t∩ thσ commanΣ namσ giveε t∩ it¼á caε ì
  698. bσá se⌠ u≡ t∩ eithe≥ searcΦ thσ patΦ o≥ g∩ directl∙á t∩á thσ ì
  699. roo⌠ oµ thσ patΦ anΣ looδ fo≥ aε ExtendeΣ CommanΣ Processor«  ì
  700. Iµ found¼ ZCPR│ simulate≤ ß commanΣ t∩ tha⌠ ExtendeΣ CommanΣ ì
  701. Processor¼á substitutinτá thσá user'≤á commanΣ linσá a≤á thσ ì
  702. argument≤ t∩ it.
  703.  
  704.      To illustrate, consider the following example:
  705.  
  706.  
  707.      MASM.ZE╪ perform≤ thσ samσ se⌠ oµ command≤ tha⌠ M80.ZE╪ ì
  708. filσ diΣ above¼ namely:
  709.  
  710. ;  MASM.ZEX -- MACRO-80 Assembler and Linker
  711. M80 =$1
  712. ;  Please Type $^C if Error(s) Exist - ^?
  713. ERA $1.BAK
  714. ERA $1.COM
  715. L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
  716. ERA $1.REL
  717. ;  Assembly Complete
  718.  
  719.      Thσá commanΣá "MAS═ DEMOó i≤ issued«á  WitΦ ZE╪ a≤á thσ ì
  720. ExtendeΣ CommanΣ Processor¼á ZCPR│ look≤ alonτ thσ patΦá fo≥ ì
  721. thσ commanΣ MASM¼á fail≤ t∩ finΣ it¼á anΣ theε simulate≤ thσ ì
  722. commanΣá "ZE╪á MAS═ DEMO"«á  Thσ abovσ commanΣ filσ i≤á theε ì
  723. executeΣ witΦ DEM╧ a≤ it≤ passeΣ parameter.
  724.  
  725.  
  726.      ZEX¼á o≥á an∙á othe≥ program¼á caε bσ installeΣá a≤á aε ì
  727. ExtendeΣ CommanΣ Processo≥ b∙ renaminτ i⌠ t∩ CMDRUN.COM.
  728.  
  729.