Seems while removing virus by AVG some infected system files also be deleted.
Take up your Windows xp professional CD and boot from it.
After booting choose a new installation on the same Drive in Which your XP installed.
This will check for any previous XP installation on this Drive First And Ask you to repair it.
After that your system should work fine.