I inherited a 42S and it switches off imediately after switching on. In
some cases the display will flash for a split second, in other cases it
doesn't show anything. If I press the ON key fast enough I can keep the
display on until I release the key.

The self test (ON-LOG) works just fine, and passes OK. But at the end
it just switches off. ON-ROOT (the reset function?) works and very
briefly display "Machine Reset". Same thing for the ON-SUM-XEQ Program

I can even adjust the contrast, and even get it to do calculations if I
press a key fast enough at power on, but it switches back off again as

Anyone know what is wrong? Is there any higher level reset function I
can try?

The batteries are brand new and tested, and I have tried a 2nd set.