Mail Archives: djgpp-workers/1996/03/13/10:55:59
On Mon, 11 Mar 1996, Douglas Rupp wrote:
> There is, reportedly, an undocumented DOS call that will save and restore
> state there, I have it in another threads package but haven;t tested it.
If you are talking about the Swappable Data Area (SDA), then beware: it
would probably work under native DOS, but I'd expect it to crash and burn
under Win 3.11 and Win95 when 32-bit file access is used (to say nothing
about WinNT and Linux). All these work by catching DOS calls and
redirecting them into totally different code and data structures. Now
guess: what are the chances that MS designed those replacements for DOS
to be reentrant?
The code to get the address of the SDA can be found on stat.c in the DJGPP
library sources. There is no DOS call to swap it in or out AFAIK; you
will have to do it yourself. There are more details about this technique
in the chapter on TSRs in ``Undocumented DOS'', 2nd ed.
- Raw text -