diff --git a/sketches/simulator-sketch-v2.js b/sketches/simulator-sketch-v2.js index 395197d..2651a85 100644 --- a/sketches/simulator-sketch-v2.js +++ b/sketches/simulator-sketch-v2.js @@ -138,7 +138,7 @@ const Instructions = { }, } -const instructionLookupTable = { +const opcodes2mnemonics = { 0: (arg) => Instructions.end(arg), 1: (arg) => Instructions.store_lit(arg), 2: (arg) => Instructions.store_addr(arg), @@ -163,7 +163,7 @@ function stepCPU() { console.log(`OP: ${opcode} ARG: ${argument}`); - let instruction = instructionLookupTable[opcode]; + let instruction = opcodes2mnemonics[opcode]; instruction(argument); logCPUState();