And again, add this to the source code you posted (after it's init label) :
Code:
movlw 0x07
movwf CMCON
Research and development is over! def works with 16F628/A.
Don't know how you're going to get on when you come to actually having to do some.
Quite a task, especially from memory
Yes, adding two instructions of spoon fed code is much more difficult
than porting an entire program from a low level language to a high level one!