This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Integer division with MON166

If I do an integer division using the 167 CPU simulator it works fine. However, if I use my Kitcon-167 evaluation board and the MON166 monitor (simulated serial mode) with uVision2, I get the wrong result for the division. Stepping through the assembler code generated by the compiler it seems to go wrong when the code attempts to load the MDL register. The same code is fine when I step through it using the CPU simulator.

Can anyone offer any idea why this might be, and what I might be able to do to work around it?

Parents Reply Children
  • I have just discovered that I have a newer version of the monitor which came with our Keil CD. I had been using a version of the monitor which came with our Kitcon-167 evaluation board.

    The newer version saves the MDL register in the relevant place, so all is now well!

    I hope this may help someone else with the same problem, though if they are using the latest stuff they'll be okay anyway.

    Perhaps Keil could put a version history of MON166 on their website, and make the latest version available for download?