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 / ARNZ09N1.LBR / ARUNZ09N.DZC / ARUNZ09N.DOC
Text File  |  2000-06-30  |  13KB  |  331 lines

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