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

Sometimes DIVSION doesn't work in Dallas 390

This is a test project in Dallas 390 and the target options-Use On-chip Arithmatic Accelerator is selected
main.c:

void main(void)
{
	unsigned int i = 2008;
	unsigned char ch;

	ch = i%100;
	ch = i/100;
}
I can get the right answer in this test project,and I can't in my original project which include some other modules.But if I unselect target options-Use On-chip Arithmatic Accelerator,I can get the right answer.There maybe something I don't know about Arithmatic Accelerator in Dallas 390.Anybody can give me the answer?Thanks!

Parents
  • You didn't get any answer so far, likely because you chose the wrong product family (C251).

    That said, it's quite impossible to guess what went wrong in your actual code if you don't show any of that. Code that does work doesn't explain anything about other code that doesn't.

    Just one hint: did you check the "ANSI C integer promotion rules" option?

Reply
  • You didn't get any answer so far, likely because you chose the wrong product family (C251).

    That said, it's quite impossible to guess what went wrong in your actual code if you don't show any of that. Code that does work doesn't explain anything about other code that doesn't.

    Just one hint: did you check the "ANSI C integer promotion rules" option?

Children
No data