If you have formatted then I take it you have the disk.
Configure your computer to start from the CD-ROM drive ie: go to the BIOS and select CD as the first boot option.
Insert your Windows XP CD into your CD-ROM drive and then restart your computer.
(You can also boot with a Windows 98/Me Startup disk with CD support and run WINNT.EXE in the I386 folder on the CD)
When the "Press any key to boot from CD" message is displayed on your screen, press a key to start your computer from the Windows XP CD.
When you see the following message displayed on the Welcome to Setup screen, press ENTER:
To setup Windows XP now, press ENTER.
At this point an option to press R to enter the Recovery Console is displayed. "Do not select this option".
On the Windows XP Licensing Agreement screen, press F8 to agree to the license agreement.
Make sure that your current installation of Windows XP is selected in the box, and then press the R key to repair Windows XP.
Follow the instructions on the screen to complete Setup.
The down side to a repair is you will have to reapply all updates and hot fixes.