Dec 192017
Alternative to DOS PAUSE command.
File PAUSEX.ZIP from The Programmer’s Corner in
Category Batch Files
Alternative to DOS PAUSE command.
File Name File Size Zip Size Zip Type
PAUSEESC.COM 33 31 deflated
PAUSEX.COM 33 33 stored
PAUSEX.DOC 3384 1273 deflated
TESTESC.BAT 179 122 deflated
TESTX.BAT 177 120 deflated

Download File PAUSEX.ZIP Here

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.

and TESTESC.BAT. It is distributed "as is" with no guarantees, warranties,
or promises.

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
the PAUSE).

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

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:

Robert Witriol
82 Woodland Road
Pittsford, NY 14534-1136

Alternatively, you may leave me a note on Compuserve (70701,777).


(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


 December 19, 2017  Add comments

Leave a Reply