Beyond Logic

Parallel Port Debug Tool Version 2.0

    The Parallel Port Debug Tool is a handy DOS utility when debugging devices connected to the Parallel Port. It gives a visual display of the three software registers used by the Standard Parallel Port. Each individual bit can be turned on or off by a simple click of the mouse. (14,839 Bytes)

Developments : Source Code is Now Included

The Parallel Port Debug Tool was first developed in 1994 by Craig Peacock. Since then, it has proven very popular with many people asking for the source code and extra features to be added. To combat both these problems, the source code for the Parallel Port Debug Tool Version 2.0 has been released and is freely available for non-commercial uses. The source code or the program cannot be sold.

However this release was not all my work. If it wasn't for Flavio Poletti, the source code would of never been released. Flavio has modified the earlier code to look for valid Parallel Ports in the BIOS Data Table and then provide the user with the option to use only one of these detected ports. This fixes earlier problems where any I/O address could be entered and the contents of this address modified. No need to mention the effects this would have!

Flavio has also cleaned up the code, making it better to read and has also added modifications so it compiles with DJGPP. As to date this source has been compiled with Borland C++ 3.0 and the DJGPP Compiler. I take the opportunity now to thank the efforts of Flavio.

However the Debug Tool is not perfect yet! Two known problems still plague the Parallel Port Debug Tool. The first one is a lack of hotkeys or accelerators. Although the 8 data bits can be toggled using function keys F1 to F8, the selection of the LPT Port or the toggling of bits of Control Port cannot be controlled using the keyboard, only the mouse. This is a big problem for people who don't have a mouse!

The other problem resides with the Bi-directional control lines. Many of you will be aware that the control lines are open collector/drain outputs and can in fact be used as inputs as well as outputs. However to do so, the control port must be written with xxxx0100 to make the outputs high so the external device can pull them low. The problem arises, when a read/modify/write operation is performed on the control port as the read operation returns what the logic levels are on the pins and not what was last written to the port.

A solution to this problem would be to have two sections to the control port. One section would be used to set the outputs which is stored as a variable. When this variable changes, the contents of the variable is written to the Port. This section never reads the control port only the variable and makes changes to it. The other section will continuously read the control port and display the results i.e. the logic levels at the pins of the control port. However this is the easy bit, finding room on the screen to do this requires the rearranging the display.

Should you make any modifications to the Parallel Port Debug Tool which you think is worth while and would like share with us, please send your modified code and details to If it's deemed worth while to share, it will be provided here with your credits. Happy Debugging . . . .

Alternative Parallel Debug Programs