Now a small, interesting problem : i need to clear said bit to be able to loop on them. (Didn't think about that when posting...)
Like this :
Code:
; d2=input value, d1=tmp, d0=result
loop
move.w d2,d1
subq.w #1,d1
not.w d1
and.w d2,d1
bfffo d1{0:32},d0
eori.b #31,d0
(do something here with d0=bit#)
eor.w d1,d2
bne loop
Above eor method removes one instruction from the calculation but destroys actual value...