summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/bfi.h17
-rw-r--r--inc/mem.h19
-rw-r--r--inc/stack.h10
3 files changed, 46 insertions, 0 deletions
diff --git a/inc/bfi.h b/inc/bfi.h
new file mode 100644
index 0000000..7f3dbce
--- /dev/null
+++ b/inc/bfi.h
@@ -0,0 +1,17 @@
+#ifndef __BFI_H__
+#define __BFI_H__
+
+enum instructions_e{
+ BF_RIGHT = '>',
+ BF_LEFT = '<',
+ BF_INCREASE = '+',
+ BF_DECREASE = '-',
+ BF_READ = ',',
+ BF_PRINT = '.',
+ BF_START_LOOP = '[',
+ BF_END_LOOP = ']',
+ BF_DEBUG = '#'};
+
+void intepret(char *program);
+
+#endif
diff --git a/inc/mem.h b/inc/mem.h
new file mode 100644
index 0000000..50a0a17
--- /dev/null
+++ b/inc/mem.h
@@ -0,0 +1,19 @@
+#ifndef __MEM_H__
+#define __MEM_H__
+
+#define MEM_SIZE 30000
+
+struct mem_st {
+ char arr[MEM_SIZE];
+ int pos;
+};
+
+int mem_inc();
+int mem_dec();
+int mem_left();
+int mem_right();
+int mem_get();
+int mem_set(char v);
+void mem_printDebug();
+
+#endif
diff --git a/inc/stack.h b/inc/stack.h
new file mode 100644
index 0000000..60d41b8
--- /dev/null
+++ b/inc/stack.h
@@ -0,0 +1,10 @@
+#ifndef __STACK_H__
+#define __STACK_H__
+
+void stackPush(int val);
+int stackPop(void);
+int stackIsEmpty(void);
+int stackPeek(void);
+void stackPrint(void);
+
+#endif