Ref: 13420015
Title: Finding Installed Ports Using DEBUG
date: 9/28/90

Copyright 3Com Corporation, 1991.  All rights reserved.

When you look at a computer, it is difficult to tell what ports
are available in the machine.  Typically, the COM1 and LPT1 ports
come installed as standard equipment but anything else is optional.
One way to tell is to look on the back of the machine and try to guess
which ports are installed.

A better way is to use the DOS command DEBUG to look into the hardware
equipment list area in BIOS to see if there are ports registered:

1.  Make sure you are using the proper version of DOS and that you have
access to the DEBUG.COM command.

2.  Type DEBUG and press Return.

3.  At the hyphen prompt (-), type D 40:0 and press Return.  Then you will
see something like this:

0040:0000  F8 03 00 00 00 00 00 00-78 03 00 00 00 00 00 00   ....
0040:0010  61 C2 00 80 02 1C 01 20-00 00 2C 00 2C 00 64 20   a...
0040:0020  20 39 34 05 30 0B 3A 27-30 0B 0D 1C 2E 34 2A 09    94.

The first line, 0040:0000, will tell you what you need to know about ports
installed in your computer.  The first four bytes (F8 03) are the address
assignment for COM1.  Since it is word reversed, it shows up as F8 03 instead
of 03 F8.  If COM2 was installed, the next four bytes would be F8 02 (02
F8).  Since there are zeros in the list, COM2 is not present in the computer.
This list will only display standard COM1 and COM2 devices as defined by
IBM BIOS.

Following the hyphen on the first line are the locations for the
parallel ports LPT1, LPT2, and LPT3.  The first four bytes
following the hyphen define LPT1 (78 03).  Again, the order is
reversed from the true address assignment of 03 78.  If zeros are
present, there are no parallel ports installed or the port was
configured improperly.The address assignments for LPT2 and LPT3
are 78 02 and BC 03.

Sometimes the address assignments will differ for parallel ports.  It is
possible to see BC 03 instead of 78 03 for LPT1.  This is because the hardware
address may be wired differently, depending on the manufacturer of the
parallel port(s).  In most instances, this will not be a problem since newer
software applications write to BIOS instead of directly to hardware.

4.  To exit from the DEBUG prompt, type Q.  You will return to the DOS
prompt.
