O.K. LOW and HIGH function set the i/o of the PIC as output.
When you apply the power to the PIC, the POR(Power on Default) value set the i/o as input. You need to set it by writing to the TRISB register (se datasheet for that). Once the i/o is properly set as output you can write it as you did.
TRISB=0
PORTB.0=0
should work. TRISx is placed at the top of your code. You can Even use the OUTPUT directive wich do almost the same thing.
hth
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks