[comp.sys.ibm.pc.hardware] How to access serial port directly?

kshaffer@modcomp.uucp (Ken Shaffer) (01/17/91)

In <1991Jan16.020328.4830@d.cs.okstate.edu> ong@d.cs.okstate.edu (ONG ENG TENG) writes:

>Does anyone know how to access the serial port register directly?
>I don't have any kind of tech manuals/journals, so I don't know if
>they are available there.  I know each serial port has 2 i/o port address,
>what do you do with the first, and the second?  

com1 at 3f8
com2 at 2f8
com3 at 3e8
com4 at 2e8

use the "in" and "out" i/o instructions if using assembly. some C compilers
provide libraries with "inp" and "outp" functions.  The port addresses above
are the base addresses. The offsets are:

	0 = data or divisor (least significant)
	1 = interrupt enable reg or divisor (most significant)
	2 = status register
	3 = line control register
	4 = modem control register

>I have been programming the serial port via INT14 for a while, with 
>complete success.  But I have just gotten a 4-serial-port card that allows
>use of each of them from COM1 to COM8, using interrupts 2 to 5.  Even though
>drivers are supplied (so that INT14 can be used for all 8 COM), I was 
>hoping to actually do some synchronized serial comm whereby I know when
>the remote machine will be sending back data, thereby not really needing
>the interrupt.  (Yes, trying to talk to 8 other PC's at the same time!)
>Anybody has any idea?

the manufacturer should have supplied documentation in which should be the
port addresses of the communication ports.  If not, then call to get some
sort of technical documentation. (there may be another charge for this)

Ken Shaffer
modcomp!kshaffer