home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / z.lbr / ZEX.HZP / ZEX.HLP
Encoding:
Text File  |  1991-11-18  |  15.5 KB  |  429 lines

  1. ;
  2.                                      ZEX.COM                                  
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                5k (39)   4793  4.04       Joe Wright 11/88         Z3COM13
  6.  
  7.   1- Syntax  2- Flag Options  3- Control Cmds  4- Notes  5- Examples of Use   
  8.  
  9.  
  10.    ZEX is  a  memory-based command file processor.  It behaves somewhat like a
  11. combination of  SUB and XSUB, and because its input source is memory-resident,
  12. the execution speed  of  ZEX is  significantly  greater than that of SUB/XSUB.
  13. Vs 3.1 (3/84) by R. Conn.
  14.  
  15.    You may  move  into  any directory you desire while a ZEX command stream is 
  16. being executed.  Up to 9  parameters  are  permitted  on the ZEX command line.
  17. ZEX Type 4 now permits operation with programs such as dBase II, WordStar, and
  18. Multiplan which attempt to flush keyboard input from time to time.  Nesting of
  19. ZEX scripts is also supported.
  20. :1
  21.  
  22.     Syntax:  ZEX                         <-- enter interactive mode
  23.  
  24.              ZEX [[dir:]subfile[.typ][ parameters][ commands]]
  25.  
  26.   Without a command tail, ZEX is interactive and allows you to enter commands 
  27. and controls from the keyboard.  User input is terminated with an empty line.  
  28. ZEX  will also take its commands from a batch file (.typ, .ZEX or  .SUB)  and 
  29. pass  up  to nine parameters and any number of ZEX controls  on  the  command 
  30. line.  These controls may be embedded in the text of the command file or user 
  31. input line and will be executed after ZEX processing begins.
  32.  
  33.  |  Insert <CR>          ^|   Insert <CR>,<LF>         ;;  ZEX comment
  34. ^:  Rerun command file   ^.   Toggle print suppress    ^!  Abort if false
  35. ^#  Toggle ZEX msgs      ^$   Define default params    ^c  Insert cntrl char
  36. ^?  Wait for user <CR>   ^/   Ring and wait for <CR>   $n  1<=n<=9 for param
  37. ^*  Ring bell            ^"_  User input /w trigger    $$  =$ Insert literal
  38. ^<  Display chars only   ^>   Stop display             ^-  Toggle quiet flag
  39. ^(  IF flow true         ^)   ENDIF flow true          ^&  Toggle print IF
  40. ^=  Toggle XSUB mode     ^%   Toggle ZEX input
  41. :2
  42.  
  43.  
  44.  ZEX Type 4 Flag Options - 1/2 
  45.  
  46.    ZEX Type 4 defaults  to all flags (except XSUB) OFF and invites the user to
  47. specify his options on the command line or in the batch file.  
  48.  
  49.    ^=  XSUB     ^= and ^% are used in combination to help control ZEX input to
  50.                 the  running program.   XSUB ON will allow ZEX  input  for the 
  51.                 remainder  of the file except  for those commands  which begin
  52.                 with ^%.   Conversely,  XSUB OFF will turn ZEX input OFF after
  53.                 each command except for those preceded by ^%.   
  54.  
  55.    ^-  QUIET    Setting  the QUIET flag  under ZEX Type 4  suppresses the  Z34 
  56.                 command prompt (A0:BASE>) as well as echo of the command line.
  57.                 ZEX Type 4  will restore the QUIET flag  to its original value
  58.                 when Done.
  59.  
  60.  
  61.  
  62.  ZEX Type 4 Flag Options - 2/2 
  63.  
  64.    ^#  MSUP     ZEX has  a number of messages of  its  own (ZEX:, Done, etc.). 
  65.                 ^# suppresses these messages until the next ^#.   If ^- and ^# 
  66.                 are  both toggled,  ZEX and Z34  will be completely silent and 
  67.                 batch commands  will execute  as if from  the multiple command 
  68.                 line or alias script with no reports to the console.
  69.  
  70.    ^.  PSUP     All Console Output may be suppressed with the ^. toggle.
  71.  
  72.    ^&  IPSUP    Any Console Output may be suppressed during a false flow state
  73.                 with the ^& toggle.  
  74. :3
  75.  
  76.  
  77.  Zex Control Commands - 1/14 
  78.  
  79. ^*   -  causes ZEX  to  ring the bell.   It does  not insert  a BELL character 
  80.         into the command  file like a ^G sequence would.  It simply  rings the 
  81.         bell and continues processing.
  82.  
  83. ;    -  a ZEX comment.  When ; is the first character on a line or is preceded
  84. ;;      by a space or tab,  the  ;  and  all characters following it up to and 
  85.         including the  following  <LF>  are  not  included in the  ZEX command 
  86.         stream.  They are simply treated as a comment in the  ZEX Command File
  87.         and ignored.   Unlike  a conventional  ZCPR3 comment,  the ZEX comment 
  88.         does not take up space in the command stream and  does not appear when 
  89.         the command stream is executed.  ';;' will still do the same thing.
  90.  
  91. {    -  'field' comment.    As the first character of  a particular line,  '{' 
  92. }       will cause  all subsequent  characters  and lines  to  be  treated  as 
  93.         comment and otherwise ignored until  the corresponding closing bracket
  94.         is encountered.
  95.  
  96.  
  97.  
  98.  Zex Control Commands - 2/14 
  99.  
  100. ^<   -  used to  bracket characters which are simply echoed by the ZEX monitor 
  101. ^>      and  not  passed  back  to  the  calling  program.   This  causes  the 
  102.         characters between  these commands  to  be  echoed  to the user during
  103.         execution but not processed by any program.  This feature is very good
  104.         for embedding comments to  be  printed  at  execution  time  into  the 
  105.         command stream.   Unlike the  ZCPR3  comment  form,  which  is  a line 
  106.         beginning with a semicolon, comments  enclosed by ^< and ^> may appear 
  107.         anywhere, such as within an editor session.
  108.  
  109. ^#   -  toggles suppression of informative messages generated by ZEX.
  110.  
  111. ^.   -  causes console output  to  cease  until  the  next ^. is  encountered.
  112.         Character input from the ZEX Monitor continues, but the  user does not 
  113.         see what it is.
  114.  
  115.  
  116.  
  117.  Zex Control Commands - 3/14 
  118.  
  119. ^:   -  causes the ZEX  monitor  to  restart  execution  of the loaded command 
  120.         stream.  With ZEX Type 4 default flags are  re-established rather than
  121.         the  entire command  stream,  as  initially processed  by  ZEX,  being
  122.         executed again from the beginning.  
  123.  
  124. $n   -  where 1<=n<=9, causes the  indicated specified or default parameter to 
  125.         be substituted from the command line.
  126.  
  127. ^$   -  used to  define or redefine the set of input command parameters.   The 
  128.         rest of the  line  following the  ^$ is treated as a set of parameters 
  129.         separated by blanks.
  130.  
  131.  
  132.  
  133.  Zex Control Commands - 4/14 
  134.  
  135. ^?   -  replace  the  /A and /AB  options  of  SUB.   ^?  causes  ZEX  to stop 
  136. ^/      processing and wait for the user to strike either the space bar or the
  137.         RETURN key before continuing.   The user can take his time and examine
  138.         the display, and, if he does not wish to continue, a ^C will abort the
  139.         command stream.  The ^/ command  is like ^?, but it periodically rings 
  140.         the bell at the console, summoning the user in an alarm fashion.
  141.  
  142. ^"   -  causes ZEX to  stop  providing input from the command stream and allow 
  143.         the user to input whatever  he  wishes  until  a  special character is 
  144.         output, at which time ZEX will resume providing input.   In this case, 
  145.         ZEX can be intimately linked with ZCPR3, and  it  is intended that the
  146.         special  character  that  ZEX is  waiting  for  is associated with the 
  147.         ZCPR3 prompt.   In  my case, I  made  the  ZCPR3  prompt  to  be a ">" 
  148.         character with the  most  significant  bit  set.   This  is unique and 
  149.         appears only when the prompt comes up on my system.
  150.  
  151.  
  152.  
  153.  Zex Control Commands - 5/14 
  154.  
  155.    The  following  examples  illustrate  applications  employing  ZEX  control 
  156. commands.  Comments appear out to the side, prefixed by <--.
  157.  
  158. B1>zex
  159. ZEX, Version 1.3
  160. 1: ^$ this is fun                  <-- Define 3 params
  161. 2: echo $1 $2 $3
  162. 3: ^$ hello from happy acres       <-- Define 4 params
  163. 4: echo $1 $2 $3 $4
  164. 5: 
  165. (ZEX Active)                       <-- ZEX is running now
  166. B1>echo this is fun
  167.  
  168. THIS IS FUN
  169.  
  170.  
  171.  
  172.  Zex Control Commands - 6/14 
  173.  
  174. B1>echo hello from happy acres
  175.  
  176. HELLO FROM HAPPY ACRES
  177. B1>
  178. (ZEX Completed)
  179. By Your Command >
  180.  
  181. B1>ed demo.zex                     <-- Demo Command File
  182.  
  183. NEW FILE
  184.      : *i
  185.     1:  ed demo.txt                <-- Edit DEMO.TXT
  186.     2:  i                          <-- Insert text while in ED
  187.     3:  This is a test
  188.     4:  This is only a test
  189.     5:  This is a demo of ZEX Control
  190.  
  191.  
  192.  
  193.  Zex Control Commands - 7/14 
  194.  
  195.     6:  ^Z                         <-- ^Z is 2 chars, xlated into
  196.     7:  b0lt                       <-- Ctrl-Z by ZEX
  197.     8:  1l
  198.     9:  0lt
  199.    10:  i                          <-- Input More Text
  200.    11:  ^"                         <-- Allow user to input text
  201.    12:  type demo.txt              <-- When ZEX continues, this
  202.    13:  era demo.txt               <--  is what it does next
  203.    14:  
  204.      : *e
  205.  
  206. B1>zex demo                        <-- Run the command file
  207. ZEX, Version 1.3
  208. (ZEX Active)
  209. B1>ed demo.txt
  210.  
  211.  
  212.  
  213.  Zex Control Commands - 8/14 
  214.  
  215. NEW FILE
  216.      : *i                          <-- ZEX is typing this in
  217.     1:  This is a test
  218.     2:  This is only a test
  219.     3:  This is a demo of ZEX Control
  220.     4:  
  221.      : *b0lt
  222.     1:  This is a test
  223.     1: *1l
  224.     2: *0lt
  225.     2:  This is only a test
  226.     2: *i                          <-- Now user input begins
  227.     2:  I am now typing this line of my own volition   <-- User
  228.     3:  ZEX will allow me to continue doing this until
  229.     4:  it sees the ZCPR3 prompt
  230.  
  231.  
  232.  
  233.  Zex Control Commands - 9/14 
  234.  
  235.     5:                                  <-- User types Ctrl-Z
  236.     5: *e                               <-- User types "e"
  237.  
  238. (ZEX Active)
  239. B1>type demo.txt                        <-- ZEX resumes
  240. This is a test
  241. I am now typing this line of my own volition
  242. ZEX will allow me to continue doing this until
  243. it sees the ZCPR3 prompt
  244. This is only a test
  245. This is a demo of ZEX Control
  246.  
  247. B1>era demo.txt
  248. DEMO    .TXT
  249.  
  250.  
  251.  
  252.  Zex Control Commands - 10/14 
  253.  
  254. B1>
  255. (ZEX Completed)
  256. By Your Command >
  257.  
  258. B1>ed demo.mac                     <-- Now to use ZEX for
  259.                                    <--  program assembly
  260. NEW FILE
  261.      : *i                          <-- User types program
  262.     1:          ext     print
  263.     2:  
  264.     3:          call    print
  265.     4:          db      'Hello, World ... It''s Another Day',0
  266.     5:          ret
  267.     6:  
  268.     7:          end
  269.  
  270.  
  271.  
  272.  Zex Control Commands - 11/14 
  273.  
  274.     8:  
  275.      : *e
  276.  
  277. B1>type a:m80.zex                  <-- M80.ZEX command file
  278. ;  M80.SUB -- MACRO-80 Assembler and Linker
  279. M80 =$1
  280. ;  Please Type $^C if Error(s) Exist - ^?
  281. ERA $1.BAK
  282. ERA $1.COM
  283. L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
  284. ERA $1.REL
  285. ;  Assembly Complete
  286.  
  287.  
  288.  
  289.  Zex Control Commands - 12/14 
  290.  
  291. B1>zex m80 demo                    <-- Run command file on pgm
  292. ZEX, Version 1.3
  293. (ZEX Active)
  294. B1>;  M80.SUB -- MACRO-80 Assembler and Linker
  295. B1>M80 =DEMO
  296.  
  297. No Fatal errr(s)
  298.  
  299. (ZEX Active)
  300.  
  301. B1>;  Please Type ^C if Error(s) Exist -     <-- User can abort now
  302.                                              <--  if he wishes
  303.  
  304.  
  305.  
  306.  Zex Control Commands - 13/14 
  307.  
  308. B1>ERA DEMO.BAK
  309. DEMO    .BAK
  310. B1>ERA DEMO.COM
  311. No File
  312. B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E
  313.  
  314. Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
  315. Data    0100    01C5    <  197>
  316.  
  317. 35936 Bytes Free
  318.  
  319. Data    0100    01C5    <  197>
  320.  
  321. 35936 Bytes Free
  322. [0000   01C5        1]
  323.  
  324.  
  325.  
  326.  Zex Control Commands - 14/14 
  327.  
  328. (ZEX Active)
  329.  
  330. B1>ERA DEMO.REL
  331. DEMO    .REL
  332. B1>;  Assembly Complete
  333. B1>
  334. (ZEX Completed)
  335. By Your Command>demo                    <-- Run pgm now
  336. Hello, World ... It's Another Day
  337. B1>
  338. :4
  339.  
  340.  ZEX Notes - 1/4 
  341.  
  342.    a. The Interactive Mode of ZEX executes  like the Interactive Mode  of SUB.
  343.       The user enters command  lines until he is satisfied and then terminates 
  344.       the process by  entering  an  empty  line (simply hitting RETURN).   ZEX 
  345.       then  executes  the commands  in  the  sequence  entered.  No  parameter 
  346.       passing is permitted in this mode of operation.
  347.  
  348.    b. The "ZEX filename params" form is like the corresponding SUB form.   ZEX
  349.       will search along the ZCPR3 External Path for a command file of the form
  350.       filename.ZEX or  filename.SUB.  If a directory is entered which contains 
  351.       both such files, the file of type ZEX will be executed.
  352.  
  353.    c. Once ZEX  has begun execution, it  places a ZEX Monitor just under ZCPR3 
  354.       and builds  the command  stream  under the  monitor.  Once complete, the 
  355.       address of the BDOS is adjusted so  that the ZEX monitor and its command 
  356.       stream will not be  overwritten  by transient  programs,  and  execution 
  357.       begins.  Each  time  the  BIOS  Console  Input  routine  is  called, ZEX 
  358.       supplies the input character.
  359.  
  360.  
  361.  ZEX Notes - 2/4 
  362.  
  363.    d. As with SUB, a ^C from the console will abort execution of a ZEX command
  364.       stream.  Also, as with SUB,  if  a  command  follows  ZEX  in a Multiple 
  365.       Command Line, ZEX appends this command to the command stream.
  366.  
  367.    e. Unlike SUB, ZEX  does  not  permit nesting  of command files.   ZEX will 
  368.       simply abort if a ZEX command is encountered in the command stream it is
  369.       processing.
  370.  
  371.    f. Unlike SUB, ZEX supports  many  more  embedded  commands.  Combining the 
  372.       facilities  of  SUB and  XSUB in this case, the embedded commands of ZEX 
  373.       reflect the XSUB-like capabilities of ZEX as well as some new ideas.
  374.  
  375.    g. ZEX Type 4 ignores  tabs and spaces  at the beginning of a command line.
  376.       Subsequent tabs are converted to spaces and subsequent spaces prior to a
  377.       ZEX comment  or CR that  ends the  line are removed.   This allows  more 
  378.       freedom to format the input file for readability.   The ZEX literal '$ '
  379.       should be used for commands preceded by a space.  
  380.  
  381.  
  382.  Zex Notes - 3/4 
  383.  
  384.    h. ZEX Type 4 has a patch area right after the Z3ENV header at 0200h.  Each
  385.       patchable byte is preceded  by its name and '>' for easy identification:
  386.  
  387.       KDEL>  05         number of false responses between normal chars
  388.       CDEL>  0F         number of lies after <cr>
  389.         
  390.       XSUB>  00 or FF   ZEX Input Mode (FF)
  391.       MSUP>  00 or FF   Suppress ZEX messages
  392.       PSUP>  00 or FF   Suppress Console Output
  393.       IPSUP> 00 or FF   Suppress Conout IF false
  394.       QUEIT> 00 or FF   Initial Z3 quiet flag
  395.  
  396.       ZEXDU> 00 00      No ZEX directory declared or..
  397.       ZEXDU> 03 01      Search directory A3: only
  398.       ROOT>  00 or FF   Search Root directory only
  399.       CURDU> 00 or FF   Search Current directory only  
  400.  
  401.  
  402.  Zex Notes - 4/4 
  403.  
  404.    i. Version 4.04 updates:
  405.       - Line  formatting  has  been  further  relaxed  by  allowing  a  single 
  406.       semicolon ';' to denote  a comment if  it is the  first character on the
  407.       line or if it is  preceded by  a space or tab.   Multiple Command system
  408.       syntax ERA *.BAK;ERA *.PRN;DIR *.Z80 still  works because  the character
  409.       prior to ; is not a space.  The ';;' ZEX comment form still works but is
  410.       unnecessary.   If ; is  required  at the beginning of  a line or after a 
  411.       space, use the $; literal form.
  412.       - Also added is the 'field' comment.   A left curly bracket  '{'  as the
  413.       first  character of  a  particular line  will cause all subsequent char-
  414.       acters and lines  to be treated  as comment  otherwise ignored until the
  415.       corresponding closing bracket is encountered. 
  416. :5
  417.  
  418.  
  419.  Examples of Use 
  420.  
  421.    a. ZEX         
  422.  
  423.       - the user now enters a group of commands
  424.  
  425.    b. ZEX mycmds p1 p2
  426.                   
  427.       - processing of  the file mycmds.ZEX, or, if  not  found,  mycmds.SUB is 
  428.         performed; p1 is substituted for $1 and p2 for $2 
  429.