Compile to bytecode

This commit is contained in:
2020-09-03 19:03:32 +02:00
parent 473334c3db
commit 96345ad6ba
45 changed files with 1615 additions and 1231 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
#include <cstdint>
namespace Execute
{
enum class InstructionByte : std::uint8_t
{
NOOP = 0,
/* Integer functions */
ADD_INTEGER,
SUBTRACT_INTEGER,
DIVIDE_INTEGER,
MULTIPLY_INTEGER,
SHIFT_LEFT_INTEGER,
SHIFT_RIGHT_INTEGER,
SET_INTEGER,
/* Control flow */
JUMP,
INTERRUPT,
CALL,
RETURN,
EXIT,
LESS_THAN_INTEGER,
GREATER_THAN_INTEGER,
EQUALS_INTEGER,
/* Memory */
POP_INTEGER,
PUSH_INTEGER,
/* Values */
IMMEDIATE_INTEGER,
REGISTER,
MEMORY_OP,
LABEL,
};
enum class RegisterByte : std::uint8_t
{
A = 1,
B,
C,
D
};
}