Signalling - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

I/O Handling
151
The {select code} specified in an ON INT statement restricts the branching action to occurring
only when the assembly language triggers the ON INT condition for that select code. The
interrupt may have occurred in actuality on another select code. This can be a way of allowing
more than one branch for interrupts from a single interrupting device.
As an example -
leg ON INT#3 GOSUB
Print result
Should anywhere in the program an interrupt occur, causing an assembly language interrupt
service routine to be executed, that assembly language ISH has the capability to cause either
the branch of line 100 or the branch of line 110 to be taken. Thus, an assembly language ISH
signals BASIC either to print an intermediate result or to note that all data has been processed.
Signalling
The {select code} specified in an ON INT statement restricts the branching action to occurring
only when an interrupt is "signalled" for that select code. In actuality, an interrupt may not
have occurred on that select code at all. Conversely, an interrupt may occur on the select code,
but BASIC and its ON INT condition.may never hear about it. It is necessary for the ISH which
..
.'
does the actual handling of an interrppt to inform, or "signal", the operating system that the
interrupt occurred and trigger the c)N INT conditions which may be set up at the time.
The responsibility of the ISR to signal the ON INT is also an opportunity. This signalling allows
you in an ISR to decide whether or not you want BASIC to know about the interrupt. If you do
not want BASIC to know, simply do not signal the condition. The signalling also allows you to
signal different interrupt conditions. An example of doing this might be a case where, after an
interrupt, a peripheral indicates whether it wants to input or output data. Your routine could
signal one select code to execute at) input routine and signal another select code to execute an
output routine.
To signal an ON INT, your ISH must execute the following instructions-
.... ·;.·"1:.··.· ... ·[
... 1
1
::!:;':::E.;

Advertisement

Table of Contents
loading

Table of Contents