I/O Handling 155 Environmental Considerations Changes in program environment, i.e., calling a subprogram or returning from one, can affect whether an ON INT is in effect or not. Once executed, the CALL version of an ON INT is always in effect, whether in the main program or in any subprogram, until it is redefined by another ON INT or is specifically disabled (see below). In the GOSUB or GOTO versions, the statement is in effect only in the same program environ- ment. This is to say that if you have executed an ON INT statement in your main program, then it is effective only while your program is executing part of the main program.
The instant the program goes into a subprogram (through a CALL statement), the statement is no longer a subprogram, it is effective only while the program is executing that subprogram. effective until the execution returns to the main program. Similarly, if you define an ON INT in A side-effect occurs here when you use the CALL version of an ON INT. By calling the subprogram with an ON INT, you have the effect of locking out the other interrupts, except those which are executed in the subprogram itself and other CALL versions. This is regardless of priority.
In the priority exampl~ in the previous section, if the ON INT#5 had been a CALL instead of a GOSUB, then the second interrupt from select code,. 7 would not have been acknowledged until the subprogram had finished. subprogram may be stacked up because an interrupt from a different select code with a CALL Since recursive calls of subprograms are possible, it is also possible that many calls to the same version of an ON INT in effect may be received while processing the CALL caused by a previous interrupt.