??? 03/20/07 20:12 Read: times |
#135436 - Time to eat your words! Responding to: ???'s previous message |
Erik Malund said:
Things like "unsigned char XDATA" are defined in a separate file as, for this, UX8. Of course all things involving SFRs and such will have to change, my question refer to the basic C syntax. Well, I always say that one should always encapsulate all compiler-dependencies in typedefs, #defines, etc. Try a search for "Conditional Compilation"; eg, http://www.8052.com/forum/read.phtml?id=129556 That way, I can compile all my 8051 code in Borland or Microsft - so the "basic C syntax" is taken care of. (of course, the code doesn't actually run - but it compiles). Stuff like: #if KEIL #define XDATA xdata #elif BORLAND #define XDATA #elif MICROSOFT #define XDATA #else #error Unsupported/Undefined compiler #endif Note the final #else and #error to catch misconfigurations... Maarten Brock started a thread a while ago with this very aim: http://www.8052.com/forum/read.phtml?id=116161 You said, although I have absolutely no interest in them, I laud your efforts
http://www.8052.com/forum/read.phtml?id=116492 Looks like now is the time to get interested! |