Is your MCU even running? Lets take a step back. Can you put your MCU on a breadboard, connect an LED anywhere on port D (anode to pin) with a 180 Ohm resistor, hook up a 4-10MHz crystal with the appropriate capacitors, connect your 5V.
Over to MPLAB. Go over to Configure>select device and select your pic. Then Configure>Config bits and make sure your oscillator is set to XT, the watchdog timer disabled, power up timer On, MCLR pin internal, code protect off, data protect off, BOD all disabled, last two disabled.
Now try this:
#include <p16f917.h>
void main(void)
{
LATD = 0xFF;
TRISD = 0x00;
while(1){;}
}
This will just turn on the LED but it will mean you MCU is working and executes instructions. I have to say that this is an example for C18, I have not used HI-TECH C for way too long. If it does not compile, try to get it to compile and check for functionality.
If you reach a dead-end ping us back. I will setup HT C here, I think I have the DOS version