Hi All, I need to make portable ANSI-C code, any advice how easier to hide "idata"? I use small memory model, and wouldn't change it. Regards, Vladimir
Thank you for your answers! Best Regards, Vladimir
Write your code with something like the following typedefs and macros, and redefine them appropriately for each compiler you use:
typedef unsigned char U8; typedef unsigned short U16; typedef unsigned long U32; typedef struct { U8 byte[8]; } U64; typedef signed char S8; typedef signed short S16; typedef signed long S32; typedef struct { U8 byte[8]; } S64; typedef unsigned char Bool; /// fast, probably small data RAM #define FAST data /// large, probably slower, data RAM #define BULK xdata /// data beyond the normal range of data RAM #define FAR far // program store #define CODE code #define REENTRANT reentrant
See my recommendation here: http://www.keil.com/forum/docs/thread31.asp
View all questions in Keil forum