You have to use the various bit operators. Here's an example:
CON bitNumber = 6
VAR byte testValue
PUB checkTheBit
if testValue & |< bitNumber
' do something if the bit is a 1
ifnot testValue & |< bitNumber
' do something if the bit is a 0
Note that this makes use of the Spin convention that a zero value is false and a non-zero value is true.
Comments