I will try to attach my code. I have been playing around with the configuration bits, but have still not found a way of making the simulator recognize RA5. It seems to remain as a zero irrespective of whether I include a '1'. The inputs are active low to satisfy the outputs from an RF600D decoder.
The only place where PORTA inputs appear are in 'getinput'. The condition of the input is transferred to 'button', and I think everything after this works. I suspect that the critical parts are the configuration and initialization.
I have renewed the attachment with changes as indicated in a later reply. There were a couple of errors, apart from the problem of RA5.