The PC supports up to four Communications Adapters, COM1-COM4, identified by DX=0, 1, 2, or 3 respectively. BIOS interrupt 14h calls with DX=0, 1, 2, or 3 and AH=0, 1, 2, or 3 may be used to initialize the adapter to the character format and the baud rate given in AL, to transmit the character in AL, to put the received character into AL, or to read the modem status into AL. In all cases, the port status is returned in AH. BIOS interrupt 14h calls with AH=4 or 5 provide extended initialization and modem port control.
BIOS call 14h with AH=0 is used to select standard character formats and baud rates by setting AL to BBBPPSLL, where:
BBB = 000, 001, 010, 011, 100, 101, 110, 111 for 110, 150, 300, 600, 1200, 2400, 4800, 9600 baud
PP = x0 for no parity, 01 for odd parity, and 11 for even parity
S = 0 for 1 stop bit, 1 for 2 (1.5 if 5 info. bits) stop bits
LL = 00 for 5, 01 for 6, 10 for 7, 11 for 8 info. bits
In addition, all interrupts from the Adapter are disabled, the port status is returned in AH and the modem status in AL, according to Table 12-3 and Table 12-4 below.
BIOS call 14h with AH=1 waits for Transmit Holding Register Empty (THRE) and transmits the character in AL; it returns with the port status (Table 12-3) in AH, with bit 7 set if a timeout occurred.
BIOS call 14h with AH=2 waits for Received Data Available (RDA) and returns with the received character in AL and the port status (Table 12-3) in AH, with bit 7 set if a timeout occurred.
BIOS call 14h with AH=3 returns the port status (Table 12-3) in AH and the modem status (Table 12-4) in AL.
BIOS call 14h with AH=4 can be used as an alternative to AH=0 to select higher baud rates or more specific serial port parity. Various settings are in BH, BL, CH, and CL.
BH = 0 for no parity, 1 for odd parity, 2 for even parity, 3 for "stick" odd parity, and 4 for "stick" even parity
BL = 0 for 1 stop bit, 1 for 2 (1.5 if 5 info. bits) stop bits
CH = 0 for 5, 1 for 6, 2 for 7, 3 for 8 info. bits
CL = 00h to 08h for 110, 150, 300, 600, 1200, 2400, 4800, 9600, and 19200 baud if ComShare is not installed. If ComShare is installed, 00h to 0Bh map to 19200, 38400, 300, 14400, 1200, 2400, 28800, 9600, 19200, 38400, 57600, and 115200 baud.
Note that the BIOS calls with AH=1 or 2 are not fast enough for sustained operation at 1200 baud or more. Note also that BIOS calls cannot be used to control or sense the modem control/device handshaking signals, or to use interrupts.