User space code
On a Linux system, the parallel port is a device node in the /dev folder with the name parport0. If you have more than one parallel port, then the other ports will be named parport1, parport2, ... parportN.
To use this parallel port from a user space program, we need to open the parallel port: