sysdep.h (76116) | sysdep.h (94290) |
---|---|
1/******************************************************************* 2 s y s d e p . h 3** Forth Inspired Command Language 4** Author: John Sadler (john_sadler@alum.mit.edu) 5** Created: 16 Oct 1997 6** Ficl system dependent types and prototypes... 7** 8** Note: Ficl also depends on the use of "assert" when 9** FICL_ROBUST is enabled. This may require some consideration 10** in firmware systems since assert often 11** assumes stderr/stdout. | 1/******************************************************************* 2 s y s d e p . h 3** Forth Inspired Command Language 4** Author: John Sadler (john_sadler@alum.mit.edu) 5** Created: 16 Oct 1997 6** Ficl system dependent types and prototypes... 7** 8** Note: Ficl also depends on the use of "assert" when 9** FICL_ROBUST is enabled. This may require some consideration 10** in firmware systems since assert often 11** assumes stderr/stdout. |
12** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ | 12** $Id: sysdep.h,v 1.11 2001/12/05 07:21:34 jsadler Exp $ |
13*******************************************************************/ 14/* 15** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) 16** All rights reserved. 17** 18** Get the latest Ficl release at http://ficl.sourceforge.net 19** | 13*******************************************************************/ 14/* 15** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) 16** All rights reserved. 17** 18** Get the latest Ficl release at http://ficl.sourceforge.net 19** |
20** I am interested in hearing from anyone who uses ficl. If you have 21** a problem, a success story, a defect, an enhancement request, or 22** if you would like to contribute to the ficl release, please 23** contact me by email at the address above. 24** |
|
20** L I C E N S E and D I S C L A I M E R 21** 22** Redistribution and use in source and binary forms, with or without 23** modification, are permitted provided that the following conditions 24** are met: 25** 1. Redistributions of source code must retain the above copyright 26** notice, this list of conditions and the following disclaimer. 27** 2. Redistributions in binary form must reproduce the above copyright --- 6 unchanged lines hidden (view full) --- 34** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 35** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 39** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 40** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 41** SUCH DAMAGE. | 25** L I C E N S E and D I S C L A I M E R 26** 27** Redistribution and use in source and binary forms, with or without 28** modification, are permitted provided that the following conditions 29** are met: 30** 1. Redistributions of source code must retain the above copyright 31** notice, this list of conditions and the following disclaimer. 32** 2. Redistributions in binary form must reproduce the above copyright --- 6 unchanged lines hidden (view full) --- 39** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 40** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 41** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 42** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 44** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 45** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 46** SUCH DAMAGE. |
42** 43** I am interested in hearing from anyone who uses ficl. If you have 44** a problem, a success story, a defect, an enhancement request, or 45** if you would like to contribute to the ficl release, please send 46** contact me by email at the address above. 47** 48** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ | |
49*/ 50 | 47*/ 48 |
51/* $FreeBSD: head/sys/boot/ficl/i386/sysdep.h 76116 2001-04-29 02:36:36Z dcs $ */ | 49/* $FreeBSD: head/sys/boot/ficl/i386/sysdep.h 94290 2002-04-09 17:45:28Z dcs $ */ |
52 53#if !defined (__SYSDEP_H__) 54#define __SYSDEP_H__ 55 56#include <sys/types.h> 57 58#include <stddef.h> /* size_t, NULL */ 59#include <setjmp.h> --- 10 unchanged lines hidden (view full) --- 70*/ 71#if !defined TRUE 72#define TRUE 1 73#endif 74#if !defined FALSE 75#define FALSE 0 76#endif 77 | 50 51#if !defined (__SYSDEP_H__) 52#define __SYSDEP_H__ 53 54#include <sys/types.h> 55 56#include <stddef.h> /* size_t, NULL */ 57#include <setjmp.h> --- 10 unchanged lines hidden (view full) --- 68*/ 69#if !defined TRUE 70#define TRUE 1 71#endif 72#if !defined FALSE 73#define FALSE 0 74#endif 75 |
78 | |
79/* 80** System dependent data type declarations... 81*/ 82#if !defined INT32 83#define INT32 long 84#endif 85 86#if !defined UNS32 --- 70 unchanged lines hidden (view full) --- 157** B U I L D C O N T R O L S 158*/ 159 160#if !defined (FICL_MINIMAL) 161#define FICL_MINIMAL 0 162#endif 163#if (FICL_MINIMAL) 164#define FICL_WANT_SOFTWORDS 0 | 76/* 77** System dependent data type declarations... 78*/ 79#if !defined INT32 80#define INT32 long 81#endif 82 83#if !defined UNS32 --- 70 unchanged lines hidden (view full) --- 154** B U I L D C O N T R O L S 155*/ 156 157#if !defined (FICL_MINIMAL) 158#define FICL_MINIMAL 0 159#endif 160#if (FICL_MINIMAL) 161#define FICL_WANT_SOFTWORDS 0 |
162#define FICL_WANT_FILE 0 |
|
165#define FICL_WANT_FLOAT 0 166#define FICL_WANT_USER 0 167#define FICL_WANT_LOCALS 0 168#define FICL_WANT_DEBUGGER 0 169#define FICL_WANT_OOP 0 170#define FICL_PLATFORM_EXTEND 0 171#define FICL_MULTITHREAD 0 172#define FICL_ROBUST 0 173#define FICL_EXTENDED_PREFIX 0 174#endif 175 176/* 177** FICL_PLATFORM_EXTEND 178** Includes words defined in ficlCompilePlatform 179*/ 180#if !defined (FICL_PLATFORM_EXTEND) 181#define FICL_PLATFORM_EXTEND 1 182#endif 183 | 163#define FICL_WANT_FLOAT 0 164#define FICL_WANT_USER 0 165#define FICL_WANT_LOCALS 0 166#define FICL_WANT_DEBUGGER 0 167#define FICL_WANT_OOP 0 168#define FICL_PLATFORM_EXTEND 0 169#define FICL_MULTITHREAD 0 170#define FICL_ROBUST 0 171#define FICL_EXTENDED_PREFIX 0 172#endif 173 174/* 175** FICL_PLATFORM_EXTEND 176** Includes words defined in ficlCompilePlatform 177*/ 178#if !defined (FICL_PLATFORM_EXTEND) 179#define FICL_PLATFORM_EXTEND 1 180#endif 181 |
182 |
|
184/* | 183/* |
184** FICL_WANT_FILE 185** Includes the FILE and FILE-EXT wordset and associated code. Turn this off if you do not 186** have a file system! 187** Contributed by Larry Hastings 188*/ 189#if !defined (FICL_WANT_FILE) 190#define FICL_WANT_FILE 0 191#endif 192 193/* |
|
185** FICL_WANT_FLOAT 186** Includes a floating point stack for the VM, and words to do float operations. 187** Contributed by Guy Carver 188*/ 189#if !defined (FICL_WANT_FLOAT) 190#define FICL_WANT_FLOAT 0 191#endif 192 193/* 194** FICL_WANT_DEBUGGER 195** Inludes a simple source level debugger 196*/ 197#if !defined (FICL_WANT_DEBUGGER) 198#define FICL_WANT_DEBUGGER 1 199#endif 200 201/* | 194** FICL_WANT_FLOAT 195** Includes a floating point stack for the VM, and words to do float operations. 196** Contributed by Guy Carver 197*/ 198#if !defined (FICL_WANT_FLOAT) 199#define FICL_WANT_FLOAT 0 200#endif 201 202/* 203** FICL_WANT_DEBUGGER 204** Inludes a simple source level debugger 205*/ 206#if !defined (FICL_WANT_DEBUGGER) 207#define FICL_WANT_DEBUGGER 1 208#endif 209 210/* |
211** FICL_EXTENDED_PREFIX enables a bunch of extra prefixes in prefix.c and prefix.fr (if 212** included as part of softcore.c) 213*/ 214#if !defined FICL_EXTENDED_PREFIX 215#define FICL_EXTENDED_PREFIX 0 216#endif 217 218/* |
|
202** User variables: per-instance variables bound to the VM. 203** Kinda like thread-local storage. Could be implemented in a 204** VM private dictionary, but I've chosen the lower overhead 205** approach of an array of CELLs instead. 206*/ 207#if !defined FICL_WANT_USER 208#define FICL_WANT_USER 1 209#endif --- 126 unchanged lines hidden (view full) --- 336** more than 8 of these, so that's the default limit. Too many of these functions 337** will probably exact a nasty performance penalty. 338*/ 339#if !defined FICL_MAX_PARSE_STEPS 340#define FICL_MAX_PARSE_STEPS 8 341#endif 342 343/* | 219** User variables: per-instance variables bound to the VM. 220** Kinda like thread-local storage. Could be implemented in a 221** VM private dictionary, but I've chosen the lower overhead 222** approach of an array of CELLs instead. 223*/ 224#if !defined FICL_WANT_USER 225#define FICL_WANT_USER 1 226#endif --- 126 unchanged lines hidden (view full) --- 353** more than 8 of these, so that's the default limit. Too many of these functions 354** will probably exact a nasty performance penalty. 355*/ 356#if !defined FICL_MAX_PARSE_STEPS 357#define FICL_MAX_PARSE_STEPS 8 358#endif 359 360/* |
344** FICL_EXTENDED_PREFIX enables a bunch of extra prefixes in prefix.c and prefix.fr (if 345** included as part of softcore.c) 346*/ 347#if !defined FICL_EXTENDED_PREFIX 348#define FICL_EXTENDED_PREFIX 0 349#endif 350 351/* | |
352** FICL_ALIGN is the power of two to which the dictionary 353** pointer address must be aligned. This value is usually 354** either 1 or 2, depending on the memory architecture 355** of the target system; 2 is safe on any 16 or 32 bit 356** machine. 3 would be appropriate for a 64 bit machine. 357*/ 358#if !defined FICL_ALIGN 359#define FICL_ALIGN 2 --- 44 unchanged lines hidden (view full) --- 404** to get a 64 bit product, & divide the product by an UNS32 405** to get an UNS32 quotient and remainder. Much easier in asm 406** on a 32 bit CPU than in C, which usually doesn't support 407** the double length result (but it should). 408*/ 409DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y); 410UNSQR ficlLongDiv(DPUNS q, FICL_UNS y); 411 | 361** FICL_ALIGN is the power of two to which the dictionary 362** pointer address must be aligned. This value is usually 363** either 1 or 2, depending on the memory architecture 364** of the target system; 2 is safe on any 16 or 32 bit 365** machine. 3 would be appropriate for a 64 bit machine. 366*/ 367#if !defined FICL_ALIGN 368#define FICL_ALIGN 2 --- 44 unchanged lines hidden (view full) --- 413** to get a 64 bit product, & divide the product by an UNS32 414** to get an UNS32 quotient and remainder. Much easier in asm 415** on a 32 bit CPU than in C, which usually doesn't support 416** the double length result (but it should). 417*/ 418DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y); 419UNSQR ficlLongDiv(DPUNS q, FICL_UNS y); 420 |
421 422/* 423** FICL_HAVE_FTRUNCATE indicates whether the current OS supports 424** the ftruncate() function (available on most UNIXes). This 425** function is necessary to provide the complete File-Access wordset. 426*/ 427#if !defined (FICL_HAVE_FTRUNCATE) 428#define FICL_HAVE_FTRUNCATE 0 429#endif 430 431 |
|
412#endif /*__SYSDEP_H__*/ | 432#endif /*__SYSDEP_H__*/ |