Hi again
As promised here is my code. I put it here in the hope that it may save someone from hours of googling and may send them in the right direction. The code is nothing special but hopefully it will help someone get started. Basically all it does is send a chaaracter, wait and read a response.
#include <dos.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#define PORT1 0x2E8 //Com4 base address
void main(void)
{
int c;
int i, j=0, init;
char Command = 'H';
char ch;
outp(PORT1 + 1, 0); //Configure the serial port 9600 baud
outp(PORT1 + 3, 0x80);
outp(PORT1 + 0, 0x0C);
outp(PORT1 + 1, 0x00);
outp(PORT1 + 3, 0x03);
outp(PORT1 + 2, 0xC7);
outp(PORT1 + 4, 0x0B);
outp(PORT1, Command); //Send a character to the port
delay(5000); //Delay to allow for response
c=inp(PORT1 + 5); //Check t see if anything has arrived
if (c & 1)
{
ch=inp(PORT1); //Read in the character and print it
printf("%c", ch);
}
}