Thanks for the help but no joy. I already knew about the port 'a' comparator story.. hence lines 4&5 of my code

movlw 7
movwf CMCON

I understand that as having the same effect as CMCON=7 (I even tried changing a couple of nights ago just to check). As long as only one port needs to be high there is no problem it is only when two or more want to be high simultaneously??? I am really frustrated as this was for a birthday present which is kind of due tomorrow??