         Serial port RS232


         Initialize Serial Port Parameters via BIOS

         INT 14H
           AH=$00
           AL=Init parameter,see below
           DX=Serial port number


         Bit 7 6 5 4 3 2 1 0
             x x x             Baud-rate code
                   x x         Parity code
                       x       Stop-bit code
                         x x   Character-size code

         Baud-rate                       Parity
         Bit 7 6 5  Value   BPS          Bit 4 3  Value  Meaning
             0 0 0    0     110              0 0    0    None
             0 0 1    1     150              0 1    1    Odd parity
             0 1 0    2     300              1 0    2    None
             0 1 1    3     600              1 1    3    Even parity
             1 0 0    4    1200
             1 0 1    5    2400
             1 1 0    6    4800
             1 1 1    7    9600

         Stop-bits                       Character-size
         Bit 2  Value  Meaning           Bit 1 0  Value  Meaning
             0    0    One                   0 0    0    5-bits
             1    1    1.5 if char           0 1    1    6-bits
                       size=5 bits           1 0    2    7-bits
             1    1    Two                   1 1    3    8-bits


         Connections

         RS232 25-pin

          1  GND       Protective ground
          2  Sout      Transmitted data
          3  Sin       Received data
          4  RTS       Request to send
          5  CTS       Clear to send
          6  DSR       Data set ready
          7  GND       Signal ground
          8  DCD       Carrier detect

          9 - 19 Not used

         20  DTR       Data terminal ready

         21 - 25 not used


         RS232 25-pin to 9-pin

         9-pin  25-pin

          1 ----- 8
          2 ----- 3
          3 ----- 2
          4 ----- 20
          5 ----- 7
          6 ----- 6
          7 ----- 4
          8 ----- 5
          9 ----- 22
                - 1
                - Ground (metal chassi)



         Zero-modem


         9-pin                   9-pin

         1-4-6 connected         1-4-6 connected
         7-8 connected           7-8 connected
         2                       3
         3                       2
         5                       5


         Meaning only a 3-wire connection between computers

         Port addresses

         COM1=$3F0
         COM2=$2F0
         COM3=$3E8
         COM4=$2E8
