}
/*==========================================================================
*
* GET_INT
*
* This function take no arguments.
*
* return value : The value returned is the highest level bit interrupt
* currently pending. Range is 1 to 24.
*
* This function returns the highest level interrupt pending. If no interrupt
* is pending, a zero is returned. This function does NOT clear the interrupt.
*
*===========================================================================*/
int get_int(void)
{
int temp;
int x;
/* read the master interrupt pending register, mask off undefined bits */
temp = inportb(ba6) & 0x07;
/* If there are no interrupts pending, return a 0 */
if((temp & 7) == 0)
return(0);
/* There is something pending, now we need to identify what it is */
/* Set access to page 3 for interrupt id registers */
outportb(ba7,0xc0);
/* Read interrupt ID register for port 0 */
temp = inportb(ba8);
/* 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+1);
/* Return bitnumber with active
int */
}
}
}
/* None in Port 0, read port 1 interrupt ID register */
Содержание EBC-BX
Страница 2: ...REVISION HISTORY P N 403 0307 000 ECO Number Date Code Rev Level ORIGINATED 030124 B 03 57 030923 C...
Страница 72: ...8 APPENDIX C EBC BX Parts Placement Guide Top 030923 OPERATIONS MANUAL EBC BX Page 8 1...
Страница 73: ...EBC BX Parts Placement Guide Bottom Page 8 2 OPERATIONS MANUAL EBC BX 030923...
Страница 74: ...9 APPENDIX D EBC BX Parts List...
Страница 82: ...10 APPENDIX E EBC BX Mechanical Drawing...
Страница 83: ......
Страница 84: ...11 APPENDIX F WS16C48 I O Routines and Sample Program Listings...