home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
vrac
/
comadr11.zip
/
COMADDR.TXT
< prev
next >
Wrap
Text File
|
1994-11-11
|
20KB
|
380 lines
COMADDR.EXE version 1.1 COMADDR.TXT
Copyright (c) 1994 K. D. Smyth All Rights Reserved
What it does, briefly:
COMADDR can reset the COM port I/O address list (those "3F8"
and "2E8" things you set jumpers for on adapter cards) stored in
your computer's memory to either the PC standard defaults or any
others that you like. This lets the digital address that the
application software reads in for the COM port actually agree
with the jumper setting; correcting mistakes your BIOS loaded in
during start-up. It also allows use of COM3 and COM4 on older PC
and XT machines. COMADDR is especially useful for machines with
lots of add-ons, or ones using extended adapters like the Mouse
Systems Serial Card, or the Quickpath Portfolio I/O card, which
allow you to set different addresses to resolve various I/O and
hardware interrupt (IRQ) conflicts. It is compatible with both
DOS and Windows, and will help resolve a lot of confusing adapter
address problems. It is not a TSR and does not take up RAM space.
Compatibility:MS/PC DOS 3.3 or higher, DR DOS 6.0, Novell DOS 7.0
works with Windows 3.1/3.11
How to Use: Three Ways!!
Setting System Back to Defaults
COMADDR (nothing afterward)
sets all four COM ports to their default I/O
addresses (COM1=3F8, COM2=2F8, C0M3=3E8, COM4=2E8)
example:"C:\comaddr". Very useful in your
AUTOEXEC.BAT file, and a big help for older
machines which may only look for COM1 and COM2. This will let them also load COM3 and COM4.
Setting System to Custom Addresses
COMADDR (address 1),(address 2),(address 3),(address 4)
sets COM1 to address 1, COM2 to address 2, etc.
example: "C:\comaddr 03F8,02F8,0338,0300" will set COM1 to 3F8, COM2 to 2F8 (both normal), COM3
to 338 and COM4 to 300 (both weird)
Changing Just One Address
COMADDR (address 1),,,
sets COM1 to address 1 but leaves others unchanged
("COMADDR ,address 2,," sets COM2 to address 2,
"COMADDR ,,address 3, sets COM3 to address 3, and
and so on.)
example: "C:\comaddr ,,02E8," will change COM3 to
to 2E8 and not disturb any settings for COM1, COM2
and COM4
Entering the Numbers
Easy. "02f8", "2f8", "02F8" and "2F8" all mean the
same thing. Commas (,) or semicolons (;) are used to separate
the data. Leave out the quote marks when you enter things, but I
assume if you're smart enough to know that you need this program,
you'll already have figured that one out! Addresses below 0200
or above 03FF will not be accepted, except for 0000.
Technical Discussion
1. What does this thing do?
This program was written to solve a simple, stupid problem:
setting up the I/O (input /output) addresses for the COM ports on
a PC. Your computer's start-up sequence that runs when you turn
the computer on has a routine to do this; it tests certain ad-
dresses and records which ones respond, and in which order; and
stores them in hexadecimal form in an area of memory called the
"ROM BIOS Data Area". (You can look at this area with the DEBUG
or SID utilities included with Microsoft or Digital Research
DOS'es, and make some sense of it sense if you are familiar with
the way assembly language writes things into memory.) The first
responding COM address is stored in the location reserved for
COM1, the second in the one for COM2, etc. This isn't a bad
system, but it has some limitations which became problems as the
capabilities of PC's grew. COM3 and COM4 were not often used in
XT's so some old BIOS's leave these address locations blank.
Also, this method assumes that all COM port numbers are being
used in order. For example, if COM1 is disabled but COM2 and
COM3 are used; then the address for COM2 will be written in the
COM1 location, and the COM3 address will be written in the COM2
location. The computer then gets lost when it tries to communi-
cate with COM2 or COM3. Problems like this didn't happen much
before things like scanners, bus mice, and other goodies became
common, but now as you fill up your PC you may need to disable
COM ports to use IRQ lines normally assigned to them, or to
prevent IRQ's from being shared by incompatible devices; and
things just don't run right, or in extreme cases, the computer
locks up when you try to access things in certain combinations.
Your Mac user buddies get a good laugh, and make smug comments.
(If they get on your nerves, ask them if they could get all of
their older software to run under System 7) The COM/IRQ silliness
is a legacy (actually a inherited birth defect) from the original
IBM-PC and is carried on by the need to keep software and hard
ware (at least some of it) compatible with older machines.
COMADDR is a solution to these problems. It allows you to
change any or all of the four COM port addresses in the ROM BIOS
Data Area, so that the addresses called by your software, the
addresses in the data area, and the REAL address that the silicon
on the card is set up to use will ALL AGREE. It does not change
the IRQ numbers that each function uses, but gives you some more
ways around that problem. It also reads and resets the machine
configuration word in the BIOS area to reflect the new number of
COM ports, if you've added any. It is not a TSR (Terminate, Stay
Resident) program so it does not sit and occupy precious lower RAM
space When the addresses set in the data area, the addresses set up
physically on the cards (those jumpers or DIP switches) and the ad-
dresses your software sends the data to are all the same, you can go
on to more important problems, like whats for lunch. Invite the Mac
users along; we're really all together in this.
2. I/O Addresses and IRQ's - What ARE they?? (and what do they do?)
These I/O addresses and IRQ's are two things that give
migraines when setting up Intel-based PC's, and finding a decent
explanation of their functions is very difficult. Let's try a
simple analogy. Think of things as a classroom with chairs
spread around in a neat arrangement, and a teacher with a bad
memory for names who must rely on a seating chart. When a hand
goes up, the teacher looks at the chart to see who sits in that
chair, and calls on that person by name. When the teacher wants
to call on someone, he or she looks at the chart to find out what
their name is and in what chair they're sitting. In the computer,
the processor is the teacher, the chairs are the "IRQ's" (or
"hardware Interrupt ReQuests", an interrupt being something that
causes the processor to stop what it is doing and react to
something else) and the seating chart is the list of "I/O ad
dresses". The software is the key to tying all of these things
together, or in the analogy, keeping the chairs arranged and the
seating list up to date so that our absent-minded professor
doesn't get hopelessly lost. Sort of like the instructor's aide.
Now, when we set addresses on the circuit cards we're giving each
student a name, then we need to write the student names in a
place where the software can read them. This is where COMADDR
can help. We also need to put our cards into the chairs, er,
IRQ's where the software will tell the processor to look.
The original PC and XT that followed had eight IRQ's,
numbered 0 to 7 and the AT bus machines (including most 286's,
386's, 486's and Pentiums) have 16, numbered 0 to 15. We should
have plenty to choose from; but some are used for system func-
tions, like IRQ0 and IRQ1; the system timer and keyboard inter-
rupts, respectively. Each available IRQ has a signal line on the
connector that the cards plug into. For a PC or XT 8-bit bus
computer, the IRQ's are set up as follows:
IRQ2 "reserved", see text - sometimes used by EGA or VGA cards
IRQ3 shared by COM2 and COM4
IRQ4 shared by COM1 and COM3
IRQ5 hard disk, if installed
IRQ6 floppy disk
IRQ7 parallel printer (LPT1), if installed
As you can see, there's not a lot of room on the 8-bit bus.
Some references list IRQ 2 as 'reserved', since it is used in a
screwy way on AT and up machines and by some XT EGA and VGA
cards, try using it if its open on your XT; it might be the only
way to make things work. (The Mouse Systems Serial Card allows
you to use IRQ's 2,3,4,5 or 7 for a serial port, and can be very
useful when you want to add something to a crowded box.) On an
AT (or above) machine, there are an extra 36 pins on the card to
run signals on, so they added IRQ's along with 8 more bits of
data. IRQ2 really is 'reserved' on an AT (don't use it) and is
tied into IRQ9, don't ask why, just don't use that either; it makes
strange things happen on some machines. The rest of the AT IRQ's
are assigned as follows:
IRQ 3 COM2/COM4 IRQ 8 Real Time Clock (not available)
IRQ 4 COM1/COM3 IRQ10 not assigned
IRQ 5 second printer IRQ11 not assigned
IRQ 6 floppy disk IRQ12 not assigned
IRQ 7 first printer IRQ13 Math Coprocessor (not available)
IRQ 14 Hard Disk
IRQ 15 not assigned, used by some SCSI boards
If you're keeping score, you notice that an XT bus has IRQ's
2,3, and 4 available, three total assuming that you have a hard
disk and a standard printer attached; and the AT bus has
3,4,10,11,12, and 15 available. You can also disable the second
printer function on most AT cards to allow use of IRQ5 on the AT
bus, to get a total of seven available loose IRQ's for use on the
various adapters. As a general rule, if something is not installed
on your machine but the IRQ line is available on the bus, you can
use that vacant IRQ line for something else if your software can
recognize that IRQ line.
That's the big if. Most hardware makers like to use cheaper
8-bit ("XT-AT compatible") cards instead of 16 bit cards, so they
cheat us out of many possible configuration options and make
IRQ's 3 through 5 very much in demand. You can try to avoid
filling them but lots of DOS driver software doesn't recognize
any other IRQ's and doesn't like to share them. That makes it hard
to get around this difficulty. For example, if you are trying to run
your mouse on COM3/IRQ11 so that you can install that new CD-ROM on
IRQ4 but your mouse driver doesn't recognize IRQ11, the mouse won't
work. This is particularly bothersome when you look at history - the
IBM AT came out about ten years ago so the manufacturers have had
plenty of time to work on these things. Be aware that this can
happen and ask a lot of questions when you buy add-ons to your
computer. One of the nice things about Windows is that you can
load non-standard IRQ's for COM ports via the Ports Control Panel
- Advanced menu, but these settings will only hold for Windows
applications that rely on the Windows I/O routines. But remem-
ber, if a card is a short, "XT" type, IRQ's 8-16 are not there.
This discussion went on longer than intended, but I hope
the explanations were helpful. If you want to avoid IRQ crowding
problems; use an AT (286 or above) and pay extra if need be for
cards that have the added IRQ lines. Mouse hookups are the
easiest things to move around, if your driver software will
cooperate. If a software driver cannot access these IRQ's, get
a better one. Use COMADDR to make certain that the COM port ad-
dresses are set correctly if addresses are the problem. With a
little shuffling, hopefully you'll get everyone in the "class"
seated and participating (or in the pedagogical vernacular
"interacting") just fine.
3. Setting things up
Plug-in cards will have a set of jumper plugs or DIP switch
es to let you set the I/O address and IRQ line that the card will
use. There are usually a few options available and the documenta
tion that came with the card (NEVER throw that away!!) will tell
you what they are and how to set-up the card. Once you've
'configured' the card, be sure to write the information down so
that you can refer to it when you set up software, a drawing of
where the jumpers or switches are on the card is also a good
idea. If you don't know how your computer is configured, but
want to find out, the simplest way is to use the Microsoft
MSD.EXE utility (comes with MS DOS 6 or Windows) or Norton Utili-
ties System Configuration command, or Quarterdeck's Manifest to
give you a readout of the I/O address and IRQ assignment of each
installed function. When installing new cards, pick an address
that's not used by anything else and try not to share an IRQ line
between functions if at all possible. Printers can usually share
IRQ's with other printers, but CDROMS, mice, scanners, fax cards,
and modems frequently have problems. When in doubt, don't share.
The standard ('default') COM port I/O addresses are: COM1
3F8, COM2 2F8, COM3 3E8 and COM4 2E8. Almost all serial cards
have these COM1 and COM2 addresses jumpered in at the factory,
and provide at least the COM3 and COM4 addresses as alternates.
Better cards have more options to help you set up the machine so
that everything will work. From a hardware point of view, its
perfectly o.k. to use a non-standard address for something, as
long as you don't have two functions sharing the same address.
Most of the system functions have addresses below 200, and this
version of COMADDR will give you an illegal input message and not
change anything if you try to write in one of these. Other ad-
dresses to avoid are 3F0-3F7 (floppy disk controller), 378-37F
(LPT1, if enabled) and 278-27F (LPT2, if enabled). Anything
above 03FF will also cause COMADDR to do nothing except give an
error message. You may enter a 0000 address to shut off a port.
4. Using this with Windows
The easiest way to use this program with Windows is to
either place the "COMADDR" command into your AUTOEXEC.BAT file,
before your "cd windows" line if you use that, or to exit Windows
(press "Alt-F4"), run COMADDR, then restart Windows. When Windows
is restarted, the Port Addresses listed in the Control Panel will
automatically be updated. Running COMADDR from the Windows "MS-
DOS" shell (that icon thing) may cause the address table that
Windows previously loaded and is using to disagree with the new
one you've set up with COMADDR. This may cause problems. If you
do this anyway, and then reset the Port Addresses in the Windows
Control Panel (or SYSTEM.INI), Windows will tell you to restart,
so you will not save any time. (Note: this program has been
tested only with Windows 3.1, it should not crash or wreak havoc
with older versions of Windows, but this has not been tested.)
So, be safe, exit Windows before you run COMADDR, then restart
Windows. Also, Windows documentation states that Windows will
not recognize a mouse on COM3 or COM4 but some drivers have
overcome this limitation. A feature of Windows that not many are
aware of is that it will allow you to have up to nine COM ports.
COMADDR will only set addresses for the original four that are
used by plain DOS programs. Use the Windows Control Panel or
edit SYSTEM.INI to insert addresses for COM 5 through COM 9. You
will probably need to share IRQ's for these. Windows IRQ sharing
can be enabled by adding the line "COMIrqSharing=True" to the
[386Enh] section of your SYSTEM.INI file. (Now there is a mouth-
ful of jargon!) The Windows documentation states that this does
not work with all adapters. There are some good shareware pack-
ages out there that automate this procedure.
5. Network Environments
This program alters only COM port addresses. It has been
tested with a Novell Netware configuration which uses an Ethernet
card and caused no conflict there, but that is only one configu-
ration. If your network does not use a COM port there should be
no problem, but the easiest way to be certain of what will happen
when using COMADDR in a network 'environment' is to use COMADDR
in your AUTOEXEC.BAT before loading the network shell files.
WARNING WARNING WARNING WARNING WARNING
This program will allow you to reset COM port addresses to
whatever you need. It will also allow you to set the COM port to
the same address as a floppy disk or some other vital organ of your
computer. This mistake could have catastrophic results. I am not
responsible for any misuse of this program, or any data lost as a
result. Please be careful, and enter only those addresses for
which your cards are programmed. If you are not certain of these
addresses, consult the data sheets for the particular adapter cards
you are using; and check out your system configuration using a
utility such as Microsoft's MSD (included with MS-DOS 6.x and
Windows 3.1), Quarterdeck's Manifest, or Norton Utilities System
Configuration. If you are still not too sure, use only the first
mode described; which sets all four addresses to the IBM defaults
and set the address jumpers on the cards accordingly.
Disclaimer of Warranty
THIS PROGRAM IS SUPPLIED WITH NO WARRANTIES, EXPRESS OR IMPLIED,
AND SPECIFICALLY NO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
A PARTICULAR PURPOSE. THE USER ASSUMES ALL LIABILITY FOR DAMAGES
RESULTING FROM LOSS OF DATA, INTERRUPTION OF BUSINESS, LOSS OF
PROFITS, USE OF EQUIPMENT, DAMAGE TO EQUIPMENT, OR INCIDENTAL OR
CONSEQUENTIAL DAMAGES.
In using this software you are assuming all risk as to its re-
sults and performance. Use of this program for any period of
time constitute your agreement with and acceptance of these
conditions and responsibilities. I am not responsible for
maintaining and updating this software on your system, except
as stated below.
Please report any bugs. I cannot guarantee that I can fix all
of them, but I will try.
REGISTRATION
This is a copyrighted program, and all rights are specifi-
cally reserved. To legally use this software after a 30-day
evaluation period, you must register and receive a license.
Registration entitles you to a free copy of any upgrade and
use of the executable COMADDR.EXE on up to three computers. The
registration fee is ten dollars US ($10) for all users with the
exception of teachers in public schools, who may register this
program and receive a license for use in a classroom or
other educational purpose at no cost. These requests must be made
on the school letterhead.
This program may be freely distributed by wire or electronic
means (i.e., bulletin boards and online information services) or
by shareware distributors. You must still register this software
even if you paid the distributor for the medium on which it was
transmitted to you. Any form of distribution must be complete
and include the three files listed below. These files may be com-
pressed for distribution but not otherwise altered in any other way.
Files included:
COMADDR.EXE Executable
COMADDR.TXT Long-winded Documentation (this file)
READIT.1ST Short Documentation
K.D. Smyth email:k.smyth1@genie.geis.com
1618 Quail Ave ksmyth@aol.com
Sunnyvale, CA 94087
Legal Disclaimers
Mouse Systems is a registered trademark of Mouse Systems Corporation.
Microsoft, MS and MS-DOS are registered trademarks, and Windows
is a trademark of Microsoft Corporation
Manifest is a registered trademark of Quarterdeck Systems Inc.
Norton Utilities is a registered trademark of Symantec Corporation.
Portfolio is a registered trademark of Quickpath Company
DR DOS and Novell Dos are registered trademarks of Novell Inc
Pentium is a trademark of Intel Corporation