Writting WAIT (A) it expects the ascii A which is something stable.
WAIT("A")
My progaram is not working propertly but it is works.How can I do much more easier and smaller?
CMCON=7 ' disable analog comparator

use Select Case will do the job.
MyButtons=PORTA

SELECT CASE Mybutton
Case

etc