You're code is very close to working, you need a config line and I changed the INTCON bits just in case.
try,
Code:
list p=16F877A
#include <p16F877A.inc>
__config _XT_OSC & _PWRTE_OFF & _WDT_OFF &_LVP_OFF
org 0x00
goto Main
org 0x04
goto T0_INT
Main
bsf STATUS,RP0 ;switch 2 bank1
clrf TRISB
movlw b'00000111'
movwf OPTION_REG
bcf STATUS,RP0 ;switch 2 bank0
movlw 0xe8
movwf TMR0
bsf INTCON,T0IE ;enable timer interrupt
bsf INTCON,GIE
clrf PORTB ;clear PORTB
goto $
;interrupt subroutine
T0_INT
clrf INTCON,T0IF ;clear int flag
movlw 0xe8
movwf TMR0
comf PORTB,f
retfie
end
Mike.