I wrote this program after finding a similar program (IOPSY.EXE) in one of my favorite DOS books.
It is "The Undocumented PC" by Frank van Gilluwe, Addison Wesley Pulishing Company.
ISBN 0-021-62277-7 The Book is no longer in print, at least according to amazon.com.
So, I decided to write my own version, more oriented towards debugging pin voltage levels for CNC stepper control.
Description of LPT_SPY.EXE
It is a DOS Terminate-Stay-Resident (TSR) program. The reason for making it a TSR was the need to be able to run my favorite CNC control program CNCPro.exe and see the state of all related printer I/O pins.
The program must be loaded before the CNC program. Some of Command line switches are:-
LPT_SPY 3BC Use LPT1 in a system with Monochrome display adapter.
LPT_SPY 378 Use LPT1 in a system with Color display adapter.
LPT_SPY 278 Use LPT2 in a system with Color display adapter.
All command line options are available any time by simply running the program without arguments.
LPT_SPY will display this..
It only displays command line options and does not load the program into memory.
LPT_SPY 378 will load the program and monitor LPT1 in my system.
Once loaded into memory, you will see a small display at the top left of the screen.
At the left side of the window is the port address, and on the right of it is the binary representation of the data byte read from that address.
In this example Pin 2,4,6,8 are LOW i.e. 0V measured at the pin of the printer port DB25 socket.
When you are finished, LPT_SPY can be unloaded by LPT_SPY /U
I wrote this program using MASM6.11 and Microsoft C++ .
The EXE is 33,400 Bytes. In memory it occupies about 10KBytes.
I wrote the program using Microsoft's recommended structure for TSR programs, and it restores memory correctly when unloaded.
It will not interfere with the normal operation of the any other DOS program.
I tested it with the CNCPro.exe and MAXNC programs. The MAXNC program uses a graphics interface and LPT_SPY uses a text display. When using LPT_SPY with a GUI based program, the colors of the LPT_SPY display are different.
LPT_SPY reads the three ports about 18 times a second. When debugging, it's best to set the CNC program to single step.
This program is Freeware and may be given away, it may not be sold without my permission.
file://http://hans-w.com/LPT_SPY.zip Download LPT_SPY.zip 17.8KBytes
Disclaimer: Use this program at your own risk.
Back to CNC Page
Back to Home Page
Copyrightę 2005 Hans Wedemeyer, Houston, Texas, U.S.A. All Rights Reserved.