yep it sorted a few less if then statementslongpole001 Today, 02:14
Just a typo! What else if not shift left.
I'm a noob myself, but no... The VAR.0 syntax is a way of addressing each bit and, while it affects the value of the byte, the bits do not interact.
VAR= %00000000 : VAR.0 = 1...
Hmmm....Answer = answer < 1
If the above is meant to be a shift left operation then what you want is Answer = Answer << 1
However, since Answer is set to 0 at the entry point of the routine...
This snippet (not tested) should do the trick.
X VAR byte
Answer VAR byte
X = 128
' variable answer should contain your bit position