Egy pelda a Hardware Help programbol, persze angolul:
INT 14H: Serial Port I/O
These functions provide access to the two RS-232 ports supported by BIOS.
The base address of each of up to 4 serial ports is stored starting at
0:0400, but the POST tests for and initializes only the first two serial
ports.
See Asynchronous Adapter Ports for a description of the hardware interface.
AH Service
00H initialize communications port
Input: DX = port number (0-1)
AL = initialization parameter bit flags:
100=1200
001=150; 101=2400
010=300; 110=4800
011=600; 111=9600
Output: AH = comm status (see below)
01H send a character out the selected RS-232 port
Input: DX = port number (0-1)
AL = character to send
Output: AL is preserved.
If bit 7 of AH is set, an error occurred and
AH (bits 6-0) = comm line status (see AH below)
02H receive a character from the selected RS-232 port
Input: DX = port number (0-1)
Output: AL is character received
AH is non-zero if an error occurred
|