Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual
Page 95

RPBASIC-52 PROGRAMMING GUIDE
2-76
The overall speed of RPBASIC-52 slows down by about 3% w hen all ON LINE tasks are enabled.
R e v ie w HARDWAR E AND SOFTWARE INTERRU PTS in the first part of this manual for interrupt
handling and multitasking information.
RELATED none
ERRORS
BAD A RGUM ENT when number > 7 or I/O line is not between 0-7 or 100-123.
EXAMPLE
The following exam ple sets up several interrupts.
10 ON LINE 0,1,1000
20 ON LINE 5,2,2000
30 ON LINE 3,3,3000
.
.
.
1000 PRINT "In LINE 0 interrupt"
1100 RETURN
2000 PRINT "In LINE 5 interrupt."
2010 PRINT "Suspending other line interrupts."
2020 ON LINE OFF
.
.
.
2300 PRINT "Resuming line interrupts."
2310 ON LINE ON , CLEAR
2320 RETURN
3000 PRINT "In LINE 3 interrupt."
3010 RETURN
Lines 10-30 set up ON LINE interrupts for lines 1, 2, and 3. For this example, line 5 cannot be interrupted by
any other line changes. Line 2020 suspends interrupts. The program continues to process this subroutine and
lines are still checked for changes. Line 2310 resumes line interrupts but it also clears out previous changes.