8807035@ul.ie (05/11/91)
At the moment I'm writing a TSR, from inside which I want to be able to spawn some programs which are stored on disk using DOS fun 4bh sub 00h. According to Andrew Schulman's ' Undocumented DOS ' article in the March Byte 'zine it is possible to do this, without adversely affecting the foreground program, by making a copy of the Swapable Data Area, and switching the PSPs and DTAs, etc. My problem is I've got the calling parameters for finding the SDA : Func 5dh Subfunc 06 (quoted in the article). However there are no function parameters stated for setting the fgnd_SDA to my_SDA, for example; although it's feasible to make a copy of the SDA in some alloc'ed memory and swap it back after the spawned program has run. Anyone got the parameters to the Set SDA function ? Does it even exist ? Any ideas ? Thanx in advance, Padraig O Mahony. 8807035@ul.ie University of Limerick, Ireland.
ralf+@cs.cmu.edu (Ralf Brown) (05/13/91)
In article <17301.282b344c@ul.ie> 8807035@ul.ie writes: } My problem is I've got the calling parameters for finding the SDA : Func 5dh }Subfunc 06 (quoted in the article). However there are no function parameters }stated for setting the fgnd_SDA to my_SDA, for example; although it's feasible }to make a copy of the SDA in some alloc'ed memory and swap it back after }the spawned program has run. There is no such function, because the DOS kernel refers to absolute addresses (going through a pointer would needlessly slow down DOS). You have to physically make a copy of the SDA and then physically overwrite it with a previously saved copy. -- {backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/3.1 BITnet: RALF%CS.CMU.EDU@CARNEGIE AT&Tnet: (412)268-3053 (school) FAX: ask DISCLAIMER? Did | It isn't what we don't know that gives us trouble, it's I claim something?| what we know that ain't so. --Will Rogers