ok I'm not sure exactly what has happened but if I were you i would do the following:
insert the XP disk and install Windows again.
when it asks where to install, delete all the partitions and make a new one occupying all of the 40GB.
Choose the NTFS format for the partition that XP is going to go onto. (FAT32 has a maximum size limit of 32GB).