Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Service 00H (decimal 0) sets the various RS-232 parameters and initializes
  the serial port. It sets four parameters: the baud rate, the parity, the
  number of stop bits, and the character size (also called the word length).
  The parameters are combined into one 8-bit code, which is placed in the AL
  register with the format shown in Figure 12-2. The bit settings for each
  code are shown in Figure 12-3. When the service is finished, the
  communication port status is reported in AX, just as it is for service
  03H. (See service 03H for the details.)

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

  Figure 12-2.  The bit order of the serial port parameters passed in
  register AL to service 00H.

  --------------------------------------------------------------------------
  NOTE:
    Although it is painfully slow, 300 baud used to be the most commonly
    used baud rate for personal computers using modems. A rate of 1200 baud
    is now the most common, particularly for serious applications that
    require faster transmission, but widespread use of at least 2400 baud
    communications is inevitable.
  --------------------------------------------------------------------------

                           BAUD RATE
   Bit
  7 6 5                    Value                   Bits per Second
  --------------------------------------------------------------------------
  0 0 0                    0                        110
  0 0 1                    1                        150
  0 1 0                    2                        300
  0 1 1                    3                        600
  1 0 0                    4                       1200
  1 0 1                    5                       2400
  1 1 0                    6                       4800
  1 1 1                    7                       9600
  --------------------------------------------------------------------------

                           STOP BITS
  Bit                      Value                   Meaning
  2
  --------------------------------------------------------------------------
  0                        0                       One
  1                        1                       Two
  --------------------------------------------------------------------------

                           PARITY
  Bit                      Value                   Meaning
  4 3
  --------------------------------------------------------------------------
  0 0                      0                       None
  0 1                      1                       Odd parity
  1 0                      2                       None
  1 1                      3                       Even parity
  --------------------------------------------------------------------------

                           CHARACTER SIZE
  Bit                      Value                   Meaning
  1 0
  --------------------------------------------------------------------------
  0 0                      0                       Not used
  0 1                      1                       Not used
  1 0                      2                       7-bit
There are only 128 standard ASCII characters, so they can be
transmitted as 7-bit characters, rather than 8-bit characters.

  1 1                      3                       8-bit
  --------------------------------------------------------------------------

  Figure 12-3.  The bit settings for the four serial port parameters for
  service 00H.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson