This code uses 3 RAM, 23 ROM, and FSR list p=16c84 indirect equ 0h status equ 3h fsr equ 4h carry equ 0h z equ 2h secs equ 0eh mins equ 0fh hours equ 10h ; ; ; ------ org 0h ; program start ; ------ ; start clrf secs clrf mins clrf hours loop call inc_time goto loop inc_time movlw secs ; set indirect address for time regs movwf fsr tm_loop incf indirect ; add 1 to addressed time reg movlw b'00001111' ; test if low nib > 9 andwf indirect,w xorlw b'00001010' btfsc status,z goto cl_nibs ; yes btfss fsr,4 ; test if hours addressed return ; no, exit movlw 0x24 ; yes, prepare for > 24 test goto test_24 cl_nibs movlw b'00000110' ; clear low nib and inc hi nib addwf indirect movlw 0x60 ; prepare for secs, mins > 60 test test_24 xorwf indirect,w btfss status,z return ; all (>) tests fail, exit clrf indirect ; reset hour or min or sec btfsc fsr,4 ; fsr bit 4 = 1 if hours addressed return ; yes, exit incf fsr ; increment pointer for mins or hours goto tm_loop ; check data again end Regards Tony Just when I thought I knew it all, I learned that I didn't.