home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
norge.freeshell.org (192.94.73.8)
/
192.94.73.8.tar
/
192.94.73.8
/
pub
/
computers
/
pcjr
/
comm
/
ZCOMMDOC.LZH
/
ZCOMMDOC.AH
< prev
next >
Wrap
Text File
|
1990-06-26
|
73KB
|
1,771 lines
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 211
character escape
rmtcheck Sets the string to be sent to the modem or command to be
executed each time ZCOMM accepts a command line or ZMODEM protocol
Command Download from the remote caller when in Host Operation,
before that command is executed.
SEE ALSO: rmtcmd, pwd string parameters
EXAMPLE: set rmtcheck "@source D:remcheck.t"
rmtcmd Contains the command line entered by the caller or received by
ZMODEM protocol Command Download in Host Operation. This may be
modified by an unrestricted script invoked via the rmtcheck string
parameter.
SEE ALSO: rmtcheck string parameter, checkrmt.t script
rname * Contains the name of the last file received by a protocol,
successful or not.
rub Assigns a string or command to the RUBOUT (Shift Backspace) key.
rxcnt A three digit number which counts the number of files that have
been created for receiving. An incoming file with an illegal name
is changed to rename.n with n is incremented from the value stored
in rxcnt (or 0).
rxlog * The filename that contains the log of received files. If
empty (the default), this function is disabled.
s * Contains the current time in seconds since the last minute.
s0...s9 These may be tested with the if %sN and if i%sN,string
commands, or expanded into a string using character escapes with
the "%sN" construction, where N is 1...9. Use set param "" (empty
string enclosed by double quote characters) to set a string
parameter to empty.
statlr May be used to place a messgae in the right side of the term
function status line, replacing the information normally displayed
there.
Soft Keys The f1 to fa12 strings are executed by the respective keys
from the term function, review function, or command prompt. In
the term function, soft keys definitions for fins, fdel, fhome,
fup, fdown, fpgup, fpgdn, fleft, fright, fend will override
ZCOMM's built-in definitions for these keys. The built-in
definitions take precedence in the review function, conference
command, and at the command prompt.
(C) 1990 Omen Tech Inc Chapter 24 String Parameters
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 212
Computers with the 101 key extended keyboard and ROM BIOS support
allow ZCOMM to distinguish the cursor cluster keys and the two new
function keys labelled F11 and F12. Extended keyboard cursor
cluster keys may be reassigned with the fcdel, fcdown, fcend,
fchome, fcins, fcleft, fcpgdn, fcpgup, fcright, and fcup string
parameters. The fnp5 key may be assigned to the "5" key on the
numeric pad.[2] ZCOMM's character escapes can be used to encode
special characters, including spaces and/or tabs.
EXAMPLE: set bs "\177"; set rubout "\b" Swap backspace and rubout
for VMS
The contents of these keys may be displayed by ALT-K or by the
keys command.
If the assigned string begins with "@" (commercial at), the string
is executed as a command. A soft key command called from the term
function should not end with a t or f command because this would
cause excessive recursion (calling the term function from within
the term function). (Use the create or open instead.)
In the conference command, soft keys are inserted into the editing
window unless they are commands, which are executed.
Soft keys are not executed from review or the command prompt
unless they are commands (beginning with "@").
EXAMPLE: set f3 @rb Assigns the rb command to F3.
t expands to the current time and date each time it is used.
SEE ALSO: d, h string parameters
tab Assigns a string or command to the TAB key.
telno The current telephone number string.
SEE ALSO: mcommand string parameter
tmp A string variable which may be used to indicate the directory used
for data to be transmitted or received.
__________
2. Visible on extended 101 key keyboards with extended BIOS support
only
(C) 1990 Omen Tech Inc Chapter 24 String Parameters
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 213
tname * Contains the name of the last file sent with a protocol,
successful or not.
txlog * The filename that contains the log of transmitted files. If
empty (the default), this function is disabled.
unrestrict Changes the password callers must match to allow remote
functions that are normally restricted such as erasing files,
listing and changing parameters, and changing to private
directories. If unrestrict is empty (the default), the unrestrict
command will fail.
SEE ALSO: unrestrict command
w Contains the day of the week (local time) as Mon, Tue, Wed, Thu,
Fri, Sat, or Sun.
welcome is executed after the password (if any) has been demanded and
accepted.
EXAMPLE: set welcome "@type welcome.txt; purgek; nulls 0"
xhelpfile The pathname that contains the online help file for host
mode commands. This should be readable when ZCOMM is in
Restricted Host Operation. Iff xhelpfile begins with the
character @, the rest of xhelpfile is treated as a Zcomm command.
SEE ALSO: helpfile string parameters, help command
xpassword * xpassword is a master password string that may be used to
generate a unique password for each system called. xpassword is
encrypted by the name of the remote system (string parameter
remote) to generate a password unique to each remote system
called. The generated password is transmitted as a result of a
Soft Key programmed with the \PXXXX construction described in
Chapter 25. To view the generated password, set the remote string
parameter to the full remote system name as it appears in the
appropriate telephone directory (up to but not including any "-"
character), then keyboard lput \PXXXX from the main command
prompt.
EXAMPLE: set f8 "\PXXXX" Programs F8 to transmit a 5 character
password from the term function.
Omen Technology Inc cannot accept responsibility for damages due
to the breaking of any codes used or generated by ZCOMM.
uucplock Contains an optional UUCP lock file prefix for arbitrating
tty ports with the Unix UUCP program. This is normally set
automatically, or from the UUCPLOCK environment variable.
(C) 1990 Omen Tech Inc Chapter 24 String Parameters
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 214
EXAMPLE: set uucplock "/usr/spool/locks/LCK.." Ee
y* All variable names beginning with "y" are reserved!
y0...y127 Read only string parameters y0 to y127 expand to represent
lines displayed by the term function. y0 corresponds to the
current partially finished line as displayed by the term function.
The last line referenced by y0...y127 becomes the y string
parameter current line used by the y, yb, and yf string
paramrters. Each time the term function displays a newline from
the remote, the y parameter is set to the new, unfinished line
from the remote.
y expands to represent the y parameter current line.
yb Referencing the yb read only string parameter backs up the y
string parameter current line one line, and then represents that
line.
yf Referencing the yb read only string parameter advances the y
string parameter current line one line, and then represents that
line.
SEE ALSO: H, h test conditions
zmrxesc Requests the sending ZMODEM-90(TM) program[3] to escape the
specified additional control character(s). Printing characters @
(40 hex) to _ (57 hex) escape the corresponding control characters
NULL (0) to US (1F) in both parities.
EXAMPLE: set zmrxesc "@" Requests the sending program to escape
NULL (0) and NULL with 8th bit set (80 hex).
SEE ALSO: zmtxesc string parameter
zmtxesc Causes ZMODEM send commands to escape the specified additional
control character(s). Printing characters @ (40 hex) to _ (57
hex) escape the corresponding control characters NULL (0) to US
(1F) in both parities.
SEE ALSO: zmrxesc string parameter
__________
3. DSZ.COM does not support the zmrxesc string parameter.
(C) 1990 Omen Tech Inc Chapter 24 Character Escapes
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 215
25. CHARACTER ESCAPES
Some commands use strings with character escapes similar to those used
by the C programming language for describing string constants. When
translating a string for character escapes, ZCOMM substitutes strings
(%svar) and then translates the result for backslash (\) encoded
character escapes.
String-Parameter %svar
Environment-Param %SVAR
% (per cent) \045
password* \PXXXXXXX
cleartext* \C+clear-text+
ciphertext* \M+ciphertext+
newline (LF) \n
return (CR) \r
tab (HT) \t
alarm (BEL) \a
backspace (BS) \b
form feed (FF) \f
escape (ESC) \E
transparent \T
lowercase \L
uppercase \U
octal byte \nnn
decimal byte \dnnn
hex byte \xHH
control char \^C
concatenation \&
backslash \\
To preserve compatibility with future TurboDial enhancements, a
backslash should not be followed by a character not listed above.
%svar is replaced by the value of the corresponding string parameter.
The string parameter name must be written exactly, in the correct
case, with no extra letters or digits at the end. Any non
alphanumeric character delimits the parameter name. The DOS
environment is searched for parameters after exhausting the ZCOMM
string parameters.[1]
\PXXXXXXX uses the xpassword and remote string parameters to generate
a password unique to each remote system, replacing each X character
with an upper case alphabetic character.* The xpassword parameter must
have at least as many characters as the number of characters used in
__________
1. DOS environment parameters are upper case only
(C) 1990 Omen Tech Inc Chapter 25 Character Escapes
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 216
the \PXXXXX construction.
SEE ALSO: xpassword, remote string parameters
\M+ciphertext+ uses a cipher and the contents of the mpassword string
parameter to decrypt and transmit the cleartext equivalent to
ciphertext. Ciphertext is delimited by the character immediately
following "M".
\C+cleartext+ is treated as above, except for no decryption.
EXAMPLE: \C+foobar+ is translated to foobar by ZCOMM's character
escape expansion.
A separate program pga encrypts instances of \C+cleartext+ into
\M+ciphertext+ according to a user specified master password. Pga
also decrypts \M sequences to either cleartext, or encrypts them with
a new master password. Please refer to Chapter 99.
The \n, \r, \t, \b, \f, \E, \nnn, \xHH, \^C and \\ character escapes
generate the associated character.
The \T character escape inhibits the processing of character eascpes
(but not string substitutions) in the remainder of the string. It is
useful when the raw string contains backslashes which must not be
treated as character escapes.
The \L character escape forces the rest of the string to lower case,
up to the next \ character. Likewise, \U forces upper case.
Octal byte escapes (\nnn) accept 1 to 3 octal digits terminated by the
first non octal digit. Decimal byte escapes (\dnnn) accept 1 to 3
digits terminated by the first non digit. Hex byte escapes (\xHH)
accept exactly 2 hex digits. Control characters may also be
represented by \^C where C is the printing representation for Ctrl-C
and ^ is the circumflex character.
The \& character escape generates nothing; it is useful to delimit the
lexical end of a string parameter name in string concatenation
applications.
25.1 Concatenating String Parameters
To concatenate the contents of a string parameter with other
characters, one must escape the next character with a backslash if it
is a letter or digit. The \& character escape expands to nothing.
EXAMPLE: Assume string parameter s1 contains "foo".
putw "%s1\&bar"
(C) 1990 Omen Tech Inc Chapter 25 Character Escapes
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 217
sends "foobar".
putw "%s1\142ar"
sends "foobar".
putw "%s1-skidoo"
sends "foo-skidoo".
putw "%s1bar"
is undefined.
putw "%s1\bar"
sends "foo<BS>ar"
Failure to observe this property causes the sets and put commands to
give unexpected results.
An encrypted password* is generated from the prototype string
\PXXXXXXXX where each X generates an upper case alphabetic character
by encrypting the leading letters of the remote system name by
xpassword.
Only the leading letters of the remote system name are used to allow a
directory to have a number of alternate access methods for a given
system, yet produce the same automatic password. For example,
"source", "source-telenet", "source300" would all generate the same
password, but "sourceb" would generate a different password.
xpassword must have at least as many characters as X characters in the
prototype string.
Omen Technology Inc and sellers of ZCOMM cannot accept any
responsibility for damages due to the breaking of any ciphers used or
generated by ZCOMM.
An arbitrary byte is generated by backslash followed by one to three
octal digits, backslash x followed by exactly two hex digits, or by
backslash circumflex followed by three decimal digits. 7 bit
transmission modes (7s, 7m, 7e, 7o) modify the parity bit of
characters transmitted by the term function during the put[w] command.
25.2 Quoting Strings
Strings must be enclosed by double quotes (Shift ' on the IBM Personal
Computer) to allow white space and/or semicolon to be included in the
string. If a string containing white space were not quoted, it would
be terminated by the first space or tab, and ZCOMM would consider the
rest of the intended string as another (incorrect) command.
25.3 Layering of Escaped Characters
Sometimes a string will be processed two (or more) times by ZCOMM's
character escapes.
set fs2 "@accept s1 Name:; find \n%s1 %phones"
(C) 1990 Omen Tech Inc Chapter 25 Quoting Strings
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 218
This example causes ZCOMM to ask for a name when F12 (shift F2) is
typed. The name is read into string parameter S1, which is then used
as part of the argument for the find command. The find command
searches the telephone directory for lines beginning with the string
you just typed in. To match only lines starting with the given
string, a linefeed (\n) is prepended to the argument of the find
command. When the obey command executes, the backslash-space
sequences translate to spaces, and the double backslash translates to
a single backslash.
The space after "find" and after "%s1" must be escaped because the
obey command accepts a single string argument. If these spaces were
not escaped, the obey command would not "see" the rest of the line
after "find".
The find command performs its own character escape translation,
changing the \n to a linefeed character.
25.4 Regular Expressions
Regular Expressions allow TurboDialTm scripts to search and parse data
from files, the keyboard, and remote computers. Regular expressions
are used for string searching and parsing (splitting) with the ss and
egrep commands, and the h and H test conditions.
Many DOS and Unix programs use regular expressions to search and parse
text, including grep, egrep, many flavors of EMACS, Brief, Epsilon,
ed, vi, sed, lex, and Perl. The effort expended in learning how to
use regular expressions will be rewarded by the increased utility of
dozens of programs and tools, not just ZCOMM.
ZCOMM regular expressions give "magic" meanings to the characters \ *
+ ? . | ^ [ ] ( )
A regular expression is zero or more branches, separated by |. It
matches anything that matches one of the branches.
A branch is zero or more pieces, concatenated. It matches a match for
the first, if it is followed by a match for the second, etc.
A piece is an atom possibly followed by *,+, or?. An atom followed by
* matches a sequence of 0 or more matches of the atom. An atom
followed by + matches a sequence of 1 or more matches of the atom. An
atom followed by ? matches a match of the atom, or the null string.
An atom is a regular expression in parentheses (matching a match for
the regular expression), a range (see below), . (matching any single
character), ^ (matching the null string at the beginning of the input
string), $ (matching the null string at the end of the input string),
a \ followed by a single character (matching that character), or a
(C) 1990 Omen Tech Inc Chapter 25 Regular Expressions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 219
single character with no other significance (matching that character).
A range is a sequence of characters enclosed in []. It normally
matches any single character from the sequence. If the sequence
begins with ^, it matches any single character not from the rest of
the sequence. If two characters in the sequence are separated by -,
this is shorthand for the full list of ASCII characters between them
(e.g. [0-9] matches any decimal digit). To include a literal ] in the
sequence, make it the first character (following a possible ^). To
include a literal -, make it the first or last character.
EXAMPLE: One can match separators (space, tabs, punctuation) by
excluding them from a range [^0-9A-Za-z] That means "match anything
except A to Z, or a to z, or 0 to 9.[2]
If a regular expression could match two different parts of the input
string, it will match the one which begins earliest. If both begin in
the same place but match different lengths, or match the same length
in different ways, life gets messier, as follows.
In general, the possibilities in a list of branches are considered in
left-to-right order, the possibilities for *, +, and ? are considered
longest-first, nested constructs are considered from the outermost in,
and concatenated constructs are considered leftmost-first. The match
that will be chosen is the one that uses the earliest possibility in
the first choice that has to be made. If there is more than one
choice, the next will be made in the same manner (earliest
possibility) subject to the decision on the first choice. And so
forth.
For example, `(ab|a)b*c' could match `abc' in one of two ways. The
first choice is between `ab' and `a'; since `ab' is earlier, and does
lead to a successful overall match, it is chosen. Since the `b' is
already spoken for, the `b*' must match its last possibility-the empty
string-since it must respect the earlier choice.
In the particular case where no `|'s are present and there is only one
*, +, or ?, the net effect is that the longest possible match will be
chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note
that if `ab*' is tried against `xabyabbbz', it will match `ab' just
after `x', due to the begins-earliest rule. (In effect, the decision
__________
2. Ranges in regular expressions are in ASCII collating order. For
example, the range [A-z] matches all the letters in either case,
PLUS all the funny characters between Z and a in the ASCII code
chart.
(C) 1990 Omen Tech Inc Chapter 25 Regular Expressions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 220
on where to start the match is the first choice to be made, hence
subsequent choices must respect it even if this leads them to less-
preferred alternatives.)
Case is significant in regular expressions. Ranges may be used to
match characters in either case. The regular expression [aA]ny
matches "any" or "Any".
The regular expression subroutines and much of this description were
written at the University of Toronto.
EXAMPLE: If s0 contains 1234567890 Hello There then the command
ss s0 "(12.*0 ).*The(..)"
results in
z1='1234567890 '
z2='re'
String parameter z0 contains the entire matched string, and may be
used for testing the success of the match with an if %z0 goto foundit
command.
EXAMPLE: string = 'Here are 345 dots'
ss string "([0-9]+)"
z0= '345'
EXAMPLE: Sometimes one needs to shorten a string which is too long.
The following loops while the length of subject is greater then 24.
One character is chopped off the end of the string each time the ss
command is executed. The parentheses contain the portion of the
string that should be retained.
while %sbj>24 ss sbj "(.*)[A-z]" sets sbj "%z1"
An alternative:
if %sbj>24 ss sbj "........................."; sets sbj "%z1"
25.4.1 Sample Script - Browse/Download The kcisdl.t script downloads
a file after it has been listed by the Compuserve Special Interest
Group DownLoad "bro" command. The kcisdl.t script should be bound to
F3 with
set f3 "@source kcisdl.t"
The Compuserve "browse" command displays file information and then
(C) 1990 Omen Tech Inc Chapter 25 Regular Expressions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 221
invites the user to download it:
[73125,617]
P3YAM.ARC/binary 09-Jul-87 3224 Accesses: 13
Keywords: YAM PRO-YAM ZCOMM YAMDEMO
Sample YAMscript, for handling messages and file up/downloads
with the popular PCBoard bulletin board systems.
Disposition !
Keyboarding F3 activates the script to scan the circular buffer for
the file name and download the file.
if !h^\[ echo "Can't find Account Number"; return
The h test condition searches backwards through the circular buffer
for a left square bracket ([). Since "[" is a magic character for
regular expressions, it must be escaped. The "^" magic character
anchors the search to the beginning of the line. The script prints a
message and exits if the search was unsuccessful.
ss yf "^[^ /]+"
The yf string parameter accesses the next line in the circular buffer.
This line, which follows the uploader's account number, contains the
file name. The ss command extracts the file name, discarding the rest
of the line starting with a possible file type designation
("/binary"). As above, "^" matches the beginning of the line. The
"[^ /]+" phrase matches a class of characters ("[") excluding ("^")
space, tab, and "/". The trailing "+" matches one or more instances
of the search string, resulting in all characters starting at the
beginning of the line up to but not including the first space, tab, or
"/".
setc s0 "\L%z0"
Translate the file name in string parameter z0 to lower case. (This
script is also used on Unix systems where most file names are lower
case.)
if f%s0 echo "%z0 Exists: No Action taken."; return
echo "File name is %s0"
put "\025dow %s0/PRO:B\r"
pat 2i "\nFile name"
wait -f20
if 2 put "\025%s0\r"
ena -C; return
The remainder of the script generates commands using the parsed file
name. The script enables Compuserve's B Protocol, allowing the
(C) 1990 Omen Tech Inc Chapter 25 Regular Expressions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 222
mainframe to initiate the download.
25.4.2 Magic Characters: Synopsis ZCOMM regular expressions give
magic meanings to the characters \ * + ? . | ^ $ [ ] ( ) as follows:
* 0 or more
+ 1 or more
? 0 or 1
. Any single character
| Branch separator (for matching)
EXAMPLE: ss s0 "(^cc: *|^ *)([^ ]+)" The first () grouping matches
either "cc:" or a space at the begining of the line in s0.
^ Matches beginning of line
$ Matches end of line
[] Single character(s) in a class
[^] Single character(s) not in a class
() Grouping (for parsing)
ZCOMM regular expressions closely resemble those used by the Unix
egrep command. The Unix ed and vi editors use regular expressions
with a slightly different syntax. Epsilon and Brief editors for DOS
also use regular expressions.
Regular Expression pattern matching is a software disicipline unto
itself. Different program behave differently when matching ambiguous
patterns. A number of Unix related books contain useful information
on the uses of Regular Expressions.
In the meantime, practice makes perfect. Setup some string variables
with strings to search and parse, and experiment with different ss
command search patterns. A full screen editor that uses regular
expressions is a handy learning aid.
(C) 1990 Omen Tech Inc Chapter 25 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 223
26. TEST CONDITIONS (if, on, while commands)
The following conditions may be tested with the if, on and while
commands.
Where a string parameter is indicated, it is an error to specify a
nonexistient string parameter.
When an immediate string argument is indicated, that argument is
delimited only by white space. As a result, if "is1,hello&&L<5"
command ... won't work as expected, but if is1,hello if "L<5" command
... will work.
Some of the test conditions described below may be used with ">",
"==", "!=", or "<" for numeric comparisions. The right hand argument
of a numeric comparision may be:
+ A decimal number.
EXAMPLE: if "L>5" abort
+ A string paremeter which contains a decimal number.
EXAMPLE: set maxloops "5"
if "L>maxloops" abort
+ The length of the string stored in a string parameter, denoted by
a leading % character.
EXAMPLE: set s1 "Hello"
set s2 "foo"
if "%s1>%s2" echo "%s1 is longer than %s2"
These comparisions should be quoted in case a future version of ZCOMM
implements output redirection in the same manner as COMMAND.COM or the
Unix shell. On 16 bit machines, 16 bit numerical values are used in
comparisions; numbers greater than 32767 should not be used.
Numeric conditions may also be tested against a bit mask using the &
operator.
EXAMPLE: if s&64 echo "Caps Lock is ON"
0...25 The specified pattern (see pattern command) was matched in the
last wait command.
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 224
%svar The specified string parameter svar (see the set command) is non
empty. May be used with ">", "==", or "<" for numeric comparisions
of the string length of svar.
EXAMPLE: if %s1 putw %s1
EXAMPLE: if %symbol>4 ss symbol "(.*)[A-z]"; sets symbol %z1
If the length of the string in string variable symbol exceeds 4,
chop off the rightmost letter.
? The ? numeric parameter counts the number of files sent or received
with a protocol, and the number of lines matched by the find
command. The fFILE test condition (if true) assigns the file length
to the ? parameter. On 16 bit computers, file lengths greater than
32767 are represented as 32767. With certain operating systems, the
exit status of a subprogram accessed by a DOS Gateway is stored in
the ? numeric parameter.
The ? numeric parameter may then be tested with the ? test
condition. It can be used with ">", "==", or "<" for numeric
comparisions.
EXAMPLE: p?0 find fizzbin *.txt; if ? echo "Found fizzbin"
SEE ALSO: ? numeric parameter
B True iff Ctrl-Break has been pressed since the last purgek command.
Csvar True iff string parameter svar contains any control characters
less than 040 (hex 20) or rubout.
EXAMPLE: if Cs0 echo "Please Retype
E True iff the elapsed time in seconds is non 0. Used with ">", "==",
or "<" for numeric comparisions.
NOTE: Elapsed time may be off by up to one second. On 16 bit
machines, the maximum testable value for elapsed time is 32767
seconds.
EXAMPLE: if "E>300" off Disconnects the modem if the elapsed time is
greater than 300 seconds.
SEE ALSO: restime command
F>N True iff more than N kilobytes (1 kilobyte = 1024 bytes) of free
space remain on the default drive.
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 225
EXAMPLE: if "F>2000" usq hugefile.q
Hregular-expression Searches backward thru the circular buffer for the
next line matching regular-expression. If the search is successful,
the y string parameter points to the matched line.
The N test condition may be used to test the number of lines that
were searched before finding a match.
EXAMPLE: To allow processing of information such as:
5 Review folder UFO (0 stories) (a typical news item in the
Executive News Service), one must scan for lines with a certain
pattern (in this case the character "(" immediately followed by
1...9 indicating 1 or more stories).
while "H\([1-9]" ss (rest of line)
The above searches backwards for the next line containing "(1" to
"(9". Note that "(" is a magic character in regular-expressions,
and must be escaped.
The h test condition is similar, but starts the search with the last
displayed line.
SEE ALSO: ens.t and kcdisl.t scripts, regular-expressions, y, yb,
y0...y127 string parameters, N test condition
Isvara,svarb Tests whether the contents of string variable svara are
IDENTICAL to the contents of string variable svarb. Case is
significant.
EXAMPLE: if Is0,s9 goto exactmatch
SEE ALSO: i test condition (compares a string parameter and an
immediate string)
Jsvar,string Tests whether any of the characters in the immediate
string string appear one or more times in string parameter svar.
EXAMPLE:
if "Js0,!@#$%^&()_" echo "No funny characters"; goto getname
L>N True iff this while command has made more then N loops.
EXAMPLE: while !1 put "\r" wait ife "L>5" off Disconnects the modem
if the while command has sent more than five "\r"'s. The "L>N"
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 226
should be quoted in case a future version of ZCOMM implements output
redirection in the same manner as command.com or the Unix shell.
N>N True iff the last h or H condition searched more than N lines
before a match.
SEE ALSO: h and H test conditions
Q>N True iff the number of active queue entries is greater than N.
R>N After a zcommand "" command, evaluates true iff more than N
kilobytes (1 kilobyte = 1024 bytes) of free space remain on the
remote system's default disk drive.
EXAMPLE: zcommand ""; if "R>1000" sz -y hugefile
S>N True iff the transmission speed is greater N bits per second.
EXAMPLE: if S>2400 put "set verbose\r"
U True if ZCOMM was unrestricted when the first level of the current
set of scripts was activated.
SEE ALSO: u test condition
asvar The numeric value of the specified string parameter svar is non
zero. May be used with ">", "==", or "<" for numeric comparisions.
The string variable may contain leading spaces or tabs, an optional
+ or - sign, and digits.
EXAMPLE: if "as1==30" goto seen30 Performs the goto if s1 contains
"30".
bTIME True if the current time is Before TIME. TIME is written in the
form [yy[mm[dd]]]hhmm. No further conditions may be given in the if
statement after the b condition.
EXAMPLE: if b2300 return Returns from the script if the time is
before 11 p.m.
EXAMPLE: if b8512250900 return Returns from the script if the
date/time is before 9 a.m. Christmas day in 1985.
c Carrier detect is present on the modem port.
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 227
EXAMPLE: if !c goto lostit
NOTE: On Unix systems, a dis -d command must be given to "arm" the
system to detect carrier loss.
SEE ALSO: d mode
d{?ADLMPSTXZacdflmrtu} True iff the corresponding configuration is
true:
? True if an unrecoverable error or manual abort was detected on
the last protocol file transfer.
A True if the term function's emulation Alternate Keypad Mode mode
is on.
C>N Numeric, true if the display column is greater than N.
D The script is running on a demonstration program.
L True if ZCOMM is recording TurboLearn(TM) script information
(learn command).
M True if term function Keyboard Mapping is on ("display mapkb").
P Packet state is active (X.PC driver).
R>N Numeric, true if the display row is greater than N.
EXAMPLE: set fa10
@pat 23cp \n "@lput \E[K if dR>23 lput \E[H\E[K"
When the Alt-F10 key is struck, a search pattern (23) is set.
This searches for each linefeed from the remote and performs a
local display clear to end of line on each new line. If the
display row exceeds 23, jump to the top of the screen and clear
the first line. This "trick" may be used to prevent scrolling
on displays that smear badly.
S The script is running on a shareware program (e.g., ZCOMM).
T True if a higher level of the script has called the Term
Function. When True, the script should return to the Term
Function; the script should not invoke the Term Function.
X The X.PC commands are available.
EXAMPLE: if dX goto xpclogin
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 228
Z The ZMODEM commands are available.
EXAMPLE: if dZ sz -n logfile
a>N True iff ZCOMM was called from the operating system with more
than N arguments (counting the program name).
c The color/graphics display is selected.
d ZCOMM is executing under DOS.
f The program is running in the foreground. On DOS, a script is
considered to be running in the foreground when it is NOT called
by the Callout Queue as described in Chapter 27. A program
running in the background is unlikely to have an operator
available for interaction.
Under Unix, a script is considered to be running in the
background if it is detached from possible keyboard input, and
ZCOMM will exit when it reaches the main command prompt.
SEE ALSO: fg, bg commands
l>N True iff the script level (nesting) is greatern than N.
m The monochrome display is selected.
r Data Set Ready (DSR) on the modem is active.
t ZCOMM is running under a Topview or DESQview virtual screen
which may be smaller than the physical screen size
u ZCOMM is executing under Unix/Xenix.
e True iff an t, sz, or rz command terminated with an error, or if the
term function has detected framing or overrun errors, since the last
autodial.
e>N True iff the e parameter (number of errors) is greater than N.
EXAMPLE: if "e>5" off Disconnects the modem if more than 5 errors
have been counted.
The "e>N" should be quoted in case a future version of ZCOMM
implements output redirection in the same manner as command.com or
the Unix shell.
NOTE: The e parameter is not compared within the term function, so
"detection" may be delayed.
SEE ALSO: e numeric parameter
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 229
fFILE (No space between f and FILE). Tests whether FILE exists as a
normal readable file (not a directory or hidden file). FILE is
expanded for string parameters. If the test is successful, the ?
numeric parameter (testable with the ? test condition) is set to
the file length. [1] The N test condition reflects the number of
links to the file.
EXAMPLE: if fnit put "message\r"; f -xp nit; put "\r\336y" If nit
exists, give a "message" command, upload the file, then send
carriage return, pause, and the letter "y".
When used in a numeric context, the fFILE test represents the size
of the file in full kilobytes (1024 bytes), or 1, whichever is
greater.
EXAMPLE: if ffoo.bar>30 echo "File Longer than 30kb"
EXAMPLE: if fspy.kgb if !? echo "Zero Length File"
SEE ALSO: obey command
g Tests whether term function file transmission flow is go (not
stopped by an XOFF character).
EXAMPLE: if !g echo "Remote has not sent XON"; pg1
SEE ALSO: g mode, term function XON and XOFF
hregular-expression Please refer to the Hregular-expression test
condition.
isvar,string Tests whether the contents of string variable svar are
identical to the immediate string string. Case is significant. No
further conditions may be given in the if statement after the i
condition. This test is useful in designing menu applications. The
menu script menu.hst uses this test condition extensively.
EXAMPLE: accept s1 Choice:; if is1,a goto choicea Executes a goto
choicea if the user keyboards an a in response to the "Choice:"
prompt.
__________
1. On 16 bit computers, file lengths greater than 32767 are
represented as 32767.
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 230
SEE ALSO: I test condition (compares two string parameters)
jsvar,string Tests whether the immediate string string is a substring
of (contained somewhere within) the contents of string variable
svar. Lower case characters in string match characters in either
case. Upper case characters in string match upper case characters.
No further conditions may be given in the if statement after the j
condition. This test is useful in designing menu applications, and
for examining message lines read with the grab command.
EXAMPLE: grab s1; if js1,sig= goto endofsig Executes a goto if the
line read by the grab command contained "sig=" or "This SIG=".
k One or more characters have been received from the keyboard and are
in the interrupt queue awaiting processing. Note: Keyboard
characters are transmitted to the remote by the term function,
except during a put command.
l True if the line printer is ready to accept a character.
m One or more characters have been received from the modem and are in
the interrupt queue awaiting processing.
n No pattern was matched as a result of the last wait command or
search pending term function. n detects a search timeout, loss of
carrier detect signal, or manual exit with F1 or ALT-X.
psvar,string Tests whether the immediate string string is a prefix of
the contents of string variable svar. The match is case sensitive.
No further conditions may be given in the if statement after the p
condition. This test is useful for examining message lines read
with the grab command.
EXAMPLE: grab s1; if ps1,sig= goto endofsig Executes a goto if the
line read by the grab command contained "sig=", but not if it
contained "This sig=" or "SIG=".
q>N True iff the number of free queue entries is greater than N.
r True iff a receive file is open for capture.
SEE ALSO: create, t commands
s>N True iff the keyboard shift state is greater than N.
EXAMPLE: if "s>63" echo "Caps Lock is Active"
(C) 1990 Omen Tech Inc Chapter 26 Test Conditions
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 231
t True iff a transmit file is open.
EXAMPLE: if !t echoc "%1 Short file! "; goto foobar
SEE ALSO: f, open commands
u True if ZCOMM is unrestricted.
SEE ALSO: U test condition
v True if the v (Verbose) numeric parameter is non zero.
EXAMPLE: if v s Displays the status on the console if the v numeric
parameter (Verbose) is non zero.
y ZCOMM accepts a single character from the keyboard, which is printed
followed by a newline. True if the character is "y" or "Y". False
the H numeric is non zero, and a character is not typed within the
time limit set by that parameter.
EXAMPLE: echo "Really quit?"; if y quit
Compound tests may be formed with the unary ! (not), binary || (or),
and binary && (and) operators. The tests are evaluated strictly left
to right. The unary ! operator applies to the following operand only.
EXAMPLE: if n&&!n||c echo "Carrier Detect Present" simply tests
carrier because the result of the binary and operation above is always
false.
EXAMPLE: if !c||1||2 o abort Disconnects the modem and aborts the
script if carrier detect is off, or if either pattern 1 or pattern 2
were matched.
EXAMPLE: on e>45||!c goto allsignd Each time the term function
returns, branch to the end of the script if carrier detect is lost or
more than 45 line hits have been detected.
(C) 1990 Omen Tech Inc Chapter 26 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 232
27. HOST OPERATION / REMOTE CONTROL
ZCOMM Host Operation allows callers to access files, programs, and
other computers with baud rate detection, speed conversion, and
multiple layers of password access control.
The comments in this chapter apply when ZCOMM is in Host Operation.
Host Operation is entered by the host command. The host command is
given only from a script, such as the telephone directory "host"
entry.
In Host Operation, the default disk is set to the default disk as of
when ZCOMM was started. The port and baud rate are set to those in
effect when the host command was given. Normally the screen is
cleared, unless the v numeric parameter is set >0. The status line
displays the number of Calls, Logins, Messages, and Scans since ZCOMM
was invoked. ZCOMM then awaits a carrier detect signal or character
from the modem indicating an incoming call.
While awaiting a call ZCOMM periodically scans the queue of outgoing
message scripts if the callpath string parameter is set.*\*(ZZ*F
The call3 string parameter may be used to display a help message which
will show while ZCOMM is awaiting calls.
EXAMPLE: set call3
@echo "Now awaiting incoming calls. Press F1 to exit."
When a character is received from the modem or the modem's carrier
detect signal comes on, ZCOMM executes the baudstr string
parameter.[1]
Most contemporary modems can send a string indicating the incoming
transmission speed.[2] The baud2.t script searchs for these strings
and sets the transmission speed accordingly. The caller does not have
to hit carriage returns to allow ZCOMM to dtermine the transmission
speed. The call2 string parameter setting in the distribution
phones.t file commands a Hayes compatible modem to transmit these
__________
0. The Callout Queue is described in a later subchapter.
1. If the executed string begins with "@", the rest is treated as a
command line, otherwise the string is sent to the modem.
2. At the current speed, before switching to the speed of the
incoming transmission
(C) 1990 Omen Tech Inc Chapter 27 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 233
extended result codes.
When ZCOMM completes execution of baudstr, ZCOMM checks the modem's
carrier detect signal. If carrier has disappeared, ZCOMM executes the
call2 string parameter and resumes its vigil.
If carrier is still present, ZCOMM increments the Call counter and
switches to remote operation. Remote operation allows characters to
be keyboarded from either the local keyboarded, or by the caller.
Remote operation also causes most screen output to be sent to the
modem.
Then ZCOMM executes the challenge string parameter. The supplied
CHALLENG.T script file first states the name of the system.
If the string parameter password is set, the script demands a
password. The caller must enter it correctly, in the correct case, or
be disconnected after three tries. If password is empty, no password
is demanded.
The caller then enters his name. Names with special characters are
rejected. The name link immediately accesss the link command.**[3]
Otherwise, the script asks the caller to confirm the name just typed.
If the script is exited with a fail command, ZCOMM terminates the
call.
Iff none of the previous activities has terminated the call, ZCOMM
increments the login counter, sets Restricted and executes the welcome
string parameter and then drops into remote command function. Most
commands are allowed remotely, except those that would disrupt the
connection (port selection) or violate security if unrestricted
privileges are not granted.
The caller may request unrestricted privileges with the unrestrict
command.* The caller must enter a password matching the unrestrict
string parameter.
The session is terminated by loss of carrier detect, the bye, o, or
off command, or by typing F1 or NUKE (ALT-N) on the local keyboard.
In Host Operation, ZCOMM will drop the call if it has to wait more
than five minutes for the next command. The j numeric parameter sets
the connect time limit in seconds for restricted callers. This limit
is checked each time the host command prompt is displayed.
__________
3. The supplied CHALLENG.T script terminates the call when the link
command exits.
(C) 1990 Omen Tech Inc Chapter 27 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 234
If Restricted, pathnames are checked against the contents of string
parameter home. Absolute pathnames (beginning with \ or /) must
include home as a prefix, and contain no references to parent
directories (..). This allows remote users to access a subtree of the
disk without allowing access to other directories. The string
parameter rdisks should be set to include only the disks that are to
be accessed by restricted callers.[4] The disks string parameter
should be set to include the disks that are to be accessed remotely by
any caller.
ZCOMM's Kermit commands operate properly in Host Operation.
When the caller disconnects by issuing a bye or off command or by
dropping carrier, the exrc string parameter is executed. exrc should
contain commands to "clean up" after a host session. If hardware
handshaking is used, exrc should contain a handshake off command.
The callout queue is scanned, and the call2 parameter is executed and
ZCOMM resumes waiting for incoming calls. The screen is then cleared
unless the v numeric parameter is greater than 0.
If the user keyboards F1 ZCOMM leaves host state and executes the
outahost string parameter.
27.1 Remote Execution of DOS Programs
The ! command is allowed only if unrestricted privileges have been
granted. All the caveats mentioned under the ! command apply,
especially since it may be inconvenient to reset the computer hardware
from a distance.
A DOS program invoked with the ! command will normally display on the
local screen only. The program's output may be redirected to the
modem by referring to the DOS device corresponding to the modem port.
For example, if serial port 1 (COM1) is being used for the modem
connection, the following ZCOMM command will output to the modem.
!chkdsk >com1
Although input can be redirected from the modem, the modem status may
not be appropriate for the desired operation. Some careful checking
beforehand may forestall the frustration of a distant computer tightly
wedged beyond all hope. Be especially careful to check what such
commands might do in the event of line hits or loss of carrier detect.
__________
4. The pathnames private, messages, rxlog, txlog, and callers are not
checked. They cannot, however, be changed by a Restricted user.
(C) 1990 Omen Tech Inc Chapter 27 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 235
The DOS "ctty" command may be used with caution. It should be
preceded with a DOS mode command to set 7 bits. The caller should be
using the same number of bits and parity as used with the DOS mode
command.
The following may be placed in a .BAT file to allow remote operation
of DOS programs:
mode com1:1200
ctty com1
command
ctty con
If these commands placed in "CT.BAT", then the caller can type !~ct to
get a DOS "shell" (command.com). When finished, give the DOS "exit"
command. CT.BAT then returns DOS control to the console and then
returns to ZCOMM's Host Operation.
Please refer to the DOS Gateway subchapter in Chapter for more
information on running DOS programs under ZCOMM.
The Doorway or similar programs may be useful for remote DOS program
execution. Doorway intercepts VIDEO BIOS calls and transmits ANSI
escape sequences to regenerate the display on the calling terminal.
Doorway may be set to use an extended keyboard mapping supported by
ZCOMM's term function ALT-= toggle.
DOS doesn't do anything intelligent with break or carrier dropout, so
be careful. ZCOMM will reinitialize the modem UART properly when it
regains control.
When the fabled multitasking DOS 5.0 becomes available (Real Soon
Now), it may be possible to implement remote access more cleanly.
27.2 Script for Host Operation
host echo "Host"
host: echo "Host1"
set emdir /memo; set twxfile twx;
set disks "c"
set rdisks "c"
set call1 ATZ\r\336ATZ\r
set call2
@bye; sleep 3; putw "\336ATZ\r\336\336ATX1 M0 S0=1\r"; clears
set callpath /tmp/*.xx?
set outahost ATZ\r
: set rmtcmd "C:/host/checkrmt.t"
The above lines set parameters used with Host Operation. The call1
(C) 1990 Omen Tech Inc Chapter 27 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 236
callpath, and rmtcmd lines must be commented out for use with ZCOMM.
px2; py9600 : Set parameters for link cmd
set linkpass "Giznoid"
set outalink "@kill; put \r\4;o"
port 2; o : Drop DTR on the linked port
port 1; bye;
set rcmdlog "c:/tmp/rcmds"
speed 1200 putw "ATZ\r"
set callers "c:/host/callers"
:Do NOT remove the "." in ".%lib..." below
set baudstr "@gosub .%lib/baud2.t"
set challenge "@gosub .%lib/challeng.t"
set welcome "@type welcome.txt; purgek; nulls 0"
set password "Change This Already"
set rxlog "c:/host/rxlog"; set txlog "c:/host/txlog";
set unrestrict ""
set xhelpfile "/host/xyamhelp.t"
set home "/host"; cd
set private "/private"; set messages "/host/messages"
set emdir "/memo"; set twxfile "twx";
set answerback "\r\nJ. Fred Muggs\r\n\21"
set outahost "ATZ\r"
set menu "/host/hostmenu"
host
27.3 Command Intercept Script
After the remote caller in Host Operation keyboards each command,
before that command line is executed, ZCOMM executes the rmtcheck
string parameter. * This is also performed on commands received by
ZMODEM protocol Command Download.
The rmtcheck parameter may be set to invoke a READ ONLY script to
examine the command line stored in the rmtcmd string parameter. Such
a script may modify the command by changing the contents of rmtcmd
disconnect the user with a bye command, or perform other checks for
the particular application. The script can trap references to illegal
disks, directories, or files, or redefine or add commands.
SEE ALSO: pwd, rmtcheck, rmtcmd string parameters
An example remote command inspection script is provided in checkrmt.t
shown below.
ss rmtcmd "(^arc[^ ]*)(.*)"
if %z2 obey "!~pkxarc /v %z2>COM1"; goto done
String Split the user's command (in rmtcmd) into a command name
starting with "arc" and an argument separated by a space or tab. If
the split is successful, execute the DOS pkxarc program with a "/v"
(C) 1990 Omen Tech Inc Chapter 27 Host Operation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 237
(verbose archive listing) flag and the name of the archive atored in
the z2 string parameter. Program output is redirected to the modem.
if %z1 echo "Must specify archive"; goto done
If the "arc" command was found but no archive name was given,
complain.
ss rmtcmd "^whereis |^sd$|^sd |^ls |ls$"
if !%z0 return
obey "!~%rmtcmd>COM1"
If the command is "whereis" with an argument, "sd" with ot without an
argument, or "ls" with ot without an argument, execute the DOS command
with output redirected to the modem.
done: set rmtcmd ""; return
After command execution, clean up by clearing rmtcmd and return to
ZCOMM.
This script must be stored with the READ ONLY file attribute for
normal operation. For convenience in testing, use the unrestrict
command to allow operation without the READ ONLY file attribute. The
ALT-1 and ALT-2 keys allow local keyboard access to commands without
executing the rmtcmd string parameter.
27.4 Callout Queue
When entering host operation, and periodically thereafter, ZCOMM scans
for script files specified by the callpath string parameter.** (If
callpath is empty, this function is disabled.) The period in seconds
between scans is set by the c numeric parameter. Between these scans,
ZCOMM waits for incoming calls.
The pathspec callpath is expanded alphabetically, and a queue entry is
made for each file found, up to a maximum of 40 entries.
If one or more queue entries are found, the transmission speed is set
to the speed in effect when the host command was given, and call1 is
executed. Typically, call1 disables the modem's autoanswer mode.
Then each queue entry is executed as a source file. Unless enclosed
by double quotes, string parameters appearing in the commands (as
%spar) are replaced by their values as the commands are read from
disk. These script files typically contain commands to check the
time, set transmission speed, dial a telephone number, and transfer
data. The last line of each script usually contains a command to
delete itself (or to rename itself so it will no longer be executed)
after successful transfer of data. If the data transfer fails, the
script will not execute its last line, and will be retried on the next
(C) 1990 Omen Tech Inc Chapter 27 Callout Queue
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 238
callout.
After the queue entries have been exhausted, the transmission speed is
set to the speed in effect when the host command was given, and call2
is executed. Usually, call2 sends a command to the modem to to make
it answer incoming calls.
ZCOMM then waits for incoming calls until it is again time to scan for
outgoing scripts.
27.5 Callback Security
In security conscious applications, it may be desireable to limit
access to specified users calling from authorized locations. A
callback scheme is demonstrated in the supplied script callback.t with
a sample callback directory callback which references entries in the
phone directory.
Be sure to remove the echo commands before using this script.
(C) 1990 Omen Tech Inc Chapter 27 Terminal Emulation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 239
28. TERMINAL (CRT) EMULATION
ZCOMM emulates the H19, Z19, VT52, VT100, VT102, VT220, Wyse, and
LSI-ADM3a terminals.
28.1 Wyse 60 Emulation
DOS flavors can emulate the Wyse 60 terminal given the command display
wyse. Wyse (wy60) terminal emulation supports operation with
applications on Unix/Xenix systems. The command display wyse enables
Wyse screen emulation.
Wyse emulation can place YAM in "PC Terminal" mode with 25 display
lines (status line invisible) and "scan code" operation. Since the
SysRq key does not return a code to Zcomm, the sequence LeftShift Alt
= sends the scancodes generated by the SysRq key. To exit from VP/ix,
hold down on the LeftShift and Alt keys, tap =, tap m (for menu), and
then tap q before releasing the Alt and Shift keys.
28.2 VT220 8 bit Controls
The command display 8bit casuses ZCOMM to emulate the VT220 in "level
2" operation. The DEC "GR" display characters are not currently
supported.
Similarly, 8 bit Dasher terminal emulation is enabled by the display
8bit command.
28.3 Keyboard Mapping
When enabled by a display mapkb command, DOS flavors of ZCOMM reassign
keys to simulate the function keys of the emulated terminal. Keyboard
Mapping operartes only in the term function, where the mappings
override the other meanings of the affected keys.
The following key assignments for a PC-AT style 84 key keyboard are
made by the distribution setup entry.
VT100 Keyboard Mappings for PC-AT Keyboard
PC Key.................VT100 keyCharacter
F7.....................UP.......A Cursor Keys
F8.....................DOWN.....B
F9.....................LEFT.....D
F10....................RIGHT....C
F1.....................PF1......P PF Keys
F2.....................PF2......Q
F3.....................PF3......R
F4.....................PF4......S
Pad 0..................Pad 0....p Number-Pad Keys
(C) 1990 Omen Tech Inc Chapter 28 Terminal Emulation
Version 17.61 TurboDial 2.33 Universal Line Printer Edition
ZCOMM User Manual 240
...
Pad 9..................Pad 9....y
Pad -..................Pad -....m
Pad *(PrtSC)..........., comma..l (lowercase L)
Del (.)................(.) (period)n
Pad +..................ENTER....M
Many users prefer a different keyboard layout for terminal emulation.
Laptop computers that do not use a standard keyboard layout may not
map well in Alternate Keypad Mode, suggesting different mappings.
The mk command, K and N numeric parameters provide a flexible, if
complex, keyboard mapping ability for various terminal emulations.
ZCOMM's term function maps the keyboard by scanning a table of
mappings for a match to the key's modified scan code, shift state, and
the state of the emulation machine. Iff the match is successful,
special characters required by the emulation are sent to the
application according to the class field, followed by the character(s)
defined in the mapping.
If you have a 101 key keyboard and ROM BIOS support for it, set the K
numeric parameter to 1 to activate the extra keys,[1] and set the N
numeric parameter to 1 to keep the keyboard in its preferred NumLock
state at all times.
With a regular keyboard, you must make more compromises in selecting
your keyboard mapping, depending on which keys are important to your
particular application. In particular, the "5" key on the numeric pad
doesn't work unless NumLock is on. The four possible values of the N
numeric parameter allow the keyboard to be placed in NumLock none of
the time, all the time, when the emulation's Numeric Keypad mode is
on, or when Alternate Keypad mode is on.
To devise your own mapping, you will need to know the modified scan
code, shift state, and ZCOMM internal value for each key you wish to
use. The modified scan code and internal value information are
provided by the _ (underscore) command.
To clear the keyboard mappings, give the mk command without arguments.
For each term function keyboard mapping, the mk command takes four
arguments.
__________
1. This may cause problems with certain versions of IBM BIOS.
(C) 1990 Omen Tech Inc Chapter 28 Terminal Emulation