home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18204 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.5 KB  |  40 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbg.informatik.th-darmstadt.de!misar
  3. From: misar@rbg.informatik.th-darmstadt.de (Walter Misar)
  4. Subject: Re: Help with shifts in Manx C
  5. Sender: news@news.th-darmstadt.de (The News System)
  6. Message-ID: <1993Jan6.133701@rbg.informatik.th-darmstadt.de>
  7. Date: Wed, 6 Jan 1993 12:37:01 GMT
  8. References:  <johnv.041s@acix.DIALix.oz.au>
  9. Nntp-Posting-Host: rbhp64.rbg.informatik.th-darmstadt.de
  10. Organization: TH Darmstadt
  11. Lines: 27
  12.  
  13. In article <johnv.041s@acix.DIALix.oz.au>, johnv@acix.DIALix.oz.au (John Verhoeven) writes:
  14. > I been playing with the AllocEntry() function.
  15. > The latest RKM Libraries (pp 460) have this example for checking the return
  16. > from AllocEntry (where memlist is assigned the return from AllocEntry):
  17. > #define ALLOCERROR 0x80000000
  18. > if ((ULONG)memlist & ALLOCERROR)
  19. > {
  20. >     /* a problem...do something */
  21. > }
  22. > When I compile this with Aztec C68k/Amiga 5.2a Sep 25 1991 17:04:29 it
  23. > translates the code to the instruction btst.b #7,memlist which is
  24. > incorrect.
  25. [stuff deleted] 
  26.  
  27. Why incorrect ?
  28. Since hi-bytes are stored first, the byte adressed with memlist is the
  29. highest byte of memlist, thus covering bits 24-31. Now the 7th bit of this
  30. is the 31th bit of memlist. Just a fine optimization methinks.
  31.  
  32. -- 
  33. Walter Misar                                | It is impossible to enjoy
  34. misar@rbg.informatik.th-darmstadt.de        | idling thoroughly unless
  35.                                             | one has plenty of work to do.
  36.