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