🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1006

Re: How to detect base address of COMx ports?

#1006
From: Joe Dubner
Date: Wed, 19 Aug 1992 15:10
33 lines
2230 bytes
lubkt@synergy.CC.Lehigh.EDU (Binod Taterway) writes:

> I am writing a software that dials various computers using a comm
> package. In order to dial thru a particular, I need to know the base
> address of the serial port. For COM1 and COM2, base addresses are set
> to 0x3F8 and 0x2F8, respectively. For the rest of the ports, their
> addresses are highly dependent on the vendor. So right now, I ask my
> users to specify this address and the interrupt level if they are
> using ports such as COM3 and COM4. Many of these users are too naive
> to understand what these two terms and have hard time looking up the
> manual. Is there any way, via some interrupt routine or the like, to
> determine how many ports are available and their base addresses and
> interrupt levels. Is it stored anywhere on the system?

MS-DOS stores the serial port base addresses at 0:400, 0:402, 0:404, and
0:406 for COM1 through COM4.  (Parallel port base addresses are also
stored, starting at 0:408.)  Using DEBUG, take a look at this area with
a "d 0:400" command.  Note that DOS has to "know" about COM3 and COM4 --
I'm not certain how it "finds out" about them, particularly if they're
at non-standard I/O addresses.  And support for COM3 and COM4 was not
present in earlier versions of DOS.

As for interrupts, sorry, but I don't have any ideas for you.  I'm of
the opinion that you're up against a brick wall here.

Regards,
Joe

---------------------------------------------------------------------------
Joe Dubner   K7JD  |  Hewlett Packard Company  |  dubner@hpspkla.spk.HP.COM
                   |  TAFC-34         M.S. 2I  |
                   |  Spokane, WA  99220       |  (509) 921-3514
---------------------------------------------------------------------------
Technical Details
Message-ID: <29820002@hpspkla.spk.hp.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!hp-cv!hp-pcd!hpspkla!dubner
References: <LUBKT.92Aug17132854@synergy.CC.Lehigh.EDU>

Show Full Headers
Complete Article Headers
From: dubner@hpspkla.spk.hp.com (Joe Dubner)
Date: Wed, 19 Aug 1992 15:10:34 GMT
Subject: Re: How to detect base address of COMx ports?
Message-ID: <29820002@hpspkla.spk.hp.com>
Organization: Hewlett Packard Company, Spokane, Wa.
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!hp-cv!hp-pcd!hpspkla!dubner
Newsgroups: comp.os.msdos.programmer
References: <LUBKT.92Aug17132854@synergy.CC.Lehigh.EDU>
Lines: 34