You’re really better off reinstalling. But you can move a hard drive with Windows XP to another computer and make it boot. Can’t promise that everything will be totally smooth though.
Back up your hard drive first. Otherwise if this procedure doesn’t work and you’re left with an unbootable drive, you’re in trouble.
The main thing that will keep your hard drive from working in another computer is all the hardware differences. Have any and all driver CDs for your hardware handy. If you have nothing but a system restore CD, this might not work for you.
To continue with the risky venture what you need to do is go to your Device Manager and delete all the drivers you can. Video driver, audio drivers, motherboard resources, everything. It’s a bit tricky because some things want to reboot the computer, keep saying no as much as you can.
Then Shut Down and put the hard drive in the new computer. With any luck it will not bluescreen or reboot during the boot and it will get into Windows and start detecting hardware. At this stage it will reboot after installing drivers several times and you’re probably going to need to supply drivers for certain hardware. Hopefully you have them, or can download drivers from another computer.
Good luck. I’ve done this several times with little or no ill effects. The only weird thing about my current PC is that USB devices are a bit quirky sometimes, but maybe that’s just XP.