Does reading a CPU port (through the in
/out
instructions) have any side effects whatsoever?
For example:
Does it "tell" a device that the port has been read?
Could reading an arbitrary port carelessly cause any harm?
I'm assuming it shouldn't, but then something doesn't make sense to me:
If there is no side effect, then how does an ATA drive, when doing programmed I/O, "know" when a word has been read, so it can supply the next word of data?