home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!gatech!enterpoop.mit.edu!eru.mt.luth.se!kth.se!dront.nada.kth.se!d88-jwa
- From: d88-jwa@dront.nada.kth.se (Jon Wtte)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Problem with patch to HFSDispatch
- Message-ID: <1992Dec28.104104.10313@kth.se>
- Date: 28 Dec 92 10:41:04 GMT
- References: <1992Dec22.182710.26751@panix.com> <absurd-221292190600@seuss.apple.com> <1992Dec28.022559.2496@panix.com>
- Sender: usenet@kth.se (Usenet)
- Organization: Royal Institute of Technology, Stockholm, Sweden
- Lines: 38
- Nntp-Posting-Host: dront.nada.kth.se
-
- In <1992Dec28.022559.2496@panix.com> rmah@panix.com (Robert Mah) writes:
-
- >Thanks I'll try it and see how it works. But won't changing the return
- >address mess up some toolbox things. I seem to recall that that was why
- >"tail patches" were not allowed -- of course, I could be totally confused
- >here :->
-
- But that's the beauty of it; we DON'T change the normal return
- address. The stack will look a little like:
-
- <Junk>
- Return Address
- <Saved Space>
- <Saved registers>
-
- Then we push the address to chain to:
-
- <Junk>
- Return Address
- Chain Address
- <Saved registers>
-
- and restore registers and do an RTS:
-
- <Junk>
- Return Address
-
- The stack looks JUST like it did on entry to our routine!
- The patch has preserved all registers and the original return
- address, so it isn't a tail patch and it isn't zapping any
- registers; it's clean.
-
-
- --
- -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
-
- "From now on I will re-label the EQ on the deck as Fizz and Wobble
- instead of HF and LF."
-