This Optiplex diagnostic chart should help. The code you posted indicates RAM problems. Assuming the RAM modules are good try reseating them. If that does not help try one module at a time in the DIMM slots. If you get an error then you have found the bad RAM module. But since the system has been unused for years it seems more like a problem that can be corrected by reseating.  One more thing. Since you replaced the CMOS battery did you leave the old one out of the system for 15 minutes which will reset the BIOS before installing the new battery?
I've had a spare 790 (Backup) under the desk, not powered up for a couple of years.   Not it fails to boot.The only diagnostics I have are:Power switch is blueDiagnostic panel numbers are 1 & 3Fan runsI have replaced the back up battery which was absolutely dead - with a brand new, test good battery.I have disconnected all the drives  (Hard drive, CD-ROM..)Where do I go next?TIASteve Withnell
Optiplex 790 - Not Booting - Power Switch Blue - Diagnostics 1 - 3