1 /*---------------------------------------------------------------------------
2 MCS51 specific features.
4 Copyright (C) 2004 - Maarten Brock, sourceforge.brock@dse.nl
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ---------------------------------------------------------------------------*/
21 #ifndef __SDC51_ASM_MCS51_FEATURES_H
22 #define __SDC51_ASM_MCS51_FEATURES_H 1
24 #define _REENTRANT __reentrant
27 /* define _AUTOMEM to indicate the default storage class for
28 automatic variables. To be used with pointers to automatic variables.
29 Cannot be used in reentrant declared functions!
34 char _AUTOMEM * pAr = Ar;
37 #if defined(SDCC_STACK_AUTO)
38 #if defined(SDCC_USE_XSTACK)
39 #define _AUTOMEM __pdata
41 #define _AUTOMEM __idata
43 #elif defined(SDCC_MODEL_SMALL)
44 #define _AUTOMEM __data
45 #elif defined(SDCC_MODEL_MEDIUM)
46 #define _AUTOMEM __pdata
48 #define _AUTOMEM __xdata
51 /* define _STATMEM to indicate the default storage class for
52 global/static variables. To be used with pointers to static variables.
57 char _STATMEM * pAr = Ar;
60 #if defined(SDCC_MODEL_SMALL)
61 #define _STATMEM __data
62 #elif defined(SDCC_MODEL_MEDIUM)
63 #define _STATMEM __pdata
65 #define _STATMEM __xdata