Here's a slight improvement on Andres' implementation. It still has the same restriction that 'seconds' must have a ram address that is 0 mod 4 (e.g. 0x20, 0x24,...) #define hours FSR,1 MOVLW seconds loop MOVWF FSR MOVF INDF,W ADDLW 7 SKPDC ADDLW -6 MOVWF INDF ADDLW 0x100-0x60 BTFSC hours ADDLW (0x100-0x24)-(0x100-0x60) SKPC RETURN MOVWF INDF INCF FSR,W BTFSC hours RETURN goto loop 17 Instructions, 3 RAM locations (or 4 if you count FSR), and a restrictive location for the variables. This has not been tested. Scott