home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!sdd.hp.com!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!carson.u.washington.edu!sinan
- From: sinan@carson.u.washington.edu (Sinan Karasu)
- Subject: Saving CW in Sparc
- Message-ID: <1992Nov19.232231.11543@u.washington.edu>
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington, Seattle
- Date: Thu, 19 Nov 1992 23:22:31 GMT
- Lines: 28
-
- Hi,
- I am writing an assembly language routine in Sparc that
- is supposed to do the following:
-
- when called with the address of a routine , it will remember
- the address
-
- next time it is called it will change the stack pointer to
- point to a common area and call the routine it remembered.
- when the routine calls another entry point in this assembly
- language routine it will save the common stack and restore
- the original stack pointer and do a return to the original
- caller(i.e. the one that started everything). when it gets
- called again to call the other routine it remembers the
- address of, it will swap stacks again and return to the
- routine so that it will take off from where it left off.
- I have written the routine , I manipulate the stack
- pointers and save/restore the registers. Ithis is all
- done as a leaf-procedure). However I now realize that
- I must handle the CWs as well (I think) otherwise
- I may have saved some CW's to my stack which now
- the original caller (or some parent of it) may
- try to resrtore and get in trouble. I can send
- you the code if you feel like helping me.
- Thanx.....
- Sinan
-
-
-