SMAC
LAC-25 Technical Reference Manual
13
2. Macro Interrupt System
The LAC-25 employs a "Macro Interrupt System" to provide additional versatility i n
programming the LAC-25. This system comprises 32 interrupt sources with corresponding vectors.
When an interrupt's source is enabled for operation and then becomes active, the current macro
being executed is saved to a so called macro stack and execution of the macro specified by that
interrupt's vector table entry begins. This happens to be similar procedure to that which the Macro
Call (MC) command follows.
2.1 The Interrupt Vector Table
The Interrupt Vector Table consists of an entry for each interrupt source and each entry will
correspond to that interrupt's level (level 0 = entry 0, level 1 = entry 1, etc.). A particular table entry
must be loaded with the number of a valid macro to be executed should that interrupt source
become active. The method for loading a vector table entry is provided by the Load Vector (LV)
command. The user must first use the Accumulator Load (AL) command to set the number of the
macro for a vector. The LV command is then used to transfer the low 8-bits of the accumulator to
the vector table entry specified by the LV command. If an interrupt is generated and that vector
table entry has not been defined (equal to 0) then the interrupt will not be executed. Note that this
implies that macro "0" cannot be used as an interrupt macro. If an interrupt is generated and it's
vector table entry has been defined but the macro it specifies has not, then an error will be
reported.
2.2 Enabling and Disabling Interrupts
Loading a vector table entry will not enable an interrupt for operation.
The Enable Vector
(EV) command must be used for this purpose. When the EV command is used, it will enable the
interrupt source (specified with the command) to function. In the event that it is necessary to
disable an interrupt source, there is a Disable Vector (DV) command that functions in a similar
manner as the EV command.
In order to prevent multiple or continuous interrupts,
as an interrupt is taken it is
automatically disabled.
This means that the user must re-enable that interrupt using the EV
command before it will occur again.