I have these in my bios.h - look around for similar in your compiler
Code:
int bioscom(int _cmd, char _data, int _port);
#define _COM_INIT 0 /* Init serial port. */
#define _COM_SEND 1 /* Send character. */
#define _COM_RECEIVE 2 /* Receive character. */
#define _COM_STATUS 3 /* Get serial port status. */
#define _COM_CHR7 2 /* 7 bits characters. */
#define _COM_CHR8 3 /* 8 bits characters. */
#define _COM_STOP1 0 /* 1 stop bit. */
#define _COM_STOP2 4 /* 2 stop bits. */
#define _COM_NOPARITY 0 /* No parity. */
#define _COM_ODDPARITY 8 /* Odd parity. */
#define _COM_SPACEPARITY 16 /* Space parity. */
#define _COM_EVENPARITY 24 /* Even parity. */
#define _COM_110 0 /* 110 baud. */
#define _COM_150 32 /* 150 baud. */
#define _COM_300 64 /* 300 baud. */
#define _COM_600 96 /* 600 baud. */
#define _COM_1200 128 /* 1200 baud. */
#define _COM_2400 160 /* 2400 baud. */
#define _COM_4800 192 /* 4800 baud. */
#define _COM_9600 224 /* 9600 baud. */
int port = 2;
int ch = 'A';
bioscom( _COM_INIT, 0, port );
bioscom( _COM_SEND, ch, port );
ch = bioscom( _COM_RECEIVE, 0, port );