Debug COM/LPT ports

Posts worthy of archiving. Maybe your problem is already solved here.
Post Reply
a_user
Good ol' Boy
Posts: 107
Joined: Fri Mar 22, 2002 4:09 pm
Location: Elgin, Texas

Have you check to see if the com ports are active via debug....

Start "debug" from a DOS prompt as in the example shown below.

C:\> debug [enter]

The debug utility will provide a simple "-" as a prompt. At the prompt enter:

-d 40:0 b [enter]

The command asks the utility to dump (d) 12 bytes (b) of memory, starting at address 0040:0000 (hex). These 12 bytes indicate what serial/parallel devices were sensed when DOS was booting. Below is an example of what could be displayed. (enter a "q" followed by [ENTER] to quit).

0040:0000 F8 03 F8 02 00 00 00 00-78 03 00 00 .........


The memory dump consists of 8 different fields. Only the first 6 are referenced in this discussion. The field descriptions are listed below. Note - formating may be off do to margins and text viewer.

Code: Select all

   
          1st serial port found
            |   2nd serial port found
            |     |   3rd serial port found
            |     |     |   4th serial port found
            |     |     |     |
            v     v     v     v
0040:0000 F8 03 F8 02 E8 02 00 00-78 03 BC 03 BC 03 C3 03
                                    ^     ^
                                    |     |
                                    |    2nd parallel port found
                                    |    
                                    |
                                  1st parallel port found 
Looking at the sample output, notice the address is displayed in "reverse byte" format (e.g., COM1 defined as F8 03 instead of 03 F8). If it is known that a port is installed/enabled in a system, the port should be listed. Not being listed could either indicate a misconfiguration/address conflict of the port, or that it failed.

The sample output lists the installed ports as COM1, COM2, COM4, and LPT1. Notice the address listed as the 3rd serial port is the address of COM4 (E8 02h 02 E8 - remember it's reversed), and the 4th is not present

The "debug" utility will show no "gaps". If you have serial ports configured as COM's 1, 2, & 4, the ports will be displayed consecutively in debug. But the addresses displayed will reflect that of ports 1, 2, & 4. So an important thing to consider when viewing the debug report is the actual addresses displayed.

Notice the address listed for the 2nd LPT port (03BCh). This is not a standard MS/DOS LPT port address. This indicates that a TSR or driver has remapped the I/O address for its own use. 03BCh can also be an LPT1 port as on a Monochrome/printer adapter, or even some other printer type adapters. This would cause the chart to read LPT1=03BC LPT2=0378 LPT3=0278, etc.

The table below lists the MS/DOS default Serial & Parallel port I/O address. An address in the fields other than one of those listed below indicate the port may be remapped.

Serial ports:
COM1=03F8h COM2=02F8h COM3=03E8h COM4=02E8h
Parallel Ports
LPT1=0378h LPT2=0278h

Something to keep in mind when trouble shooting: Are two ports possibly set to the same address? When ports automatically remap they often go to the other port sharing its IRQ. For example, COM2 will remap to the COM4 address.
Please use the Fourms for Bios Questions
and not my Email

Flashing is risky in any form!
Post Reply