blob: c283e57c6c65475bff9766842cc33c7a28c19422 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/**
* @module instructions
* @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
* @brief TODO
* @date 10.05.2009
*/
#include "instructions.h"
using namespace std;
void CInstructionInc::compile(std::list<std::string>& params)
{
if (params.size() != 1)
throw runtime_error("Invalid paramater count - must be 1");
m_regidx1 = parseRegister(params.front());
}
/*----------------------------------------------------------------------------*/
void CInstructionInc::execute(CCPU *cpu)
{
checkRegister(cpu, m_regidx1);
cpu->getRegisters()[m_regidx1]++;
}
/* vim: set et sw=2 ts=2: */
|