12 void Computer::executeEQU(ParsedResult* instruction) {
13 if (!instruction->address.evaluated()) {
14 if (!instruction->address.evaluate(_constants)) {
15 throw RuntimeError(_lineOffset,
"Unresolved symbol found while parsing EQU: " + instruction->rawAddress);
18 _constants[instruction->rawLocation] = AtomicValue(instruction->address.result().value);
22 void Computer::executeORIG(ParsedResult* instruction) {
23 if (!instruction->address.evaluated()) {
24 if (!instruction->address.evaluate(_constants)) {
25 throw RuntimeError(_lineOffset,
"Unresolved symbol found while parsing ORIG: " + instruction->rawAddress);
28 int lineOffset = _lineOffset;
29 _lineOffset = instruction->address.result().value;
30 if (instruction->rawLocation.length() > 0) {
31 if (instruction->rawAddress.find(
'*') == std::string::npos) {
32 if (!instruction->rawLocation.empty()) {
33 _constants[instruction->rawLocation] = AtomicValue(instruction->address.result().value);
37 _constants[instruction->rawLocation] = AtomicValue(lineOffset);
40 std::string symbol = getPesudoSymbolname();
41 _constants[symbol] = AtomicValue(instruction->address.result().value);
46 void Computer::executeCON(ParsedResult* instruction) {
47 if (!instruction->address.evaluated()) {
48 if (!instruction->address.evaluate(_constants)) {
49 throw RuntimeError(_lineOffset,
"Unresolved symbol found while parsing CON: " + instruction->rawAddress);
52 memory[_lineOffset].
set(instruction->address.result().value);
53 if (!instruction->rawLocation.empty()) {
54 _constants[instruction->rawLocation] = AtomicValue(_lineOffset);