Modern notebooks do not come anymore with parallel ports. If you are luck and have a docking station, perhaps. Otherwise no more fun with LPT interfacing alas.
So I had a look at USB or Cardbus/PCMCIA solutions.
Do not bother with the USB to LPT adapters. Those are capable of driving a printer, but the interface as is required for the programming here is not there.
There are many Cardbus Parallel port adapters and most also do not work as I want.
I did find one, and it works fine. It is the Delock PCMCIA Cardbus 1 x Parallel adapter.
Ofcourse it has the big DB25 pin connector as you can see, it is really standard.
Drivers are either found at the driver cd or (more uptodate) at Delock’s website. Windows 7 drivers are installed automatically. As you can see, the card is based on a MosChip IC.
Now not everything is simple as with the oldfashioned parallel port.
As you can see in the Properties tab (Device Manager shows this) for this instance it is LPT3 and the I/O range is starting at FFF0. Depending on (I really dont have a clue!) it can also be other I/O resource addresses and/or LPT port numbers. It is the same after every reboot, so it is only once determined.
Substitute this in your program (and remove the sanity checks if any for valid ports).
My tests has shown this to work as a standard LPT port. It is a bit slower alas.