VSU performance tweak, add immediate notation setting
This commit is contained in:
@@ -61,6 +61,8 @@ let Constants = {
|
||||
L : 0,
|
||||
LOWER : 1,
|
||||
NAMES : 1,
|
||||
NONE : 0,
|
||||
NUMBER : 1,
|
||||
NUMBERS : 0,
|
||||
OUTSIDE : 0,
|
||||
SPLIT : 1,
|
||||
|
||||
@@ -128,6 +128,7 @@ new class Core {
|
||||
message.config.conditionNotation,
|
||||
message.config.hexCase,
|
||||
message.config.hexNotation,
|
||||
message.config.immediateNotation,
|
||||
message.config.memoryNotation,
|
||||
message.config.mnemonicCase,
|
||||
message.config.operandOrder,
|
||||
|
||||
@@ -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 ; }
|
||||
|
||||
+4
-3
@@ -108,9 +108,9 @@ EMSCRIPTEN_KEEPALIVE void* CreateSim() {
|
||||
// Disassemble from a simulation
|
||||
EMSCRIPTEN_KEEPALIVE void* Disassemble(
|
||||
int bcondNotation, int conditionCase, int conditionCL, int conditionEZ,
|
||||
int conditionNotation, int hexCase, int hexNotation, int memoryNotation,
|
||||
int mnemonicCase, int operandOrder, int programCase, int programNotation,
|
||||
int setfNotation, int systemCase, int systemNotation,
|
||||
int conditionNotation, int hexCase, int hexNotation, int immediateNotation,
|
||||
int memoryNotation, int mnemonicCase, int operandOrder, int programCase,
|
||||
int programNotation, int setfNotation, int systemCase, int systemNotation,
|
||||
VB *sim, uint32_t address, unsigned length, int line
|
||||
) {
|
||||
VBU_DasmConfig config;
|
||||
@@ -121,6 +121,7 @@ EMSCRIPTEN_KEEPALIVE void* Disassemble(
|
||||
config.conditionNotation = conditionNotation;
|
||||
config.hexCase = hexCase;
|
||||
config.hexNotation = hexNotation;
|
||||
config.immediateNotation = immediateNotation;
|
||||
config.memoryNotation = memoryNotation;
|
||||
config.mnemonicCase = mnemonicCase;
|
||||
config.operandOrder = operandOrder;
|
||||
|
||||
Reference in New Issue
Block a user