996
|
1 /*
|
|
2 * Copyright (C) 2005 Gregor Richards
|
|
3 *
|
|
4 * This file is part of EgoBCh.
|
|
5 *
|
|
6 * EgoBCh is free software; you can redistribute it and/or modify
|
|
7 * it under the terms of the GNU General Public License as published by
|
|
8 * the Free Software Foundation; either version 2 of the License, or
|
|
9 * (at your option) any later version.
|
|
10 *
|
|
11 * EgoBCh 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
|
|
14 * GNU General Public License for more details.
|
|
15 *
|
|
16 * You should have received a copy of the GNU General Public License
|
|
17 * along with EgoBCh; if not, write to the Free Software
|
|
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 */
|
|
20
|
|
21 #ifndef EGOBCH_H
|
|
22 #define EGOBCH_H
|
|
23
|
|
24 #include <stdint.h>
|
|
25
|
|
26 struct bchi {
|
|
27 enum { NIL,
|
|
28 RTGL,
|
|
29 LFT,
|
|
30 LPO,
|
|
31 LPC,
|
|
32 OUT,
|
|
33 INP,
|
|
34 DBG,
|
|
35 FIN
|
|
36 } cmd;
|
|
37 int arg1;
|
|
38 };
|
|
39
|
|
40 extern char *iprog;
|
|
41 extern int ipptr;
|
|
42
|
|
43 extern struct bchi *prog;
|
|
44 extern int pptr;
|
|
45
|
|
46 extern unsigned char *mem;
|
|
47 extern unsigned char *mptr;
|
|
48 extern unsigned char membit;
|
|
49
|
|
50 /* options */
|
|
51 extern int lazy_io;
|
|
52 extern int debug;
|
|
53
|
|
54 #define ISBCH(a) ( \
|
|
55 (a) == '}' || \
|
|
56 (a) == '<' || \
|
|
57 (a) == ']' || \
|
|
58 (a) == '[' || \
|
|
59 ((a) == '.' && lazy_io) || \
|
|
60 ((a) == ',' && lazy_io) || \
|
|
61 ((a) == '#' && debug))
|
|
62
|
|
63 #endif
|