Additional Pre-Defined Symbols; Prioritizing On Int Branches - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

I/O Handling
153
Additional Pre-Defined Symbols
Isr _flag and Isr _psw are pre-defined symbols in the assembler. Also pre-defined are two other
symbols used by the assembler - End _isr _low and End _isr _high. These symbols may not be
redefined.
Prioritizing ON INT Branches
Since more than one interrupt may occur while a single BASIC statement is executing, it is
possible that by the time the line finishes there may be a number of ON INT branches waiting to
be executed. In such situations you may want to assure that some ON INT branches are taken
before others, or that you finish one routine (caused by an ON INT GOSUB or ON INT CALL)
before you start another. This can be achieved by using the {priority} option of the ON INT
statement, thereby "prioritizing" the branching caused by interrupts.!
There is a "system priority" for ordering this interrupt branching. For an ON INT to be honored
at the end of a BASIC line, its priority must be greater than the current system priority.
Initially, the system priority is set to O. When a BASIC line finishes, and there is at least one ON
INT branch pending which is greater than the system priority, then the system takes the branch
associated with the ON INTwith the greatest {priority}. The values assigned to {priority} may be
any integer numeric expression from 1 to 15.
If
{priority} is omitted,.} is assumed.
If
the ON INT branch to be executed is a GOTO, then the system priority level is unchanged.
But if the branch to be executed is a GOSUB or a CALL, then the system priority level is
changed to the priority level of the ON INT. Whenever the subroutine or subprogram is finished
executing, then the previous system priority level is restored.
Thus, with the GOSUB and CALL versions, there are two effects involving priorities -
• The subroutine or subprogram is not allowed to execute until its priority is the highest one
pending .
• Whenever the subroutine or subprogram is executing, it locks out any other interrupting
branches unless they have a higher priority.
I
1 This "prioritizing" also holds between the various types of end-of-Iine branch statements that have the priority parameter.
Thus an ON KEY with high priority is executed before an ON INT with low priority.

Advertisement

Table of Contents
loading

Table of Contents