Click here to Skip to main content
15,850,360 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
int b;
cout<<"insert  data\n";
outportb (0x378,b);
case 2:
int result;
result = inportb(0x378);

I'm not able to overwrite first value sent to port. If I take input from port, it always give me same value no matter whatever I write to port.
Updated 8-May-11 13:23pm

1 solution

Why on Earth do you expect to read the same value you have written?

The I/O port is not a memory device; it is not obliged to write back the value you have previously written to it. What happen depends on the behavior of the device connected to the other end of your parallel cable…

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900