I'm using DT-Ints and the interrupt is working ok. I am sending counter results from a rotary encoder to a debug port. That is working too, but I'm trying to put a bottom limit of $00 and a top limit of $48 on the counter, and exit the interrupt handler. Can someone tell me why this doesn't work? It blows right by the IF..THENs and sends bad values out the debug port? Are GOTOs not allowed?
Code:R_ENCODER: IF DIR=1 THEN X=X+1 ENDIF IF DIR=0 THEN X=X-1 ENDIF IF X<$00 THEN X=$00 GOTO ENDINT ENDIF IF X>$48 THEN X=$48 GOTO ENDINT ENDIF DEBUG $82 DEBUGIN [WAIT(ACK)] DEBUG $F5 DEBUGIN [WAIT(ACK)] DEBUG X DEBUGIN [WAIT(ACK)] ENDINT: @ INT_RETURN




Bookmarks