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