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:
C#
int b;
cout<<"insert  data\n";
cin>>b;
outportb (0x378,b);
break;
case 2:
int result;
result = inportb(0x378);
cout<<result<<endl;
break;


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.
Posted
Updated 8-May-11 13:23pm
v2

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…

—SA
 
Share this answer
 
v2

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