Intel 386 User Manual

Page 240

Advertising
background image

9-41

INTERRUPT CONTROL UNIT

Poll_Command:

Description:

This routine issues a poll command which reads the poll status byte

of the ICU.

Parameters:

Master_or_Slave

Specifies which interrupt controller is polled

Returns:

Current value of poll status byte

Assumptions:

None

Syntax:

in poll_status;

poll_status = Poll_Command();

Real/Protected Mode:

No changes required.

******************************************************************************/

int Poll_Command( int Master_or_Slave)

{

int poll_status;

if (Master_or_Slave == Master) {

_SetEXRegByte(OCW3M, 0x0c); //Initiate polling sequence

poll_status = _GetEXRegByte(ICW2M);

}

else {

_SetEXRegByte(OCW3S, 0x0c); //Initiate polling sequence

poll_status = _GetEXRegByte(ICW2S);

}

return(poll_status);

} /* Poll_Command */

Advertising