Try changing
call readADC
call spin
to
GOSUB readADC
GOSUB spin
From the manual:
CALL
CALL LabelExecute the assembly language subroutine named Label.
GOSUB is normally used to execute a PICBASIC PRO™ subroutine. The main difference between GOSUB and CALL is that with CALL, Label=s existence is not checked until assembly time. Using CALL, a Label in an assembly language section can be accessed that is otherwise inaccessible to PBP.
See the section on assembly language programming for more information on CALL.
CALL pass ' Execute assembly language subroutine named _pass





Bookmarks