I found the problem.

I had copied

@ DEVICE pic16F648A, INTRC_OSC_NOCLKOUT
@ DEVICE pic16F648A, WDT_ON
etc.

from a pic16F628A example and had forgot to change the pic to a 16F648A.