Scott Dattalo wrote: > Andrew Warren wrote: (and then I modified) > > [subroutine snipped] > > 19 + 3*4 = 31 points > With the added benefit that upon returning from 'TICK', the > carry flage indicates if 24 hours has rolled over. > .... > I think this works, but my brain's starting to hurt. Maybe after you > get some sleep maybe you can check it out Andy. I think I checked > all the possible combinations, but there are surprisingly quite a > few. Scott: Your version works fine... But using your ideas [duh... how come _I_ never remember the DC flag?], the code can be made shorter still: TICK: MOVLW SECONDS MOVWF FSR CALL SUB1 CALL SUB0 CALL SUB0 GOTO SUB2 SUB0: INCF FSR SKPNC SUB1: INCF INDF MOVLW 6 ADDWF INDF SKPDC SUBWF INDF MOVLW 0100H - 060H SUB2: ADDWF INDF,W SKPNC CLRF INDF RETLW 0100H - 024H As with your version, the carry flag is set if the "hours" register has rolled over. 18 instructions, so the score for this one is 4*3 + 18 = 30. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 === For PICLIST help (including "unsubscribe" instructions), === put the single word "help" in the body of a message and === send it to: listserv@mitvma.mit.edu