I'm posting this strange problem here because I still believe it's hardware related... (maybe rom defect? But the issue is well confined to math operations (!))
I just repaired an NMS8280 (power supply faulty, required one diode rectifier replacement).
I was testing the overall functioning and it seems to work fine with any rom or cartridge I have... but...
A very strange behaviour occurs on some demo or test programs such as testram or the monitor test by NYYRIKKI (which stops with an overflow wthin a 'circle' statement in test)
I traced down the problem beginning from the suspect instructions reading the H2B location that stores monitor frequency , but then I found that the problem occurs on any division made
but the strangest thing occurs using a variable to store a value :
I don't believe it's a common NMS8280 defect but if anyone wants to try in his own... (I tried same configuration on BlueMSX and it behaves just as expected...)