How to use the parallell port:

The connector looks like this:

(13)SLCT---i-|© ©|---GND(25)
(12)PE-------i-|© ©|---GND(24)
(11)BUSY---i-|© ©|---GND(23)
(10)-ACK---i-|© ©|---GND(22)
( 9)data 7 --o-|© ©|---GND(21)
( 8)data 6 --o-|© ©|---GND(20)
( 7)data 5 --o-|© ©|---GND(19)
( 6)data 4 --o-|© ©|---GND(18)
( 5)data 3 --o-|© ©|---SLCT IN- (17)
( 4)data 2 --o-|© ©|-o- INIT- (16)
( 3)data 1 --o-|© ©|-i- ERROR- (15)
( 2)data 0---o-|© ©|-o- auto feed xt- (14)
( 1)strobe---o-|©_/----

i => input
o => output
- => inverted input/output


It is very easy to control the port in, for example, Qbasic or Pascal. The commands looks like this:
Qbasic: OUT adress, value
qbasic: variable = INP(adress)

pascal: port[adress]:= value
Pascal: variable := port[adress]

adress = the adress of the port, often 0378H (888 in decimal) or 03BCH (956 in decimal).
value = the value you want to send to the port variable = any variable where you want to put a value fetched from the port.
The port is located in three registers, the DATA, STATUS and CONTROL registers. their adresses are:
DATA - base + 0
STATUS - base + 1
CONTROL - base + 2

The inputs are located in the STATUS-register The data I/O-lines D0...D7 are located in the DATA-register,and are

normally outputs only. On newer computers,however, The data lines are bidirectional.

The other outputs are located in the CONTROL-register

In the setup, the port is set to bidirectional if you change the setting to "ECP" or "EPP". If these modes are not available, the data lines can only act as outputs.