You mean the ports? Well, it depends. It's very complicated, because each PC is setup differently, and may have different ports. Some things have fixed ports, but you never know.
A PS/2 mouse uses the same ports as the keyboard - you have to send a special code before each command, so it knows the command is for the mouse, not the keyboard. See this:
http://www.computer-engineering.org/ps2mouse/ for more details.
A serial mouse uses the serial ports, and usually the same protocol (except you don't have to send the special code first). The serial UART ports bases (COM1, COM2, COM3, COM4): 3F8h, 2F8h, 3E8h, 2E8h. The last two are subject to differences in systems (OS/2 have up to 8 serial ports, and only the first two are the same as DOS/Windows). They also have an IRQ, #3 is shared between COM2 and COM4, and #4 between COM1 and COM3.
The floppy uses several ports. The primary floppy controller uses port 3F0h, while the secondary controller (if there is one) uses 370h.
Usually. If you have a SCSI or USB floppy then it gets a lot more complicated, and in that case I can't help you. You can have up to two floppies.
The hard disk depends on a lot. If it's an IDE hard disk, the primary controller
usually uses registers starting at 170h (like the floppy, it uses several ports; the first port is called the
base address) and the secondary controller starts at 1F0h. Each controller supports up to two disks, so you have up to 4.
There are also other things, like ATAPI and SCSI, which I know very little about. I don't think they use fixed addresses, I think you should scan the PCI config space for those.
The speaker/soundcard depends. If you just mean the PC speaker, which virtually every PC has built in, the one that old DOS games used for their sound, which consisted of little beeps, that uses two ports, a keyboard port and the PIT channel 2. The lower two bits of port 61h must both be set for PIT channel 2 to connect to the speaker. You program the PIT, telling it the frequency to emit, and with bits 0 and 1 of port 61h set, you'll have sound. PCGPE (PC Game Programmers Encyclopedia) has a speaker.txt which explains how this works.
This is a very primitive sound system, not suitable for a modern OS. Programming modern sound cards is complex, and you probably shouldn't do it until you have done a lot of other thing first (soundcards are less important than most other things). Some documents on sound cards are here:
http://www.osdever.net/cottontail/#Sound
You need to learn about DMA (Direct Memory Access), the PIT (Programmable Interval Timer), the PIC (Programmable Interrupt Controller), and others to make many of these things work. You can learn about these things, or download documents about them, at:
http://www.osdever.net/documents.php?cat=0&sort=1
http://www.osdever.net/cottontail/
http://www.geocities.com/SiliconValley/2151/pcgpe.html
and of course, our very own
http://www.Mega-Tokyo.com/osfaq2/index.php
good luck!