Hope this makes things clearer...
I have the usual var declarations (over 200). The following names are for example only.
abc var byte
bcd var byte
cde var byte
def var byte[75]
efg var long[8]
-
-
-
-
-
-
-
wxy var byte
xyz var byte
If I comment out the second last variable 'wxy' (or comment out any of the later bytes) the code runs. If I leave wxy in the list then elements of array 'def' become corrupted. At first I suspected it was something to do with using too much ram, so I reduced the size of array def to 50 elements. But the problem is exactly the same, even though I freed up 25 bytes of ram when I reduced the size of 'def' (and of course, made sure I didn't point to any of the now missing array elements, in practice I only use the first 20 elements at the moment)
Commenting out 'wxy' allows the code to run properly, and also wxy is never actually used yet at any point in my code.
This is what leads me to wonder if it is not the actual _number_ of variables which is the key, rather than the amount of space which they use. I have 211 variable names (excluding aliases), that's 211 pointers to individual addresses, and presumably that info is saved on a table. How many variables does PBP require, because if it uses 45 or more then that would cause overflow of an 8-bit table or variable.
Chris
Bookmarks