First of All You Should Send you Program Lines
Now Check These:
1- You have Enabled EPP,ECP in you Rom Bios to Use your port as Bidrectional port
2- you Data (input or Output) is in the 1 Byte (@ Adr 0x378 ) you Must Always Read or Write Data
in that Reister
3- For Toggleing the Direction of Data you only need to change the Control Reg (0x378+2) bit #5
which is direction bit like outport(0x378+2,xxx1xxxx).
4- now you should put the Desired input on LPT Data Pins
5- Then you should Read the 0x378 Register a=inport(0x378)