Hello John. > > Another variant. > > > > movfw scanbit > > addwf scanbit,f > > skpnz > > bsf scanbit,0 > > > > After this W contain previous scan and scanbit contain next scan. > > Hmm... this has the same problem that the first four-cycler given before > had: if scanbit holds something other than a power of two, running the > routine repeatedly won't fix that. On the other hand, looking at mine > above it's just plain broken. Sigh. Maybe too much egg nog. Put any value to scanbit and excute my code up to 8 times. I think you will see recovering :-) WBR Dmitry.