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

division by zero

Hi all,

Does anybody know what does the system do when a division by zero occurs?

We are running RTX 51 ful kernel on Philips' 80c51, 80c552 and 80c660 controllers.

Thanks,

Laurent.

Parents Reply Children
  • Geez! Isn't there any exception/software interrupt thrown that we could catch?

    Nope. You seem to believe that the '51 is a microprocessor, it is not, it is a microcontroller.

    Erik

  • I don't believe the C166 has a hardware trap for this but division by zero causes the overflow bit to be set. I know the HC16 provides a hardware trap, I guess that makes it a microprocessor in Erik's eyes.

    -Walt

  • Walt,

    Yeah... In my opinion, the use of the word microcontroller has been muddied a bit to include anything that includes some built-in "peripherals." For instance, Motorola/Freescale dub the 68340 a microcontroller, but I think most people would have put that one squarely in the processor category. I think it just comes down to the 8051 being an architecture designed for simplicity.

  • I don't believe the C166 has a hardware trap for this but division by zero causes the overflow bit to be set.
    same for the '51
    I know the HC16 provides a hardware trap, I guess that makes it a microprocessor in Erik's eyes.
    Nope, if a controller get a few gadgets, that's nice, if it does not, do not *** about it.

    Erik

  • "In my opinion, the use of the word microcontroller has been muddied..."

    I don't know that there was ever a hard-and-fast distinction between "controller" and "processor."

    These days, I believe that Intel refer to the '386 as a "microcontroller" - that's just their view of market segmentation, rather than any specific architectural or functional distinction!