The following C code fragment demonstrates this process:
outportb(BA4, inportb(BA4)|0x02);
/*Set RTS bit without altering states of other bits*/
while(data[i]); /*While there is data to send*/
{
while(!(inportb(BA5)&0x20)); /*Wait until transmitter is empty*/
outportb(BASEADDR,data[i]);
i++;
}
outportb(BA4, inportb(BA4)&0xFD);
/*Reset RTS bit without altering states of other bits*/
Caution
The OUT2 bit of the UART must be set low for proper interrupt driven communication. This bit
enables or disables the interrupts and the card will not communicate if the bit is pulled high.