[Main menu]

I/O Ports


Introduction

The Intel 32-bit processors can access 65536 (16 bit) different I/O ports. The table below is some of the I/O ports used today. For a more detailed list download Ralf Brown's interrupt list.


I/O Port Deconding

On early PC system the system components only decoded the lowest 10 bit on the I/O port bus. Therefor the component could only differentiate 1024 different I/O ports (0000h to 0400h). Never system will do the full 16 bit decode, but the 10 bit decoding can still be a problem. When a system component only decode the lower 10 bits for an I/O port, it will positive decode 64 (the top 6 bits) different I/O ports in the full I/O range.

Fx. a system component with a port at 0021h, and doing 10 bit decoding, would react to the following I/O ports:

?021h, ?421h, ?821h, ?C21h

Where ? can be any value between 0 and F


Fixed I/O Ports

This is a list of the most generic and fixed I/O ports in the IBM PC:

Fixed I/O Ports
I/O Port(s) Description
0000h - 001FhDMA-1
0020h - 003FhPIC-1
0040h - 005FhPIT
0070h - 007FhCMOS-RAM & RTC
0080h - 008FhDMA Page Register
00A0h - 00AFhPIC-2
00C0h - 00DFhDMA-2
0140h - 0157hRTC
0170h - 0177hSecondary IDE
01E8h - 01EFhTertiary IDE
01F0h - 01F7hPrimary IDE
01F8h - 01F8hBit 0: A20 Gate Enable/Disable
0238h - 023BhBus Mouse Port - Secondary address
023Ch - 023FhBus Mouse Port - Primary address
0240h - 0257hRTC
0278h - 027FhParallel EPP-mode port - LPT1
0279h - 0279hISA PnP Configuration - Write Address Port
02E8h - 02EFhSerial Port - COM4
02F0h - 02F8hSerial Port - COM2
0340h - 0357hRTC
0370h - 0377hSecondary Floppy Disk Controller
0378h - 037FhParallel EPP-mode Port - LPT2
03BCh - 03BFhParallel Port - LPT1
03E8h - 03EFhSerial Port - COM3
03F0h - 03F7hPrimary Floppy Disk Controller
03F8h - 03FFhSerial Port - COM1
0778h - 077AhECP-mode Parallel port
07BCh - 07BEhECP-mode Parallel port
0A79h - 0A79hISA PnP Configuration - Write Data Port


I/O Port Ranges

This is a list of the I/O port ranges which can be used by adapters:

I/O Port Ranges
I/O Port Range Number of Ports Description
0203h - ????h1ISA PnP Configuration - Read Data Port