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 / ZCPR33 / A-R / ARUNZ09Q.LBR / ARUNZ09Q.DZC / ARUNZ09Q.DOC
Text File  |  1989-03-02  |  15KB  |  376 lines

  1.  
  2.                Summary of ARUNZ Parameters as of Version 0.9Q
  3.  
  4.                                   Jay Sage
  5.                                 March 2, 1989
  6.  
  7.  
  8.      The information about the ARUNZ parameters is covered in four sections
  9. below.  Section A has a summary of the parameters and directives with no
  10. explanation.  Sections B through D explain the parameters in greater detail. 
  11. Section B defines some qualifier symbols that are used with a number of
  12. parameter forms.  Section C defines the actual parameter expressions
  13. supported by ARUNZ version 0.9Q.  Finally, Section D covers the special
  14. directives recognized by ARUNZ.
  15.  
  16.  
  17. =============================================================================
  18.  
  19. A. Parameter Summary
  20. --------------------
  21.  
  22. format    'f'    =    H   hex            D   3 decimal
  23.             F   floating decimal    T   two decimal
  24.                         O   one decimal
  25.  
  26. module    'm'    =    B   BIOS        M   MSG
  27.             C   CCP/CPR        N   NDR
  28.             D   DOS            P   PATH
  29.             E   ENV            R   RCP
  30.             F   FCP            S   SHL
  31.             I   IOP            X   XFCB
  32.             L   MCL
  33.  
  34. component  'c'    =    N   FN            D   drive or default
  35.             T   FT            U   user or default
  36.             F   FN[.FT]        P   prefix (with colon)
  37.             Z   Crunched Type    S   short prefix
  38.             Q   Squeezed Type    C   converted token (to DU:)
  39.  
  40. units    'u'    =    Y  year            H  hour (mil)
  41.             M  month        C  hour (civ)
  42.             D  day            N  minute
  43.                         A  AM/PM
  44.  
  45.  
  46. parameter forms:    full token        $#
  47.             parsed token        $Tc#
  48.             home directory        $HD  $HU  $HB
  49.             full command line    $!
  50.             full command tail    $*
  51.             tail less tokens    $-#
  52.             memory contents        $Mf####
  53.             register contents    $Rf##
  54.             system file        $Sc#
  55.             get prompted input    $"prompt"
  56.             use prompted input    $'c#  ( c: L ; E )
  57.             ENV address        $Am
  58.             offset ENV address    $+m
  59.             ENV address content    $@fAm
  60.             offset ENV content    $@f+m####
  61.             date/time        $Du
  62.  
  63. =============================================================================
  64.  
  65. B. Definitions
  66. --------------
  67.  
  68.      A line in the ALIAS.CMD file takes the following form:
  69.  
  70.     alias_name_form   alias_script
  71.  
  72. The alias script is the prototype command line.  It contains normal charactersì
  73. and parameter expressions, as discussed in detail in this DOC file.  It isì
  74. separated from the alias_name_form by any number of tabs and spaces.  Thus theì
  75. scripts can be formatted neatly to make the file easier to read.
  76.  
  77.      The alias_name_form consists of any number of individual alias nameì
  78. expressions connected by equal signs.  There must be no imbedded spaces orì
  79. tabs.  An individual alias name expression can be of any length.  It is notì
  80. limited to the eight characters of file names, and it can contain controlì
  81. characters, unlike file names.  The alias name may contain several specialì
  82. symbols which qualify comparisons with the command verb passed to ARUNZ. ì
  83. These are as follows:
  84.  
  85. underscore (_)    This character in the alias name will match any character.
  86.         Thus the alias name "_DIR" will match the commands LDIR,
  87.         XDIR, and so on.  Their must be a character present.
  88.  
  89. comma (,)    Characters that appear after this character are optional.
  90.         If characters are present in the command, they must match;
  91.         However, the characters need not be present.  For example,
  92.         "ZP,ATCH" will respond to ZP or ZPATCH but not to ZPTCH.
  93. greater (>)    This special character represents any name followed by a
  94.         period.  It is used with ZCPR34, which can accept a command
  95.         like "PROG.Z80" and pass it to the extended command processor.
  96.         An example alias definition would be
  97.  
  98.             >Z80  z80asm $tn0
  99.  
  100.         Just entering the name with its file type of Z80 would invoke
  101.         the Z80ASM assembler on the file name.
  102.  
  103. colon (:)    An alias name that begins with this character will match
  104.         any command and is thus the default alias definition.  If used
  105.         at all, it should be the last alias defined.  A command use is
  106.         to make ARUNZ chain to LX or another extended command
  107.         processor.
  108.     
  109.      Several parameters use qualifiers to further define the data returned 
  110. by that parameter.  Since a number of parameters share some of these 
  111. qualifiers, we would like to list them here at the beginning.
  112.  
  113. 1. Conversion formats (f):
  114.  
  115.      When byte values are returned by parameters, the values can be 
  116. converted to various formats.  These formats are indicated by a format 
  117. qualifier in the parameter expression as follows.
  118.  
  119.      format qualifier        meaning
  120.      ----------------        -------
  121.  
  122.         H        return two hexadecimal characters
  123.         F        return value as floating decimal
  124.                 (leading 0s suppressed)
  125.         D        return three decimal characters
  126.         T        return value as two decimal characters
  127.         O        return value as one decimal character
  128.  
  129. 2. System memory module (m):
  130.  
  131.      For parameters that obtain the value of a memory module from the
  132. environment descriptor, the module is specified by one of the following
  133. letters:
  134.  
  135.      module qualifier        memory module
  136.      ----------------        -------------
  137.         B            BIOS    (basic i/o system)
  138.         C            CCP/CPR    (command processor)
  139.         D            DOS    (disk operating system)
  140.         E            ENV    (environment descriptor)
  141.         F            FCP    (flow command package)
  142.         I            IOP    (input/output package)
  143.         L            MCL    (multiple command line)
  144.         M            MSG    (message buffer)
  145.         N            NDR    (named directory register)
  146.         P            PATH    (command search path)
  147.         R            RCP    (resident command package)
  148.         S            SHL    (shell stack)
  149.         X            XFCB    (external command FCB)
  150.  
  151.  
  152. 3. File specification components (c):
  153.  
  154.      Several parameters return various information about file 
  155. specifications.  The following parts of the file specification token can 
  156. be returned.  The first three letters can be used with all such 
  157. parameters. The remaining letters can be used with those parameters that 
  158. refer to tokens that can have directory prefixes as well as file names.
  159.  
  160.         file part        meaning
  161.         ---------        -------
  162.  
  163.          N    FN (file name)
  164.         T    FT (file type)
  165.         F    FN[.FT] (complete file name -- name and type)
  166.  
  167.         Z    the file type as it would be when file is crunched
  168.         Q    the file type as it would be when file is squeezed
  169.  
  170.         D    drive (or logged drive if no explicit value)
  171.         U    user (or logged user if no explicit value)
  172.         P    directory prefix (including the colon)
  173.         S    short prefix (without the colon)
  174.         C    converted file specification (DIR: form, if
  175.             present changed to equivalent DU: -- if invalid
  176.             name, then no conversion is performed)
  177.  
  178. =============================================================================
  179.  
  180. C. Parameter Expressions
  181. ------------------------
  182.  
  183. 1. Command line token parameters: $#
  184.  
  185.      The parameter expression $#, where '#' is a number between 0 and 9,
  186. returns a complete token from the command line.  $0 returns the command verb
  187. (alias name) exactly as it was entered on the command line, including any
  188. directory prefix and/or file type.  Parameters numbered from 1 to 9 return
  189. the corresponding token from the command line tail.  Tokens are defined as
  190. contiguous strings of characters.  ARUNZ is normally configured to take only
  191. spaces as delimiters between tokens, but it can be configured to allow tabs
  192. as delimiters as well.
  193.  
  194.  
  195. 2. Command line token parsing parameter: $T
  196.  
  197.      The command line tokens are returned whole, as is, by the $# parameter
  198. described above but can be parsed as file specification expressions using
  199. the parameter form $Tc#, where 'c' is the component part of the file
  200. specification to use (see definition 3 in Section B above) and where '#' is
  201. a number from 0 to 9.  The value 0 refers to the command verb; the values
  202. 1..9 refer to the corresponding token in the command line tail.
  203.  
  204.      Under ZCPR33 and earlier, if the command verb contained an explicit
  205. directory prefix or if it included a file type, the extended command
  206. processor could not be invoked.  Thus $TT0, the file type of the command
  207. verb, would always be null.  The expressions $TD0 and $TU0 would always
  208. return the logged-in drive and user, respectively.  With ZCPR34 this is no
  209. longer true.  All the parameters can take on more general values.
  210.  
  211.  
  212. 3. Home directory parameter: $H
  213.  
  214.      Since $TD0 and $TU0 cannot be counted on to return the currently logged
  215. directory values, special parameters have been provided for this purpose. 
  216. They are:
  217.  
  218.         $HD        the home (logged) drive
  219.         $HU        the home (logged) user
  220.         $HB        the home (logged) drive and user together
  221.  
  222.  
  223. 4. Command tail parameters: $!  $*  $-#
  224.  
  225.      The parameter $! represents the entire command line as entered,
  226. including the command verb (alias name) and the tail.  It is useful in
  227. aliases whose only purpose is to put an explicit DU: or DIR: directory
  228. prefix on the command.
  229.  
  230.      The parameter $* represents the entire command tail (after the command
  231. verb), not including any leading space characters.  It is useful in aliases
  232. which substitute another command verb for the one actually given but which
  233. leave the command tail as it was.
  234.  
  235.      The parameter expression $-#, where '#' is a number between 0 and 9,
  236. returns the command line tail with the designated number of leading tokens
  237. removed.  Thus $-0 is the same as $*.  These parameters are useful when some
  238. number of leading tokens are given some special treatment using the token
  239. parsing parameters and the rest of the command line is to be passed intact.
  240.  
  241.  
  242. 5. Memory contents parameters: $M
  243.  
  244.      A parameter expression of the form $Mf#### returns the contents of the
  245. memory address given by ####, a four digit hexadecimal address.  Note that
  246. there must be exactly four hex digits, even if the value has leading zeros. 
  247. The 'f' term is the conversion format (see definition 1 in Section B above).
  248.  
  249.  
  250. 6. Register value parameters: $R
  251.  
  252.      The byte contained in any of the 32 user registers is returned by a
  253. parameter expression of the form $Rf##.  The register number must be given
  254. as exactly two hex digits.  The value must be in the range 00 to 1F.  The
  255. 'f' term is the conversion format (see definition 1 in Section B above).
  256.  
  257.  
  258. 7. System file parameters: $S
  259.  
  260.      Parameters can return values based on the four system file names stored
  261. in the environment.  The general expression is $Sc#, where '#' is a digit
  262. from 1 to 4 and where 'c' is the component of the file.  Since these files
  263. have no associated directory, only the first three values usually allowed
  264. for 'c' (see definition 3 in Section B above) can be used (N, T, and F)
  265.  
  266.  
  267. 8. Prompted input parameters: $"  $'
  268.  
  269.      The double-quote parameter is used to prompt for user input.  If the
  270. parameter expression $"..." appears, where the dots refer to any string of
  271. characters, that string of characters will be sent to the screen as a
  272. prompt, and one line of user input will be read into a buffer.  In the
  273. normal configuration of ARUNZ there can be up to four such prompts and
  274. responses.
  275.  
  276.      The prompt is sent without case conversion.  A character preceeded by a
  277. caret is converted to a control character (^M for return, ^J for linefeed). 
  278. The dollar sign acts as an escape character.  Any character after it is sent
  279. as is.  Thus $$ produces '$' in the prompt; $^ produces '^'; $" produces
  280. '"'; and so on.
  281.  
  282.      The single-quote parameter is used to process the user's reponse to
  283. prompts.  The parameter expression $'c# is used in the script to retrieve
  284. all or part of the user's response.  The number '#' is in the range 1 to 4
  285. but must not be larger than the number of prompts up to that point.  (It is
  286. recommended that all the prompts be placed at the very beginning of the
  287. script.)  The term 'c' indicates the component to be extracted from the
  288. user's response.  The usual values described under definition 3 in Section B
  289. above can be specified.  In addition, the following values are also allowed:
  290.  
  291.     L    the entire line of user input
  292.     ;    one complete command (i.e., the input is terminated either
  293.         by the end of the input or by a semicolon)
  294.     E    exactly the first token from the user's input
  295.  
  296. The user's input can be used repeatedly and in different ways throughout the
  297. script.  Here is an example:
  298.  
  299.   TEST  $"Enter a file spec: "echo directory prefix is $'p1;echo file name
  300.     is $'f1
  301.  
  302.  
  303. 9. Environment data parameters: $A  $+  $@
  304.  
  305.      Several parameter expressions can return information related to data
  306. extracted from the Z-System environment descriptor.  In this way, aliases
  307. can determine information independent of system configuration.  This is
  308. particularly important in the new dynamic systems (NZCOM and Z3PLUS) where
  309. the operating system configuration can change at any time.
  310.  
  311.      The $A paramter returns the address of various system modules.  The
  312. parameter expression is $Am, where 'm' designates the module (see definition
  313. 2 in Section B of this document).
  314.  
  315.      The $+ parameter is similar but allows one to compute an offset from
  316. the address that would be returned by a $A parameter.  The form is $+m####,
  317. where #### is an exactly four hex digit offset value and 'm' is the memory
  318. module to use as the base address.  The expression $+m0000 is equivalent to
  319. $Am.
  320.  
  321.      The $@ parameter expression is $@fam or $@f+m####.  It performs the
  322. same calculation as the parameter expression following the '@f' except that
  323. instead of returning the calulated address it returns the value of the byte
  324. stored at that address converted according to the format specified by 'f'.
  325.  
  326.  
  327. 10. Date and time parameters: $D
  328.  
  329.      The parameter expression $Du returns a unit of the date/time supplied
  330. by DateStamper.  The unit 'u' can be any of the following:
  331.  
  332.     Y    Year (YY)
  333.     M    Month (MM)
  334.     D    Day (DD)
  335.     H    Hour in military form 00-23 (HH)
  336.     C    hour in Civil form 01-12 (HH)
  337.     N    miNute (MM)
  338.     A    Am/pm flag (AM or PM)
  339.  
  340. In all cases, two characters are returned if DateStamper is running.  If
  341. DateStamper is not running, then values of '00' are returned for all
  342. parameters except the AM/PM flag, for which a null string is returned.  Note
  343. that 'M', having been used for 'month', could not be used for 'minute'; 'N'
  344. was used instead.
  345.  
  346. =============================================================================
  347.  
  348. D. ARUNZ Directives
  349. -------------------
  350.  
  351.      There are two expressions that look like parameters but are actually
  352. directives that tell ARUNZ how to work (and not parameters that return
  353. character strings).
  354.  
  355. 1. ZEX input redirection control: $I
  356.  
  357.      Whenever user input is requested (as with the $" parameter), one must
  358. consider whether or not ZEX should be allowed to supply the input from its
  359. character stream.  ARUNZ normally turns ZEX redirection off.  If the
  360. directive $I is placed before one occurrence of prompted input requested by
  361. $"prompt", then ZEX input redirection will be turned on, but for that prompt
  362. only.  If there are two prompts and you want ZEX to answer both of them,
  363. then you must put a $I before each prompt.
  364.  
  365. 2. Recursive alias mode: $Z
  366.  
  367.      Normally, after a script is interpreted and converted into a command
  368. line, any commands still pending in the multiple command line buffer are
  369. appended to the alias command line (separated by a semicolon).  This
  370. complete command is then copied into the multiple command line buffer.
  371.  
  372.      The $Z directive tells ZEX to discard any pending commands and to load
  373. the multiple command line buffer with the alias command line only.  This
  374. capability was developed to allow recursive aliases.  However, better
  375. techniques are now available.
  376.