3302C Series Mainframe Operation Manual B-9
break;
}
}
}
else
{
return(OPER_ERR);
}
return (result);
}
void pd_rem(void)
{
char ch;
outportb(ACE_INT_ENB_REG, 0xd);
/* enable ACIA interrupt register */
inportb(ACE_DATA_REG);
/* empty receive data register */
inportb(ACE_LINE_STAT_REG);
/* clear line status register */
outportb(ACE_MODEM_CTL_REG, 0xb);
/* set RTS,DTR to enable modem and
*/
/* turn on OUT2 to enable the
8250's */
/* IRQ interrupt to system
*/
}
void pd_loc(void)
{
char ch;
outportb(ACE_INT_ENB_REG, 0);
/* disable all 8250 interrupt */
outportb(ACE_MODEM_CTL_REG, 0);
/* clear RTS,DTR to disable modem
and */
/* turn off OUT2 to disable the
8250's*/
/* IRQ interrupt to system
*/
}/* Program terminated. */
C Example Program
/* Link this program with pd_rs232.obj */
#include <dos.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
main()