home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5370 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.unix.programmer
  2. 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
  3. From: sinan@carson.u.washington.edu (Sinan Karasu)
  4. Subject: Saving CW in Sparc
  5. Message-ID: <1992Nov19.232231.11543@u.washington.edu>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Organization: University of Washington, Seattle
  8. Date: Thu, 19 Nov 1992 23:22:31 GMT
  9. Lines: 28
  10.  
  11. Hi,
  12. I am writing an assembly language routine in Sparc that
  13. is supposed to do the following:
  14.  
  15. when called with the address of a routine , it will remember
  16. the address
  17.  
  18. next time it is called it will change the stack pointer to
  19. point to a common area and call the routine it remembered.
  20. when the routine calls another entry point in this assembly
  21. language routine it will save the common stack and restore
  22. the original stack pointer and do a return to the original
  23. caller(i.e. the one that started everything). when it gets
  24. called again to call the other routine it remembers the
  25. address of, it will swap stacks again and return to the
  26. routine so that it will take off from where it left off.
  27. I have written the routine , I manipulate the stack
  28. pointers and save/restore the registers. Ithis is all
  29. done as a leaf-procedure). However I now realize that
  30. I must handle the CWs as well (I think) otherwise
  31. I may have saved some CW's to my stack which now
  32. the original caller (or some parent of it) may
  33. try to resrtore and get in trouble. I can send
  34. you the code if you feel like helping me. 
  35. Thanx.....
  36. Sinan
  37.  
  38.  
  39.