On itr – Remote Processing CAMBASIC User Manual
Page 121
Comm ands - 88
ON ITR
Tasking Statement
SYNTAX:
ON ITR n GOS UB line/label
ON ITR n G O S U B
PURPOSE:
To enab le or disable a progr am br anch due to a n hardw are inter rupt.
REMARK S:
Check your har dware ma nual to determine if this statement is active for your card. It is not active
for the RPC-2300 or RPC-150.
n = 0 or 1. These co rres pond to IT R 0 and IT R 1 as descr ibed in the har dwar e manua l.
The ON ITR statement traps a hardware interrupt so software can service it. When a hardware
interrupt occurs, it sets an internal flag and that. interrupt is disabled. If an appropriate ON ITR has
been declared, a program branch will occur.
Hardware interrupts will remain disabled until a corresponding RETURN ITR statement has been
executed. If the subroutine ends with just a RETURN, the interrupt remains disabled. You can
cancel an ON ITR at any time by executing the statement without a line number.
NOTE: Not all hardware pr oducts implement a hardware interr upt. See your C PU car d user’s
manua l.
RELATED:
RETURN ITR
EXAMPLE:
10 ON ITR 0 GOSUB..clock
20 .
30 .
40 .
50 ..clock
60 BIT 1,1,OFF
'turn whatever off
70 RETURN ITR 0
ERRORS:
< Can’t compile> – if line/label does not exist
< Command not available> – if not implemented on your card
< Data out of range> - when n is not 0 or 1