Thanks again for all of you that
responed with tips. I was using the 16f84 on a breadboard and I was trying
to conserve space. The problem was I was using only one 10k resistor as a
pullup for MCLR, unused porta inputs, and unused portb outputs. I
corrected the problem by adding two more resistors so that MCLR, porta, and
portb would have their own resistor. The code that I wrote works
fine.