We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
Are you sure that the register pairs R13:R12 and R7:R6 have the same value immediately before executing line #4641 ? Not sure how Tasking assigns registers and deals with unsigned longs - the code snippet looks ok.
Thanks for your reply. well, I did my comparison in 2 parts - 16 bits each. That is good enough for now.