> I have a simple 16F84 LED flasher that is starting up weird. All your problems seem to be due to register bank confusion. In particular, your InitPorts and InitTimers routines both leave bank 1 selected, so your main loop: MAIN: NOP NOP NOP NOP movf counter, W ; Output 'counter' to port B. movwf PORTB GOTO MAIN is not doing at all what you think it is. That reference to 'counter' is picking the right value only by accident (it's at an address that's shared between the two banks), and you're actually storing it into the TRISB register (in bank 1 at the same address as PORTB in bank 0). In other words, instead of switching between low and high levels at your outputs, you're switching between the random initial state of the PORTB latch and a high impedance input state. You might think that you're clearing PORTB, so there wouldn't be any randomness to the behavior: InitPorts: bsf STATUS, RP0 ; Select Bank 1. clrf PORTB ; All outputs low. movlw B'00000000' ; Set Port B is all outputs. movwf TRISB ; but that's not so: the references to PORTB and TRISB (same address, different banks) are both setting TRISB, since bank 1 is selected during both references. It appears that the PIC assembers' handling of register banks simply sucks - the problems you're having (but not every such problem) could have easily been detected by a simple data flow analysis pass in the assembler. Until such time as somebody writes an assembler that works right, you'll just have to be more careful about register banks - check EVERY register access, and make sure that the bank select bits are set appropriately (unless you're using register that's duplicated across all banks). This brings up another problem I think your code has - you need to move the definition of status_temp up a little bit, so that it's in one of the register addresses that is duplicated between banks, OR you need to move that "bcf STATUS,RP0" (4th line of INT_SERV) up one line. As it is, status_temp may be written to and read from different places, causing unexpected changes to the STATUS register in your main program every time an interrupt occurs. Jason Harper