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?