Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
1)I have this fundamental doubt about I/O address and memory. There is something called 'memory address space' and 'I/O address space'. Suppose there is 32 MB RAM, then the memory (or system) address space is 0...32MB-1. Similarly, the I/O address space also start from 0...something? It looks like the I/O address space starts from 0..ffff. (this is my understanding, correct me if I'm wrong). My question is, whether this I/O address space is part of the RAM address space ie. 0..32MB-1. If this is the case, can anyone tell me where exactly the I/O addresses start in RAM (ie. in the 0..32MB-1 range?). If this is not the case, then how does CPU distinguish between memory address space and I/O address space, given an machine instruction which asks the CPU to load the value from some address?Also, some I/O ports can have a range of memory. What I understand is suppose an I/O port has an address range of x..x+3, what it means is, it has probably one or more registers inside it with a combined size of 4 bytes. For eg., let's say there are four registers inside an I/O port each of size 1 byte. Then if I address location x, then it means I'm referrring to register 1 inside the I/O port and so on. Is this correct?
2) Then there is something called I/O memory. What does this mean?
I expect clarification on these points.