[comp.os.msdos.programmer] Interrupt Driven Communication

visjames@ubvmsd.cc.buffalo.edu (Larry James (WNYCUG)) (12/28/90)

     I am looking for a good library of Interrupt driven communications routines
for C.  I would like source code if possable.  They need to be extreamly fast
as they will be used on a Multitasking XT at 38,400 bps.  Can anyone help me
find some so I don't have to write my own?
     Thanks in advace.

williams@umaxc.weeg.uiowa.edu (Kent Williams) (12/29/90)

38,400 BPS is too fast on an XT unless you do a hard polling loop in
assembly language.

38,400 BPS = 3,840 CPS (at 8 bits per byte).  That means an interrupt
roughly every 275 microseconds.  You have roughly one instruction per micro-
second on an XT (and that's being generous).  I would estimate you couldn't
do a bare bones interrupt service in under 50 instructions, so you would tie
up the CPU 1/5 of the time in interrupt services for the serial port.  Then,
consider how many instructions it takes to effect a task switch from the timer
tick interrupt.  What do you get? Missed serial port interrupts!


--
             Kent Williams --- williams@umaxc.weeg.uiowa.edu 
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"