Hi camerart,
add cmcon = 7 into the top area of your code. Should be all you need to change as the 16F648 has analog comparators and the 16F84 does not. (working' from memory here)