Here is how to set the variables up. The read/write part is in the manual.
Code:
TRISB = %00000000
X   VAR BYTE
X = %00000100
PORTB = X
The above will make PORTB.2 high.
Change "X" and read/write to eeprom.

Is that what you are after?