I was wondering how a port for a given device controller is chosen and how it knows the values on address/data/control bus are for him.
Let's take the 8259A PIC for example, which is connected that way to the address/data/control bus:
8952A Programmable Interrupt Controller
I can see the active low CS (Chip Select) pin that is used to enable the PIC and be able to read/write on it, is connected to the address bus... But to what line? (That is the part I don't get). How does the address bus know when to activate the CS pin?
I believe that CS pin must be activated when the address bus is 0x20 or 0x21 (ports used by master PIC) and the CPU did not assert the M/#IO control line to read/write from/into I/O space (with the IN and OUT x86 instructions). But I don't get why the CS pin is connected to whatever address bus line since other ports are used by other devices controller.