|
|
|
@ -40,6 +40,7 @@ var instructions = []*Instruction{ |
|
|
|
|
InstructionStop, |
|
|
|
|
InstructionIn, |
|
|
|
|
InstructionOut, |
|
|
|
|
InstructionAddnum, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var InstructionStart = &Instruction{ |
|
|
|
@ -70,3 +71,10 @@ var InstructionIn = &Instruction{ |
|
|
|
|
// TODO implement
|
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var InstructionAddnum = &Instruction{ |
|
|
|
|
Name: "ADDNUM", |
|
|
|
|
ExecuteWithOperand: func(module *Module, operand float64) { |
|
|
|
|
module.accumulator = module.accumulator + operand |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|