[comp.os.msdos.programmer] accessing ss and sp in C

wtl@ulysses.att.com (Bill Langin[ftd]) (09/25/90)

I have a bit of a small problem.  I am writing a TSR using PowerC.  What I want
to do is ressign the stack to a stack defined by the TSR when the TSR is 
activated and reset it upon exit.  

Using TurboC this is simple.  Just declare ss and sp properly and 

 ss = _SS;		/* ressign */
 sp = _SP;
_SS = new segment;
_SP = new pointer;
    .
    .
    .
_SS = ss;		/* reset */
_SP = sp;

However, since I'm using PowerC for other reasons, and it doesn't have 
equivalent "built-in register variables" I haven't been able to figure out a
way to do what I want.

Any ideas? 

Thanks in advance.

P.S. I'd like to not have to resort to assembly language if possible, since I
stink at it.

-- Bill Langin  -> My opinions are mine only... Go figure. 
INTERNET: wtl@ulysses.att.com  UUCP {att,decvax,ucbvax}!ulysses!wtl