Код: Выделить всё
;******************************************************************************************
;****** РАБОЧАЯ ЧАСТЬ *********************************************************************
;****** Сканирование кнопок ***************************************************************
wait
btfsc GPIO,3
goto nextchk ;кн. вперёд не нажата
wait1
btfss GPIO,5
goto goforward
btfsc GPIO,3
goto goforward
goto wait1
nextchk
btfsc GPIO,5
goto wait
wait2
btfss GPIO,3
goto gobackward
btfss GPIO,5
goto wait2
call Backward
goto wait
goforward
call Forward
goto wait
gobackward
call Backward
goto nextchk
;******************************************************************************************