From af38b37429335b535349ae310beb6a2cf017f4b7 Mon Sep 17 00:00:00 2001 From: MatCat Date: Mon, 12 Apr 2021 00:17:22 -0700 Subject: [PATCH] Added mnemonic and instruction count to the isa page --- js/instruction_doc.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/instruction_doc.js b/js/instruction_doc.js index ce820f2..647bde8 100644 --- a/js/instruction_doc.js +++ b/js/instruction_doc.js @@ -20,7 +20,12 @@ for (let a = 0; a < Instructions.length; a++) { } } -let outHTML = ""; +let totalVarients = 0; +for (let a = 0; a < ISAPrepList.length; a++) { + totalVarients += ISAPrepList[a].Varients.length; +} + +let outHTML = `
Total Mnemonics   : ${ISAPrepList.length}
Total Instructions: ${totalVarients}
`; ISAPrepList.sort((a, b) => (a.Bytecode > b.Bytecode) ? -1 : 1); for (let a = 0; a < ISAPrepList.length; a++) { outHTML += `
`;