Mitsubishi Motors DS5000TK User Manual

Page 95

Advertising
background image

USER’S GUIDE

050396 94/173

95

cycle. If the interrupt acknowledge does not take place
for one of the reasons cited above, the request flag will
become subsequently inactive and the interrupt will
have been lost and will not be serviced.

When an interrupt request is acknowledged, a long call
is executed to the interrupt vector location and the
2–byte return address is pushed onto the stack. In addi-
tion, an internal flag is set which indicates to the hard-
ware the interrupt source that is being serviced. Execu-
tion then proceeds from the interrupt vector location. At
the conclusion of the interrupt service routine, an RETI
instruction should be performed to return control to the
main program. The RETI performs the same action as a
RET instruction in terms of its operation on the stack and
the Program Counter. In other words, two bytes of return
address are popped off the stack and loaded into the
Program Counter. However, the RETI performs the

additional operation of clearing the interrupt–in–service
flag to inform the hardware that a service routine is no
longer in progress. Therefore, an RETI should always
be used to terminate an interrupt service routine. Failure
to do so would indicate that the interrupt was still being
serviced.

Higher priority interrupts, which are enabled, can inter-
rupt lower priority interrupts. According to this rule, a
higher priority interrupt could become pending just prior
to machine cycle IA3 during an interrupt acknowledge of
a lower priority interrupt. This would cause the hardware
to vector to the higher priority service routine during the
two machine cycles just after the long call to the lower
priority interrupt so that no instruction within the lower
priority interrupt service routine would have been
executed.

Advertising
This manual is related to the following products: