Notifications
Clear all
Topic starter
In the manual it says that interrupts must not be called directly using GOSUB command, does that also mean the GOTO command should not be used to loop inside the interrupt?
Example:
ITR(0,16,0,1,20)
EITR(0)
ITRE
C10
'MAIN LOOP
GOTO10
END
C20
'Interrupt Loop
'DO CODE
IF B(16,0) == 1 'If the I/O pin is still high loop
GOTO20
ENDIF
RETURNI
Is the loop inside C20 okay?
Posted : 14/03/2014 7:49 pm
You could do the same with a WHILE LOOP.
Note: You may want to disable the interrupt when you enter the subroutine and re-enable it when you leave to prevent multiple calls.
C20
WHILE B(16,0)==1
'DO CODE
LOOP
RETURNI
Posted : 14/03/2014 7:59 pm