--- In "Stephen Queen" <> wrote:
>
> On 9/12/07, Yan Seiner <> wrote:
> >
> > printf("qddr: 0x%x 0x%x 0x%x 0x%x\n",*qddr,*((uint32_t
> > *)qddr),*(qddr+1), *((uint32_t *)(qddr+1)));
>
> It looks like to me, the way you have things cast, that
> *qddr
> will give you the 16 bit contents of the object pointed to by qaddr,
while
> *((uint32_t *)(qddr))
> will cast qadd to 32 bits and then give you the 16 bit contents of the
> object pointed to by the 32 bit pointer.
> Do you mean
> (uint32_t)(*qddr)
> ????
What I was trying to do is figure out why 16 bit pointers weren't
giving me the result I was seeking, so the idea was to
1. see what was at the *qddr location if we were to look at 2 bytes
2. see what was at the *qddr location if we were to look at 4 bytes
Repeat at the next location
My understanding is that the pointers should point to the same thing,
except in one case I'd get 2 bytes back and in the other case I'd get
4 bytes back, and that the 2 bytes from the 16 bit pointer would be
somewhere in the 4 bytes of the 32 bit pointer. It's purely a test
case. Alas, it's not so and I can't figure out why.
I've been looking at this bloody code for so long that it's possible
I'm losing my mind....
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|