Thanks Bruce, your suggestion worked. Setting IOCA.4 = 1 enabled the change on porta interrupt to function properly. I have a switch on porta pin 4. The interrupt works for both on-switching and off-switching.

Of course, each time the interrupt is used 2 seconds is added to the clocked time because of the delay inside the handler. In the real program I don't want this happening. This interrupt will only be used once. After it occurs this interrrupt can be disabled. I then want to jump to another program loop. I'll try some experiments to see if this can be done ...