This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

unsigned long question

Hello all,
I guest this issue has something to do with integer promosion or something related but still I don't fully understand this:
I have 2 unsigned long integers containing an equal value. However, when I compare them the program behaves as if they are not.

if ( (l_x - l_y) == 0)
                  4640           ?LINE   939
0EFC 20C6         4641           SUB     R12,R6
               R  4642           ?SYMB   '',$,102,2
0EFE 30D7         4643           SUBC    R13,R7
0F00 70CD         4644           OR      R12,R13
0F02 3D15         4645           JMPR    cc_NZ,_217

what is happening? it must be related to the numbers being 32 bit long.

Thanks in advance
Cactus Blip