[net.micro.pc] COM port routines for automatic buffering

madd@bucsb.bu.edu.UUCP (Jim Frost) (09/04/86)

There has been some talk here on routines for reading the COM ports
fast enough to handle high speed communications.  I need help in this,
too.

Here's my question:  What is necessary to set up a procedure to buffer
the COM1 or COM2 port whenever a character has been received?  I know
that you need to set an IRQ (IRQ3 and 4 I think), but will resetting this
harm anything?  If I reset it, how do you return from the interrupt without
blowing up the executing program?

I program extensively in Turbo Pascal and have written routines to
directly read and write the COM ports in order to speed up the process
since the BIOS is much too slow.  I have written resident routines (such
as desktops) so I know how to wedge in Turbo routines (for those of you
reading this who want to know, the first address that does not alter
machine registers will be seg(procedurename) : ofs(procedurename)+7).  If
someone knows the entry conditions on a routine that is called via IRQ,
this should be enough to get me started.

Mail direct or post replies -- if there is sufficient interest, I'll post
the source when complete.