Incorrect return value from NCD function in VSM models

roho

Member
This affects both the PICAXE28X2 and PICAXE40X2 VSM models; others may be affected but I don't intend to use them and so haven't tested anything else. Neither have I tested actual silicon -- at this stage I'm assuming the problem is just in the models. Please download the attachments and run the VSM simulation. The same programme is run in both devices, which produce the same results. The results are dumped to the scratch pad for ease of reading. It can be seen that the return value of the NCD function, stored in register b2, is miscalculated whenever the counter is 2 to an integer power. For comparison, correct results are obtained when the same programme is simulated in the PICAXE editor. Please can the relevant VSM models be corrected. Thanks.

Roger.
 

Attachments

Top