From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: how do you get a DOS returncode back into unix ? Date: Sat, 24 Aug 2002 01:33:04 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3D66AA10.9040604@yahoo.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-msdos@vger.kernel.org Hello. Per Jessen wrote: >>No. What DOSEMU could do is to intercept int21,4d and "peek" the code >>from DOS memory, at the SDA (obtained via int21/5d06), location 14h. >>SDA=DOS Swappable Data Area, basically the current state of DOS, >>combined with all its "static" variables and internal stacks. >>The "Undocumented DOS" books attempt to do multitasking with DOS by >>swapping the SDA. Of course multitasking with DOSEMU is trivial and >not >>nearly as dangerous and full of potholes :) >>The SDA is already used by the redirector code, so DOSEMU knows its >>location. > Thanks Bart - I'll have a think about it. Just wondering: is it really worth doing it that way? Can you just create a .bat file that will execute your program and then exitemu with an argument to depend on ERRORLEVEL?