I/O Addresses are not particularly scarce in an IBM pc.
There are in fact 1024 of them using a 10bit bus.
Logically, no two devices could use the same address to
connect to the cpu. For this reason, fixed IO addresses
have been assigned to many peripherals, largely for
historic reasons.. Just as a printer port uses a
fixed IO address like 0x378, the ISA PNP channel
also uses 3 fixed addresses. These addresses are actually
registers present on all ISA PNP cards in the system.
Irrespective of how many pnp cards are in a system, all respond to these addresses as if they were a single unit.
The Address Register
The write-only pnp address register shares it's space with the read only printer status port.
All pnp components have fixed functionality. You set
the address register to specify which function on the pnp
card you wish to operate on. The addresses (functions)
sent to the address register are:
*The port address in function code 0 is a 6 bit value. Write data = port>>2. The resulting read address is always port | 0x03
The Write Data Register.
The write data register is used to provide addtional information to a 'function; Thus, to wakep logical card 1, C code would look as follows
// set the address register to the wake function
The READ Data Register.
Sending a write command to all boards with the same address (0x279,or 0x2A9) presents no problem. Each board simply latches the incoming data with no ill affect. Reading data from the same address on all cards is impossible. All cards would respond, and all data would be corrupted on the common bus. There is no problem electronically, doing this, just the data will be garbaged. All cards initially have no specific read address. It is up to the controlling software to tell them which address they should use to send their data. This can be done by;