- First, you can't see a module-level variable if it's not declared 'public'... it only appears in the 'global' Watch list when it's declared public. I'm not sure how it would handle variables in different modules with the same public names. Normally I wouldn't do that, but you might be forced to since they have to be public now to see them.
- Bits and booleans need to be in a structure to be useful. Here's some code showing some ways of using bits and booleans that you CAN debug:
Code: Select all
// you can see individual bits and booleans when they're in a structure
// declare a union that can hold up to 8 bit flags
structure msbits
b as byte
b0 as b.bits(0)
b1 as b.bits(1)
b2 as b.bits(2)
b3 as b.bits(3)
end structure
// this structure holds different types
structure ms
b as byte
bit0 as bit
bit1 as bit
bool1 as boolean
bool2 as boolean
end structure
// can't see this because it's not public
dim b0 as bit
// you can see these, but they all show at the same address with the same value
// (you can't distingush individual bits unless they're in a structure)
public dim b1 as bit
public dim b2 as bit
// can see the individual bits since they're in a structure (and it's public)
public msb as msbits
msb.b = $55 // sets all
msb.b0 = 1
msb.b1 = 1
msb.b2 = 1
msb.b3 = 1
msb.b0 = 0
msb.b1 = 0
msb.b2 = 0
msb.b3 = 0