home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Lion Share
/
lionsharecd.iso
/
utils_mz
/
turbobat.zip
/
TURBOBAT.DOC
< prev
next >
Wrap
Text File
|
1992-01-28
|
25KB
|
735 lines
TurboBAT■
_______________________________________
Users Manual
Version 3.07 01/28/92
Copyright (c) 1991 Foley Hi-Tech Systems
License Agreement
This software is protected by both United States copyright law and
international treaty provisions. Therefore, you must treat this software
"just like a book," with the following single exception. Foley Hi-Tech
Systems authorizes you to make archival copies of the software for the sole
purpose of backing up our software and protecting your investment from
loss. By saying, "just like a book," Foley Hi-Tech Systems means that this
software may be used by any number of people and may be freely moved from
one computer location to another, provided there is absolutely no
possibility of it being used at one location at the same time it is being
used at another. Just as a book cannot be read by two different people in
two different places at the same time, the software may not be used by two
different people in two different places at the same time.
You may not make copies of the software documentation or disk, except as
described above. You may not distribute, rent, sublicense, or lease the
software or the documentation. You may not alter, modify, or adapt the
software or documentation, including but not limited to translating,
decompiling, reverse assembling, or creating derivative works. You may not
use the software in a network, timesharing, multiple CPU, or multi- user
environment unless each user is licensed by Foley Hi-Tech Systems.
Limited Warranty
In the event of notification of defects in material or workmanship, within
the warranty period of 45 days from the date of purchase, Foley Hi-Tech
Systems will, at its option, replace the defective diskette or refund the
license fee. If you need to return a product, call the Foley Hi-Tech
Systems Technical Support Service Department to obtain a return
authorization number. The remedy for breach of this warranty shall be
limited to replacement or refund and shall not encompass any other damages,
including but not limited to loss of profit, and special, incidental,
consequential, or other similar claims.
Foley Hi-Tech Systems specifically disclaims all other warranties,
expressed or implied, including but not limited to implied warranties of
merchantability and fitness for a particular purpose with respect to
defects in the diskette and documentation, and the program license granted
herein in particular, and without limiting operation of the program license
with respect to any particular application, use, or purpose. In no event
shall Foley Hi-Tech Systems be liable for any loss of profit or any other
commercial damage, including but not limited to special, incidental,
consequential, or other damages. This statement shall be construed,
interpreted, and governed by the laws of the State of California.
Trademark Information
Safety Disk is a trademark of Foley Hi-Tech Systems.
MS-DOS is a trademark of Microsoft Corporation.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
Purpose
TurboBat allows you to compile standard DOS batch files into .COM binary
programs. This will greatly enhance the speed of large batch files by
allowing them to run in native code rather than interpreted DOS commands.
The resulting .COM files may call nested batch files without loosing the
parent since the parent calling program is now no longer a batch file.
Version
3.07 01/28/92
Command Format
Usage: TURBOBAT [options] filename[.ext]
/1 Insert single stepping code. The creates a version of the
output that is useful when debugging a batch file. When the
output .COM program is run, it will single step through each
line of the original program.
/4 Supress 4DOS warning messages. Don't report any warning
messages generated by the use of 4DOS specific commands.
/A Supress all warning messges (same as /4/I/L/X). Don't display
any warning messages, only error messages.
/D[name] Include full symbolic tracing information. If NAME is specified
the information will be sent to the named file, otherwise is is
displayed via the standard error device. There must not be any
spaces between /D and NAME.
/I Ignore nonstandard labels. DOS supports labels up to 8
characters long for use with the goto statement. Many people
use the label as a comment field rather than a label and this
can cause problems when a label that is used in a non standard
fashion shows up during the compile stage of the batch file.
DOS will noramally just ignore this error.
/L Relaxed label length checking. The normal label size recognized
by DOS is 8 characters. In many cases people use the : as a
place holder for the program without ever referencing the label.
The problem is that if you have more than one long label name
where the first 8 digits match another label, the file won't
compile because it will look as though you have duplicate
labels. This switch relaxes that limit.
/T Compile with line number TRACE information. The line number
information is displayed via the standard error device. When
running the output program compiled with this option on you will
get a display of each line number as the program is running.
This is useful when trying to determine where a program is
failing.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
/X Supress extension warning messages. Normally during compilation,
TurboBAT will warn you about any lines that make use of commands
that are supported by the compiler but are not supported by DOS.
Using the /X will tell TurobBAT not to warn you about any BATCH
files that will not function under normal DOS conditions.
Description
TurboBAT is a multipass batch file compiler. It takes interpreted DOS
batch files and turns them into binary programs that can execute up to as
much as 4 times faster than normal batch files. While supporting all of
the normal DOS functions that can be called from within a batch file,
TurboBAT also provides many additional features including support for many
4DOS/NDOS commands.
Extended Batch Commands
TurboBAT support many commands beyond those supported in normal batch
files. Some of these commands are in support of J.P. Softwares 4DOS Batch
Enhancements and others are to replace small external DOS utilities.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
Internally Supported Commands
%? "Internal" evironment variable. Expands to the error level of
the last executed program as a string.
Example of usage:
SET LASTERROR=%?
BEEP BEEP [frequency duration ...]
Sounds a tone of the specified frequency for the duration in
clock ticks. The defaults are 440Hz (A below middle C) for 2
clock ticks (about 1/4 second).
The list of tones and durations can be repeated on a single line.
This table is identical to the 4DOS tone table:
╔════════╦═══════╤═══════╤═══════╤════════╤═══════╗
║ C ║ 131 │ 262 │ 523 │ 1040 │ 2093 ║
║ C#/Db ║ 139 │ 277 │ 554 │ 1103 │ 2217 ║
║ D ║ 147 │ 294 │ 587 │ 1176 │ 2349 ║
║ D#/Eb ║ 156 │ 311 │ 622 │ 1241 │ 2489 ║
║ E ║ 165 │ 330 │ 659 │ 1311 │ 2637 ║
║ F ║ 175 │ 349 │ 698 │ 1391 │ 2794 ║
║ F#/Gb ║ 185 │ 370 │ 740 │ 1488 │ 2960 ║
║ G ║ 196 │ 392 │ 784 │ 1568 │ 3136 ║
║ G#/Ab ║ 208 │ 415 │ 831 │ 1662 │ 3322 ║
║ A ║ 220 │ 440 │ 880 │ 1760 │ 3520 ║
║ A#/Bb ║ 233 │ 466 │ 932 │ 1866 │ 3729 ║
║ B ║ 248 │ 494 │ 988 │ 1973 │ 3951 ║
╚════════╩═══════╧═══════╧═══════╧════════╧═══════╝
BOOT BOOT [WARM | COLD]
Boots the computer. If no options are specified or if WARM is
specified a WARM boot will occur. If COLD is specified the
computer will go through the entire cold boot process. Under
Desqview, a warm boot will only close the window.
CDD CDD drive:path
Changes subdirectories and drives. This command will change the
current directory and drive to the one specified in [drive:path]
and make the current DOS drive equal to the value in [drive].
Normally within dos the CD command will change directories on any
drive that you specify but will keep the current drive the same.
CDD allows you to switch to that drive rather than stay on the
current drive.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
CHDIR/CD CD path
CD drive:path
Change the current directory as specified in path. If a drive is
specified than change the current directory of that drive to the
directory specified in path.
CLS CLS [[bright] [blink] fg on bg]
Clears the screen and optionally sets the screen color. When
setting the colors the syntax is identical to the COLOR command.
COLOR COLOR [bright] [blink] fg ON bg
Uses ANSI escape squences to set the screen color. Only the first
three letters of each command word are actually significant. The
following colors are allowed:
BLAck BLUe GREen RED
MAGenta CYAn YELlow WHIte
Example:
COLOR BRIGHT WHITE ON BLUE
DELAY DELAY [seconds]
Pauses for the specified interval in seconds. If no duration is
given it will pause for 1 second.
ECHO ECHO [message]
If the /D switch was used at compile time you can enable or
disable command echoing with ECHO OFF and ECHO ON. ECHO without
any text will indicate if the /D switch was used when the file
was compiled, not the current status of command echoing. To
display a blank line use "ECHO:" or "ECHO.".
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
ECHONLN ECHONLN [message]
Displays the message without appending a cr/lf to the end of the
message like ECHO does.
ELSE If the IFF condition was false the lines from ELSE to
ENDIFF will be executed. See IFF.
ELSEIFF ELSEIFF condition [THEN]
Similar structure to the IFF command. If the previous IFF was
false and the current condition is true the code following will
be executed to the next ELSE, ELSEIFF, or ENDIFF statement. Each
use of ELSEIFF counts as a nesting level. The compiler actually
converts this command into logical ELSE^IFF^ENDIFF statements.
See IFF.
ENDIFF Terminates an IFF statement. See IFF.
EXIT EXIT is used when at the DOS level if you are running within a
shelled version of the command interpretor and you wish to exit
the shelled session. The EXIT command is ignored by TurboBAT.
See also QUIT.
FOR FOR %%var IN (file list) [DO] command
Allows more than a single letter as the loop variable. Can be
nested. The loop variable can be tested from other lines by
treating it as a normal environment variable. The word "DO" is
required by DOS but is optional under 4DOS and Turbobat.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
GOTO GOTO label
Will jump control to the label. Labels are marked as a line
begining with a :.
GOSUB GOSUB label
Calls a label in the current batch file as a subroutine. Must
have a matching RETURN statement. The end of the batch file does
NOT act as a RETURN.
IF IF [NOT] first (== | EQ | NE | LT | LE | GT | GE) second command
IF [NOT] ERRORLEVEL [== | EQ | NE | LT |LE | GT | GE] value command
IF [NOT] ENVFREE [== | EQ | NE | LT |LE | GT | GE] value command
IF [NOT] EXIST filename command.
IF [NOT] ISDIR path command
EQ (equal), also '==' and '='
NE (not equal),
LT (less than),
LE (less or equal),
GT (greater than),
GE (greater or equal).
If no compare command is used for ERRORLEVEL or ENVFREE the
default of GE will be used.
EXIST tests for the existence of a file.
IF EXIST my.cfg GOTO continue
ECHO Configuration file is missing
QUIT 99
:continue
ISDIR tests if the given path specification is an existing
subdirectory.
IF NOT ISDIR \work MD \work
ENVFREE tests the available environment space.
IF ENVFREE LT 123 ECHO Insufficient environment space
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
IFF IFF condition [THEN]
If the condition is true the lines up to ELSE, ELSEIFF or ENDIFF
(whichever appears first) will be executed. IFF statements may be
nested up to 15 levels deep. See also IF.
IFF %? EQ 0 THEN
GOTO CONTINE
ELSEIFF %? EQ 99
THEN GOTO CRITICAL
ELSE
GOTO ERROR
ENDIFF
INKEY INKEY [/Wn] [message] %%var
Gets a single keystroke and places it in the environment. %%var
is the environment variable that will be assigned the keystroke.
If /W is specified the command will wait up to that many seconds,
e.g. /W10. It will also optionally display a message. If a wait
of zero is used (/W0) the command will return immediately if no
keystrokes are pending. The wait period can be specified in the
environment, but the /W but be present on the line at compile
time, e.g.:
inkey /w%delay Press any key: %%key
Displayable keystrokes (characters above the space) are stored as
their corresponding character. Keystrokes that do not have a
corresponding character are displayed as a number, e,g. the
carriage return as "13". Extended keystrokes such as F1 are
stored with a preceding '@', (@59 for F1).
INPUT INPUT [/Wn] [message] %%var
Gets a string and places it in the environment. %%var is the
environment variable that will be assigned the string. The
string is terminated by a carriage return or end of file mark
(^Z). Extended keystrokes are ignored. /Wn is the optional
maximum time in seconds to wait for the first keystroke. Once a
keystroke is entered this command will not time out.
MKDIR/MD MD [pathname]
Will create a new directory of PATHNAME.
PATH Displays or Sets the Path.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
PAUSE PAUSE [message]
Accepts an optional message. If no message is specified the
default of "Press a key when ready..." is used. In addition, a
CR/LF is not output until after the key is pressed.
PROMPT Displays or Sets the DOS Prompt
QUIT QUIT [exitcode]
Unconditionally halts the compiled batch file. If no exitcode is
specified, zero will be used. The exit code can refer to an
environment variable. If the variable is not a number or does
not exist zero will be used. Examples:
SET var=1
QUIT %var
Exits with 1.
SET var=test
QUIT %var
Exits with 0 because %var is not a number.
REM REM is the standard DOS Remark field. REM lines are ignored by
the TurboBAT Compiler.
REPEAT/
UNTIL Similar to the Pascal structure. May be nested up to 15 deep.
Redirection is not allowed on a line containing REPEAT or UNTIL.
REPEAT
ECHO %1
SHIFT
UNTIL "%1" EQ ""
RETURN Return from a subroutine call. If no subroutines are pending it
will terminate the batch file with an exit code of 255.
RD/RMDIR Remove Directory. This will remove the directory specified as
long as there are no files in it.
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
SCREEN SCREEN row column [message]
Positions the cursor using ANSI sequences and displays an
(optional) message. The cursor coordinates are 0 based, the
normal range being 0-24 rows and 0-79 columns.
SCRPUT SCRPUT row col [bright][blink] fg ON bg message
Writes the message at the specified screen coordinates using the
specified colors. The cursor position is restored to the
position before the command. ANSI escape sequences are used
throughout.
SET Alone, Set will display the current environment variables, or
followed by an environment variable, set will set the environment
variable to the given value.
SHIFT Same as standard DOS. I will be expanding this command for 4DOS
compatibility to accept a shift factor, with support for a
negative number which will get back previously shifted
parameters.
SINGLESTEP SINGLESTEP ON | OFF
Enables or disables single stepping. The /1 compiler switch must
be used for this command to have any effect. The options are
resolved at compile time so you can not use an environment
variable or command line parameter to set the status.
TEXT/
ENDTEXT The text that follows, up to ENDIFF will be displayed as if each
line was preceded by an ECHO. Output redirection is more
efficient using this command instead of individually redirected
ECHO commands since the file will only be opened and closed once,
while the file will be opened and closed for each ECHO command.
TEXT
This could be a menu
or it could be help information
ENDTEXT
TEXT >dummy
This text will be sent to the redirection file.
Up to, but not including the ENDTEXT command.
ENDTEXT
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
UNSET Deletes the environment variable from the master environment.
UNSET RESULT
WHILE/
WEND Similar to the Pascal structure. May be nested up to 15 deep.
Redirection is not allowed on a line containing WHILE or WEND.
WHILE "%1" NE ""
ECHO %1
SHIFT
WEND
COMMANDS HANDLED BY CALLING THE COMSPEC
These commands are supported by calling COMMAND.COM:
CALL, DIR, DEL, REN, VER, VOL, CTTY, CHCP, TYPE, COPY, DATE, TIME, ERASE,
BREAK, RENAME, DELETE, VERIFY, COMMAND
These commands will only work if 4DOS is the active COMSPEC:
FREE, DRAWBOX, DRAWHLINE, DRAWVLINE, MEMORY
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
Compiler Error Messages
TurboBat contains a library of internal error messages and will display the
error number and message when an error or warning is found. Files with just
warnings will compile, files with errors will not compile.
Warning Messages
Error Messages
1 Duplicate label. Each label must be unique for a file to compile
correctly. Use the /I to relax label checking when using the : for
marking comments.
2 Duplicate label (check size). Sometimes labels are used as comments in
batch files. If a label is unique, but after the 8th character the
compiler won't pick it up as unique since DOS only supports the first
8 characters of a label. You can use the /L option to relax label length
checking.
3 Redirection not allowed here
4 Invalid IF statement
6 Invalid FOR statement
7 EXIT can not be used in a compiled batch file
8 Unresolved label
9 Program is too large
10 REPEAT nested too deeply
11 Unmatched UNTIL
12 WHILE nested too deeply
13 Unmatched WEND
14 Label longer than nn characters, truncated
TURBOBAT - Turbo Batch File Compiler
___________________________________________________________
15 IFF nested too deeply
16 Unmatched ELSE statement
17 Unmatched ENDIFF statement
18 Unexpected end of file
19 Unmatched ENDTEXT
20 Syntax error
TECHNICAL SUPPORT
Many times we get calls from people asking questions that can be solved
easily by checking through the manual before calling tech support. We
ask that you browse the manual and look for information pertaining to
your particular problem before calling. This can often save you time, as
we take a collection of our most common questions and try to address
them in this manual.
We offer alternative methods in addition to the conventional phone
support, such as a multi-line 24-hour BBS system. We also monitor most
technical conferences in the BBS Interlink and RelayNet networks as well
as many of the conferences on the CompuServe Information System.
You may send messages and questions via any of these services.
Currently our Tech Support office is staffed Monday through Friday from
9:00 a.m. to 5:00 p.m. Pacific Time. There is a chance, however, that
someone is in the office outside of this time frame. If so, we will gladly
answer your questions outside the normal business hours.
Foley Hi-Tech Systems
Technical Support Department
172 Amber Drive
San Francisco, CA 94131-1642
(415) 826-6084
(415) 826-1706 FAX
(415) 826-1707 BBS
70262,1463 CompuServe
FHTS Products
_________________________________________________________
ExtraDOS Toolbox Professional■. A large collection of over 50 utilities
that DOS forgot. Includes many helpful utilities that enhance MS-DOS
machines. Featured in the DOS Power Tools, 2nd Edition, Revised for
DOS 5.0 book by Bantam Books.
Safety Disk■ . Safety Disk saves all of your systems vital information
and will solve most problems due to: Loss of battery power, Loss of
CMOS information, accidental deletion of boot files, virus damage to boot
disk.
Coach Database System■. CDBS provides a method for tracking and
evaluating NBA teams, NBA players, and college players. It supplies a
comprehensive report generator for building decision support reports on
scouted players.
Press Gate Manager■. Software for event organizers. Creates and
maintains a database of events and guests with the ability to track
seating by type, location, and person. Produces seating charts and labels
for press passes.
FINDB■. Financial Database System for tracking shareholders in a
company. Allows the instant retrieval of information based on any part
of a persons account id, ss#, zip code etc. Has support for completely
customized HP Laserjet tax forms. Ideal for generating K1 tax reports
for limited partnerships.
StatView■. Software that keeps track of all players in the NBA.
Includes dial in capability for daily updates on transactions, statistics and
penalties.