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
/
COMIF10.LBR
/
COMIF10.DZC
/
COMIF10.DOC
Wrap
Text File
|
2000-06-30
|
5KB
|
119 lines
COMIF VERSION 1.0
Jay Sage
March 10, 1987
COMIF.COM is a transient IF processor designed to replace the original IF.COM
released with ZCPR3. COMIF supports a very great number of additional test
conditions and accepts greatly extended syntactic forms.
Two versions of the object file are included in this release. COMIF10.COM can
be renamed to IF.COM and used as a direct replacement for the original.
COMIF10.CIM has been linked to run at 8000H instead of 100H. It can be renamed
to IF.COM and used together with a resident FCP assembled from the new FCP10
with the high-memory option enabled and set to 8000H. See the FCP10 release
package for more information.
The following text has been derived from comments in the source code. Until
real DOC and HLP files have been written, this will have to serve as
documentation of the new features.
----------
Hex/binary/octal numerical inputs implemented for all number entry.
"IF INPUT" prompt text has controls to generate control character output and
upper/lower case text. A '^' converts the following character to a control
character. The sequence '%<' toggles output to upper case; '%>' toggles to
lower case. To afford greater flexibility, "(Y/N)? " is no longer appended
automatically. Here is an example. The command
"IF IN A%>SSEMBLY COMPLETE^M^J%<D%>O YOU WANT TO CONTINUE %<(Y/N) ? "
will produce the following prompt on the screen (where '|' represents the left
margin of the screen):
|Assembly complete
|Do you want to continue (Y/N)? _
This example uses "^M^J" to generate a carriage return/line feed. You can also
put in escape sequences for special screen operations, such as cursor
addressing and attribute setting.
The following test conditions have been added:
IF AMBIG FILESPEC returns TRUE if the file spec is ambiguous
IF ARCHIVE FILELIST returns TRUE if all files in the list have
the archive attribute set
IF BG returns TRUE if BackGrounder is loaded
IF COMPR FILESPEC returns TRUE if the file(s) is (are) crunched
or squeezed as indicated by the second letter
of the file type
IF DS returns TRUE if DateStamper is loaded
IF LIST TOKEN returns TRUE if TOKEN contains items separated
by commas (i.e., is not a simple file spec)
IF RO FILELIST returns TRUE if all files in the list have
the R/O attribute set
IF SHELL returns TRUE if any shell is on the stack
IF SHELL TEXT returns TRUE if the first entry on the shell
stack matches TEXT (may contain '?' chars)
IF SYS FILELIST return TRUE if all file in the list have
the SYS attribute set
IF TAG FILELIST # returns TRUE if all files in the list have
the attribute tag designated by the number #
set (e.g., IF TAG FILE.EXT 3)
IF ZEX returns TRUE if ZEX is running
Some other conditional tests were enhanced as described later.
Added more general equality/inequality testing options for strings. If XCOMP1
is true, the following conditions are recognized: EQ, NE, GT, GE, LT, LE. All
can be negated with ~. If XCOMP2 is true, the following conditions are also
allowed: = <> >< > >= < <=. All can be negated with '~'. Remember
that in all cases the comparison is performed on the ASCII tokens, not on the
values they may represent. Here are some examples of the syntax.
IF EQ TOKEN1 TOKEN2
IF ~LT TOKEN1 TOKEN2
IF = TOKEN1 TOKEN2
IF ~< TOKEN1 TOKEN2
Added extended register and value testing options (if REGVALOPT is true).
Syntax forms are:
IF [~]REG REG# OPERATOR VALUE
IF [~]VALUE ARG1 OPERATOR ARG2
VALUE compares two 16-bit numerical arguments; REG treats the first argument as
a register number rather than a value. Spaces are optional surrounding the
operator, and the following operators are recognized: = <> >< > >= <
<=. Here are some examples:
IF REG 3 > 1CH IF REG 9= 0
IF REG 3 <>1101B IF ~REG 011B=15Q
IF VAL C000H > 40000
Added many optional extensions to conditions. IF TCAP can now test for a
specific TCAP using the syntax IF TCAP STRING. The string may have '?' wild
cards in it. The TCAP ID string is compared to the given string up to the
length of the latter.
Specific error conditions can be tested using the optional syntax IF ERROR
VALUE.
One can test for a particular shell program on the top of the stack using IF
SHELL NAME, where NAME may be ambiguous.
Modified EXIST and EMPTY tests to share code and meaning. The two tests are
now the same except that (1) the EX test only checks for the presence of a
directory entry while EM also checks for contents and (2) the senses of the
tests are reversed (EX is true if all files in list exist; EM is false if all
files exist and have contents. Thus ~EM is equivalent to EX but with a more
stringent existence requirement). Note that when the file list has ambiguous
filespecs, only the first matching file is checked.
I would like to acknowlege extensive contributions to the coding of COMIF by
Howard Goldstein.
Jay Sage