IBM AT 5170 Technical Reference page 35

Table of Contents

Advertisement

reenabled) before another interrupt is serviced, protecting the
stack from excessive build up.
Example of an Interrupt Handler
~
~
YOUR_CARD
ISB
REARM
SPC EOI
-
EOI
OCR
IMR
MYCSEG
ENTRY
FFTR
SIGNATURE
FLAGS
FIRST
JMP
RES
BYTES
-
PAST:
SERVICE:
EXIT:
RESET:
ENTRY
EQU
EQU
EQU
EQU
EQU
EQU
EQU
SEGMENT
ASSUME
PRoe
JMP
DD
DW
DB
EQU
SHORT
DB
STI
PUSH
MOV
IN
TEST
JNZ
TEST
JNZ
POP
CLI
JMP
CLI
MOV
OUT
MOV
OUT
POP
IRET
RET
ENDP
MYCSEG
END
2F7H
67H
20H
20H
21H
PARA
CS:HYCSEG,DS:DSEG
FAR
SHORT
PAST
424BH
80H
RESET
DUP
(0 )
DX,YOUR_CARD
AL,DX
AL,ISB
SERVICE
CS,FLAGS.FIRST
EXIT
DWORD PTR CS:FPTR
AL,EOI
aeR,AL
OX,REARM
DX.AL
ENDS
ENTRY
Location of your card's interrupt
control/status register
Interrupt bit in your card's interrupt
control status register
Global Rearm location for interrupt
level 7
Specific EOI for 8259'5 interrupt
level 7
Non-specific EOI
Location of 8259 operational control
register
Location of 8259 interrupt mask
register
Entry point of handler
Forward Pointer
Used when unlinking to identify
compatible interrupt handlers
Flags
Future expansion
Actual start of handler code
Save needed registers
Select your status register
Read the status register
Your card caused the interrupt?
Yes, branch to service logic
Are we the first ones in?
If yes, branch for EOI and Rearm
Restore registers
Disable interrupts
Pass control to next guy on chain
Service the interrupt
Disable the interrupts
Issue non-specific EOI to 8259
Rearm the cards
Restore registers
Disable your card
Return FAR to operating system
System Board
1-19

Advertisement

Table of Contents
loading

Table of Contents