Rename menonic-to-machine-operation lookup table
This commit is contained in:
parent
959697cd70
commit
9797b2e25f
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue