Just like on a PIC or so. Use the address 278 LPT2 or 378 LPT1 to access the ports.
Depending on the program that you use.
But the law stays the same. Access the address then read from or write to the
address. Always watch the size of the data you send.
Just make sure you set in the BIOS that the port is Bi-directional.
Tell me what program you use and I could send you a little example.
I will be using Labwindows for the interfacing task. I have read some where, that using the LPT port in ECP mode will make it bidirectional. But the problem lies with the controlling of that bidirectional mode.