From 0cd770e4c9d3ef2ffd79e265f0e4416edf2a4512 Mon Sep 17 00:00:00 2001 From: n loewen Date: Thu, 3 Aug 2023 16:28:04 +0100 Subject: [PATCH] Don't pass arguments to functions that don't use them --- simulator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simulator.js b/simulator.js index 97db98a..10011dc 100644 --- a/simulator.js +++ b/simulator.js @@ -155,7 +155,7 @@ const Instructions = { } const opcodes2mnemonics = { - 0: (arg) => Instructions.end(arg), + 0: (arg) => Instructions.end(), 1: (arg) => Instructions.store_lit(arg), 2: (arg) => Instructions.store_addr(arg), 3: (arg) => Instructions.load_lit(arg), @@ -168,9 +168,9 @@ const opcodes2mnemonics = { 10: (arg) => Instructions.hop_addr(arg), 11: (arg) => Instructions.jump_lit(arg), 12: (arg) => Instructions.jump_addr(arg), - 13: (arg) => Instructions.carry_clear(arg), - 14: (arg) => Instructions.carry_hop(arg), - 15: (arg) => Instructions.no_op(arg), + 13: (arg) => Instructions.carry_clear(), + 14: (arg) => Instructions.carry_hop(), + 15: (arg) => Instructions.no_op(), }; function startCPU(code) {