I do not know the commands (nor where to find them) on making the ADC active on a PIC12F510.
I need to make GPIO.0 (Pin 7) an ADC input.
On the code below I found referencs to ADC and tried them. But no luck.
Here's the code so far:

'Initialize variable
#CONFIG
__config _IntRC_OSC & _WDT_ON & _MCLRE_OFF & _CP_OFF & _IOSCFS_OFF
#ENDCONFIG
DEFINE OSC 4
DEFINE ADC_BITS 10 ' 10 bit A/D Conversion
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50 ' 50 uS A/D sample time
OPTION_REG.5=0 'Set GPIO.2 to I/O

ADCON0.6 = 0
ADCON0.7 = 1
CM1CON0.3 = 0
ADCON0 = %00000001 'Set AN0 active

adval var word

low GPIO.1
low GPIO.2
low GPIO.3
low GPIO.4
low GPIO.5

mainloop:
ADCIN 0, adval
GPIO.1 = 1
GPIO.2 = 0
pause 127
GPIO.1 = 0
GPIO.2 = 1
pause 128
if adval<115 then 'if low battery
GPIO.4 = 1
endif
if adval>150 then 'if low battery
GPIO.4 = 0
endif
goto mainloop
return
end