I have been reading a lot on port addressing and such lately, and know that say, Port 0x20, 0x21, 0xA0, and 0xA1 are the 8259A PIC, 8253/8254 PIT at Port 0x40-0x47, Ports 0x60-0x64 are the keyboard controller, 0x3F0-0x3F6 is the floppy device controller ext. I am trying to read up on things specifically for the 8086+ processor family and have seen some books online that seem to be very well worth the buy, if any suggestions on such books please let me know as well.
However, to my surprise, I am still unsure exactly how or where these port numbers are actually coming from? Are they mapped like the IDT occupying a space for a vector table somewhere? To my understanding you can readjust port numbers on windows, or is this incorrect? Or are they built into the circuitry of the processors pin-outs maybe? How can one find knowledge on what ports are for what device and what ports a computer has exactly?