Stat VAR BYTE 'relay status ON/OFF variable
8 bits in a byte -- 0 to 7
IF relay = 1 THEN CW = Stat.0 ' Process relay#1
Stat.0 is the first bit of byte Stat
From the PBP manual
4.4. Aliases
VAR can also be used to create an alias (another name) for a variable. This is most useful for accessing the innards of a variable.
fido var dog ' fido is another name for dog
b0 var w0.byte0 ' b0 is the first byte of word w0
b1 var w0.byte1 ' b1 is the second byte of word w0
flea var dog.0 ' flea is bit0 of dog
Bookmarks