Programming Information Interrupt 14h Functions The DOS device driver for DigiCHANNEL intelligent communications boards provides an interface for programmers via BIOS interrupt 14h. This software interface provides over 30 functions to allow programmers to read and write single characters or strings of characters, get status information, set communication parameters, control handshake lines, check interrupt status, etc. Interrupt 14h functions are invoked by placing a function number in the CPU's AH register, the number of the channel to be affected in the DX register and the parameters associated with that function in one or more of the remaining CPU registers (as specified by the particular function). After the registers are loaded, a software Interrupt 14h is generated by a issuing a special interrupt command. In C, this command is int86(0x14, ®s, ®s), where regs is a union of the CPU registers. Other languages may use different conventions, and some don't have software interrupt capability~see your programming language reference manual for the correct command syntax. Upon completion of the command, status will be returned in one or more of the CPU registers. When the DOS device driver is loaded, it takes over the interrupt 14h vector, but saves the address of any handler previously assigned to that interrupt. Thus, if an interrupt 14h request is generated for a non- DigiCHANNEL device (i.e. the DX register contains a channel number not assigned to the DigiBoard), control is transferred to the previously defined vector. This enables the DigiBoard device driver to co-exist with the standard DOS COM1/COM2 driver, as well as EBIOS drivers and others which may also use interrupt 14h. Initialize a Port ~ Function 00h This function initializes a port with the specified parameters. NOTES~ See Function 04h - Extended Port Initialization, for more options. If EBIOS support was included in the DOS device driver configuration (via the set-up program), 110 baud is replaced by 19200 baud in this function. In this case, 110 baud can still be obtained by executing Function 04h - Extended Port Initialization. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 00h Function number. AL xx Channel parameters: Bits 0, 1 = Data bits per character: 00 = 5 bits 01 = 6 bits 10 = 7 bits 11 = 8 bits Bit 2 = Stop bits: 0 = 1 stop bit 1 = 2 stop bits Bits 3, 4 = Parity: 00 = No parity 01 = Odd parity 10 = No parity 11 = Even parity Bits 5, 6, 7 = Baud rate: 000 = 110 baud (or 19200, if EBIOS is supported) 001 = 150 baud 010 = 300 baud 011 = 600 baud 100 = 1200 baud 101 = 2400 baud 110 = 4800 baud 111 = 9600 baud Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH xx Line status (See function 03h - Get Status). AL xx Modem status (See function 03h - Get Status). Output a Single Character Function 01h This function places the character in the AL register into the transmit buffer of the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 01h Function number. AL xx Character to be transmitted. Return After executing the function, the following information is returned in the CPU registers: AL xx Character transmitted. AH xx Line status: Bit 0 = Data Ready~If set to 1, there is data available in the receive buffer; if set to 0, the receive buffer is empty. Bit 5 = Transmitter Holding Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 6). Bit 6 = Transmitter Shift Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 5). Bit 7 = Timeout Error~If transmit buffer is full, the driver will try for 2 seconds to write a character before timing out. If timeout is disabled through Function 20h, only one attempt will be made before generating a timeout error. Input a Single Character Function 02h This function reads a character from the receive buffer of the selected channel. If no character is found, the function will keep trying for approximately two seconds, then return a time-out error (if timeouts are disabled through Function 20, only one attempt will be made to read a character). Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 02h Function number. Return After executing the function, the following information is returned in the CPU registers: AL xx Character received. AH xx Line status: Bit 0 = Data Ready~If set to 1, there is data available in the receive buffer; if set to 0, the receive buffer is empty. Bit 1 = Overrun Error~ If set to 1, indicates that an overrun error occurred while attempting to read the character. This would normally occur when incoming data is received while the input buffer is full. Bit 2 = Parity Error~If set to 1, indicates that the character received has a parity error. Bit 3 = Framing Error~If set to 1, indicates that the character received has a framing error. Bit 4 = Break Interrupt~Indicates that a Break occurred at this point in the input data stream. The AL register should contain a NUL (00h) character. Bit 5 = Transmitter Holding Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 6). Bit 6 = Transmitter Shift Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 5). Bit 7 = Timeout Error~If set to 1, indicates that there was no character in the input buffer. Get Status ~ Function 03h This function returns the Line Status and Modem Status of the specified channel. The status bytes are in the form of 8250/16450 UART Line Status and Modem Status registers. NOTE~This function returns the status of the channel, and not the physical communications chip (16450). Thus, in this context, ~Transmitter Holding Register Empty~ means that there is room in the board's transmit buffer for at least one more character. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 03h Function number. Return After executing the function, the following information is returned in the CPU registers: AH FFh Error. Otherwise: AH xx Line status: Bit 0 = Data Ready~If set to 1, there is data available in the receive buffer; if set to 0, the receive buffer is empty. Bit 5 = Transmitter Holding Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 6). Bit 6 = Transmitter Shift Register Empty~If set to 1, there is room for at least one more character in the transmit buffer; if set to 0, the transmit buffer is full (same as bit 5). Bits 1, 2, 3, 4 & 7~Not applicable. AL xx Modem Status: Bit 0 = Delta Clear To Send~If set to 1, indicates that CTS has changed state since the last time Modem Status was checked (by any function that provides a Modem Status byte). Bit 1 = Delta Data Set Ready~If set to 1, indicates that DSR has changed state since the last time Modem Status was checked (by any function that provides a Modem Status byte). Bit 2 = Trailing Edge Ring Indicator~If set to 1, indicates that RI (Ring Indicator has changed from an active state to an inactive state since the last time Modem Status was checked (by any function that provides a Modem Status byte). Bit 3 = Delta Data Carrier Detect~If set to 1, indicates that DCD has changed state since the last time Modem Status was checked (by any function that provides a Modem Status byte). Bit 4 = Clear To Send (CTS)~If set to 1, indicates that CTS is active. If set to 0, indicates that CTS is inactive. Bit 5 = Data Set Ready (DSR)~If set to 1, indicates that DSR is active. If set to 0, indicates that DSR is inactive. Bit 6 = Ring Indicator (RI)~If set to 1, indicates that RI is active. If set to 0, indicates that RI is inactive. Bit 7 = Data Carrier Detect (DCD)~If set to 1, indicates that DCD is active. If set to 0, indicates that DCD is inactive. Extended Port Initialization - Function 04h This function provides more initialization options than the basic initialization function (Function 00h). Baud rates of up to 57,600 are supported, and the function can be used to force a BREAK condition which can be held indefinitely. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 04h Function number. AL xx Break setting: 0 = No break 1 = Break (held until reset by executing this command with AL = 0) BH xx Parity: 0 = No parity 1 = Odd parity 2 = Even parity 3 = Stick parity odd (not supported) 4 = Stick parity even (not supported) BL xx Stop bits: 0 = 1 stop bit 1 = 2 stop bits CH xx Character length: 0 = 5 bits 1 = 6 bits 2 = 7 bits 3 = 8 bits CL xx Baud rate: 00h 110 baud 08h 19200 baud 01h 150 baud 09h 38400 baud 02h 300 baud 0Ah 57600 baud 03h 600 baud 0Dh 50 baud 04h 1200 baud 0Eh 75 baud 05h 2400 baud 0Fh 134 baud 06h 4800 baud 10h 200 baud 07h 9600 baud 11h 1800 baud Return After executing the function, the following information is returned in the CPU registers: AH FFh Error. Otherwise: AH xx Line status (see function 03h). AL xx Modem status (see function 03h). Extended Communications Port Control - Function 05h This function enables software to directly monitor and control the handshaking lines DTR (Data Terminal Ready) and RTS (Request to Send). Note~access to OUT1, OUT2 and LOOP bits is not supported. Also, RTS and DTR will not be affected if these lines are being used for hardware handshaking. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 05h Function number. AL xx 00h = Read Modem Control Register. 01h = Write Modem Control Register. BL xx If AL = 01h, and hardware handshaking is disabled: setting bit 0 of BL to 1 will raise DTR; setting bit 0 of BL to 0 will drop DTR; setting bit 1 of BL to 1 will raise RTS; setting bit 1 of BL to 0 will drop RTS. Return After executing the function, the following information is returned in the CPU registers: AH xx Line status (see function 03h). AL xx Modem status (see function 03h). BL xx Modem Control Register: Bit 0 = DTR (active if set to 1). Bit 1 = RTS (active if set to 1). Get Driver/Board Information - Function 06h This function provides information about the board and the DOS device driver. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 06h Function number. Sub-function 00h: Get port name AL 00h Sub-function number. Sub-function 01h: Get driver information AL 01h Sub-function number. Sub-function 02h: Get board information AL 02h Sub-function number. BX xxxx Board number (0-3). Sub-function FFh: Get driver name AL FFh Sub-function number. Returns After executing the function, the following information is returned in the CPU registers: Sub-function 00h: Port name: AH FFh Error indication~otherwise: AL xx Number of highest Interrupt 14h function supported. ES:BX Pointer to 8 byte ASCII string which contains the name of the port (e.g. COM5 ) if DOS support is enabled (done through the ~Options~ menu in driver set-up program). If DOS support is disabled (Int 14h support only), the string will contain ~NoDriver~. Sub-function 01h: Driver information: AH FFh Error indication~otherwise: AX xxxx Total number of channels supported. BX xxxx Driver version number (e.g. V 4.0.4: BX=0404h). CX xxxx Total number of boards supported. DX xxxx Lowest channel number supported by this driver~to get highest supported channel number, use the formula AX+DX-1. Sub-function 02h: Board information: AH FFH Error indication. Otherwise: AH xx IRQ number. AL xx Board type (should be 06h for C/X) BX xxxx Board's dual-ported memory segment. CX xxxx Number of channels supported by the board. DX xxxx Board's I/O port address. SI xxxx Channel number of first channel on the board. Sub-function FFh: Driver name: AX xxxx Driver version number. CX xxxx Number of channels supported. ES:BX Pointer to 8-byte string containing the driver's name (e.g. ~DIGIC/X5~). Send Break - Function 07h This function forces a BREAK condition for a specified interval. If no interval is specified, the default (initially 250 milliseconds) is used. If an interval is specified, it becomes the new default BREAK time. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 07h Function number. AL 00h Use default BREAK time. Otherwise: AL 01h BREAK time is value in BX times 10 milliseconds. BX xxxx Factor for determining length of BREAK (BX times 10 milliseconds). Return After executing the function, the following information is returned in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Alternate Status Check - Function 08h This function performs a non-destructive read from the receive buffer. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 08h Function number. Return After executing the function, the following information is returned in the CPU registers: ZF 0 Next character in input buffer will appear in AL. AL xx Next character to be read by a Read Single Character or Read String function. AH xx Line status associated with next character to be read (see function 02h). ZF 1 No character in buffer. AH FFh No character in buffer. Clear Buffers - Function 09h This function clears (flushes) both the transmit and receive buffers for the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 09h Function number. Return After executing the function, the following information is returned in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Input Queue Check - Function 0Ah This function returns the number of characters currently in the receive buffer. NOTE~This function differs from function 15h (Input byte count), because there can be more bytes in the buffer than there are charac- ters. The character FFh requires two bytes, and characters with errors (parity, framing, etc.) require three bytes. Use this function to determine how many characters are avail- able to be read using the Read Single Character or Read String functions, and use function 15h to determine how much physical buffer space has been filled. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Ah Function number. Return After executing the function, the following information is returned in the CPU registers: AX xxxx Number of characters in input buffer. DH FFh Error indication. ZF 1 Error indication. Drop Handshake Lines - Function 0Bh This function causes DTR and RTS to drop (become inactive). If hardware handshaking is not enabled, these control lines will remain inactive either until they are raised by executing Interrupt 14 function 13h (Set Handshake Lines), or until hardware hand- shaking is enabled by executing Interrupt 14h function 1Eh (Set Flow Control). If hardware handshaking is enabled when this function is executed, it is temporarily suspended and the DTR and RTS control lines are dropped. Then hardware handshaking is automatically re-activated, and the control lines return to their previous state. This has the effect of ~pulsing~ the lines to the inactive state, and might be used to hang up a modem. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Bh Function number. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Get Channel Parameters - Function 0Ch This function returns the current settings of flow control, baud rate, parity and framing parameters for the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Ch Function number. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH xx Software flow control (XON/XOFF): Bit 0 = Transmit flow control~If set to 1, XON/XOFF flow control is enabled for transmitted data. Inactive if set to 0. Bit 1 = Receive flow control~If set to 1, XON/XOFF flow control is enabled for received data. Inactive if set to 0. AL xx Hardware flow control: Bit 0 = DTR receive flow control~If set to 1, DTR is used to control incoming data. Bit 1 = RTS receive flow control~If set to 1, RTS is used to control incoming data. Bit 4 = CTS transmit flow control~If set to 1, data transmission will be paused any time CTS (Clear To Send) is dropped by the receiving device. If set to 0, CTS has no effect. Bit 5 = DSR transmit flow control~If set to 1, data transmission will be paused any time DSR (Data Set Ready) is dropped by the receiving device. If set to 0, DSR has no effect. Bit 7 = DCD transmit flow control~If set to 1, data transmission will be paused any time DCD (Data Carrier Detect) is dropped by the receiving device. If set to 0, DCD has no effect. BH xx Parity 0 = No parity 1 = Odd parity 2 = Even parity BL xx Stop bits 0 = 1 stop bit 1 = 2 stop bits CH xx Character length 0 = 5 bits 1 = 6 bits 2 = 7 bits 3 = 8 bits CL xx Baud rate 00h 110 baud 08h 19200 baud 01h 150 baud 09h 38400 baud 02h 300 baud 0Ah 57600 baud 03h 600 baud 0Dh 50 baud 04h 1200 baud 0Eh 75 baud 05h 2400 baud 0Fh 134 baud 06h 4800 baud 10h 200 baud 07h 9600 baud 11h 1800 baud Get Pointer to Character Ready Flag - Function 0Dh This function returns the pointer to a byte in host memory which can be used as a flag to indicate the presence or absence of input data characters in the receive buffer for the designated channel. This permits a quick test for received data without necessitating an Interrupt 14h call. This function must be executed for each channel for which a character ready flag is desired, and should be run as part of the initialization sequence of any application program using the flags. NOTE~A hardware interrupt is required to set the character ready flag. Therefore, the board must have an IRQ line selected and the driver must be configured for that IRQ line. It is also necessary to configure the driver to support the character ready flag for each applicable port. This is done through the ~C)har Ready Flags~ item in the ~O)ptions~ menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Dh Function number. Return After executing the function, the following information is available in the CPU registers: ES:BX Pointer to the flag. If the byte pointed to by ES:BX is 00h, the receive buffer is empty. If the byte contains FFh, the buffer is not empty. Write String - Function 0Eh This function copies a string of characters from a buffer in the host's memory to the transmit buffer for the designated channel. NOTE~Before executing the Write String function, you should first find the amount of free space in the transmit buffer by executing Interrupt 14h Function 12h (Get Transmit Buffer Free Space). Attempting to write more characters than the buffer can hold may result in a time-out error. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Eh Function number. CX xxxx Number of characters in string. ES:BX Pointer to the string. Load ES and BX with the segment and offset, respectively, of the first char- acter of the string you wish to send. Return After executing the function, the following information is available in the CPU registers: AX xxxx Number of characters transmitted. DH FFh Error indication. ZF 1 Error indication. (A time-out error will occur if there is insufficient space in the transmit buffer for the entire string after approximately 2 sec- onds. If timeouts are disabled through Function 20h, only one attempt will be made to write the string.) Read String - Function 0Fh This function moves a string of characters from the designated channel's receive buffer to an area in the host's memory pointed to by the ES:BX registers. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 0Fh Function number. CX xxxx Number of characters to read. ES:BX Pointer to caller's buffer. Load ES and BX with the segment and offset, respectively, of a character array large enough to hold the number of characters specified in CX. Return After executing the function, the following information is available in the CPU registers: AX xxxx Number of characters read. DH FFh Error indication. ZF 1 Error indication. An error will be flagged for data errors (parity, framing, etc.), or if the value in CX was larger than the number of characters available in the receive buffer. Clear Receive Buffer - Function 10h This function clears the receive buffer for the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 10h Function number. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Clear Transmit Buffer - Function 11h This function clears the transmit buffer for the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 11h Function number. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Get Transmit Buffer Free Space - Function 12h This function returns the amount of free space in the transmit buffer for the designated channel. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 12h Function number. Return After executing the function, the following information is available in the CPU registers: AX xxxx Number of free bytes in transmit buffer. Set Handshake Lines - Function 13h This function raises the RTS and DTR control lines (causes them to become active). If hardware handshaking is enabled, it is temporarily suspended, the control lines are raised, then hardware handshaking is re- activated and the control lines return to their previous state. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 13h Function number. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Non-Destructive Character Read - Function 14h This function is similar to Function 08h, Alternate Status Check, except the ZF flag is not set. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 14h Function number. Return After executing the function, the following information is available in the CPU registers: AH xx Line status. AL xx Next character to be read by a Read Single Character or Read String command. Input Byte Count - Function 15h This function returns the number of bytes waiting in the receive buffer. This is different from the number of characters, because under certain conditions, there can be more bytes in the buffer than there are characters (see Function 0Ah - Input Queue Check). Use this function to determine how full the input buffer is. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 15h Function number. Return After executing the function, the following information is available in the CPU registers: AX xxxx Number of bytes in the receive buffer. Pause/Resume Transmit - Function 17h This function overrides XON/XOFF output flow control. It can be used to immediately pause transmission, or to restart transmission which has previously been paused (either by this command, or by a received XOFF character). NOTE~This function will not override hardware flow control. If hardware handshaking is enabled, and the applicable control line (CTS, DSR and/or DCD) is inactive, any attempts to resume transmission with this function will fail. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 17h Function number. AL xx If AL = 0, pause transmission. If software (XON/XOFF) flow control is active, transmission will resume if an XON character is re- ceived. If AL = 1, resume previously paused transmission. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Pause/Resume Receive - Function 18h This function immediately activates or releases receive flow control. NOTE~If the number of characters in the input buffer is less than the Receive Low Water Mark (see Function 1Bh - Get Water Marks and Buffer Size), any attempts to pause reception will be ignored. Similarly, if the number of characters in the input buffer is greater than the Receive High Water Mark, any attempts to resume reception will be ignored. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 18h Function number. AL xx If AL = 0, pause reception as if the number of characters in the input buffer exceeded the Receive High Water Mark. If software (XON/XOFF) flow control is active, send XOFF. If hardware flow control is enabled, drop the applicable handshaking lines (RTS and/or DTR). If AL = 1, resume reception as if the number of characters in the input buffer fell below the Receive Low Water Mark. If software (XON/XOFF) flow control is active, send XON. If hardware flow control is enabled, raise the applicable handshaking lines (RTS and/or DTR). Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Get Water Marks and Buffer Size - Function 1Bh This function returns the size of the selected buffer (receive or transmit), and the ~water marks~ for that buffer (see Function 1Ch - Set Water Marks). Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 1Bh Function number. AL xx 0 = Get Transmit Low Water Mark. 1 = Get Receive Low Water Mark. 2 = Get Receive High Water Mark. Return After executing the function, the following information is available in the CPU registers: AX xxxx The requested water mark. BX xxxx Size of the buffer for which the water mark was requested (Transmit if AL was 0; Receive if AL was 1 or 2). DH FFh Error indication. ZF 1 Error indication. Set Water Marks - Function 1Ch This function provides control over the points at which flow control actions take place during read operations, and at which an interrupt may be requested during write operations. Receive High Water Mark: When the number of bytes in the receive buffer reaches the Receive High Water Mark, the buffer is considered to be nearly full, and appropriate handshaking is invoked (XOFF is sent and/or any active hardware handshake lines are dropped) to tell the sender to pause transmission. Receive Low Water Mark: Once handshaking has been invoked to pause remote transmission (see Receive High Water Mark, above), it remains in effect while characters are read from the buffer (with the Read Single Character or Read String functions) until the number of bytes in the buffer has been reduced to the Receive Low Water Mark. Then appropriate action is taken (XON is sent and/or the active hardware handshake lines are raised) to tell the sender that it may resume transmission. The two receive water marks set up a hysteresis loop so that handshaking is not invoked every time a character enters the buffer. Transmit Low Water Mark: The Host Adapter board may be configured to generate an IRQ when the number of characters in the transmit buffer drops to the Transmit Low Water Mark. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 1Ch Function number. AL xx 0 = Set Transmit Low Water Mark. 1 = Set Receive Low Water Mark. 2 = Set Receive High Water Mark. BX xxxx Water mark value. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Set Flow Control - Function 1Eh This function defines the method to be used for input and output flow control. Any combination of the available methods may be implemented. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 1Eh Function number. BH xx Software flow control (XON/XOFF): Bit 0 = Transmit flow control~If set to 1, XON/XOFF flow control will be used for transmitted data. Inactive if set to 0. Bit 1 = Receive flow control~If set to 1, XON/XOFF flow control will be used for received data. Inactive if set to 0. Bit 2 = Set new XON/XOFF characters~If set to 1, CH contains the new XOFF character and CL contains the new XON character. BL xx Hardware flow control: Bit 0 = DTR receive flow control~If set to 1, DTR will be used to control incoming data. Bit 1 = RTS receive flow control~If set to 1, RTS will be used to control incoming data. Bit 4 = CTS transmit flow control~If set to 1, data transmission will be paused any time CTS (Clear To Send) is dropped by the receiving device. If set to 0, CTS will have no effect on transmission. Bit 5 = DSR transmit flow control~If set to 1, data transmission will be paused any time DSR (Data Set Ready) is dropped by the receiving device. If set to 0, DSR will have no effect on transmission. Bit 7 = DCD transmit flow control~If set to 1, data transmission will be paused any time DCD (Data Carrier Detect) is dropped by the receiving device. If set to 0, DCD will have no effect on transmission. CH xx New XOFF character, if bit 2 of BH is set to 1. CL xx New XON character, if bit 2 of BH is set to 1. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication. Otherwise: AH 00h No errors. Enable/Disable Read/Write Timeouts - Function 20h Normally the DOS device driver will try for 2 seconds to execute a read or write operation. If no data is read, or if there is no room in the transmit buffer for a write operation after this 2 second period, a ~timeout~ occurs and the read or write function will return an error condition. If read/write timeouts are disabled, the driver will try a read or write operation only once, and if unsuccessful, will immediately return with an error condition. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH 20h Function number. AL xx 0 = Disable read/write timeout. 1 = Enable read/write timeout. Return After executing the function, the following information is available in the CPU registers: AH FFh Error indication (invalid byte in AL). Otherwise: AH 00h No errors. Presence Test - EBIOS Function F4h This function is used to determine whether the device driver has been configured for EBIOS support. This is done through the D)evice Driver Support menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH F4h Function number. Return After executing the function, the following information is available in the CPU registers: AX 0000 EBIOS functions present. Otherwise: AH FFh EBIOS functions not present. Specify Modem Leads - EBIOS Function FBh This function allows you to raise or lower DTR and RTS, and to specify which modem control signals (CTS, DSR and/or DCD) to honor for output flow control. NOTES~ To execute this function, EBIOS support must be included in the DOS device driver during set-up. This is done through the D)evice Driver Support menu of the set-up program. RTS and DTR will not be affected if these lines are being used for hardware handshaking. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH FBh Function number. AL xx Modem leads: Bit 0 = 1: Raise DTR (drop if 0). Bit 1 = 1: Raise RTS (drop if 0). Bit 4 = 1: Use CTS for output flow control. Bit 5 = 1: Use DSR for output flow control. Bit 6 = 1: Use RI for output flow control (not supported). Bit 7 = 1: Use DCD for output flow control. Receive with No Wait - EBIOS Function FCh This function works like Function 02 - Read Single Character, except only one attempt to read the buffer is made. If the buffer is empty, the function immediately returns 80h in the AH register, indicating a time-out error. NOTE~To execute this function, EBIOS support must be included in the DOS device driver during set-up. This is done through the D)evice Driver Support menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH FCh Function number. Return After executing the function, the following information is available in the CPU registers: AL xx Character read. AH xx Line status (see Function 02h - Read Single Character). Retrieve Buffer Count - EBIOS Function FDh This function returns the number of characters currently residing in the specified buffer. NOTE~To execute this function, EBIOS support must be included in the DOS device driver during set-up. This is done through the D)evice Driver Support menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH FDh Function number. AL xx Buffer to check: 1 = Get transmit buffer count. 2 = Get receive buffer count. Return After executing the function, the following information is available in the CPU registers: CX xxxx Character count. Set Pacing Mode - EBIOS Function FEh This function enables or disables XON/XOFF handshaking for the specified channel. Executing this function (regardless of the mode selected) also turns on CTS and DSR output flow control. NOTE~To execute this function, EBIOS support must be included in the DOS device driver during set-up. This is done through the D)evice Driver Support menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxxx Channel number. AH FEh Function number. AL xx Pacing mode: 00h = No pacing. 40h = XON/XOFF for receive; no pacing for transmit. 80h = XON/XOFF for transmit; no pacing for receive. C0h = XON/XOFF for both transmit and receive. Set Buffered Mode - EBIOS Function FFh This function is included to maintain compatibility with the EBIOS specification. Since DigiCHANNEL intelligent boards are fully buffered, executing this function has no effect on the host. NOTE~To execute this function, EBIOS support must be included in the DOS device driver during set-up. This is done through the D)evice Driver Support menu of the set-up program. Preparation Before requesting Interrupt 14h, load the CPU registers as follows: DX xxx Channel number. AH FFh Function number. AL x Buffer to affect: 1 = Transmit buffer. 2 = Receive buffer. CX xxxx Buffer size~to terminate buffered mode, set CX to 0. ES:BX Pointer to buffer.