home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14256 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  2.9 KB

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