/* cmds_4th.h Command definitions for portable Forth compiler. Copyright (c) J.L. Bezemer 1994,2008 This file is part of 4tH 4tH is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _CMD_4TH_H #define _CMD_4TH_H #define NOOP 0 #define CELLD 0 #define EXECUTE 1 #define CR 2 #define SPACES 3 #define EMIT 4 #define PRINT 5 #define DOT 6 #define FETCH 7 #define STORE 8 #define CATCH 9 #define CAUGHT 10 #define PLUS 11 #define MINUS 12 #define MUL 13 #define DIV 14 #define MOD 15 #define SWAP 16 #define DUP 17 #define OVER 18 #define ROT 19 #define DROP 20 #define EQ 21 #define LT 22 #define GT 23 #define NE 24 #define INVERT 25 #define LT0 26 #define GT0 27 #define BRANCH0 28 #define BRANCH 29 #define FETCHC 30 #define AND 31 #define OR 32 #define XOR 33 #define SHIFT 34 #define ABS 35 #define NEGATE 36 #define QUIT 37 #define MIN 38 #define MAX 39 #define RPUT 40 #define RGET 41 #define RCOPY 42 #define NE0 43 #define EQ0 44 #define ACCEPT 45 #define RADIX 46 #define OFFSET 47 #define RPFETCH 48 #define SPFETCH 49 #define THROW 50 #define INC 51 #define DEC 52 #define ARGS 53 #define ARGN 54 #define LEFT2 55 #define RIGHT2 56 #define LITERAL 57 #define QDO 58 #define DO 59 #define LOOP 60 #define PLOOP 61 #define LEAVE 62 #define FCLOSE 63 #define FOPEN 64 #define USE 65 #define ADDSTORE 66 #define SLASHMOD 67 #define STARSLSH 68 #define EXIT 69 #define RCOPY3 70 #define DOTR 71 #define NUMBER 72 #define VARIABLE 73 #define RANDOM 74 #define TRAILING 75 #define CALL 76 #define REFILL 77 #define CFETCH 78 #define CSTORE 79 #define TYPE 80 #define FILL 81 #define COUNT 82 #define CMOVE 83 #define PLACE 84 #define OMIT 85 #define PARSE 86 #define LSHARP 87 #define SHARP 88 #define RSHARP 89 #define SHARPS 90 #define SIGN 91 #define HOLD 92 #define TO 93 #define VALUE 94 #define TIME 95 #define STRINGD 96 #define SQUOTE 97 #define PAUSE 98 #define VECTOR 99 #define ENVIRON 100 #define PLITERAL 101 #define FSEEK 102 #define FTELL 103 #define FSYNC 104 /* ranges */ #define LastWord4th FSYNC #define LastMsg4th M4CABORT /* flags */ #define F_T 1L #define F_F 0L /* file modes */ #define F4_READ 1L #define F4_WRITE 2L #define F4_APPND 4L #define F4_PIPE 8L /* devices */ #define STD4IN 0L #define STD4OUT 1L /* header */ #define Version4th 0x35D #define App4th 0L /* compiler */ #define LINKSIZ 64 #define SYMLEN 16 /* interpreter */ #define STACKSIZ 512 #define TIBSIZ 256 #define PADSIZ 512 #define DOTSIZ 64 #define RNDMASK 32767 #define MAXDEVS 8 #define PIPEWAIT 102400L /* variables and environs */ #define SYS4TH 3 #define VAR4TH 10 #define ENV4TH 5 #define VHI 0 #define VFIRST 1 #define VLAST 2 #define VCIN 3 #define VCOUT 4 #define VBASE 5 #define VIN 6 #define VOUT 7 #define VTIB 8 #define VTIBS 9 /* load+save */ #define HMASK UCHAR_MAX #define HBITS CHAR_BIT #define HNTINY SCHAR_MAX #define HNSMALL SHRT_MAX #define HSPOS 0 #define HSNEG 1 #define HCCELL 0 #define HCSIGN 1 #define HCBYTE 2 #define HCSHRT 4 #define HCZERO 8 #define HCONE 16 /* generation */ #define UNITSLINE 9 #define DICTSLINE 3 /* no not change */ #define TIB 0 #define PAD TIBSIZ #define STRTOP ((TIBSIZ+PADSIZ)-DOTSIZ) #define S0 0 #define R0 (STACKSIZ-1) #endif