Skip to content

Instantly share code, notes, and snippets.

@VictorKoenders
Created May 8, 2017 18:09
Show Gist options
  • Save VictorKoenders/4b5998c985581ea2b8abd3eec5841377 to your computer and use it in GitHub Desktop.
Save VictorKoenders/4b5998c985581ea2b8abd3eec5841377 to your computer and use it in GitHub Desktop.
#include "Operation.hpp"
#include <iostream>
Operation::Operation()
{
}
Operation::~Operation()
{
}
void NoOperation::execute(const CpuState& state)
{
std::cout << "NOP" << std::endl;
}
static Operation* operations[256] = {
new NoOperation(),
};
#pragma once
class CpuState
{
};
class Operation
{
public:
Operation();
~Operation();
virtual void execute(const CpuState& state) = 0;
};
class NoOperation : public Operation
{
public:
void execute(const CpuState& state);
};
static Operation* operations[256];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment