一
ISR(interrupt service routine)是處理IRQs(interrupt request line)的程序
X
ULONG PeRPISR(void)
{
ULONG ulRet = SYSINTR_NOP; ///返回值
UCHAR ucCurrentInterrupt; ///當前中斷號
if (fIntrTime) ////// fIntrTime 用於測試SR和IST的延時時間
ucCurrentInterrupt = PICGetCurrentInterrupt(); ////返回當前中斷IRQ
if (ucCurrentInterrupt == INTR_TIMER
if (dwRebootAddress) ////是否需要重啟動
RebootHandler();
if(ucCurrentInterrupt == INTR_RTC) ////IRQ
else if (ucCurrentInterrupt <= INTR_MAXIMUM) ///如果中斷小於 INTR_MAXIMUM
{
ulRet = NKCallIntChain(ucCurrentInterrupt); ////調用中斷鏈
if (ulRet == SYSINTR_CHAIN) ///如果中斷鏈未包含中斷
ulRet = OEMTranslateIrq(ucCurrentInterrupt); ////在IRQ 和SYSINTR之間轉換
PICEnableInterrupt(ucCurrentInterrupt
} ///else if
OEMIndicateIntSource(ulRet); ///通知內核已經發生SYSINTR中斷
}
[
From:http://tw.wingwit.com/Article/program/SQL/201311/16412.html