home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: StripAddress
- Message-ID: <1992Aug20.180918.10249@waikato.ac.nz>
- Date: 20 Aug 92 18:09:18 +1200
- References: <1992Aug18.181714.12276@midway.uchicago.edu><Bt74v9.KGF@taligent.com> <1992Aug19.101953.10190@waikato.ac.nz> <NEERI.92Aug19104845@iis.ethz.ch>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 45
-
- In article <NEERI.92Aug19104845@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias Neeracher) writes:
- > In article <1992Aug19.101953.10190@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
- >>In article <Bt74v9.KGF@taligent.com>, keith@taligent.com (Keith Rollin) writes:
- >>> I've got a Quadra 900 with 7.0.1, Tune-Up
- >>> 1.1.1, and a bunch of skanky INITs. If anyone is going to have a goofy version
- >>> of StripAddress, I would. However, StripAddress is still run from ROM on my
- >>> machine, and it looks like this:
- >>>
- >>> +0000 4080D764 BTST #$00,$1EFC
- >>> +0006 4080D76A BNE.S _StripAddress+000C ; 4080D770
- >>> +0008 4080D76C AND.L MaskBC,D0
- >>> +000C 4080D770 RTS
- >>
- >>Interesting. I had a look on my IIfx, and my StripAddress entry point
- >>is at 4080D76C--that is, my StripAddress routine consists of only the
- >>last two of the above instructions. The preceding BTST and BNE are still
- >>there, in the same place, but they're not part of StripAddress. Not
- >>according to MacsBug, anyway.
- >>
- >>My machine is running in 24-bit mode.
- >
- > This looks like an optimization. In 24-bit mode, *every* address should be
- > masked to 24 bit, so the trap dispatcher is set up to point to the stripping
- > part. _SwapMMUMode is then probably responsible for pointing the trap back to
- > 4080D764. Remember, MacsBug gets its information of what instruction belongs to
- > what trap from the trap dispatch table.
-
- I just had a quick look at the code for SwapMMUMode on my IIfx, and while it
- does some interesting manipulations with privileged CPU registers, I can't see
- that it alters any trap table addresses, let alone the one for StripAddress.
-
- Anyway, StripAddress shouldn't alter its behaviour if you temporarily switch
- from 24 to 32-bit mode.
-
- I also checked my LC at home. Apart from the fact that the above addresses
- 4080Dxxx become 00A0Dxxx, the four-instruction sequence is identical. The
- only difference is that the StripAddress entry point is the RTS! (My LC runs
- in 32-bit mode.) And MaskBC is still 00FFFFFF, not FFFFFFFF.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
- In roughly 250 years, every atom in the universe will be connected to
- the Internet.
-