Re: [Sdcc-user] 8052 pointer seems to quit v2.

2010-01-07 Thread Kustaa Nyholm
> So >if (a = a + 1024) > > evaluates a + 1024, then assigns the result to a, then tests the result > (of the new a) for true or false ... (or zero or non zero) so it'll always > be true... In the interest of nitpicking: if a has value of 64512 then this evaluates to 0 ie false. Seeing that '

Re: [Sdcc-user] 8052 pointer seems to quit v2.

2010-01-06 Thread Sean Cross
Gordon Henderson wrote: > That's not what that statement is doing. > > One = is an assignment, 2 == is comparision. > > So >if (a = a + 1024) > > evaluates a + 1024, then assigns the result to a, then tests the result > (of the new a) for true or false ... (or zero or non zero) so it'll al

Re: [Sdcc-user] 8052 pointer seems to quit v2.

2010-01-06 Thread Gordon Henderson
On Wed, 6 Jan 2010, Sean Cross wrote: > First off, Sorry for the new thread, my old free email account was > bouncing your replies, and by chance i saw your replies through the > archived lists. > I have since changed e-mail accounts, so there should not be any more of > a bounce problem. (i hope)

Re: [Sdcc-user] 8052 pointer seems to quit.

2010-01-04 Thread Gregory G Dyess
Sent: Monday, January 04, 2010 3:26 AM To: sdcc-user@lists.sourceforge.net Subject: Re: [Sdcc-user] 8052 pointer seems to quit. Putu, > so, *abs_ptr++ is equal to *(abs_ptr++) not (*abs_ptr)++. Hit, and sunk! You are so right, and I'm the idi

Re: [Sdcc-user] 8052 pointer seems to quit.

2010-01-04 Thread Bodo Wenzel
Putu, > so, *abs_ptr++ is equal to *(abs_ptr++) not (*abs_ptr)++. Hit, and sunk! You are so right, and I'm the idiot! :-} Bodo -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Veriz

Re: [Sdcc-user] 8052 pointer seems to quit.

2010-01-03 Thread Susila IP
On Mon, Jan 4, 2010 at 12:00 AM, Bodo Wenzel wrote: >>                       if( a = a + 1024 )      // strangely this makes the >> pointer work for 21 bytes > Well, this is a bad code; do you really mean: > >                      if( ( a = a + 1024 ) != 0) > > The other proposal "(a == a + 1024)

Re: [Sdcc-user] 8052 pointer seems to quit.

2010-01-03 Thread Bodo Wenzel
> if( a = a + 1024 ) // strangely this makes the > pointer work for 21 bytes Well, this is a bad code; do you really mean: if( ( a = a + 1024 ) != 0) The other proposal "(a == a + 1024)" will never be true. ;-) > *abs_ptr++ ; // Mak

Re: [Sdcc-user] 8052 pointer seems to quit.

2010-01-02 Thread Susila IP
On Sun, Jan 3, 2010 at 11:57 AM, mr_cross wrote: > Is it me or stack problems, or me? :P > > when it should be 0x00 from 0x2500 - 0x3FFF > > if i lose the "if( a = a + 1024 )" test, it runs like it should. > hi, don't you mean that the code should be "if (a == a + 1024)" instead of above code? ea