Keil Logo

Version 4.0 Differences

  • Byte Order of Floating-point Numbers
    Floating-point numbers are now stored in the big endian order. Previous releases of the C51 compiler stored floating-point numbers in little endian format. Refer to Floating-point Numbers for more information.
  • _chkfloat_ Library Function
    The intrinsic function _chkfloat_ allows for fast testing of floating-point numbers for error (NaN), ±INF, zero and normal numbers. Refer to _chkfloat_ for more information.
  • FLOATFUZZY Directive
    C51 now supports the FLOATFUZZY directive. This directive controls the number of bits ignored during the execution of a floating-point compare. Refer to FLOATFUZZY for more information.
  • Floating-point Arithmetic is Fully Reentrant
    Intrinsic floating-point arithmetic operations (add, subtract, multiply, divide, and compare) are now fully reentrant. The C library routines fpsave and fprestore are no longer needed. Several library routines are also reentrant. Refer to Routines by Category for more information.
  • Long and Floating-point Operations no Longer use an Arithmetic Stack
    The long and floating-point arithmetic is more efficient; the code generated is now totally register-based and does not use a simulated arithmetic stack. This also reduces the memory needs of the generated code.
  • Memory Types
    The memory types have been changed to achieve better performance in the run-time library and to reflect the memory map of the MCS® 251 architecture.
  • Memory Type Bytes for Generic Pointers
    The memory type bytes used in generic pointers have changed. The following table contains the memory type byte values and their associated memory type.

    Memory Type idata data bdata xdata pdata code
    C51 V5 Value 0x00 0x00 0x00 0x01 0xFE 0xFF
    C51 V4 Value 0x01 0x04 0x04 0x02 0x03 0x05
  • WARNINGLEVEL Directive
    C51 now supports the WARNINGLEVEL directive which lets you specify the strength of the warning detection for the C51 compiler. The C51 compiler now also checks for unused local variables, labels, and expressions. Refer to WARNINGLEVEL for more information.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.