home *** CD-ROM | disk | FTP | other *** search
- E - L - F
-
- (E)rror (L)evel (F)ile
-
- Documentation
-
-
- INTRODUCTION:
-
- ELF was written to fufill two needs: The need to allow operator input
- in batch files, in the form of Yes/No answers, and the need to force
- ERRORLEVEL to a specified value. The former function is available in
- several programs, but the latter is not. ELF combines both into one
- easy to use program.
-
- DISCLAIMER:
-
- This program is placed in the public domain. Permission is granted
- to copy, give away, and distribute this package. Permission is
- expressly denied to anyone to sell this software, other than nominal
- costs for media. The user bears all responsiblity for testing & use.
- If ELF turns out to be a virus that wipes out your hardware, you have
- no-one to blame but yourself. The source code is included for your safety.
- If the possiblity of trojan horse or virus programs disturbs you, please
- carefully examine the source code, and then re-assemble it yourself. If
- you didn't receive the source code, then request it from the source from
- which you received this software. Alternately, close inspection with
- a debugger is in order. ELF is really a trivial program, so dis-assembly
- is easy. In actuality, I have been using Public Domain software for years
- and have *never* had any problems, so the above is not intended to make
- you paranoid. It is intended to protect the author of this, and the authors
- of all legitimate public domain or shareware software. Enjoy.
-
-
- USE:
-
- Invoke as: ELF XX <CR> where XX is a two digit HEXIDECIMAL number. Hex
- was used out of pure laziness on the part of the programmer. ELF will
- simply terminate with the appropiate ERRORLEVEL set without printing anything.
- This is useful for "tacking-on" ERRORLEVEL control for batch files with
- programs that don't support ERRORLEVEL. BASIC is a good example. If
- running a BASIC program under a batch process, chain to ELF upon termination
- to set up an ERRORLEVEL parameter. Remember that while ELF uses hex
- arguments, the ERRORLEVEL statement in your batch file uses the decimal
- equivalant.
-
- The other form is: ELF <CR>. This will print (Y/N)? on the console, and
- wait for the Y or N key to be pressed. (Either case). All other keys are
- ignored. This is great for run time operator input with batch files. I
- use it in my AUTOEXEC.BAT file to ask whether or not to attach my machine
- to our LAN. Countless other uses could be thought of. It sets ERRORLEVEL
- to 0 for a Y response, and to 255 for a N response.
- Example:
-
- ECHO OFF
- CLS
- -
- - {Rest of batch file}
- -
- ECHO Login to network?
- ELF
- IF ERRORLEVEL 255 GOTO END
- NETWORK {Run NETWORK.BAT}
- :END
-
-
- This produces:
-
- -
- - {Other things in batch file}
- -
- Login to network?
- (Y/N)?
-
-
- Note: If you'd rather not have the (Y/N)? prompt, either re-assemble
- the program, or patch the string with a debugger. Replace the ( with a $.
-
- v1.1, Toad Hall Tweak:
- - Reformatted source (ELF11.ASM) for ASM/MASM
- - Slight tweaks, no functional changes.
- David Kirschbaum
- Toad Hall
- kirsch@braggvax.ARPA