> Subject: Re: [PIC]: Modulo 3 code > From: Scott Dattalo (scott@DATTALO.COM) > Date: Sat Jun 15 2002 - 15:31:41 PDT > On Sat, 15 Jun 2002, Nikolai Golovchenko wrote: >> Hey Scott, >> >> Doesn't look right :) Your code will add 1 to the counter when it >> reaches 3 instead of clearing it. >> >> Here is another idea: >> >> incf File, w ;11->100 >> andlw 0x04 >> skpz >> clrf File ;11->00 > For Modulo 3 it's the same thing (unless the upper bits mean something - > like they apparently do in this case). Although in your case, you combine > the increment with the check for a net savings overall. Sorry, you were right. For some reason, I was sure the whole byte should be meaningful. Nikolai -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads