VSU performance tweak, add immediate notation setting

This commit is contained in:
2024-11-11 20:05:14 -06:00
parent b4b9131f39
commit 7e31fbd582
8 changed files with 47 additions and 16 deletions
+15
View File
@@ -19,6 +19,7 @@ class DasmConfig {
#conditionNotation;
#hexCase;
#hexNotation;
#immediateNotation;
#memoryNotation;
#mnemonicCase;
#operandOrder;
@@ -40,6 +41,7 @@ class DasmConfig {
this.#conditionNotation = Constants.VBU.NAMES;
this.#hexCase = Constants.VBU.UPPER;
this.#hexNotation = Constants.VBU["0X"];
this.#immediateNotation = Constants.VBU.NONE;
this.#memoryNotation = Constants.VBU.OUTSIDE;
this.#mnemonicCase = Constants.VBU.UPPER;
this.#operandOrder = Constants.VBU.DEST_LAST;
@@ -125,6 +127,16 @@ class DasmConfig {
this.#hexNotation = value;
}
get immediateNotation() { return this.#immediateNotation; }
set immediateNotation(value) {
switch (value) {
case Constants.VBU.NONE :
case Constants.VBU.NUMBER: break;
default: return;
}
this.#immediateNotation = value;
}
get memoryNotation() { return this.#memoryNotation; }
set memoryNotation(value) {
switch (value) {
@@ -407,6 +419,7 @@ class Sim extends HTMLElement {
conditionNotation: config.conditionNotation,
hexCase : config.hexCase,
hexNotation : config.hexNotation,
immediateNotation: config.immediateNotation,
memoryNotation : config.memoryNotation,
mnemonicCase : config.mnemonicCase,
operandOrder : config.operandOrder,
@@ -650,6 +663,8 @@ class VB {
static get L () { return Constants.VBU.L ; }
static get LOWER () { return Constants.VBU.LOWER ; }
static get NAMES () { return Constants.VBU.NAMES ; }
static get NONE () { return Constants.VBU.NONE ; }
static get NUMBER () { return Constants.VBU.NUMBER ; }
static get NUMBERS () { return Constants.VBU.NUMBERS ; }
static get OUTSIDE () { return Constants.VBU.OUTSIDE ; }
static get RELATIVE () { return Constants.VBU.RELATIVE ; }