home *** CD-ROM | disk | FTP | other *** search
-
-
-
- +--------------------+
- | INT 14 H Extension |
- +--------------------+
-
-
-
- CDRV.COM is a "Terminate and Stay Resident" program. It provides
- several new functions for INT 14H.
-
- These functions use the same parameters as the usual BIOS ones :
- the function number is to be placed in AH, the COM port number
- (0 to 7) is to be placed in DX, whenever required.
-
- To install CDRV.COM, just type CDRV [Enter] at the DOS prompt,
- or insert this command into the AUTOEXEC.BAT file.
-
- The functions then available are :
-
-
- =======
- AH = 0 Init port using AL (same as BIOS)
- =======
- AL bit meaning is :
-
- +---+---+---+
- | 7 | 6 | 5 |
- +---+---+---+
- | | |
- 0 0 0 for 110 bps,
- 0 0 1 for 150 bps,
- 0 1 0 for 300 bps,
- 0 1 1 for 600 bps,
- 1 0 0 for 1200 bps,
- 1 0 1 for 2400 bps,
- 1 1 0 for 4800 bps,
- 1 1 1 for 9600 bps.
-
- +---+---+
- | 4 | 3 |
- +---+---+
- | |
- 0 0 for No Parity,
- 0 1 for Odd Parity,
- 1 1 for Even Parity.
-
- +---+
- | 2 |
- +---+
- |
- 0 for 1 stop bit,
- 1 for 2 stop bits.
-
- +---+---+
- | 1 | 0 |
- +---+---+
- | |
- 1 0 for 7 data bits,
- 1 1 for 8 data bits.
-
- Upon exit AH = LSR and AL = MSR (see function 3).
-
-
- =======
- AH = 1 Send character in AL (same as BIOS)
- =======
- Upon exit AH = LSR with MSB is set in case of T.O.
-
-
- =======
- AH = 2 Recv character in AL (same as BIOS)
- =======
- Upon exit AL = char and AH = LSR.
- In case of T.O., AL = MSR and AH = LSR with MSB set.
-
-
- =======
- AH = 3 Get port status (same as BIOS)
- =======
- Upon exit AH = LSR and AL = MSR. The meaning of their bits is :
-
- +---+---+---+---+---+---+---+---+
- | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for AH)
- +---+---+---+---+---+---+---+---+
- | | | | | | | |
- | | | | | | | +---> data ready (OK to read)
- | | | | | | +-------> overrun
- | | | | | +-----------> parity error
- | | | | +---------------> framing error
- | | | +-------------------> break detected
- | | +-----------------------> THRE (OK to send)
- | +---------------------------> TSRE
- +-------------------------------> always zero
-
- +---+---+---+---+---+---+---+---+
- | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for AL)
- +---+---+---+---+---+---+---+---+
- | | | | | | | |
- | | | | | | | +---> delta clear to send
- | | | | | | +-------> delta data set ready
- | | | | | +-----------> delta ring indicator
- | | | | +---------------> delta carrier detect
- | | | +-------------------> CTS
- | | +-----------------------> DSR
- | +---------------------------> RI
- +-------------------------------> CD
-
-
- =======
- AH = 4 Write AL to MCR (bit 7 = 0) or LCR (bit 7 = 1)
- =======
- +---+---+---+---+---+---+---+---+
- | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for MCR)
- +---+---+---+---+---+---+---+---+
- | | | | | | | |
- | | | | | | | +---> DTR
- | | | | | | +-------> RTS
- | | | | | +-----------> OUT1
- | | | | +---------------> OUT2 (enable IRQ)
- | | | +-------------------> enable loopback (*)
- | | +-----------------------> always zero
- | +---------------------------> always zero
- +-------------------------------> 0 to select MCR
-
- In loopback mode : TXD ---> RXD
- DTR ---> DSR
- RTS ---> CTS
- OUT1 ---> RI
- OUT2 ---> CD
-
- +---+---+---+---+---+---+---+---+
- | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | (for LCR)
- +---+---+---+---+---+---+---+---+
- | | | | | | | |
- | | | | | | 0 0 ....... 5 data bits
- | | | | | | 0 1 ....... 6 data bits
- | | | | | | 1 0 ....... 7 data bits
- | | | | | | 1 1 ....... 8 data bits
- | | | | | |
- | | | | | 0 ............... 1 stop bit
- | | | | | 1 ............... 2 stop bits
- | | | | |
- | | | | 0 ................... no parity
- | | | | 1 ................... parity
- | | | |
- | | | 0 ....................... odd parity
- | | | 1 ....................... even parity
- | | |
- | | 0 ........................... no stick parity
- | | 1 ........................... stick parity
- | |
- | 0 ............................... no break
- | 1 ............................... send break
- |
- 1 to select LCR
-
-
- =======
- AH = 5 Set baud rate according to CX (units are bits per second).
- =======
-
- =======
- AH = 6 Set SEND TIME OUT, where CX = # of clock tics.
- =======
-
- =======
- AH = 7 Set RECV TIME OUT, where CX = # of clock tics.
- =======
-
- =======
- AH = 8 Set BREAK DURATION in clock tics (CX = duration).
- =======
-
- =======
- AH = 9 Send BREAK on port DX.
- =======
-
- =======
- AH = 10 Get version number in AH (major) and AL (minor).
- =======
-
- =======
- AH = 11 Set I/O parms for asynch port (COM1: to COM8:)
- =======
- DX = COM port number (0 to 7)
- CX = I/O base address (eg 03F8H)
- AL = IRQ mask (eg 00010000B for IRQ 4)
-
-
- =======
- AH = 12 Get I/O parms for asynch port (COM1: to COM8:)
- =======
- DX = COM port number (0 to 7)
- CX and AL set upon exit (see function 11)
-
-
- =======
- AH = 13 Set IRQ mode for port number DX.
- =======
- Upon exit AX = 0 if OK, AX # 0 otherwise (*).
-
- (*) An error is returned if any com port is already IRQ driven,
- or if no IRQ line is specified for this port.
-
- =======
- AH = 14 Reset IRQ mode for current port.
- =======
-
- =======
- AH = 15 Check for char in buffer.
- =======
- CX returns # of chars in buffer, DX returns # of lost chars (if any)
- AH = number of port IRQ driven (0 for none, 1 for COM1:, etc...)
- AL holds the next char to be read from buffer (the char is not
- removed from buffer).
-
- =======
- AH = 16 Get char from ring buffer into AL.
- =======
- CX returns # of chars still waiting in buffer,
- DX returns # of lost chars (if any),
- AH returns the IRQ driven port #, MSB is set in case of T.O.
-