[comp.os.msdos.programmer] Stack Switches in MSC?

trier@cwlim.INS.CWRU.Edu (Stephen C. Trier) (02/28/91)

I'm working on replacing some assembly code with C, and I'd like to redo
a timer-tick interrupt routine.  In order to do this, I need to do a
stack switch.  I know I can do this in Turbo C:

    unsigned oldSS, oldSP, newSS, newSP;
    void interrupt stackswitch(void)
    {
	disable();
	oldSS = _SS;
	oldSP = _SP;
	_SS = newSS;
	_SP = newSP;
    }

How do I do the equivalent in Microsoft C 5.1?  (_Must_ I use assembly?
How primitive!  :-)

-- 
Stephen Trier                              Case Western Reserve University
Work: trier@cwlim.ins.cwru.edu             Information Network Services
Home: sct@seldon.clv.oh.us               %% Any opinions above are my own. %%