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
would it be
if value > 2 then VAR.0[VALUE - 1]
cos if value below 2 would be incorrect bit ??
DCD is exactly right, remember however that DCD sets all other bits to 0.
If your intent is to change only a single bit: VAR.0[VALUE - 1] = 1
see the DCD operatorrichard Yesterday, 01:19
it late and minds going dull
looking for a math function to change a value 1- 8 to be bit 0 - 7 representation value
value 1 = 1 ' bit 0
2 = 2 ' bit 1
3 = 4 ...