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
Wrap
Text File
|
2000-06-30
|
13KB
|
331 lines
Summary of ARUNZ Parameters as of Version 0.9N
Jay Sage
June 3, 1988
The information about the ARUNZ parameters is covered in three sectionsì
below. Section A has a summary of the parameters and directives with noì
explanation. Sections B through D explain the parameters in greater detail. ì
Section B defines some qualifier symbols that are used with a number ofì
parameter forms. Section C defines the actual parameter expressionsì
supported by ARUNZ version 0.9N. Finally, Section D covers the specialì
directives recognized by ARUNZ.
=============================================================================
A. Parameter Summary
--------------------
format 'f' = H hex D 3 decimal
F floating decimal T two decimal
O one decimal
module 'm' = B BIOS M MSG
C CCP/CPR N NDR
D DOS P PATH
E ENV R RCP
F FCP S SHL
I IOP X XFCB
L MCL
component 'c' = N FN D drive or default
T FT U user or default
F FN[.FT] P prefix (with colon)
S short prefix
C converted token (to DU:)
units 'u' = Y year H hour (mil)
M month C hour (civ)
D day N minute
A AM/PM
parameter forms: full token $#
parsed token $Tc#
home directory $HD $HU $HB
full command line $!
full command tail $*
tail less tokens $-#
memory contents $Mf####
register contents $Rf##
system file $Sc#
get prompted input $"prompt"
use prompted input $'c# ( c: L ; E )
ENV address $Am
offset ENV address $+m
ENV address content $@fAm
offset ENV content $@f+m####
date/time $Du
=============================================================================
B. Definitions
--------------
Several parameters use qualifiers to further define the data returnedì
by that parameter. Since a number of parameters share some of theseì
qualifiers, we would like to list them here at the beginning.
1. Conversion formats (f):
When byte values are returned by parameters, the values can beì
converted to various formats. These formats are indicated by a formatì
qualifier in the parameter expression as follows.
format qualifier meaning
---------------- -------
H return two hexadecimal characters
F return value as floating decimal
(leading 0s suppressed)
D return three decimal characters
T return value as two decimal characters
O return value as one decimal character
2. System memory module (m):
For parameters that obtain the value of a memory module from theì
environment descriptor, the module is specified by one of the followingì
letters:
module qualifier memory module
---------------- -------------
B BIOS (basic i/o system)
C CCP/CPR (command processor)
D DOS (disk operating system)
E ENV (environment descriptor)
F FCP (flow command package)
I IOP (input/output package)
L MCL (multiple command line)
M MSG (message buffer)
N NDR (named directory register)
P PATH (command search path)
R RCP (resident command package)
S SHL (shell stack)
X XFCB (external command FCB)
3. File specification components (c):
Several parameters return various information about fileì
specifications. The following parts of the file specification token can beì
returned. The first three letters can be used with all such parameters. ì
The remaining letters can be used with those parameters that refer to tokensì
that can have directory prefixes as well as file names.
file part meaning
--------- -------
N FN (file name)
T FT (file type)
F FN[.FT] (complete file name -- name and type)
D drive (or logged drive if no explicit value)
U user (or logged user if no explicit value)
P directory prefix (including the colon)
S short prefix (without the colon)
C converted file specification (DIR: form, if
present changed to equivalent DU: -- if invalid
name, then no conversion is performed)
=============================================================================
C. Parameter Expressions
------------------------
1. Command line token parameters: $#
The parameter expression $#, where '#' is a number between 0 and 9,ì
returns a complete token from the command line. $0 returns the command verbì
(alias name) exactly as it was entered on the command line, including anyì
directory prefix and/or file type. Parameters numbered from 1 to 9 returnì
the corresponding token from the command line tail. Tokens are defined asì
contiguous strings of characters. ARUNZ is normally configured to take onlyì
spaces as delimiters between tokens, but it can be configured to allow tabsì
as delimiters as well.
2. Command line token parsing parameter: $T
The command line tokens are returned whole, as is, by the $# parameterì
described above but can be parsed as file specification expressions usingì
the parameter form $Tc#, where 'c' is the component part of the fileì
specification to use (see definition 3 in Section B above) and where '#' isì
a number from 0 to 9. The value 0 refers to the command verb; the valuesì
1..9 refer to the corresponding token in the command line tail.
Under ZCPR33 and earlier, if the command verb contained an explicitì
directory prefix or if it included a file type, the extended commandì
processor could not be invoked. Thus $TT0, the file type of the commandì
verb, would always be null. The expressions $TD0 and $TU0 would alwaysì
return the logged-in drive and user, respectively. With ZCPR34 this is noì
longer true. All the parameters can take on more general values.
3. Home directory parameter: $H
Since $TD0 and $TU0 cannot be counted on to return the currently loggedì
directory values, special parameters have been provided for this purpose. ì
They are:
$HD the home (logged) drive
$HU the home (logged) user
$HB the home (logged) drive and user together
4. Command tail parameters: $! $* $-#
The parameter $! represents the entire command line as entered,ì
including the command verb (alias name) and the tail. It is useful inì
aliases whose only purpose is to put an explicit DU: or DIR: directoryì
prefix on the command.
The parameter $* represents the entire command tail (after the commandì
verb), not including any leading space characters. It is useful in aliasesì
which substitute another command verb for the one actually given but whichì
leave the command tail as it was.
The parameter expression $-#, where '#' is a number between 0 and 9,ì
returns the command line tail with the designated number of leading tokensì
removed. Thus $-0 is the same as $*. These parameters are useful when someì
number of leading tokens are given some special treatment using the tokenì
parsing parameters and the rest of the command line is to be passed intact.
5. Memory contents parameters: $M
A parameter expression of the form $Mf#### returns the contents of theì
memory address given by ####, a four digit hexadecimal address. Note thatì
there must be exactly four hex digits, even if the value has leading zeros. ì
The 'f' term is the conversion format (see definition 1 in Section B above).
6. Register value parameters: $R
The byte contained in any of the 32 user registers is returned by aì
parameter expression of the form $Rf##. The register number must be givenì
as exactly two hex digits. The value must be in the range 00 to 1F. Theì
'f' term is the conversion format (see definition 1 in Section B above).
7. System file parameters: $S
Parameters can return values based on the four system file names storedì
in the environment. The general expression is $Sc#, where '#' is a digitì
from 1 to 4 and where 'c' is the component of the file. Since these filesì
have no associated directory, only the first three values usually allowedì
for 'c' (see definition 3 in Section B above) can be used (N, T, and F)
8. Prompted input parameters: $" $'
The double-quote parameter is used to prompt for user input. If theì
parameter expression $"..." appears, where the dots refer to any string ofì
characters, that string of characters will be sent to the screen as aì
prompt, and one line of user input will be read into a buffer. In theì
normal configuration of ARUNZ there can be up to four such prompts andì
responses.
The prompt is sent without case conversion. A character preceeded by aì
caret is converted to a control character (^M for return, ^J for linefeed). ì
The dollar sign acts as an escape character. Any character after it is sentì
as is. Thus $$ produces '$' in the prompt; $^ produces '^'; $" producesì
'"'; and so on.
The single-quote parameter is used to process the user's reponse toì
prompts. The parameter expression $'c# is used in the script to retrieveì
all or part of the user's response. The number '#' is in the range 1 to 4ì
but must not be larger than the number of prompts up to that point. (It isì
recommended that all the prompts be placed at the very beginning of theì
script.) The term 'c' indicates the component to be extracted from theì
user's response. The usual values described under definition 3 in Section Bì
above can be specified. In addition, the following values are also allowed:
L the entire line of user input
; one complete command (i.e., the input is terminated either
by the end of the input or by a semicolon)
E exactly the first token from the user's input
The user's input can be used repeatedly and in different ways throughout theì
script. Here is an example:
TEST $"Enter a file spec: "echo directory prefix is $'p1;echo file name
is $'f1
9. Environment data parameters: $A $+ $@
Several parameter expressions can return information related to dataì
extracted from the Z-System environment descriptor. In this way, aliasesì
can determine information independent of system configuration. This isì
particularly important in the new dynamic systems (NZCOM and Z3PLUS) whereì
the operating system configuration can change at any time.
The $A paramter returns the address of various system modules. Theì
parameter expression is $Am, where 'm' designates the module (see definitionì
2 in Section B of this document).
The $+ parameter is similar but allows one to compute an offset fromì
the address that would be returned by a $A parameter. The form is $+m####,ì
where #### is an exactly four hex digit offset value and 'm' is the memoryì
module to use as the base address. The expression $+m0000 is equivalent toì
$Am.
The $@ parameter expression is $@fam or $@f+m####. It performs theì
same calculation as the parameter expression following the '@f' except thatì
instead of returning the calulated address it returns the value of the byteì
stored at that address converted according to the format specified by 'f'.
10. Date and time parameters: $D
The parameter expression $Du returns a unit of the date/time suppliedì
by DateStamper. The unit 'u' can be any of the following:
Y Year (YY)
M Month (MM)
D Day (DD)
H Hour in military form 00-23 (HH)
C hour in Civil form 01-12 (HH)
N miNute (MM)
A Am/pm flag (AM or PM)
In all cases, two characters are returned if DateStamper is running. Ifì
DateStamper is not running, then values of '00' are returned for allì
parameters except the AM/PM flag, for which a null string is returned. Noteì
that 'M', having been used for 'month', could not be used for 'minute'; 'N'ì
was used instead.
=============================================================================
D. ARUNZ Directives
-------------------
There are two expressions that look like parameters but are actuallyì
directives that tell ARUNZ how to work (and not parameters that returnì
character strings).
1. ZEX input redirection control: $I
Whenever user input is requested (as with the $" parameter), one mustì
consider whether or not ZEX should be allowed to supply the input from itsì
character stream. ARUNZ normally turns ZEX redirection off. If theì
directive $I is placed before one occurrence of prompted input requested byì
$"prompt", then ZEX input redirection will be turned on, but for that promptì
only. If there are two prompts and you want ZEX to answer both of them,ì
then you must put a $I before each prompt.
2. Recursive alias mode; $Z
Normally, after a script is interpreted and converted into a commandì
line, any commands still pending in the multiple command line buffer areì
appended to the alias command line (separated by a semicolon). Thisì
complete command is then copied into the multiple command line buffer.
The $Z directive tells ZEX to discard any pending commands and to loadì
the multiple command line buffer with the alias command line only. Thisì
capability was developed to allow recursive aliases. However, betterì
techniques are now available.