Some comments in your code would be very helpful.
Otherwise anyone looking at this
#define p1 0b10001000
#define p2 0b10101010
Has to go and refer to the datasheet to figure out what the hell you are trying to do.
p2 is written to INTCON, so you are setting:
GIE, TMR0IE, RBIE, and INT0IF
Never, ever enable an interrupt that your ISR does not handle. That will make your code crash, continually running only the ISR whenver that interrupt request flag gets set.
Please explain what you expect this code to do.
It appears to me, when the RB0 pin is held low, it will very rapidly write to T0CON and INTCON over and over.
(I have no idea why you are setting RBIE or INT0IF.)
When RB0 is high, it rapidly clears all of the LATD port over and over.
So, if you pull RB0 low, and hold it low, after 30 timer rollovers, it will raise the RD0-RD3 pins, so long as RB0 is still low.
(If RB0 is high, they would be set very very briefly, but immediately get cleared by your non interrupt code)
void interrupt f1()
void interrupt f1(void)