Added direct memory access

This commit is contained in:
2019-11-23 16:47:16 +01:00
parent 22bb974a05
commit 1148682324
14 changed files with 329 additions and 92 deletions

View File

@@ -1,5 +1,5 @@
#pragma once
#include <execute/registers.hpp>
#include <execute/state.hpp>
#include <token/token.hpp>
namespace Interpret
@@ -7,19 +7,23 @@ namespace Interpret
enum class ValueType
{
Register,
ImmediateInteger
ImmediateInteger,
MemoryLocation
};
enum class ValueDataType
{
Register,
Immediate
};
struct Value
{
ValueType type;
union
{
int registerIndex;
int integer;
};
ValueDataType dataType;
int data;
int & GetValue(Execute::Registers & registers);
int & GetValue(Execute::State & state, Execute::Registers & registers);
void CreateFromToken(Token::Token const & token);
};