Article View: comp.os.msdos.programmer
Article #949Re: How to detect base address of COMx ports?
From: John Steele
Date: Tue, 18 Aug 1992 03:48
Date: Tue, 18 Aug 1992 03:48
29 lines
1753 bytes
1753 bytes
In <1992Aug18.021412.19094@news.ysu.edu> af458@yfn.ysu.edu (Jon K. Salmon) writes: >Well, in theory you can look at the 4 WORD values at 40h:00h, which >SHOULD be the port addrs for COM1-COM4. How safe/reliable this >technique is, I do not know. There is a similar table of LPT port >addrs (next 4 WORDs? I don't recall), but I KNOW that is unreliable. >For what it's worth... >-- Jon >-- Actually, the only time that I have found that looking for com/lpt base port addresses in this manner fails is under Novell. It does work under every version of MS-DOS, Ntnx, Lantastic and PC-MOS. When else have you found it to be unreliable? Another possible method is looking at the data at the standard port addresses of 3f8,2f8,3e8 and 238 for comm ports and 3bc,378 and 278 for lpts. This can be pretty dangerous under a multitasking system of course :) John -- #include <disclaimer.h> /* route all flames to /dev/null */ /**************************************************************************/ /* Systems Analyst | John Steele email: jsteele@netcom.com */ /* Video Business Systems | */ /* 1-800-255-3088 | Most people spell COBOLSUX incorrectly... */ /**************************************************************************/
Technical Details
Message-ID:
<m-0mdl.jsteele@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!jsteeleReferences:
<1992Aug18.021412.19094@news.ysu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!jsteele From: jsteele@netcom.com (John Steele) Subject: Re: How to detect base address of COMx ports? Message-ID: <m-0mdl.jsteele@netcom.com> Date: Tue, 18 Aug 92 03:48:44 GMT Organization: Netcom - Online Communication Services (408 241-9760 guest) References: <1992Aug18.021412.19094@news.ysu.edu> Lines: 29