OP_HALT is its own opcode, fixed some other minor bugs

This commit is contained in:
2024-05-01 22:36:34 +05:30
parent fcc6bce6f9
commit a40eaf29b8
6 changed files with 27 additions and 24 deletions

View File

@@ -161,9 +161,9 @@ typedef enum
OP_CALL_STACK,
OP_RET,
OP_HALT,
// Should not be an opcode
NUMBER_OF_OPCODES,
OP_HALT = 0b11111111, // top of the byte is a HALT
} opcode_t;
size_t opcode_bytecode_size(opcode_t);