Help ..............to find a code................
hello,
Thx in advance...i need to write an assembly code to find a the first zero bit in a bit string....
1. it takes an unsigned long variable
2. i need to extract the long variable in terms of 32 bits.
3. search for the first zero bit..\
4. if the zero is not found in the first set of 32 bits , i need to shift to the next 32 bits and to perform the same search operation.
5. repeat the step 3 till i find a zero bit
pls help me..it is very urgent.,...
bye
sweety
Re: Help ..............to find a code................
You'll have to do the work yourself.
Here is some logic to help you out:
-x & (x+1)
= rightmost zero bit
= 0 if no zero bits in set