Several ways to access the parallel port are discussed in
http://www.tldp.org/HOWTO/IO-Port-Programming.html
Basically, if you ignore the handshaking, then bytes written to lp0 will appear on the port, and bytes read from it will return the values on the port. More complex issues, such as setting the port to be an input, or changing the handshake modes, are in the HOWTO.