I saw a recent post about version 3.2xx having some wierd behavior with int1 and was wondering if it was also true for version 3.184. If I use this code:
int1 x;
main()
{
x = TRUE;
}
The debugger shows x as 0 all the time. I've tried x = 1, x == 1, x == TRUE. All 0. But if I define x as an int it will change value correctly/as expected.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Jun 09, 2004 4:14 pm
Quote:
The debugger shows x as 0 all the time.
Look at the .LST file to find out what's really happening.
Here is part of the listing for your program, compiled
with PCM vs. 3.184 for a 16F877. Conclusion: No problem.
The variable x is being set = 1, as expected.
Code:
Symbol Table
x 00000020
0000 00284 .................... x = TRUE;
000A 1283 00285 BCF 03.5 // Bank 0
000B 1420 00286 BSF 20.0 // Set bit 0 of Loc 0x20 = 1
ninjanick
Joined: 25 May 2004 Posts: 25
Posted: Thu Jun 10, 2004 1:45 pm
I checked the LST file and it is getting set, but my Debugger still reads 0. Maybe it's a bug in the debugger?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum