I/O Port Addresses
Your computer's I/O ports enable communications between devices and software in your system. They are equivalent to two-way radio channels. If you want to talk to your serial port, you need to know on which I/O port (radio channel) it is listening.
Similarly, if you want to receive data from the serial port, you need to listen on the same channel on which it is transmitting. Unlike IRQs and DMA channels, our systems have an abundance of I/O ports. There are 65,535 ports to be exact—numbered from 0000h to FFFFh—which is an artifact of the Intel processor design more than anything else.
Even though most devices use up to 8 ports for themselves, with that many to spare, you won't run out anytime soon. The biggest problem you have to worry about is setting two devices to use the same port. Most modern plug-and-play systems resolve any port conflicts and select alternative ports for one of the conflicting devices.
One confusing issue is that I/O ports are designated by hexadecimal addresses similar to memory addresses. They are not memory; they are ports. The difference is that when you send data to memory address 1000h, it gets stored in your SIMM or DIMM memory.
If you send data to I/O port address 1000h, it gets sent out on the bus on that "channel," and anybody listening in could then "hear" it. If nobody is listening to that port address, the data reaches the end of the bus and is absorbed by the bus terminating resistors.
Driver programs are primarily what interact with devices at the various port addresses. The driver must know which ports the device is using to work with it, and vice versa. That is not usually a problem because the driver and device come from the same company.
Motherboard and chipset devices usually are set to use I/O port addresses 0h–FFh, and all other devices use 100h–FFFFh. Table 1 shows the commonly used motherboard and chipset-based I/O port usage.
Address (hex) | Size | Description |
---|---|---|
0000–000F | 16 bytes | Chipset - 8237 DMA 1 |
0020–0021 | 2 bytes | Chipset - 8259 interrupt controller 1 |
002E–002F | 2 bytes | Super I/O controller configuration registers |
0040–0043 | 4 bytes | Chipset - Counter/Timer 1 |
0048–004B | 4 bytes | Chipset - Counter/Timer 2 |
0060 | 1 byte | Keyboard/Mouse controller byte - reset IRQ |
0061 | 1 byte | Chipset - NMI, speaker control |
0064 | 1 byte | Keyboard/Mouse controller, CMD/STAT byte |
0070, bit 7 | 1 bit | Chipset - Enable NMI |
0070, bits 6:0 | 7 bits | MC146818 - Real-time clock, address |
0071 | 1 byte | MC146818 - Real-time clock, data |
0078 | 1 byte | Reserved - Board configuration |
0079 | 1 byte | Reserved - Board configuration |
0080–008F | 16 bytes | Chipset - DMA page registers |
00A0–00A1 | 2 bytes | Chipset - 8259 interrupt controller 2 |
00B2 | 1 byte | APM control port |
00B3 | 1 byte | APM status port |
00C0–00DE | 31 bytes | Chipset - 8237 DMA 2 |
00F0 | 1 byte | Math Coprocessor Reset Numeric Error |
To find out exactly which port addresses are being used on your motherboard, consult the board documentation or look up these settings in the Windows Device Manager. Bus-based devices typically use the addresses from 100h on up. Table 2 lists the commonly used bus-based device addresses and some common adapter cards and their settings.
Address (hex) | Size | Description |
---|---|---|
0130–0133 | 4 bytes | Adaptec SCSI adapter (alternate) |
0134–0137 | 4 bytes | Adaptec SCSI adapter (alternate) |
0168–016F | 8 bytes | Fourth IDE interface |
0170–0177 | 8 bytes | Secondary IDE interface |
01E8–01EF | 8 bytes | Third IDE interface |
01F0–01F7 | 8 bytes | Primary IDE/AT (16-bit) hard disk controller |
0200–0207 | 8 bytes | Gameport or joystick adapter |
0210–0217 | 8 bytes | IBM XT expansion chassis |
0220–0233 | 20 bytes | Creative Labs Sound Blaster 16 audio (default) |
0230–0233 | 4 bytes | Adaptec SCSI adapter (alternate) |
0234–0237 | 4 bytes | Adaptec SCSI adapter (alternate) |
0238–023B | 4 bytes | MS bus mouse (alternate) |
023C–023F | 4 bytes | MS bus mouse (default) |
0240–024F | 16 bytes | SMC Ethernet adapter (default) |
0240–0253 | 20 bytes | Creative Labs Sound Blaster 16 audio (alternate) |
0258–025F | 8 bytes | Intel above board |
0260–026F | 16 bytes | SMC Ethernet adapter (alternate) |
0260–0273 | 20 bytes | Creative Labs Sound Blaster 16 audio (alternate) |
0270–0273 | 4 bytes | Plug and Play I/O read ports |
0278–027F | 8 bytes | Parallel port 2 (LPT2) |
0280–028F | 16 bytes | SMC Ethernet adapter (alternate) |
0280–0293 | 20 bytes | Creative Labs Sound Blaster 16 audio (alternate) |
02A0–02AF | 16 bytes | SMC Ethernet adapter (alternate) |
02C0–02CF | 16 bytes | SMC Ethernet adapter (alternate) |
02E0–02EF | 16 bytes | SMC Ethernet adapter (alternate) |
02E8–02EF | 8 bytes | Serial port 4 (COM4) |
02EC–02EF | 4 bytes | Video, 8514, or ATI standard ports |
02F8–02FF | 8 bytes | Serial port 2 (COM2) |
0300–0301 | 2 bytes | MPU-401 MIDI port (secondary) |
0300–030F | 16 bytes | SMC Ethernet adapter (alternate) |
0320–0323 | 4 bytes | XT (8-bit) hard disk controller |
0320–032F | 16 bytes | SMC Ethernet adapter (alternate) |
0330–0331 | 2 bytes | MPU-401 MIDI port (default) |
0330–0333 | 4 bytes | Adaptec SCSI adapter (default) |
0334–0337 | 4 bytes | Adaptec SCSI adapter (alternate) |
0340–034F | 16 bytes | SMC Ethernet adapter (alternate) |
0360–036F | 16 bytes | SMC Ethernet adapter (alternate) |
0366 | 1 byte | Fourth IDE command port |
0367, bits 6:0 | 7 bits | Fourth IDE status port |
0370–0375 | 6 bytes | Secondary floppy controller |
0376 | 1 byte | Secondary IDE command port |
0377, bit 7 | 1 bit | Secondary floppy controller disk change |
0377, bits 6:0 | 7 bits | Secondary IDE status port |
0378–037F | 8 bytes | Parallel Port 1 (LPT1) |
0380–038F | 16 bytes | SMC Ethernet adapter (alternate) |
0388–038B | 4 bytes | Audio - FM synthesizer |
03B0–03BB | 12 bytes | Video, Mono/EGA/VGA standard ports |
03BC–03BF | 4 bytes | Parallel port 1 (LPT1) in some systems |
03BC–03BF | 4 bytes | Parallel port 3 (LPT3) |
03C0–03CF | 16 bytes | Video, EGA/VGA standard ports |
03D0–03DF | 16 bytes | Video, CGA/EGA/VGA standard ports |
03E6 | 1 byte | Third IDE command port |
03E7, bits 6:0 | 7 bits | Third IDE status port |
03E8–03EF | 8 bytes | Serial port 3 (COM3) |
03F0–03F5 | 6 bytes | Primary floppy controller |
03F6 | 1 byte | Primary IDE command port |
03F7, bit 7 | 1 bit | Primary floppy controller disk change |
03F7, bits 6:0 | 7 bits | Primary IDE status port |
03F8–03FF | 8 bytes | Serial port 1 (COM1) |
04D0–04D1 | 2 bytes | Edge/level triggered PCI interrupt controller |
0530–0537 | 8 bytes | Windows sound system (default) |
0604–060B | 8 bytes | Windows sound system (alternate) |
0678–067F | 8 bytes | LPT2 in ECP mode |
0778–077F | 8 bytes | LPT1 in ECP mode |
0A20–0A23 | 4 bytes | IBM Token-Ring adapter (default) |
0A24–0A27 | 4 bytes | IBM Token-Ring adapter (alternate) |
0CF8–0CFB | 4 bytes | PCI configuration address registers |
0CF9 | 1 byte | Turbo and reset control register |
0CFC–0CFF | 4 bytes | PCI configuration data registers |
FF00–FF07 | 8 bytes | IDE bus master registers |
FF80–FF9F | 32 bytes | Universal serial bus |
FFA0–FFA7 | 8 bytes | Primary bus master IDE registers |
FFA8–FFAF | 8 bytes | Secondary bus master IDE registers |
To find out exactly what your devices are using, again I recommend consulting the documentation for the device or looking up the device in the Windows Device Manager. Note that the documentation for some devices might list only the starting address instead of the full range of I/O port addresses used.
Virtually all devices on the system buses use I/O port addresses. Most of these are fairly standardized, meaning conflicts or problems won't often occur with these settings. In the next section, you learn more about working with I/O addresses.