15 void Computer::executeINC(
const InstructionWord& instruction, Register5* reg) {
16 int32_t value = reg->value();
17 int32_t address = getIndexedAddress(instruction);
19 reg->set(checkRange(value));
26 void Computer::executeDEC(
const InstructionWord& instruction, Register5* reg) {
27 int32_t value = reg->value();
28 int32_t address = getIndexedAddress(instruction);
30 reg->set(checkRange(value));
34 void Computer::executeENT(
const InstructionWord& instruction, Register5* reg) {
35 int32_t address = getIndexedAddress(instruction);
38 reg->negative = instruction.negative;
43 void Computer::executeENN(
const InstructionWord& instruction, Register5* reg) {
44 int32_t address = getIndexedAddress(instruction);
47 reg->negative = !instruction.negative;
52 void Computer::executeINCi(
const InstructionWord& instruction) {
53 int registerIndex = instruction.operation() - Instructions::INC1 + 1;
54 auto& rIi =
rI(registerIndex);
55 int16_t value = rIi.value();
56 int16_t address = getIndexedAddress(instruction);
58 rIi.set(checkRange(value, 2));
62 void Computer::executeDECi(
const InstructionWord& instruction) {
63 int registerIndex = instruction.operation() - Instructions::INC1 + 1;
64 auto& rIi =
rI(registerIndex);
65 int16_t value = rIi.value();
66 int16_t address = getIndexedAddress(instruction);
68 rIi.set(checkRange(value, 2));
72 void Computer::executeENTi(
const InstructionWord& instruction) {
73 int registerIndex = instruction.operation() - Instructions::INC1 + 1;
74 auto& rIi =
rI(registerIndex);
75 int16_t address = getIndexedAddress(instruction);
76 rIi.set(checkRange(address, 2));
78 rIi.negative = instruction.negative;
83 void Computer::executeENNi(
const InstructionWord& instruction) {
84 int registerIndex = instruction.operation() - Instructions::INC1 + 1;
85 auto& rIi =
rI(registerIndex);
86 int16_t address = getIndexedAddress(instruction);
87 rIi.set(checkRange(-address, 2));
89 rIi.negative = !instruction.negative;