Intel 386 User Manual page 238

Embedded microprocessor
Table of Contents

Advertisement

Returns:Error Code
E_INVALID_VECTOR
E_BADVECTOR
E_OK
Assumptions:
Compiler supports far and interrupt keywords
ICU must be configured before this function is call for it to
operate properly
_IRQ_SlaveBase_,_IRQ_MstrBase_,_CascadeBits_ are set before function
is called. These are initialized in the InitICU functions supplied
in this source.
Syntax:
int error_code;
error_code = SetIRQVector(wdtISR,
Real/Protected Mode
No changes required.
dependant (separate source)
*****************************************************************************/
int SetIRQVector( void (far interrupt *IntrProc)(void), int IRQ, int IntrType)
{
int Vector;
if(IRQ > 15) return E_INVALID_VECTOR;
if(IRQ > 7)
Vector = _IRQ_SlaveBase_ + IRQ - 8;
else
{
if((1 << IRQ) & _CascadeBits_) return E_BADVECTOR;
Vector = _IRQ_MstrBase_ + IRQ;
}
SetInterruptVector(IntrProc, Vector, IntrType);
supports INTERRUPT_ISR (parameter is ignored).
Protected mode supports both.
-- An IRQ of greater than 15 was passed
-- IRQ is used for cascading to a slave interrupt
controller
-- Initialized OK, No error.
15,
// Slave IR#'s are offset by 8 in
// Vector Table
INTERRUPT_ISR);
Uses SetInterruptVector which is mode
// Get Vector from Slave
// From Master
INTERRUPT CONTROL UNIT
9-39

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Intel386 exIntel386 extbIntel386 extc

Table of Contents