home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13240 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.2 KB  |  25 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!wupost!csus.edu!netcomsv!mork!patf
  3. From: patf@netcom.com (pat flaherty)
  4. Subject: what's happened to the stack under VM?
  5. Message-ID: <9#qm16d.patf@netcom.com>
  6. Date: Fri, 31 Jul 92 01:02:50 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. Summary: stack behaviour seems to have changed under VM
  9. Lines: 14
  10.  
  11. A test application called "A-trap somethingorother" came with my copy of 
  12. MacsBug 6.2.  You use the app and MacsBug to watch at the assembly level
  13. as the app makes a trap call.  In particular you can watch as the stack
  14. gets set up and then taken apart afterwards.  For traps that return a value
  15. (say a pointer to a window dstruct), the first thing you do stack-wise
  16. before going to the trap is CLR.L -(A7); effectively clearing a long word
  17. on the stack where the return vluae value will be placed.  And you would
  18. expect that this decrements the stack point by 4 right?  Under 6.X or 7.0
  19. with VM _off_, this does decrement the stack pointer by 4.  Under 7 with
  20. VM _on_, you leave a long word cleared but the stack pointer has been
  21. _incremented_ by 2.  Huh, what's going on here?  Am I looking at this 
  22. wrong?
  23.  
  24.             pat
  25.