On Tue, 18 Jun 2002, Dmitriy A. Kiryashov wrote: >Hi Peter and guys. > >Couple final steps to bit my favorite 12 clocks/words. ;) >The code is not tested though... > >;11 words/clocks asyncronous > > btfsc direction ;skip if dec > comf File,F ;11->00 >; > movlw 2 > btfsc base ;skip if base_3 > movlw 3 > > btfss File,1 > btfsc File,0 > movlw -1 > > addwf File,F >; > btfsc direction ;skip if dec > comf File,F ;recover > >Explanation: > >-((-x-1)+a)-1 = x+1-a-1 = x - a Very nice! Now the last trick is that direction is a flag in File, but it could be placed somewhere else to accomodate your code ;-) ;-). thank you very much, Peter -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body