I don't understand why you have to throw it out. Install a clean copy of XP or win98 or Win 2000. You can move disks from one box to another. Most of the time with OS still installed if you prepped it before hand. Removed the devices before you shutdown the old box.
If you can't get an OS to install fresh then it is possible the disk is bad. Put another disk in and install.
If I understand you the computer boots past bios, but, doesn't boot to oS because the disk and OS was installed on another box. This does happen. Wipe the drive and start fresh.
If you want to throw away that box then I'll give you my address and send you shipping cost and you can ship it to me.