The IBM 5160, or XT, is the SECOND version if the original PC from 1983! That's almost 30 years old.
You STILL have one?
If you use an original floppy, it's heads may need to be cleaned, of your floppies could be going bad. You can no longer find any replacement for those old 5.25".
It came with a 10 Mb hard drive. If you have something larger, the BIOS overlay may have become corrupted.
Do you try to run programms writen in Basic? "Syntax error" was all to common in Basic.
If it's interpreted basic, the programm may have become corrupted. Try editing it and look for badly coded lines.
Those things ran the MS-DOS version 1, 2 or 3 operating system. Maybe the OS have some bad system files.
Check those:
autoexec.bat
config.sys
Make sure that command.com is present and intact.
Start to think about getting a current computer. The cheapest entry level you can find will be over 1000 times more performant.
If you still need to run very old DOS based programms, there are several emulators available, most are free.
If you need it to run some equipment controllers, then it's past time to upgrade your equipment or you could go out of business as that old equipment break down and you can't get any support for it.
Electro
July 2012