Reading a parallel port

Is is anyone familiar with any source code that enables reading of a
parallel port??

The scenario:
I have a device that spews ASCII into a parallel port. Currently, it is
hooked into a printer, but I want to trap that ASCII, append it to a
file and then redirect to the printer.

There is heaps of serial port source code floating about, but I can't
find any for the parallel port, any assistance would be most welcomed.