Basic PIC circuit is not working
As it's impossible to put code in comments, I'll put my suggestion for code that sets the Config bits correctly here. The issue is I don't have this compiler so I cannot be certain of the names (LVPDIS as opposed to, say, LVP_OFF in assembly) but if I'm wrong, someone could comment(?)

#include &lt;htc.h&gt;

#define _XTAL_FREQ 8000000

__CONFIG(UNPROTECT &amp; PWRTDIS &amp; WDTDIS &amp; HS &amp; LVPDIS);

int main()
{
    TRISB0 = 0;
    RB0 = 1;
    while(1);
}