Int 14h, 03h            Get Serial Port Status

Returns line status and modem status information for a specified
serial port.

Entry AH = 03h
DX = Serial port number (0 - COM1, 1 - COM2, etc.)

Return AX = Line and Modem status (See below)

──────────────────────────────────────────────────────────────────

Status information is returned in AX, as follows:

AH (Line status)
7 6 5 4 3 2 1 0
1 . . . . . . . Time-out error
. 1 . . . . . . Transfer shift register empty
. . 1 . . . . . Transfer holding register empty
. . . 1 . . . . Break-detect error
. . . . 1 . . . Framing error
. . . . . 1 . . Parity error
. . . . . . 1 . Overrun error
. . . . . . . 1 Data ready

AL (Modem status)
7 6 5 4 3 2 1 0
1 . . . . . . . Received line signal detect
. 1 . . . . . . Ring indicator
. . 1 . . . . . Data set ready
. . . 1 . . . . Clear to send
. . . . 1 . . . Change in receive line signal detected
. . . . . 1 . . Trailing edge ring detector
. . . . . . 1 . Change in data set ready
. . . . . . . 1 Change in clear to send

If bit 7 of the Line status byte (AH) is set, then the rest of the
bits in AH and AL are unpredictable.


Note
Early versions of the ROM-BIOS for the original PC had a
programming error that would cause "time-out" errors to be
reported as "transfer shift register empty" and "break-detect"
errors. This has been corrected in all other versions of the
ROM-BIOS.