| |||||||||
Memory mapped IO: device registers get accessed by ordinary memory access instructions.
Another way of device access is having extra instructions (e.g. IN OUT of 8080, 8086) that drive an extra processor pin to signal device access.
Advantages of "IN/OUT": less decoding gear needed due to the extra IN/OUT pin (it can be determined by looking at one pin whether the addressbus bitpattern is directed at memory or device). No RAM addressspace is wasted (relevant on cpus with only 64 kilobyte or less address space).
Disadvantages of "IN/OUT": special instructions that do not work with all registers/addressing modi (it would be opcode space waste to provide IN/OUT with all addressing modi, not to mention all operations AND OR CLR...). Also the special instructions do not get generated by compilers, making it impossible e.g. in C to just say *device=value; .