🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4926

Stack Switches in MSC?

#4926
From: Stephen C. Trier
Date: Thu, 28 Feb 1991 05:46
21 lines
1222 bytes
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. %%
Technical Details
Message-ID: <1991Feb28.054613.19796@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uwm.edu!bionet!agate!usenet.ins.cwru.edu!cwlim!trier

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uwm.edu!bionet!agate!usenet.ins.cwru.edu!cwlim!trier
From: trier@cwlim.INS.CWRU.Edu (Stephen C. Trier)
Newsgroups: comp.os.msdos.programmer
Subject: Stack Switches in MSC?
Message-ID: <1991Feb28.054613.19796@usenet.ins.cwru.edu>
Date: 28 Feb 91 05:46:13 GMT
Sender: news@usenet.ins.cwru.edu
Reply-To: trier@po.CWRU.Edu
Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA)
Lines: 22
Nntp-Posting-Host: cwlim.ins.cwru.edu