en:docs:macrolib:auxinit

This is an old revision of the document!


Table of Contents

Note: This IBM PC BIOS API call is for DOS/Win16 personality only. Use Family API for portability.

Note: osFree Macro Library provides macros for most of functions

2022/03/13 05:41 · prokushev · 0 Comments

@AuxInit

Brief

Initialize serial port

Syntax

@AuxInit port, settings

Parameters

  • port (WORD) - port number
  • settings (BYTE) - port settings

Baud rates is passed in the high order 3 bits as follows:

              000 =   110 baud
              001 =   150  ''
              010 =   300  ''
              011 =   600  ''
              100 =  1200  ''
              101 =  2400  ''
              110 =  4800  ''
              111 =  9600  ''

Bits 4-3 define parity:

              0 0       no parity
              1 0       no parity
              0 1      odd parity
              1 1     even parity

Bit 2 defines stop bits:

                0        1 stop bit;
                1        2 

Bits 1-0 character length:

                1 0        7 bits
                1 1        8 bits

Return

  • AX - port status

Bitfields for serial line status:

Bit(s) Description
7 timeout
6 transmit shift register empty
5 transmit holding register empty
4 break detected
3 framing error
2 parity error
1 overrun error
0 receive data ready

Bitfields for modem status:

Bit(s) Description
7
6
5
4
3
2
1
0