> > Loop > MOVF PORTB,w ; Read Portb into w register > MOVWF PORTA ; Move W into Porta > BTFSC W,7 ; If bit 7 is set goto Chase > CALL Chase > CALL Loop <<<<<<< I think someone mentioned that the above will cause a stack overflow. The section below probbaly won't execute as you want. >From within 'Loop' an instruction called Chase. >From within 'Chase' you GOTO Inttmr. The return at the end of Inttmr will fall back to the instruction following 'call Chase' Try 'CALL Inttmr' > > Chase > Goto Inttmr ; Initialise timer > BTFSS PORTB,7 <<<<<<<<<<<<<<<<<<<<<<<<<<<< THIS CODE WON'T EXECUTE > CALL Loop > BTFSS INTCON,2 ; If timer has overflowed than skip next > CALL Chase > GOTO Step > > ;-------------------------------------------------------------------------- > > Inttmr > BCF STATUS,RP0 > CLRF TMR0 ; Clear timer > BCF INTCON,INTF ; Clears the interupt if set > BSF STATUS,RP0 > movlw B'00000111' ; Set prescaler to 255 > movwf OPTION_REG ; Option reg > BCF STATUS,RP0 > RETURN > -- Best regards Tony http://www.picnpoke.com Email sales@picnpoke.com