master
kolaente 4 years ago
parent 6cf605a5aa
commit b78ecf6747
Signed by: kolaente
GPG Key ID: F40E70337AB24C9B
  1. 8
      hal/instructions.go

@ -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
},
}

Loading…
Cancel
Save