There will be bounce on the switches , hmm , you can use interrupts. If a switch is switched the program will stop from working ( execute his last instruction) and go to an interrupt vector , here you can wait the debounce time and check witch switch was pressed , after that you can go to the routine that handles that switch.
For the debounce time you can use a self made delay or use a timer. I think after 500 ms you'll get the correct data , the final state.
I dont know how you would check the state of the switches if you wouldnt use interrupts hmm ...
btfss portX,pinX ?
goto testAnotherPin
goto pressed
If there is bounce on the you won't get the correct data.
You can use use the "intterrupt on change PORT A/B" function , this will notice if a state of an input has changed. I think these are 4 inputs and if 1 changes a flag will be set.
Well I'm not the best person to ask, I'm not that skilled in micro controllers , It's maybe better to open a new thread and ask that question again?
Bye