[1] Reads a character from the first serial port.
[2.0+] Reads a character from the standard auxiliary device. The default is the first serial port (COM1).
Call with:
AH = 03H
Returns:
AL = 8-bit input data
Notes:
In most MS-DOS systems, the serial device is unbuffered and is not interrupt-driven. If the auxiliary device sends data faster than your program can process it, characters may be lost.
At startup on the IBM PC, PC-DOS initializes the first serial port to 2400 baud, no parity, 1 stop bit, and 8 data bits. Other implementations of MS-DOS may initialize the serial device differently.
There is no way for a user program to read the status of the auxiliary device or to detect I/O errors (such as lost characters) through this function call. On the IBM PC, more precise control can be obtained by calling ROM BIOS Int 14H or by driving the communications controller directly.
If a Ctrl-C is detected at the keyboard, an Int 23H is executed.
[2.0+] You can also input from the auxiliary device by requesting a read (Int 21H Function 3FH) using the predefined handle for the standard auxiliary device (0003H) or using a handle obtained by opening the logical device AUX.
Example:
Read a character from the standard auxiliary input and store it in the variable char.
char db 0 ; input character
.
.
.
mov ah,3 ; function number
int 21h ; transfer to MS-DOS
mov char,al ; save character
.
.
.