how do you get a DOS returncode back into unix ?
Hello.
Quoted 11 lines · Per Jessen
Quoted 6 lines
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
Quoted 3 lines
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?