Rename menonic-to-machine-operation lookup table

This commit is contained in:
n loewen 2023-07-26 14:39:35 +01:00
parent 959697cd70
commit 9797b2e25f
1 changed files with 2 additions and 2 deletions

View File

@ -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();