>
> >In the Easy PIC'n book, it is written that decfsz takes 1 clock cycle, and
> >2
> >clock cycle if result is 0.
> >But in another book I have borrowed and read, it say that it only takes one
> >clock cycle, eventhough the result is 0.
>
> If you look in the MPLAB user's manual (or any datasheet that has an
> Instruction Set Summary page), you can see that it clearly describes it as
> requiring 1 cycle if nonzero and 2 cycles if zero. If it is nonzero, it
> really still takes 2 cycles to get to the same point in your code, except
> that it executes the next line instead of skipping it. When it "skips on
> zero", it really executes a "nop" instruction before it continues on. For
> example:
>
> decfsz FILE; 1 instruction cycle
> bsf FLAG, 1 ; executed normally if F != 0, or a NOP if F=0
> movlw 0xFF ; this is instruction cycle 3, regardless of whether or not F=0
>
> You can't "save" instruction cycles if it's zero or nonzero in going through
> your code. In the example above, it will always take 2 cycles to get from
> "decfsz" to "movlw". It doesn't matter if F=0 or F!=0.
>
> --Andrew
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
http://explorer.msn.com
>
> --
>
http://www.piclist.com hint: The list server can filter out subtopics
> (like ads or off topics) for you. See
http://www.piclist.com/#topics