Contents of the PAUSEX.DOC file
* Program...: PAUSEX.COM
* Author....: Robert Witriol, M.D. (Compuserve 70701,777)
* Date......: 30 March 1989
* Purpose...: Enhanced version of DOS PAUSE command.
This package contains PAUSEX.COM, PAUSEX.DOC, PAUSEESC.COM and TESTX.BAT
and TESTESC.BAT. It is distributed "as is" with no guarantees, warranties,
PAUSEX.COM temporarily halts batch file execution.
No prompt or message is provided.
If one is needed, use ECHO [message] in the preceding line of the batch file.
Execution resumes upon pressing any key.
*** HOWEVER, if that key was x or X, the DOS Errorlevel will be set to 1. ***
*** This may be used for subsequent branching in the calling batch file. ***
I wrote this to provide me with a "secret back door" to give me two ways out
of a pause in a batch file. This enables me to skip certain commands which
are ordinarily executed, but which I want to bypass during program testing or
modification. My end users generally do not press "X" to get out of a PAUSE,
and I do not provide documentation of this feature. Thus, to the user, it is
indistinguishable from PAUSE (unless he just happens to hit "X" to get out of
If "X" is not agreeable to you as the "back door" key, use DEBUG or a
text editor to substitute another character for it. PAUSEESC.COM, which
is enclosed in this package, is a clone of PAUSEX.COM which is set up to have
the ESCape key set Errorlevel = 1.
Simple batch files TESTX.BAT and TESTESC.BAT are provided to demonstrate
the use of PAUSEX.COM and PAUSEESC.COM.
If you find that this little utility has any value, or you wish to
provide me with feedback of any kind, please send me a postcard
at the following address:
82 Woodland Road
Pittsford, NY 14534-1136
Alternatively, you may leave me a note on Compuserve (70701,777).
ASSEMBLER LISTING FOR PAUSEX.COM
(NOPs have been used only for clarity)
1DAC:0100 B40C MOV AH,0C
1DAC:0102 B007 MOV AL,07
1DAC:0104 CD21 INT 21
1DAC:0106 90 NOP
1DAC:0107 3C58 CMP AL,58
1DAC:0109 740B JZ 0116
1DAC:010B 90 NOP
1DAC:010C 3C78 CMP AL,78
1DAC:010E 7406 JZ 0116
1DAC:0110 90 NOP
1DAC:0111 B000 MOV AL,00
1DAC:0113 EB06 JMP 011B
1DAC:0115 90 NOP
1DAC:0116 B001 MOV AL,01
1DAC:0118 EB01 JMP 011B
1DAC:011A 90 NOP
1DAC:011B B44C MOV AH,4C
1DAC:011D CD21 INT 21
1DAC:011F 90 NOP
END OF FILE PAUSEX.COM