home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
drdobbs
/
1991
/
10
/
embedcp
/
lib
/
setvect.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-30
|
435b
|
21 lines
/* Set interrupt vector
* --------------------
*
* Written: March 23th, 1991
* By : Stuart G. Phillips
*
* Utility procedure for setting interrupt vectors on MIO
*
*/
#include "mio.h"
void setvect(int interruptno, void interrupt (*isr)())
{
unsigned short *ivec = (unsigned short *)(interruptno * 4);
ivec[0] = (unsigned short)((long)isr & 0xffff);
ivec[1] = (unsigned short)((long)isr >> 16);
}