1 /* yForth? - A Forth interpreter written in ANSI C
2 * Copyright (C) 2012 Luca Padovani
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * ------------------------------------------------------------------------
17 * Module name: config.h
18 * Abstract: configuration file. Before any compilation please check
19 * that actual configuration is consistent with your
20 * hardware AND your compiler.
23 /* module definition: 1 indicates that a module should be included in the
24 * base vocabulary, 0 excludes a module. Note however that some words in
25 * excluded word lists may be linked to final code if used by other words.
32 #define DOUBLEE_DEF 1L
36 #define MEMALLE_DEF 0L
38 #define SEARCHE_DEF 1L
42 #define LOCALSE_DEF 1L
43 #define FACILITY_DEF 1L
44 #define FACILITYE_DEF 0L
47 #define EXCEPTION_DEF 1L
48 #define EXCEPTIONE_DEF 0L
52 #define STRINGE_DEF 0L
54 #define VERSION_PATTERN (COREE_DEF | (DOUBLE_DEF << 1) |\
55 (DOUBLEE_DEF << 2) | (FLOAT_DEF << 3) |\
56 (FLOATE_DEF << 4) | (MEMALL_DEF << 5) |\
57 (MEMALLE_DEF << 6) | (SEARCH_DEF << 7) |\
58 (SEARCHE_DEF << 8) | (TOOLS_DEF << 9) |\
59 (TOOLSE_DEF << 10) | (LOCALS_DEF << 11) |\
60 (LOCALSE_DEF << 12) | (FACILITY_DEF << 13) |\
61 (FACILITYE_DEF << 14) | (BLOCK_DEF << 15) |\
62 (BLOCKE_DEF << 16) | (EXCEPTION_DEF << 17) |\
63 (EXCEPTIONE_DEF << 18) | (FILE_DEF << 19) |\
64 (FILEE_DEF << 20) | (STRING_DEF << 21) |\
68 /************************************************************************/
69 /* compilation and machine dependent definitions */
70 /************************************************************************/
72 /* Define LITTLE_ENDIAN if you machine is little-endian (e.g. Intel), undefine
73 * it if your machine is big-endian (e.g. Motorola, Sparc...)
74 * Note that some compilers have LITTLE_ENDIAN yet defined.
77 # if __BYTE_ORDER == __LITTLE_ENDIAN
78 # define LITTLE_ENDIAN
84 /* When DCELL_MEM is defined, double cell transfer is realized by memory
85 * copy, if not defined shift and logical operators are used to combine
86 * or isolate cell values
90 /* DATA TYPES: please modify this list accordingly to your system. Note that
91 * sizeof(DCell) == 2 * sizeof(Cell) MUST BE satisfied.
92 * For example, using Borland C for DOS Cell may be "int" and DCell "long int".
93 * Under Linux, Cell may be "int" and DCell "long long".
96 /* this might work for other 64 bit architectures, too? */
97 #if defined(__alpha__)
101 #endif /* __alpha__ */
106 #define UCell unsigned Cell
107 #define DCell long long
108 #define UDCell unsigned DCell
109 #define UChar unsigned Char
111 #define CellBits (sizeof(Cell) * 8)
112 #define CellLog (sizeof(Cell) - 1)
113 #define RealLog (sizeof(Real) - 1)
115 #define FFLAG(n) (-(n))
117 /* Please modify this definitions accordingly with your data types */
119 #define MAX_CHAR UCHAR_MAX
120 #define MAX_D LONG_MAX
121 #define MAX_N INT_MAX
122 #define MAX_U UINT_MAX
123 #define MAX_UD ULONG_MAX
126 /* Some compilers doesn't provide some functions in the standard library.
127 * If you don't have, turn 1s into 0s
133 /* Set following define to 1 if you're compiling under Turbo C, Borland C,