1 /******************************************************************************
2 * Copyright (c) 2004, 2008 IBM Corporation
4 * This program and the accompanying materials
5 * are made available under the terms of the BSD License
6 * which accompanies this distribution, and is available at
7 * http://www.opensource.org/licenses/bsd-license.php
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
13 // Copyright 2002,2003,2004 Segher Boessenkool <segher@kernel.crashing.org>
17 extern long engine(int, long, long);
21 #define POCKETSIZE 256
24 #define HASHSIZE 0x1000
27 #define ENGINE_MODE_PARAM_1 0x0001
28 #define ENGINE_MODE_PARAM_2 0x0002
29 #define ENGINE_MODE_NOP 0x0004
30 #define ENGINE_MODE_EVAL 0x0008
31 #define ENGINE_MODE_POP 0x0010
34 #define forth_eval(s) engine(ENGINE_MODE_PARAM_1|ENGINE_MODE_PARAM_2|ENGINE_MODE_EVAL, \
35 strlen((s)), (long)(s))
36 #define forth_eval_pop(s) engine(ENGINE_MODE_PARAM_1|ENGINE_MODE_PARAM_2|ENGINE_MODE_EVAL|ENGINE_MODE_POP, \
37 strlen((s)), (long)(s))
39 #define forth_push(v) engine(ENGINE_MODE_PARAM_1|ENGINE_MODE_NOP, v, 0)
41 #define forth_pop() engine(ENGINE_MODE_NOP|ENGINE_MODE_POP, 0, 0)