STOP 0xed:
http://aumha.org/win5/kbestop.php#0xedCheck the cables to your hard drive to ensure that they're the correct one's (you should be using the 80 wire cables with IDE - not the 40 wire one's).
If that is OK, then the problem is most likely with your drive controller (that's built into your motherboard). I say this because you also had problems with the CD/DVD drives.
How to fix this? That's a poser. For now, I'd suggest resetting your BIOS to the default values (the easiest way to do this is to unplug the system from the wall, open the case, ground yourself on the metal frame of the case, and remove the CMOS battery (a silver thing about the size of a nickle), and then wait at least 30 minutes before putting it back in).
A BIOS flash may also become necessary - but for now hold off on that (because it can destroy your motherboard if not done right).
Then try to install XP again. First try it with all but the hard drive and floppy being disconnected. Then try it with the hard drive and one CD connected (and everything else disconnected) - this'll help to rule out problems with the floppy or the CD Drive. You can also troubleshoot this by getting another hard drive to try in place of the one you currently have.
Should all this fail, I'd try the BIOS flash as a last resort and then would start thinking about replacing the motherboard (or a new system with lot's of goodies on it!)