]> git.gag.com Git - fw/sdcc/blob - device/include/asm/ds390/features.h
* device/include/asm/default/features.h,
[fw/sdcc] / device / include / asm / ds390 / features.h
1 /** DS390/DS400 specific features.
2  */
3 #ifndef __SDC51_ASM_DS390_FEATURES_H
4 #define __SDC51_ASM_DS390_FEATURES_H   1
5
6 #define _REENTRANT      __reentrant
7 #define _CODE           __code
8
9 /* define _AUTOMEM to indicate the default storage class for
10    automatic variables. To be used with pointers to automatic variables.
11    Cannot be used in reentrant declared functions!
12
13    void foo(void)
14    {
15      char Ar[10];
16      char _AUTOMEM * pAr = Ar;
17    }
18 */
19 #if defined(SDCC_STACK_AUTO)
20   #if defined(SDCC_USE_XSTACK)
21     #define _AUTOMEM __pdata
22   #else
23     #define _AUTOMEM __idata
24   #endif
25 #elif defined(SDCC_MODEL_SMALL)
26   #define _AUTOMEM __data
27 #else
28   #define _AUTOMEM __xdata
29 #endif
30
31 /* define _STATMEM to indicate the default storage class for
32    global/static variables. To be used with pointers to static variables.
33
34    char Ar[10];
35    void foo(void)
36    {
37      char _STATMEM * pAr = Ar;
38    }
39 */
40 #if defined(SDCC_MODEL_SMALL)
41   #define _STATMEM __data
42 #else
43   #define _STATMEM __xdata
44 #endif
45
46 #endif