aboutsummaryrefslogtreecommitdiff
path: root/src/inst.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inst.h')
-rw-r--r--src/inst.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/inst.h b/src/inst.h
index 95baaf2..086696a 100644
--- a/src/inst.h
+++ b/src/inst.h
@@ -17,14 +17,20 @@
typedef enum
{
- OP_PUSH_BYTE = 1,
- OP_PUSH_WORD,
- OP_PUSH_FLOAT,
-} op_t;
+ OP_NOOP = 0,
+
+ OP_PUSH_BYTE = 0b0001,
+ OP_PUSH_WORD = 0b0101,
+ OP_PUSH_FLOAT = 0b1001,
+
+ OP_HALT,
+} opcode_t;
+
+#define OPCODE_IS_PUSH(OPCODE) (((OPCODE)&1) == 1)
typedef struct
{
- op_t opcode;
+ opcode_t opcode;
data_t operand;
} inst_t;