[comp.sys.ibm.pc.misc] Interrupt 2E and batch files

rick@wicat.UUCP (Rick Moll) (11/16/90)

I am  currently  working  on  a  project  which uses the 2E interrupt when
spawning processes. However, a nasty glitch has reared its  ugly  head;  it
seems  that  if a batch file invokes an executable on anything but its last
line, and the executable uses INT  2E  to  spawn  a  process,  DOS  merrily
ignores  the  command line passes in DS:SI and instead continues processing
the next line of the batch file.

E.G.: given this batch file:

ECHO Before...
MASTER.EXE
ECHO After...

       if MASTER.EXE attempts to use INT 2E, instead  of  whatever  it  may
have passed, the "ECHO After..." line will execute. When MASTER terminates,
this line does not get executed again.

If anybody has a workaround that will convince DOS not to resume batch file
processing, I would be most verily grateful for your help.

Reply   via   e-mail    to    72500.3705@compuserve.com    or    post    to
ALT.MSDOS.PROGRAMMER.

        --Kevin Vigor

valley@uchicago (Doug Dougherty) (11/27/90)

rick@wicat.UUCP (Rick Moll) writes:

>I am  currently  working  on  a  project  which uses the 2E interrupt when
>spawning processes. However, a nasty glitch has reared its  ugly  head;  it
>seems  that  if a batch file invokes an executable on anything but its last
>line, and the executable uses INT  2E  to  spawn  a  process,  DOS  merrily
>ignores  the  command line passes in DS:SI and instead continues processing
>the next line of the batch file.

>E.G.: given this batch file:

>ECHO Before...
>MASTER.EXE
>ECHO After...

>       if MASTER.EXE attempts to use INT 2E, instead  of  whatever  it  may
>have passed, the "ECHO After..." line will execute. When MASTER terminates,
>this line does not get executed again.

>If anybody has a workaround that will convince DOS not to resume batch file
>processing, I would be most verily grateful for your help.

>Reply   via   e-mail    to    72500.3705@compuserve.com    or    post    to
>ALT.MSDOS.PROGRAMMER.

>        --Kevin Vigor

It is documented (in Dave Jackson) that INT 2E doesn't work with batch
files (with results ranging from simply not working to locking up the machine)

Any reason you gotta use INT 2E?  My understanding is that anything you
can do with it, you can do more normally just by EXECing a copy of COMMAND.COM.
It's more bother though; what is appealing about 2E is how easy it is to
use.  But as with most things, its worth about what you paid for it.