Dear Dick,

I din't connect serial mouse on Comm1 and i am connecting it in USB port.But even then i am facing such error.I am using the following code for the port initialisation at every start up.
/***************Code******************************* **************/
Code:
void ConfigurePort (void)
{
  int c;

  outportb(PORT1 + 1 , 0); 		/* Turn off interrupts - Port1 */
  oldport1isr = getvect(INTVECT); 	/* Save old Interrupt Vector for */

  setvect(INTVECT, PORT1INT); 		/* Set Interrupt Vector Entry */
  /* COM1 - 0x0C */
  /* COM2 - 0x0B */
  /* COM3 - 0x0C */
  /* COM4 - 0x0B */
  /* PORT 1 - Communication Settings */

  outportb(PORT1 + 3 , 0x80); 		/* SET DLAB ON */
  outportb(PORT1 + 0 , 0x0C); 		/* Set Baud rate - Divisor Latch Low Byte */
  /* Default 0x03 = 38,400 BPS */
  /* 0x01 = 115,200 BPS */
  /* 0x02 = 56,700 BPS */
  /* 0x06 = 19,200 BPS */
  /* 0x0C = 9,600 BPS */
  /* 0x18 = 4,800 BPS */
  /* 0x30 = 2,400 BPS */

  outportb(PORT1 + 1 , 0x00); 		 /* Set Baud rate - Divisor Latch High Byte */
  outportb(PORT1 + 3 , 0x1B);            /* 8 Bits, Even Parity, 1 Stop Bit */
  outportb(PORT1 + 2 , 0x00);            /* FIFO Control Register */
  outportb(PORT1 + 4 , 0x0B); 		 /* Turn on DTR, RTS, and OUT2 */
  outportb(0x21,(inportb(0x21) & 0xEF)); /* Set Programmable Interrupt */
  /* Controller */
  /* COM1 (IRQ4) - 0xEF */
  /* COM2 (IRQ3) - 0xF7 */
  /* COM3 (IRQ4) - 0xEF */
  /* COM4 (IRQ3) - 0xF7 */
  outportb(PORT1 + 1 , 0x01); 		/* Interrupt when data received */
}

/************************End*************************************/

Last edited by shabbir; 5Jul2008 at 20:35.. Reason: Code block