Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_int14()</b> - configure port to use int 14h http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_int14() - configure port to use INT 14h

   tp_int14(nPort, nUnit, [nDriver])

   nPort       Serial port number.
   nUnit       Logical port number.
   nDriver     Driver type code.

   Configures a serial port to use INT 14h services instead of accessing
   the hardware port directly.  nUnit is the BIOS adapter number for the
   port you wish to use, normally 0 for COM1 or 1 for COM2.  nDriver is
   an optional code for the type of INT 14h driver used:

       nDriver     Driver type
       ----------------------------------------------------------------
          0        Autodetect driver type.  This is the default.
          1        PC BIOS compatible driver.  Uses no extended
                   services.
          2        FOSSIL driver.
          3        TES network driver.

   If you omit nDriver, Telepathy will attempt to detect the kind of INT
   14h driver used.  If you encounter problems with autodetection, try
   specifying the driver type explicitly.  If the driver is not one of
   the types listed here, type 1 (PC BIOS) is the safest choice.

   INT 14h services are provided by some networks, and by FOSSIL (Fido/
   Opus/SEAdog Standard Interface Layer) drivers. These provide basic
   serial I/O services, but some Telepathy features are not available
   through INT 14h.

   Output Buffers.  Ports opened using INT 14 have no output buffer.
   Buffering is handled by the driver.  Because there is no buffer,
   tp_clearout() does not work, and tp_outchrs() and tp_outfree() do not
   return any useful information.  tp_flush(), on the other hand, does
   work.

   Input Buffers.  INT 14 ports do have input buffers, but they work
   differently than for normal ports.  The driver has its own input
   buffer, and Telepathy moves data from that buffer to its own whenever
   you call a function that reads characters or looks at the input
   buffer.  This approach, though probably unnecessary, does at least
   mean that tp_lookfor() works correctly.  However, increasing the
   input buffer size in Telepathy will probably not prevent overruns,
   since it will usually be the driver's buffer, not Telepathy, that
   overflows.

   Handshaking.  Handshaking options with an INT 14 driver are limited.
   FOSSIL drivers can handle XON/XOFF, RTS/CTS, DCD, and allow you to
   turn DTR on and off.  (But you can't enable just RTS or just CTS
   handshake; both must be enabled or neither.)  Network and other
   drivers have no options except DCD handshaking.

   Telepathy's low- and high-water mark settings have no effect on
   FOSSIL drivers.

   Serial Parameters.  INT 14 drivers cannot use the full range of baud
   rates available on normal ports.  FOSSIL drivers can be set to rates
   from 300 to 38400 baud; other drivers have a range of 110 to 9600
   baud.  With network drivers, the actual baud rate is configured at
   the server, and the rate you set with Telepathy has no effect.


   (Except for one: it determines the default subpacket size for Zmodem
   sends.  See the manual entry on tp_zblklen() for details.)

   Similarly, the data bits, parity, and stop bits settings may have no
   effect on network drivers.  Not all FOSSIL drivers support parameter
   settings other than 8 bits, no parity, 1 stop bit.  Those drivers
   will use 8N1 no matter what settings you give them.


   Notifications.  Nope.  Notifications are not available for INT 14
   ports.

   BREAKs.  tp_break() works normally for a FOSSIL port.  With a network
   driver, tp_break() has a different function, giving access to the
   local command interpreter.  In that case, the second parameter (BREAK
   time in seconds) is ignored.

   Reopening Ports.  Except with a FOSSIL driver, if you use tp_reopen()
   to open a port, Telepathy will not be able to figure out what its
   baud rate and other parameters were.  tp_baud() used to query the
   baud rate will return 0, and tp_data(), tp_parity(), and tp_stop()
   will return similarly useless values.  Since this is a nuisance, we
   recommend against using tp_reopen() with an INT 14 port unless you
   know you are using a FOSSIL driver.

   Detecting Ports.  tp_isport() does not work on ports set to use INT
   14.  It will always return TRUE for those ports.

   Example:

       tp_int14(1, 0)
       tp_open(1, NIL, NIL, 9600, 8, "N", 1)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson