> John Payson wrote: > > > > On Thu, Sep 18, 1997 at 07:50:09PM -0500, John Payson wrote: > > > > It's true that not all PICs have a hardware known-zero. > > Nonetheless, you > > > > might want to consider having the compiler allocate one. You > > could use > > Would someone be so kind as to explain what exactly the significance of > a known zero is? > >From what I've seen, I can deduct that you use it as a fixed reference > point to which you can compare all your arithmic and answers? A known-zero location is useful for the following two instructions: rlf KZ,w ; W will be 0 if carry clear, 1 if carry set rrf KZ,w ; W will be 0 if carry clear, 128 if carry set If you have a loop counter that's always left at zero when you're not using it, you can replace: movlw 8 movwf counter with bsf counter,3 or likewise for counts of 1, 2, 4, etc. or 255 [use comf or decf]; in addition, the normal "decfsnz loop" behavior is to loop precisely 256 times if the counter is zero at the start.