temp = inportb(ba9);
/* See if any bit set, if so return the bit number */
if(temp !=0)
{
for(x=0; x <=7; x++)
{
if(temp & (1 << x))
{
outportb(ba7,0);
/* Turn off access */
return(x+9);
/* Return bitnumber with active
int */
}
}
}
/* Lastly, read status of port 2 int id */
temp = inportb(ba0x0a);
/* Read port 2 status */
/* If any pending, return the appropriate bit number */
if(temp !=0)
{
for(x=0; x <=7; x++)
{
if(temp & (1 << x))
{
outportb(ba7,0);
/* Turn off access */
return(x+17);
/* Return bitnumber with active
int */
}
}
}
/* We should never get here unless the hardware is misbehaving but just
to be sure. We'll turn the page access back to 0 and return a 0 for
no interrupt found.
*/
outportb(ba7,0);
return 0;
}
Summary of Contents for EBC-LP
Page 68: ...APPENDIX C Mechanical Drawing...
Page 69: ......
Page 70: ......
Page 71: ...APPENDIX D WS16C48 I O Routines and Sample Program Listings...