there is some bad advise here

lcd var LATB.4 ' Serial output to LCD ;THIS IS WRONG
btnr var PORTA.0 ' Right arrow button
btns vAR PORTA.1 ' Select button
btnu var PORTA.2 ' Up arrow button
btnl var PORTA.3 ' Left arrow button
btnd var PORTA.4 ' Down arrow button

' Variable declaration

start:

SerOut lcd,N9600,[254,1] ' Clear LCD screen
Pause 1


use of LATx ports in "highlevel" commands is incorrect and will not work as expected
lcd var PORTB.4 ' Serial output to LCD , IS CORRECT