Add exit operand
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Execute
|
||||
std::vector<InterruptFn> const interrupts;
|
||||
std::vector<std::uint8_t> memory;
|
||||
unsigned stackPointer;
|
||||
bool terminated;
|
||||
|
||||
State(std::unordered_map<std::string, unsigned> const & labelStatementIndice, unsigned const memorySize);
|
||||
};
|
||||
|
||||
@@ -71,6 +71,11 @@ namespace Interpret
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
struct ExitProgramStatement : Statement
|
||||
{
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
struct SetStatement : Statement
|
||||
{
|
||||
Value firstArgument;
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Token
|
||||
Jump,
|
||||
CallFunction,
|
||||
ReturnFromFunction,
|
||||
ExitProgram,
|
||||
LessThanInteger,
|
||||
GreaterThanInteger,
|
||||
EqualInteger,
|
||||
|
||||
Reference in New Issue
Block a user