Martin R. Green wrote: > > You are, of course, correct, but I have a question. Does your code always > use the same # of cycles, I am confused about how the PIC handles a long > sequence of 2 byte instructions like this. If it is, is this why you chose > goto $+2 for the first goto instead of goto $+4? > incfsz low,f > goto $+2 > incfsz medium,f > goto $+2 > incf high,f > > then it will work. > > Mark Langezaal If low++ <>0 than incfsz(1)+goto(2)+goto(2) If low++ =0 and medium++<>0 than incfsz(2)+incfsz(1)+goto(2) If .... And so on - constant time execution = 1+3*(n-1) WBR Dmitry .