home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / hardware / 24947 < prev    next >
Encoding:
Internet Message Format  |  1992-12-27  |  3.2 KB

  1. Path: sparky!uunet!utcsri!torn!spool.mu.edu!hri.com!enterpoop.mit.edu!linus!alliant!merk!spdcc!jfwhome!jfw
  2. From: jfw@jfwhome.FUNHOUSE.COM (John F. Woods)
  3. Newsgroups: comp.sys.mac.hardware
  4. Subject: Re: P5 v. PowerPC (WAS: Where the mac really wins)
  5. Message-ID: <Bzx997.FMz@jfwhome.FUNHOUSE.COM>
  6. Date: 27 Dec 92 14:22:14 GMT
  7. References: <D2150035.lqbfh6@outpost.SF-Bay.org> <1992Dec26.230858.4892@netcom.com>
  8. Organization: Misanthropes-R-Us
  9. Lines: 45
  10.  
  11. In <1992Dec26.230858.4892@netcom.com> parag@netcom.com (Parag Patel) writes:
  12. >peirce@outpost.SF-Bay.org (Michael Peirce) writes:
  13. >>My friends at DEC tell me there was one overriding reason that Alpha
  14. >>wasn't picked over PowerPC: Politics.  The technological considerations
  15. >>were a distant second.
  16. >Don't underestimate the effects of hardware endian problems (ie which
  17. >byte is most significant in a word).  Macs (mc68ks) are big-endian, and
  18. >a lot of software (system and otherwise) makes implicit assumptions
  19. >about it.  The Alpha is little-endian, making both porting Mac system
  20. >software and Mac emulation a lot more difficult.
  21. > ...
  22. >I believe that the PowerPC is like the MIPS, in that it can handle
  23. >either endian-ness, but if it can't, I'll bet it's big-endian.
  24. >Unfortunately, while most modern chips can go either way, the software
  25. >which runs upon it usually doesn't.  Sad, but system software generally
  26. >has to make such assumptions to run fast (networking code, drivers, etc.)
  27.  
  28. Don't overestimate the effects of byte-order, either.  Extremely few programs
  29. *should* care one way or the other, and very few programs *do* care one way
  30. or the other (having ported enough software to learn the difference in the
  31. size of those two sets :-).  It is not hard to write software (in high-level
  32. languages, anyway) which is independant of byte order -- to use one of your
  33. examples, get a copy of the Berkeley networking code (before USL has it
  34. declared Top Secret :-( ), and look around for uses of the macros ntohs(),
  35. ntohl(), htonl(), htons(); essentially, you convert network-order values to
  36. host order once, then stare at them hundreds of times in native format.  The
  37. "wrong-endian" processor for a given network is at a slight disadvantage
  38. (since it does, indeed, need to swap those bytes), but it only needs to swap
  39. them once.  Drivers are somewhat harder (though with the prevalence of byte-
  40. wide chip registers, this is less of a problem than you might thing), but it
  41. is nowhere near insurmountable.
  42.  
  43. It occurs to me that another technical glitch the Alpha presents may have
  44. been more significant -- the Alpha is a 64 bit chip (I assume PowerPC is
  45. 32 bits), and there's a lot more code that stumbles over data-*size* problems
  46. than byte-order; the Berkeley networking code will again show lots of examples
  47. where (for example) pointers are laid over no-longer-used structure elements
  48. to avoid having to allocate a pointer structure and copy some data around.
  49. That kind of thing, too, is not insurmountable (having surmounted several
  50. examples myself), but that may have been a more significant factor in
  51. the decision (I hope the Pink system interface is specified at a high-enough
  52. level that it will be able to migrate to 64-bit processors easily).
  53.  
  54. Or maybe the folks at Apple misheard the name and declared "We do *fruits*,
  55. not *grains*."    :-)
  56.