Add Executor

This commit is contained in:
Andrea Bontempi 2015-08-09 18:10:27 +02:00
parent fb99662ae8
commit ba43d2ade6
2 changed files with 36 additions and 0 deletions

16
RamExecutor.cpp Normal file
View file

@ -0,0 +1,16 @@
#include "RamExecutor.h"
RamExecutor::RamExecutor(RamInstruction code) {
this->pc = 0;
this->sourcecode = code;
}
int RamExecutor::getPC() {
return this->pc;
}
void RamExecutor::setPC(int newPC) {
this->pc = newPC;
}

20
RamExecutor.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef RAMEXECUTOR_H
#define RAMEXECUTOR_H
#include "RamInstruction.h"
#include <map>
class RamExecutor {
private:
RamInstruction sourcecode;
std::map<int, int> registers;
int pc;
public:
RamExecutor(RamInstruction code);
int getPC();
void setPC(int newPC);
};
#endif // RAMEXECUTOR_H