
				
				
				
				
				
		       BIOS Interrupt 14h
			    Functions





			Supplement to the
		       Installation Guide
			       for
		     DigiCHANNEL Intelligent
	       Asynchronous Communications Boards
		   Universal DOS Device Driver
			  DOS 2.0 - 5.0
				
Copyright (C) Digi International, Inc. 1991-1993
All Rights Reserved




Information in this document is subject to change without notice
and does not represent a commitment on the part of DigiBoard.

DigiBoard provides this document "as is", without warranty of any
kind, either expressed or implied, including, but not limited to, the
particular purpose.  DigiBoard may make improvements and/or changes
in this document or in the product(s) and/or the program(s) described 
in this document at any time.

This document could include technical inaccuracies or typographical
errors.  Changes are periodically made to the information herein;
these changes may be incorporated in new editions of the publication.
Table of Contents

Introduction                                                   4
Interrupt 14h Function Descriptions                            5
  Initialize a Port  -  Function 00h                           5
  Output a Single Character  -  Function 01h                   7
  Input a Single Character  -  Function 02h                    8
  Get Status  -  Function 03h                                  9
  Extended Port Initialization - Function 04h                 11
  Extended Communications Port Control - Function 05h         13
  Get Driver/Board Information - Function 06h                 14
  Send Break - Function 07h                                   16
  Alternate Status Check - Function 08h                       17
  Clear Buffers - Function 09h                                18
  Input Queue Check - Function 0Ah                            19
  Drop Handshake Lines - Function 0Bh                         20
  Get Channel Parameters - Function 0Ch                       21
  Get Pointer to Character Ready Flag - Function 0Dh          23
  Write String - Function 0Eh                                 24
  Read String - Function 0Fh                                  25
  Clear Receive Buffer - Function 10h                         26
  Clear Transmit Buffer - Function 11h                        27
  Get Transmit Buffer Free Space - Function 12h               28
  Set Handshake Lines - Function 13h                          29
  Non-Destructive Character Read - Function 14h               30
  Input Byte Count - Function 15h                             31
  Pause/Resume Transmit - Function 17h                        32
  Pause/Resume Receive - Function 18h                         33
  Get Water Marks and Buffer Size - Function 1Bh              34
  Set Water Marks - Function 1Ch                              35
  Set Flow Control - Function 1Eh                             36
  Enable/Disable Read/Write Timeouts - Function 20h           38
  Presence Test - EBIOS Function F4h                          39
  Specify Modem Leads - EBIOS Function FBh                    40
  Receive with No Wait - EBIOS Function FCh                   41
  Retrieve Buffer Count - EBIOS Function FDh                  42
  Set Pacing Mode - EBIOS Function FEh                        43
  Set Buffered Mode - EBIOS Function FFh                      44




















                                  3
Introduction

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,
&regs, &regs), 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.


























                                  4
Interrupt 14h Function Descriptions


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    NOTE- 1.5  stop bits can only be
		 1  =  2  stop  bits   set  by  the  configuration utility.
	       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	   (or  19200, if EBIOS is supported)
		 010 = 300 baud    (or  38400, if EBIOS is supported)
		 011 = 600 baud    (or  57600, if EBIOS is supported)
		 100 = 1200 baud   (or 115200, if EBIOS is supported)
				   (No 115200 substitution on C/X driver.)
		 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).





                                  5
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.























                                  6
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.

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.











                                  7
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
(regardless of whether the board has 16450 UARTs or 8530 SCCs).
NOTE - This function returns the status of the channel, and not the
physical  communications chip (16450 or  8530).   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,  indi
		 cates 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).




                                  8
	       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.










































                                  9
Extended Port Initialization - Function 04h

This function provides more initialization options than the basic
initialization  function (Function 00h).  Baud  rates  of  up  to
115,200  are supported, and the function can be used to  force  a
BREAK condition which can be held indefinitely.

NOTE - The  maximum  baud rate which can be set on  the  COM/Xi  is
57,600.   However,  baud rates in excess of 38,400  may  not  run
reliably on that board.

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 NOTE - 1.5 stop bits can only be
	       1 = 2 stop bitsset by the configuration utility.
  CH  xx   Character length:
	       0 = 5 bits
	       1 = 6 bits
	       2 = 7 bits
	       3 = 8 bits
  CL  xx   Baud rate:
	       00h   110 baud      09h   38400 baud
	       01h   150 baud      0Ah   57600 baud
	       02h   300 baud      0Bh   76800 baud
	       03h   600 baud      0Ch   115200 baud
	       04h   1200 baud     0Dh   50 baud
	       05h   2400 baud     0Eh   75 baud
	       06h   4800 baud     0Fh   134 baud
	       07h   9600 baud     10h   200 baud
	       08h   19200 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).



                                  10
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 the LOOP bit is not supported.  Access to the OUT1
and OUT2 bits is limited to the COM/Xi board. 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;
               setting bit 2 of BL to 1 will raise OUT1 (COM/Xi only);
               setting bit 2 of BL to 0 will drop OUT1 (COM/Xi only);
               setting bit 3 of BL to 1 will raise OUT2 (COM/Xi only);
               setting bit 3 of BL to 0 will drop OUT2 (COM/Xi only).

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).
               Bit 2 = OUT1 (COM/Xi only - active if set to 1).
               Bit 3 = OUT2 (COM/Xi only - active if set to 1).



















                                  11
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 2.0.1: BX = 0201h).
  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.









                                  12
Sub-function 02h: Board information:
  AH  FFH  Error indication.  Otherwise:
  AH  xx   IRQ number.
  AL  xx   Board type:
               01h  COM/Xi
               02h  MC/Xi
               03h  PC/Xe
               04h  PC/Xi
               05h  PC/Xm
  BX  xxxx Board's dual-ported memory segment.
  CX  xxxx Number of channels on 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. "DIGIFEP5").







































                                  13
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.

































                                  14
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.
 
































                                  15
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.







































                                  16
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 characters.  
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 available 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.






























                                  17
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 handshaking 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 reactivated, 
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.





























                                  18
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 (or 1.5, as set with configuration utility)
  CH  xx   Character length
	     0 = 5 bits
	     1 = 6 bits
	     2 = 7 bits
	     3 = 8 bits





                                  19
  CL  xx   Baud rate
	     00h   110 baud      09h   38400 baud
	     01h   150 baud      0Ah   57600 baud
	     02h   300 baud      0Bh   76800 baud
	     03h   600 baud      0Ch   115200 baud
	     04h   1200 baud     0Dh   50 baud
	     05h   2400 baud     0Eh   75 baud
	     06h   4800 baud     0Fh   134 baud
	     07h   9600 baud     10h   200 baud
	     08h   19200 baud    11h   1800 baud
















































                                  20
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 Options 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.

























                                  21
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 character 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 seconds.)



























                                  22
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.






























                                  23
Clear Receive Buffer - Function 10h

This  function  clears  (flushes)  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.






































                                  24
Clear Transmit Buffer - Function 11h

This  function  clears  (flushes) 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.
 





































                                  25
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.







































                                  26
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.



































                                  27
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.





































                                  28
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.




































                                  29
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 received.
	   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.



























                                  30
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.



















                                  31
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.






























                                  32
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:
  Boards 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.









                                  33
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  trans
		 mitted 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.





                                  34
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  dis
abled,  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.































                                  35
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.





































                                  36
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.






























                                  37
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).
































                                  38
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.
































                                  39
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.


































                                  40
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  xxxx Channel number.
  AH  FFh  Function number.
  AL  xx   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.



































				   41