How to access I/O Port of the PCI card?

Thanks!

I believe that the PCI card has I/O memory space. Because MS-DOS ~ Windows XP can sound sounds through I/O port 220H or 388H. However, I don’t know the reason the sound is sounding regardless there are no I/O memory space confguration data on the PCI configuration space.

Generally, user need to set environment variable “BLASTER=A220 I5 D1 T2” on the MS-DOS to sound.
On Windows XP, I think the sound driver reserves or allocates or assigns I/O port 220H or 388H for the PCI card to OS/BIOS? by using kernel/BIOS API ?

EDIT:
Also, Linux sound driver can sound sounds from the PCI card. the driver access the I/O port.
So, I think modern Windows can sound sounds from the PCI card, too.