title: What is the value 12800 in this code to output a char to a serial port?
body: <p>This is a sample code to output a char to serial console:</p>
  
  <pre><code>#define COM1            0x3F8 // base port address
  
  #define COM_LSR         5     // In:    Line Status Register
  
  #define COM_LSR_TXRDY   0x20  //   Transmit buffer avail
  
  static void
  serial_putc(int c)
  {
      int i;
  
      for (i = 0;
           !(inb(COM1 + COM_LSR) &amp; COM_LSR_TXRDY) &amp;&amp; i &lt; 12800;
           i++)
          delay();
  
      outb(COM1 + COM_TX, c);
  }
  </code></pre>
  
  <p>The above code loops to check if serial port is available, and when it is, send a character <code>c</code>. However, why is the number <code>12800</code> chosen and not any other number?</p>