|
|
@ -226,7 +226,7 @@ var InstructionDiv = newMathInstruction("DIV", divInstr) |
|
|
|
var InstructionLoadInd = &Instruction{ |
|
|
|
var InstructionLoadInd = &Instruction{ |
|
|
|
Name: "LOADIND", |
|
|
|
Name: "LOADIND", |
|
|
|
ExecuteWithOperand: func(module *Module, operand float64) error { |
|
|
|
ExecuteWithOperand: func(module *Module, operand float64) error { |
|
|
|
module.mmu.Read(Address(operand)) |
|
|
|
module.mmu.Read(Address(module.register[int(operand)])) |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
@ -234,7 +234,7 @@ var InstructionLoadInd = &Instruction{ |
|
|
|
var InstructionStoreInd = &Instruction{ |
|
|
|
var InstructionStoreInd = &Instruction{ |
|
|
|
Name: "STOREIND", |
|
|
|
Name: "STOREIND", |
|
|
|
ExecuteWithOperand: func(module *Module, operand float64) error { |
|
|
|
ExecuteWithOperand: func(module *Module, operand float64) error { |
|
|
|
module.mmu.Write(Address(operand), module.accumulator) |
|
|
|
module.mmu.Write(Address(module.register[int(operand)]), module.accumulator) |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|