On Tue, 2 Sep 1997, Scott Dattalo wrote: > How fast can you logically AND two bits? > > Given: > bit_a of register A > bit_b of register B > bit_c of register C > > The goal in C parlance is: > > C.bit_c = A.bit_a & B.bot_b; bsf C,bit_c ;assume the result will be high. btfss A,bit_a ;does bit_a make the result low? bcf C,bit_c ;yes. btfss B,bit_b ;does bit_b make the result low? bcf C,bit_c ;yes. 2+3+2+1=8 points if this works :) -Shane. > > 9 unbearably long cycles and trashes W. Last week I placed too much > emphasis on preserving W. This week the emphasis is on speeeed. > > So here are how the points are to be tallied: > > 1) Size: 2*(6 - # of execution cycles) > 2) Isosynchonous: 3 points > 3) Preserves W: 2 points > 4) Preserves reg A and B: 1 point > > The example slug scores: 2*(6-9) + 3 + 0 + 1 = -2 > > My pre-Payson/Keitz solution is worth 10 points. > hint: x & y = ~(~x | ~y) > > > Scott > -- > __o > I still buy pizza instead of gas. \< > (*)/(*) >