Predefined symbols in C51

Where can I find a list of predefined symbols for C51? I'm trying to write a set of portable library routines and I can't figure out how to tell that the file is being compiled by C51..

So I can do something like:
#ifdef __keil_c51__
//keil specific routines
#endif

I'm using an old version of the compiler, v5.10.

Thanks in advance..

Scott

Parents
  • In the v6.03 manual, "C51 Compiler User's Guide 03.2000," it's on p112, entitled "Predefined Macro Constants"

    __C51__ gives you the version of C51

    There's also a NOEXTEND directive, which disables all the Keil extensions to ANSI C.

    Don't forget that you'll need to consider byte ordering, data sizes, etc, as well as the 'C' language extensions!

Reply
  • In the v6.03 manual, "C51 Compiler User's Guide 03.2000," it's on p112, entitled "Predefined Macro Constants"

    __C51__ gives you the version of C51

    There's also a NOEXTEND directive, which disables all the Keil extensions to ANSI C.

    Don't forget that you'll need to consider byte ordering, data sizes, etc, as well as the 'C' language extensions!

Children
More questions in this forum