Try BON instruction this gives a check on specified bit status in a word although this may not be what you want, to check which bit is on i.e. step though bits in word till a bit is "1" then use a loop, load a 2 registers with 1
"WAnd" reg1 with the word if result <> 0 then this bit is set
multiply reg1 by 2 and add 1 to reg2 then try again.
when you reach 16 count then exit loop.
reg 2 will contain the bit No. that has the "1"
Sorry can't give you an example no Gx or IEC here at the moment
but it may go something like this:
mov k1 d1 // move 1 to D1 & D2
mov k1 d2
Label
2 // jump back label
wand d1 d3 //and the word to check (D3) with D1
<> D3 K0 CJ P1 //if result <> 0 then bit must be set (D2 = bit no)jump to P1
mul D1 K2 // mask for next bit
ADD D2 K1 D2 //add the bit pointer
< D2 K16 CJ P2 //if bit pointer < 16 then jump back
Label
1
there are many ways of checking for bits in a word you could shift one place to bit 0 then test this bit.
I'm sure someone here could knock up a quick bit of logic or check the instructions in the manual