Examples - IBM AT 5170 Technical Reference

Table of Contents

Advertisement

Treat words as words, not bytes. Remember that data is
stored in memory using the Intel format (word 424B is
stored as 4B42).
Interrupt Chaining Structure
ENTRY, JMP
SHORT PAST
,
Jump around structure
FPTR
DD
0
,
Forward Pointer
SIGNATURE
DW
q2qBH
,
Used when unlinking to identify
,
compatible interrupt handlers
FLAGS
DB
,
Flags
FIRST
EQU
BOH
,
Flag for being first in chain
JMP
SHORT
RESET
RES BYTES
DB
DUP
7
(0 )
,
Future expansion
-
PAST,
,
Actual start of code
The interrupt chaining structure is a 16-byte format containing
FPTR, SIGNATURE, and RES
BYTES.
It
begins at the third
byte from the interrupt handler'sentry point. The first
instruction of every handler is a short jump around the structure
to the start of the routine. Since the position of each interrupt
handler's chaining structure is known (except for the handlers on
adapter ROS), the FPTRs can be updated when unlinking.
~
The FIRST flag is used to determine the handler's position in the
chain when unlinking when sharing interrupts 7 and 15. The
RESET routine, an entry point for the operating system, must
disable the adapter's interrupt and RETURN FAR to the
operating system.
Note:
All handlers designed for interrupt sharing must use
424B as the signature to avoid corrupting the chain.
Examples
In the following examples, notice that interrupts are disabled
before control is passed to the next handler on the chain. The
next handler receives control as if a hardware interrupt had
caused it to receive control. Also, notice that the interrupts are
.~
disabled before the non-specific EOI is issued, and not reenabled
in the interrupt handler. This ensures that the IRET is executed
(at which point the flags are restored and the interrupts
1-18 System Board

Advertisement

Table of Contents
loading

Table of Contents