Hello Peu,

Peu>>TRISIO=%1 'Pic 12F675<

TRISIO is your input output switch.

I did not go through all of your code, but this put a flag up to me.

TRISIO=%XXXXXXX is a binary representation of the switches.
I question the usagle of just TRISIO=%1

You are using GPIO.0 as your input, thus I would assign TRISIO one of the following:

TRISIO=%00000001
or
TRISIO=1

Notice I did not put the % in front of the second one.
Because 1 = %00000001

I am not saying this is your entire problem. But you may want to check it out.

Dwayne