Hi all - with Andy's cool trick I'm down to 10 cycles typical with return in Z. Any other ideas? - Rich ; given address of 32 bit little-endian counter in W, ; decrement the counter and return Z set if zero ; 99.2% of the time, this takes 10 cycles w/call dec32 movwf FSR ; FSR -> v decfsz INDF,f ; v[0]-- goto dec32nz ; here, v[0] just became 0, check the others incf FSR,f ; get v[1] movf INDF,w incf FSR,f ; OR v[2] iorwf INDF,w incf FSR,f ; OR v[3] iorwf INDF,w return ; return Z set if so ; here, v[0] is non-zero, make sure we return with Z=0 dec32nz clrz ; in case Z was set on entry... incfsz INDF,w ; now, did v[0] underflow? return ; no (this is 99.2% path) incf FSR,f ; yes, advance to v[1] decfsz INDF,f ; dec v[1] incfsz INDF,w ; underflow? return ; incf FSR,f ; yes, advance to v[2] decfsz INDF,f ; dec v[2] incfsz INDF,w ; underflow? return ; incf FSR,f ; yes, advance to v[3] decfsz INDF,f ; dec v[3] return ; return return ; in either case