[comp.sys.ibm.pc.programmer] COM I/O in turbo C

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (04/07/90)

In article <5806@jarthur.Claremont.EDU> dpletche@jarthur.Claremont.EDU (David Pletcher) writes:
$I am trying to write an application in turbo C that will read
$data at full speed from one of the COM ports at 19200 baud.
$Documentation on use of communications is pretty lacking in the
$turbo C 1.4 manual, and I don't have the money to upgrade just
$now (and I don't know whether they have improved it any.)  All

   Turbo C 1.4?  Never heard of it.  Anyway, the only sure way to
use a COM port at high speed is to write your own interrupt handler
for it.  Your interrupt handler would have a buffer of some size which
your program reads from and which it writes into every time a new
character comes in from the serial port.  You might also want to do the
same with output characters so that your program can dump a whole bunch
of characters into the buffer and do something else while they're being
transmitted.

   One other note:  if you're using a disk cache in extended (80286 and
up protected mode) memory and are accessing the disk while doing your
communications, you'll lose characters in any case unless your disk cache
knows you're using an 80386.

-- 
               More half-baked ideas from the oven of:
****************************************************************************
Stephen M. Dunn                               cs4g6ag@maccs.dcss.mcmaster.ca
     <std_disclaimer.h> = "\nI'm only an undergraduate ... for now!\n";