Quote Originally Posted by Archangel View Post
Yes, var= variable
bit is one of the placeholders in the larger variable, example
say you want a variable to hold a value as a flag for an event, you could make a bit variable, called . . . FLAGBIT this way FLAGBIT VAR BIT
or you might need several flag bits and do it this way
FLAGBIT VAR BYTE which gives you an 8 bit byte full of FLAGBITS as follows
FLAGBIT.0 lowest bit in the byte
FLAGBIT.1 second bit in the byte
FLAGBIT.2 third " " " "
FLAGBIT.3 . . .
FLAGBIT.4 . . . all the way to FLAGBIT.7 , FLAGBIT.7 being the highest order bit in the byte variable
which is to say you can address every bit of your variable individually.
Byte = %00000000 will hold 0 to 255 in decimal
word = %00000000 00000000 will hold 0 to 65535 in decimal
LONG = %00000000 00000000 00000000 00000000 which is 4294967295 but I think (I am not sure of this) only allows 1/2 that much on each side of zero -2147483647 0 2147483647

Notice the way I have written the binary expression %00000000 this is the appropriate syntax for P Basic Pro, other compilers may use different "punctuation" and you will see "BIG ENDIAN" and LITTLE ENDIAN" usage and all that means is which end of the group of zeros is the least significant bit, the Left or the Right.

You will see different ways of displaying hex as well, in PBP we use $00 whereas in C you might see something like 0h00
Thanks that helps alot. Yes I had noticed the % in front of what looked like binary expressions but hadn't noticed the $ in front of hex expressions. Can you still use the "b and h" in PCB? In case I forget and use the asm expression?