From d5c48df9bcad467b5a94128f18bb7e2f8441337a Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 28 Mar 2017 15:22:17 -0700 Subject: [PATCH] Added support for MACRO-10 literal collapsing; it's not super-aggressive, but it's more than adequate for what DEC's diagnostics require --- apps/pdp10/diags/klad/dakae/README.md | 4 +- docs/pcx86/examples/pcx86-dbg.js | 4 +- modules/pdp10/lib/cpuops.js | 1868 +++++++++++++------------ modules/pdp10/lib/macro10.js | 82 +- modules/shared/lib/debugger.js | 24 +- versions/pc8080/1.34.3/pc8080-dbg.js | 4 +- versions/pcx86/1.34.3/pcx86-dbg.js | 4 +- versions/pdpjs/1.34.3/pdp10-dbg.js | 342 ++--- versions/pdpjs/1.34.3/pdp10.js | 52 +- versions/pdpjs/1.34.3/pdp11-dbg.js | 4 +- 10 files changed, 1243 insertions(+), 1145 deletions(-) diff --git a/apps/pdp10/diags/klad/dakae/README.md b/apps/pdp10/diags/klad/dakae/README.md index be22678fe..a6fee09dd 100644 --- a/apps/pdp10/diags/klad/dakae/README.md +++ b/apps/pdp10/diags/klad/dakae/README.md @@ -7,7 +7,7 @@ machines: type: pdp10 config: /devices/pdp10/machine/ka10/test/debugger/machine.xml debugger: true - commands: a 30724 DAKAE.MAC + commands: a 30706 DAKAE.MAC --- PDP-10 KA10 Basic Instruction Diagnostic #5 @@ -32,7 +32,7 @@ The Debugger's assemble ("a") command can be used to test the new built-in of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command: - a 30724 DAKAE.MAC + a 30706 DAKAE.MAC will automatically read the [DAKAE.MAC](DAKAE.MAC.txt) source file (a slightly modified copy of [DAKAEM.MAC](DAKAEM.MAC.txt)), assemble it, and then load the binary output at the specified address. diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 3ccbb7d6b..9d2208647 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -719,8 +719,8 @@ Vx.prototype.Cg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);i function Wx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?(a<2*-b&&(d=a%(2*b)),d+=2*b):d>=b&&(a>=2*b&&(d=a%(2*b)),d-=2*b));a!=d&&(a=d);return a} function Xx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Wx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=Yx(a,b,0,b.length,a.F,c);void 0!==d&&!1===c&&dy(a,null,d)}return d} function ey(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=cy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?by(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== diff --git a/modules/pdp10/lib/cpuops.js b/modules/pdp10/lib/cpuops.js index 1786310d2..87178389c 100644 --- a/modules/pdp10/lib/cpuops.js +++ b/modules/pdp10/lib/cpuops.js @@ -165,9 +165,9 @@ PDP10.opKA10 = function(op) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opUUO = function(op, acc) +PDP10.opUUO = function(op, ac) { this.opUndefined(op); }; @@ -192,9 +192,9 @@ PDP10.opUUO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opUFA = function(op, acc) +PDP10.opUFA = function(op, ac) { this.opUndefined(op); }; @@ -212,9 +212,9 @@ PDP10.opUFA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDFN = function(op, acc) +PDP10.opDFN = function(op, ac) { this.opUndefined(op); }; @@ -245,9 +245,9 @@ PDP10.opDFN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSC = function(op, acc) +PDP10.opFSC = function(op, ac) { this.opUndefined(op); }; @@ -282,9 +282,9 @@ PDP10.opFSC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIBP = function(op, acc) +PDP10.opIBP = function(op, ac) { var inc = 0; var w = this.readWord(this.regEA); @@ -327,9 +327,9 @@ PDP10.opIBP = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opILDB = function(op, acc) +PDP10.opILDB = function(op, ac) { /* * We're called in two phases: phase 1 is with regEA containing the address of the pointer, and phase 2 @@ -339,9 +339,9 @@ PDP10.opILDB = function(op, acc) * opIBP() on phase 1. */ if (this.regBP < 0) { - PDP10.opIBP.call(this, op, acc); + PDP10.opIBP.call(this, op, ac); } - PDP10.opLDB.call(this, op, acc); + PDP10.opLDB.call(this, op, ac); }; /** @@ -361,9 +361,9 @@ PDP10.opILDB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opLDB = function(op, acc) +PDP10.opLDB = function(op, ac) { /* * We're called in two phases: phase 1 is with regEA containing the address of the pointer, and phase 2 @@ -392,7 +392,7 @@ PDP10.opLDB = function(op, acc) */ w = Math.trunc(w / Math.pow(2, p)) % Math.pow(2, s); } - this.writeWord(acc, w); + this.writeWord(ac, w); this.regBP = -1; }; @@ -413,9 +413,9 @@ PDP10.opLDB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIDPB = function(op, acc) +PDP10.opIDPB = function(op, ac) { /* * We're called in two phases: phase 1 is with regEA containing the address of the pointer, and phase 2 @@ -425,9 +425,9 @@ PDP10.opIDPB = function(op, acc) * opIBP() on phase 1. */ if (this.regBP < 0) { - PDP10.opIBP.call(this, op, acc); + PDP10.opIBP.call(this, op, ac); } - PDP10.opDPB.call(this, op, acc); + PDP10.opDPB.call(this, op, ac); }; /** @@ -447,9 +447,9 @@ PDP10.opIDPB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDPB = function(op, acc) +PDP10.opDPB = function(op, ac) { /* * We're called in two phases: phase 1 is with regEA containing the address of the pointer, and phase 2 @@ -468,7 +468,7 @@ PDP10.opDPB = function(op, acc) * over-large, we "mask" the resulting byte value (b) to 36 bits, so that when we re-assemble the final * result (w), there shouldn't be any overlap or overflow. */ - var b = ((this.readWord(acc) % Math.pow(2, s)) * Math.pow(2, p)) % PDP10.WORD_LIMIT; + var b = ((this.readWord(ac) % Math.pow(2, s)) * Math.pow(2, p)) % PDP10.WORD_LIMIT; w = (w - (w % Math.pow(2, p + s))) + b + (w % Math.pow(2, p)); this.writeWord(this.regEA, w); this.regBP = -1; @@ -479,9 +479,9 @@ PDP10.opDPB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFAD = function(op, acc) +PDP10.opFAD = function(op, ac) { this.opUndefined(op); }; @@ -491,9 +491,9 @@ PDP10.opFAD = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADI = function(op, acc) +PDP10.opFADI = function(op, ac) { this.opUndefined(op); }; @@ -503,9 +503,9 @@ PDP10.opFADI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADM = function(op, acc) +PDP10.opFADM = function(op, ac) { this.opUndefined(op); }; @@ -515,9 +515,9 @@ PDP10.opFADM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADB = function(op, acc) +PDP10.opFADB = function(op, ac) { this.opUndefined(op); }; @@ -527,9 +527,9 @@ PDP10.opFADB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADR = function(op, acc) +PDP10.opFADR = function(op, ac) { this.opUndefined(op); }; @@ -539,9 +539,9 @@ PDP10.opFADR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADRI = function(op, acc) +PDP10.opFADRI = function(op, ac) { this.opUndefined(op); }; @@ -551,9 +551,9 @@ PDP10.opFADRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADRM = function(op, acc) +PDP10.opFADRM = function(op, ac) { this.opUndefined(op); }; @@ -563,9 +563,9 @@ PDP10.opFADRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFADRB = function(op, acc) +PDP10.opFADRB = function(op, ac) { this.opUndefined(op); }; @@ -575,9 +575,9 @@ PDP10.opFADRB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSB = function(op, acc) +PDP10.opFSB = function(op, ac) { this.opUndefined(op); }; @@ -587,9 +587,9 @@ PDP10.opFSB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBI = function(op, acc) +PDP10.opFSBI = function(op, ac) { this.opUndefined(op); }; @@ -599,9 +599,9 @@ PDP10.opFSBI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBM = function(op, acc) +PDP10.opFSBM = function(op, ac) { this.opUndefined(op); }; @@ -611,9 +611,9 @@ PDP10.opFSBM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBB = function(op, acc) +PDP10.opFSBB = function(op, ac) { this.opUndefined(op); }; @@ -623,9 +623,9 @@ PDP10.opFSBB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBR = function(op, acc) +PDP10.opFSBR = function(op, ac) { this.opUndefined(op); }; @@ -635,9 +635,9 @@ PDP10.opFSBR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBRI = function(op, acc) +PDP10.opFSBRI = function(op, ac) { this.opUndefined(op); }; @@ -647,9 +647,9 @@ PDP10.opFSBRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBRM = function(op, acc) +PDP10.opFSBRM = function(op, ac) { this.opUndefined(op); }; @@ -659,9 +659,9 @@ PDP10.opFSBRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFSBRB = function(op, acc) +PDP10.opFSBRB = function(op, ac) { this.opUndefined(op); }; @@ -671,9 +671,9 @@ PDP10.opFSBRB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMP = function(op, acc) +PDP10.opFMP = function(op, ac) { this.opUndefined(op); }; @@ -683,9 +683,9 @@ PDP10.opFMP = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPI = function(op, acc) +PDP10.opFMPI = function(op, ac) { this.opUndefined(op); }; @@ -695,9 +695,9 @@ PDP10.opFMPI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPM = function(op, acc) +PDP10.opFMPM = function(op, ac) { this.opUndefined(op); }; @@ -707,9 +707,9 @@ PDP10.opFMPM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPB = function(op, acc) +PDP10.opFMPB = function(op, ac) { this.opUndefined(op); }; @@ -719,9 +719,9 @@ PDP10.opFMPB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPR = function(op, acc) +PDP10.opFMPR = function(op, ac) { this.opUndefined(op); }; @@ -731,9 +731,9 @@ PDP10.opFMPR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPRI = function(op, acc) +PDP10.opFMPRI = function(op, ac) { this.opUndefined(op); }; @@ -743,9 +743,9 @@ PDP10.opFMPRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPRM = function(op, acc) +PDP10.opFMPRM = function(op, ac) { this.opUndefined(op); }; @@ -755,9 +755,9 @@ PDP10.opFMPRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFMPRB = function(op, acc) +PDP10.opFMPRB = function(op, ac) { this.opUndefined(op); }; @@ -767,9 +767,9 @@ PDP10.opFMPRB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDV = function(op, acc) +PDP10.opFDV = function(op, ac) { this.opUndefined(op); }; @@ -779,9 +779,9 @@ PDP10.opFDV = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVI = function(op, acc) +PDP10.opFDVI = function(op, ac) { this.opUndefined(op); }; @@ -791,9 +791,9 @@ PDP10.opFDVI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVM = function(op, acc) +PDP10.opFDVM = function(op, ac) { this.opUndefined(op); }; @@ -803,9 +803,9 @@ PDP10.opFDVM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVB = function(op, acc) +PDP10.opFDVB = function(op, ac) { this.opUndefined(op); }; @@ -815,9 +815,9 @@ PDP10.opFDVB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVR = function(op, acc) +PDP10.opFDVR = function(op, ac) { this.opUndefined(op); }; @@ -827,9 +827,9 @@ PDP10.opFDVR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVRI = function(op, acc) +PDP10.opFDVRI = function(op, ac) { this.opUndefined(op); }; @@ -839,9 +839,9 @@ PDP10.opFDVRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVRM = function(op, acc) +PDP10.opFDVRM = function(op, ac) { this.opUndefined(op); }; @@ -851,9 +851,9 @@ PDP10.opFDVRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opFDVRB = function(op, acc) +PDP10.opFDVRB = function(op, ac) { this.opUndefined(op); }; @@ -872,11 +872,11 @@ PDP10.opFDVRB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVE = function(op, acc) +PDP10.opMOVE = function(op, ac) { - this.writeWord(acc, this.readWord(this.regEA)); + this.writeWord(ac, this.readWord(this.regEA)); }; /** @@ -895,11 +895,11 @@ PDP10.opMOVE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVEI = function(op, acc) +PDP10.opMOVEI = function(op, ac) { - this.writeWord(acc, this.regEA); + this.writeWord(ac, this.regEA); }; /** @@ -916,11 +916,11 @@ PDP10.opMOVEI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVEM = function(op, acc) +PDP10.opMOVEM = function(op, ac) { - this.writeWord(this.regEA, this.readWord(acc)); + this.writeWord(this.regEA, this.readWord(ac)); }; /** @@ -937,11 +937,11 @@ PDP10.opMOVEM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVES = function(op, acc) +PDP10.opMOVES = function(op, ac) { - if (acc) this.writeWord(acc, this.readWord(this.regEA)); + if (ac) this.writeWord(ac, this.readWord(this.regEA)); }; /** @@ -956,13 +956,13 @@ PDP10.opMOVES = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVS = function(op, acc) +PDP10.opMOVS = function(op, ac) { var src = this.readWord(this.regEA); src = ((src / PDP10.HALF_SHIFT)|0) + ((src & PDP10.HALF_MASK) * PDP10.HALF_SHIFT); - this.writeWord(acc, src); + this.writeWord(ac, src); }; /** @@ -979,11 +979,11 @@ PDP10.opMOVS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVSI = function(op, acc) +PDP10.opMOVSI = function(op, ac) { - this.writeWord(acc, this.regEA * PDP10.HALF_SHIFT); + this.writeWord(ac, this.regEA * PDP10.HALF_SHIFT); }; /** @@ -998,11 +998,11 @@ PDP10.opMOVSI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVSM = function(op, acc) +PDP10.opMOVSM = function(op, ac) { - var src = this.readWord(acc); + var src = this.readWord(ac); src = ((src / PDP10.HALF_SHIFT)|0) + ((src & PDP10.HALF_MASK) * PDP10.HALF_SHIFT); this.writeWord(this.regEA, src); }; @@ -1019,14 +1019,14 @@ PDP10.opMOVSM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVSS = function(op, acc) +PDP10.opMOVSS = function(op, ac) { var src = this.readWord(this.regEA); src = ((src / PDP10.HALF_SHIFT)|0) + ((src & PDP10.HALF_MASK) * PDP10.HALF_SHIFT); this.writeWord(this.regEA, src); - if (acc) this.writeWord(acc, src) + if (ac) this.writeWord(ac, src) }; /** @@ -1047,11 +1047,11 @@ PDP10.opMOVSS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVN = function(op, acc) +PDP10.opMOVN = function(op, ac) { - this.writeWord(acc, PDP10.doNEG.call(this, this.readWord(this.regEA))); + this.writeWord(ac, PDP10.doNEG.call(this, this.readWord(this.regEA))); }; /** @@ -1074,9 +1074,9 @@ PDP10.opMOVN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVNI = function(op, acc) +PDP10.opMOVNI = function(op, ac) { /* * We used to perform an in-line two's complement of regEA, since doNEG() updates the flags, and the @@ -1086,7 +1086,7 @@ PDP10.opMOVNI = function(op, acc) * * TODO: Verify the "set no flags" assertion on *real* (KA10) hardware. */ - this.writeWord(acc, PDP10.doNEG.call(this, this.regEA) /* this.regEA? PDP10.TWO_POW36 - this.regEA : 0 */); + this.writeWord(ac, PDP10.doNEG.call(this, this.regEA) /* this.regEA? PDP10.TWO_POW36 - this.regEA : 0 */); }; /** @@ -1107,11 +1107,11 @@ PDP10.opMOVNI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVNM = function(op, acc) +PDP10.opMOVNM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doNEG.call(this, this.readWord(acc))); + this.writeWord(this.regEA, PDP10.doNEG.call(this, this.readWord(ac))); }; /** @@ -1132,13 +1132,13 @@ PDP10.opMOVNM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVNS = function(op, acc) +PDP10.opMOVNS = function(op, ac) { var dst = PDP10.doNEG.call(this, this.readWord(this.regEA)); this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -1159,11 +1159,11 @@ PDP10.opMOVNS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVM = function(op, acc) +PDP10.opMOVM = function(op, ac) { - this.writeWord(acc, PDP10.doABS.call(this, this.readWord(this.regEA))); + this.writeWord(ac, PDP10.doABS.call(this, this.readWord(this.regEA))); }; /** @@ -1186,11 +1186,11 @@ PDP10.opMOVM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVMI = function(op, acc) +PDP10.opMOVMI = function(op, ac) { - this.writeWord(acc, this.regEA); // src is an 18-bit immediate value, so there's no need to call doABS() + this.writeWord(ac, this.regEA); // src is an 18-bit immediate value, so there's no need to call doABS() }; /** @@ -1211,11 +1211,11 @@ PDP10.opMOVMI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVMM = function(op, acc) +PDP10.opMOVMM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doABS.call(this, this.readWord(acc))); + this.writeWord(this.regEA, PDP10.doABS.call(this, this.readWord(ac))); }; /** @@ -1236,13 +1236,13 @@ PDP10.opMOVMM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMOVMS = function(op, acc) +PDP10.opMOVMS = function(op, ac) { var dst = PDP10.doABS.call(this, this.readWord(this.regEA)); this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -1258,11 +1258,11 @@ PDP10.opMOVMS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIMUL = function(op, acc) +PDP10.opIMUL = function(op, ac) { - this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA), true)); + this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA), true)); }; /** @@ -1278,11 +1278,11 @@ PDP10.opIMUL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIMULI = function(op, acc) +PDP10.opIMULI = function(op, ac) { - this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.regEA, true)); + this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.regEA, true)); }; /** @@ -1298,11 +1298,11 @@ PDP10.opIMULI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIMULM = function(op, acc) +PDP10.opIMULM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA), true)); + this.writeWord(this.regEA, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA), true)); }; /** @@ -1318,11 +1318,11 @@ PDP10.opIMULM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIMULB = function(op, acc) +PDP10.opIMULB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA), true))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA), true))); }; /** @@ -1338,12 +1338,12 @@ PDP10.opIMULB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMUL = function(op, acc) +PDP10.opMUL = function(op, ac) { - this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA))); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA))); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1359,12 +1359,12 @@ PDP10.opMUL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMULI = function(op, acc) +PDP10.opMULI = function(op, ac) { - this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.regEA)); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.regEA)); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1380,11 +1380,11 @@ PDP10.opMULI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMULM = function(op, acc) +PDP10.opMULM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -1400,12 +1400,12 @@ PDP10.opMULM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opMULB = function(op, acc) +PDP10.opMULB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.doMUL.call(this, this.readWord(acc), this.readWord(this.regEA)))); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.doMUL.call(this, this.readWord(ac), this.readWord(this.regEA)))); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1423,14 +1423,14 @@ PDP10.opMULB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIDIV = function(op, acc) +PDP10.opIDIV = function(op, ac) { - var dst = PDP10.doDIV.call(this, this.readWord(acc), 0, this.readWord(this.regEA)); + var dst = PDP10.doDIV.call(this, this.readWord(ac), 0, this.readWord(this.regEA)); if (dst < 0) return; - this.writeWord(acc, dst); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, dst); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1448,14 +1448,14 @@ PDP10.opIDIV = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIDIVI = function(op, acc) +PDP10.opIDIVI = function(op, ac) { - var dst = PDP10.doDIV.call(this, this.readWord(acc), 0, this.regEA); + var dst = PDP10.doDIV.call(this, this.readWord(ac), 0, this.regEA); if (dst < 0) return; - this.writeWord(acc, dst); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, dst); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1473,11 +1473,11 @@ PDP10.opIDIVI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIDIVM = function(op, acc) +PDP10.opIDIVM = function(op, ac) { - var dst = PDP10.doDIV.call(this, this.readWord(acc), 0, this.readWord(this.regEA)); + var dst = PDP10.doDIV.call(this, this.readWord(ac), 0, this.readWord(this.regEA)); if (dst < 0) return; this.writeWord(this.regEA, dst); }; @@ -1497,11 +1497,11 @@ PDP10.opIDIVM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIDIVB = function(op, acc) +PDP10.opIDIVB = function(op, ac) { - var dst = PDP10.doDIV.call(this, this.readWord(acc), 0, this.readWord(this.regEA)); + var dst = PDP10.doDIV.call(this, this.readWord(ac), 0, this.readWord(this.regEA)); if (dst < 0) return; this.writeWord(this.regEA, dst); }; @@ -1522,16 +1522,16 @@ PDP10.opIDIVB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDIV = function(op, acc) +PDP10.opDIV = function(op, ac) { - var ext = this.readWord(acc); - var dst = this.readWord((acc + 1) & 0o17); + var ext = this.readWord(ac); + var dst = this.readWord((ac + 1) & 0o17); dst = PDP10.doDIV.call(this, dst, ext, this.readWord(this.regEA)); if (dst < 0) return; - this.writeWord(acc, dst); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, dst); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1550,16 +1550,16 @@ PDP10.opDIV = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDIVI = function(op, acc) +PDP10.opDIVI = function(op, ac) { - var ext = this.readWord(acc); - var dst = this.readWord((acc + 1) & 0o17); + var ext = this.readWord(ac); + var dst = this.readWord((ac + 1) & 0o17); dst = PDP10.doDIV.call(this, dst, ext, this.regEA); if (dst < 0) return; - this.writeWord(acc, dst); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, dst); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1578,12 +1578,12 @@ PDP10.opDIVI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDIVM = function(op, acc) +PDP10.opDIVM = function(op, ac) { - var ext = this.readWord(acc); - var dst = this.readWord((acc + 1) & 0o17); + var ext = this.readWord(ac); + var dst = this.readWord((ac + 1) & 0o17); dst = PDP10.doDIV.call(this, dst, ext, this.readWord(this.regEA)); if (dst < 0) return; this.writeWord(this.regEA, dst); @@ -1605,16 +1605,16 @@ PDP10.opDIVM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opDIVB = function(op, acc) +PDP10.opDIVB = function(op, ac) { - var ext = this.readWord(acc); - var dst = this.readWord((acc + 1) & 0o17); + var ext = this.readWord(ac); + var dst = this.readWord((ac + 1) & 0o17); dst = PDP10.doDIV.call(this, dst, ext, this.readWord(this.regEA)); if (dst < 0) return; - this.writeWord(acc, this.writeWord(this.regEA, dst)); - this.writeWord((acc + 1) & 0o17, this.regExt); + this.writeWord(ac, this.writeWord(this.regEA, dst)); + this.writeWord((ac + 1) & 0o17, this.regExt); }; /** @@ -1655,16 +1655,16 @@ PDP10.opDIVB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opASH = function(op, acc) +PDP10.opASH = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value (+/-255). */ var s = ((this.regEA << 14) >> 14) % 256; if (s) { - var w = this.readWord(acc), bits; + var w = this.readWord(ac), bits; /* * Convert the unsigned word (w) to a signed value (i), for convenience. */ @@ -1713,7 +1713,7 @@ PDP10.opASH = function(op, acc) } } w = (i < 0? i + PDP10.WORD_LIMIT: i); - this.writeWord(acc, w); + this.writeWord(ac, w); } }; @@ -1727,22 +1727,22 @@ PDP10.opASH = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opROT = function(op, acc) +PDP10.opROT = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value, modulo 36 (+/-35). */ var s = ((this.regEA << 14) >> 14) % 36; if (s) { - var w = this.readWord(acc); + var w = this.readWord(ac); /* * Note that a right rotation (s < 0) of s bits is equivalent to a left rotation (s > 0) of 36 + s bits. */ if (s < 0) s = 36 + s; w = ((w * Math.pow(2, s)) % PDP10.WORD_LIMIT) + Math.trunc(w / Math.pow(2, 36 - s)); - this.writeWord(acc, w); + this.writeWord(ac, w); } }; @@ -1776,16 +1776,16 @@ PDP10.opROT = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opLSH = function(op, acc) +PDP10.opLSH = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value (+/-255). */ var s = ((this.regEA << 14) >> 14) % 256; if (s) { - var w = this.readWord(acc); + var w = this.readWord(ac); if (s > 0) { if (s >= 36) { w = 0; @@ -1799,7 +1799,7 @@ PDP10.opLSH = function(op, acc) w = Math.trunc(w / Math.pow(2, -s)); } } - this.writeWord(acc, w); + this.writeWord(ac, w); } }; @@ -1816,12 +1816,12 @@ PDP10.opLSH = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJFFO = function(op, acc) +PDP10.opJFFO = function(op, ac) { var dst = 0; - var src = this.readWord(acc); + var src = this.readWord(ac); if (src) { while (src < PDP10.INT_LIMIT) { dst++; @@ -1829,7 +1829,7 @@ PDP10.opJFFO = function(op, acc) } this.setPC(this.regEA); } - this.writeWord((acc + 1) & 0o17, dst); + this.writeWord((ac + 1) & 0o17, dst); }; /** @@ -1849,9 +1849,9 @@ PDP10.opJFFO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opASHC = function(op, acc) +PDP10.opASHC = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value (+/-255). @@ -1859,8 +1859,8 @@ PDP10.opASHC = function(op, acc) var s = ((this.regEA << 14) >> 14) % 256; if (s) { var bits; - var wLeft = this.readWord(acc); - var wRight = this.readWord((acc + 1) & 0o17); + var wLeft = this.readWord(ac); + var wRight = this.readWord((ac + 1) & 0o17); if (s > 0) { /* * Handle all the left shift cases below, which don't need to worry about sign-extension @@ -1977,8 +1977,8 @@ PDP10.opASHC = function(op, acc) if (wLeft > PDP10.INT_MASK) wRight += PDP10.INT_LIMIT; } } - this.writeWord(acc, wLeft); - this.writeWord((acc + 1) & 0o17, wRight); + this.writeWord(ac, wLeft); + this.writeWord((ac + 1) & 0o17, wRight); } }; @@ -1994,17 +1994,17 @@ PDP10.opASHC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opROTC = function(op, acc) +PDP10.opROTC = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value, modulo 72 (+/-71). */ var s = ((this.regEA << 14) >> 14) % 72; if (s) { - var wLeft = this.readWord(acc); - var wRight = this.readWord((acc + 1) & 0o17); + var wLeft = this.readWord(ac); + var wRight = this.readWord((ac + 1) & 0o17); var wLeftOrig = wLeft; /* * Note that a right rotation (s < 0) of s bits is equivalent to a left rotation (s > 0) of 72 + s bits. @@ -2017,8 +2017,8 @@ PDP10.opROTC = function(op, acc) wLeft = ((wRight * Math.pow(2, s - 36)) % PDP10.WORD_LIMIT) + Math.trunc(wLeft / Math.pow(2, 72 - s)); wRight = ((wLeftOrig * Math.pow(2, s - 36)) % PDP10.WORD_LIMIT) + Math.trunc(wRight / Math.pow(2, 72 - s)); } - this.writeWord(acc, wLeft); - this.writeWord((acc + 1) & 0o17, wRight); + this.writeWord(ac, wLeft); + this.writeWord((ac + 1) & 0o17, wRight); } }; @@ -2034,17 +2034,17 @@ PDP10.opROTC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opLSHC = function(op, acc) +PDP10.opLSHC = function(op, ac) { /* * Convert the unsigned 18-bit value in regEA to a signed 8-bit value (+/-255). */ var s = ((this.regEA << 14) >> 14) % 256; if (s) { - var wLeft = this.readWord(acc); - var wRight = this.readWord((acc + 1) & 0o17); + var wLeft = this.readWord(ac); + var wRight = this.readWord((ac + 1) & 0o17); if (s > 0) { if (s >= 36) { if (s >= 72) { @@ -2070,8 +2070,8 @@ PDP10.opLSHC = function(op, acc) wLeft = Math.trunc(wLeft / Math.pow(2, -s)); } } - this.writeWord(acc, wLeft); - this.writeWord((acc + 1) & 0o17, wRight); + this.writeWord(ac, wLeft); + this.writeWord((ac + 1) & 0o17, wRight); } }; @@ -2084,12 +2084,12 @@ PDP10.opLSHC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opEXCH = function(op, acc) +PDP10.opEXCH = function(op, ac) { - var tmp = this.readWord(acc); - this.writeWord(acc, this.readWord(this.regEA)); + var tmp = this.readWord(ac); + this.writeWord(ac, this.readWord(this.regEA)); this.writeWord(this.regEA, tmp); }; @@ -2116,12 +2116,12 @@ PDP10.opEXCH = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opBLT = function(op, acc) +PDP10.opBLT = function(op, ac) { var fDone = false; - var addrDst = this.readWord(acc); + var addrDst = this.readWord(ac); var addrSrc = (addrDst / PDP10.HALF_SHIFT)|0; addrDst &= PDP10.HALF_MASK; while (!fDone) { @@ -2134,7 +2134,7 @@ PDP10.opBLT = function(op, acc) * Since the CPU isn't currently running, the CPU is presumably being stepped, so we'll treat that the * same as the "priority interrupt" condition described above, update the accumulator, rewind the PC, and leave. */ - this.writeWord(acc, addrSrc * PDP10.HALF_SHIFT + addrDst); + this.writeWord(ac, addrSrc * PDP10.HALF_SHIFT + addrDst); if (!fDone) this.advancePC(-1); fDone = true; } @@ -2156,12 +2156,12 @@ PDP10.opBLT = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOBJP = function(op, acc) +PDP10.opAOBJP = function(op, ac) { - var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_LIMIT; - this.writeWord(acc, dst); + var dst = (this.readWord(ac) + 0o000001000001) % PDP10.WORD_LIMIT; + this.writeWord(ac, dst); if (dst < PDP10.INT_LIMIT) this.setPC(this.regEA); }; @@ -2180,12 +2180,12 @@ PDP10.opAOBJP = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOBJN = function(op, acc) +PDP10.opAOBJN = function(op, ac) { - var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_LIMIT; - this.writeWord(acc, dst); + var dst = (this.readWord(ac) + 0o000001000001) % PDP10.WORD_LIMIT; + this.writeWord(ac, dst); if (dst >= PDP10.INT_LIMIT) this.setPC(this.regEA); }; @@ -2228,29 +2228,29 @@ PDP10.opAOBJN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJRST = function(op, acc) +PDP10.opJRST = function(op, ac) { - if (acc & 0b0001) { + if (ac & 0b0001) { /* * Enter user mode. */ this.setUserMode(); } - if (acc & 0b0010) { + if (ac & 0b0010) { /* * Restore the flags. */ this.setPS(this.regLA); } - if (acc & 0b0100) { + if (ac & 0b0100) { /* * Halt the processor. */ this.stopCPU(); } - if (acc & 0b1000) { + if (ac & 0b1000) { /* * Restore interrupt channel. */ @@ -2264,7 +2264,7 @@ PDP10.opJRST = function(op, acc) * * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-57: * - * If any flag specified by F [acc] is set, clear it and take the next instruction from location E, + * If any flag specified by F [ac] is set, clear it and take the next instruction from location E, * continuing sequential operation from there. * * To select one or a combination of these flags (which are among those described above) the programmer can specify @@ -2288,14 +2288,14 @@ PDP10.opJRST = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJFCL = function(op, acc) +PDP10.opJFCL = function(op, ac) { /* - * The acc (F) bits from the opcode align perfectly with the top 4 bits of regPS; all we have to do is shift acc left 14. + * The ac (F) bits from the opcode align perfectly with the top 4 bits of regPS; all we have to do is shift ac left 14. */ - var bitsPS = acc << 14; + var bitsPS = ac << 14; if (this.regPS & bitsPS) { this.regPS &= ~bitsPS; this.setPC(this.regEA); @@ -2315,9 +2315,9 @@ PDP10.opJFCL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opXCT = function(op, acc) +PDP10.opXCT = function(op, ac) { this.regXC = this.regEA; }; @@ -2327,9 +2327,9 @@ PDP10.opXCT = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opPUSHJ = function(op, acc) +PDP10.opPUSHJ = function(op, ac) { this.opUndefined(op); }; @@ -2360,11 +2360,11 @@ PDP10.opPUSHJ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opPUSH = function(op, acc) +PDP10.opPUSH = function(op, ac) { - var p = this.readWord(acc); + var p = this.readWord(ac); if (!PDP10.SIMH) { /* * This is the behavior that is clearly documented by DEC. @@ -2385,7 +2385,7 @@ PDP10.opPUSH = function(op, acc) this.regPS |= PDP10.PSFLAG.PD_OVFL; } } - this.writeWord(acc, p); + this.writeWord(ac, p); }; /** @@ -2402,18 +2402,18 @@ PDP10.opPUSH = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opPOP = function(op, acc) +PDP10.opPOP = function(op, ac) { - var p = this.readWord(acc); + var p = this.readWord(ac); var src = this.readWord(p & PDP10.HALF_MASK); this.writeWord(this.regEA, src); - if (this.regEA == acc) p = src; // this avoids re-reading the accumulator if the write just overwrote it + if (this.regEA == ac) p = src; // this avoids re-reading the accumulator if the write just overwrote it p -= 0o000001000001; if (p < 0) p += PDP10.WORD_LIMIT; if (((p / PDP10.HALF_SHIFT)|0) == PDP10.HALF_MASK) this.regPS |= PDP10.PSFLAG.PD_OVFL; - this.writeWord(acc, p); + this.writeWord(ac, p); }; /** @@ -2421,9 +2421,9 @@ PDP10.opPOP = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opPOPJ = function(op, acc) +PDP10.opPOPJ = function(op, ac) { this.opUndefined(op); }; @@ -2443,9 +2443,9 @@ PDP10.opPOPJ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJSR = function(op, acc) +PDP10.opJSR = function(op, ac) { this.writeWord(this.regEA, this.getPS() + this.getPC()); this.setPC(this.regEA + 1); @@ -2454,6 +2454,8 @@ PDP10.opJSR = function(op, acc) /** * opJSP(0o265000): Jump and Save PC * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-58: + * * Place the current contents of the flags (as described above) in AC left and the contents of PC in AC right * (at this time PC contains an address one greater than the location of the JSP instruction). Take the next * instruction from location E and continue sequential operation from there. The flags are unaffected except @@ -2464,36 +2466,72 @@ PDP10.opJSR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJSP = function(op, acc) +PDP10.opJSP = function(op, ac) { - this.writeWord(acc, this.getPS() + this.getPC()); + this.writeWord(ac, this.getPS() + this.getPC()); this.setPC(this.regEA); }; /** - * opJSA(0o266000) + * opJSA(0o266000): Jump and Save AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-61: + * + * Place AC in location E, the effective address E in AC left, and the contents of PC in AC right (at this time + * PC contains an address one greater than the location of the JSA instruction). Take the next instruction from + * location E + 1 and continue sequential operation from there. The original contents of E are lost. + * + * If this instruction is executed as a result of a priority interrupt or in unrelocated 41 or 61 while the processor + * is in user mode, bit 5 of the PC word stored is 1 and the processor leaves user mode. + * + * Regarding JSA and JRA: + * + * A JSA combines advantages of the JSR and JSP. JSA does modify memory, but it saves PC in an accumulator + * without losing its previous contents (at a cost of not saving the flags). It is thus convenient for multiple-entry + * subroutines. In a subroutine called by a JSR, the returning JRST must refer to the (single) entry point. + * Since a JRA can retrieve the original PC by addressing AC as an index register, it is independent of any entry point + * without tying up an accumulator to the extent a JSP would. * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJSA = function(op, acc) +PDP10.opJSA = function(op, ac) { - this.opUndefined(op); + this.writeWord(this.regEA, this.readWord(ac)); + this.writeWord(ac, this.regEA * PDP10.HALF_SHIFT + this.getPC()); + this.setPC(this.regEA + 1); }; /** - * opJRA(0o267000) + * opJRA(0o267000): Jump and Restore AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-61: + * + * Place the contents of the location addressed by AC left into AC. Take the next instruction from location E and + * continue sequential operation from there. + * + * This opcode functions as the counterpart to JSA, but ONLY if location E (the effective address stored in the JRA) indexes + * with the same AC that was used with the JSA. + * + * JSA 17,F1 + * R1: ... + * ... + * F1: 0 ; location to save AC 17, as specified by the A field of "JSA 17,F1" + * F2: ... ; first instruction executed after "JSA 17,F1" + * JRA 17,(17) ; return to R1, after restoring AC 17 * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJRA = function(op, acc) +PDP10.opJRA = function(op, ac) { - this.opUndefined(op); + var acc = this.readWord(ac); + this.writeWord(ac, this.readWord((acc / PDP10.HALF_SHIFT)|0)); + this.setPC(this.regEA); }; /** @@ -2511,11 +2549,11 @@ PDP10.opJRA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opADD = function(op, acc) +PDP10.opADD = function(op, ac) { - this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -2533,11 +2571,11 @@ PDP10.opADD = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opADDI = function(op, acc) +PDP10.opADDI = function(op, ac) { - this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), this.regEA)); }; /** @@ -2555,11 +2593,11 @@ PDP10.opADDI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opADDM = function(op, acc) +PDP10.opADDM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -2577,11 +2615,11 @@ PDP10.opADDM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opADDB = function(op, acc) +PDP10.opADDB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -2599,11 +2637,11 @@ PDP10.opADDB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSUB = function(op, acc) +PDP10.opSUB = function(op, ac) { - this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.doSUB.call(this, this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -2621,11 +2659,11 @@ PDP10.opSUB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSUBI = function(op, acc) +PDP10.opSUBI = function(op, ac) { - this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.doSUB.call(this, this.readWord(ac), this.regEA)); }; /** @@ -2643,11 +2681,11 @@ PDP10.opSUBI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSUBM = function(op, acc) +PDP10.opSUBM = function(op, ac) { - this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -2665,11 +2703,11 @@ PDP10.opSUBM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSUBB = function(op, acc) +PDP10.opSUBB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.doSUB.call(this, this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -2682,11 +2720,11 @@ PDP10.opSUBB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIL = function(op, acc) +PDP10.opCAIL = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) < 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) < 0) this.setPC(this.regPC + 1); }; /** @@ -2699,11 +2737,11 @@ PDP10.opCAIL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIE = function(op, acc) +PDP10.opCAIE = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) == 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) == 0) this.setPC(this.regPC + 1); }; /** @@ -2716,11 +2754,11 @@ PDP10.opCAIE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAILE = function(op, acc) +PDP10.opCAILE = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) <= 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) <= 0) this.setPC(this.regPC + 1); }; /** @@ -2733,9 +2771,9 @@ PDP10.opCAILE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIA = function(op, acc) +PDP10.opCAIA = function(op, ac) { // TODO: Determine if there's any need to actually perform the comparison. this.setPC(this.regPC + 1); @@ -2751,11 +2789,11 @@ PDP10.opCAIA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIGE = function(op, acc) +PDP10.opCAIGE = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) >= 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) >= 0) this.setPC(this.regPC + 1); }; /** @@ -2768,11 +2806,11 @@ PDP10.opCAIGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIN = function(op, acc) +PDP10.opCAIN = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) != 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) != 0) this.setPC(this.regPC + 1); }; /** @@ -2785,11 +2823,11 @@ PDP10.opCAIN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAIG = function(op, acc) +PDP10.opCAIG = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.regEA) > 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.regEA) > 0) this.setPC(this.regPC + 1); }; /** @@ -2803,11 +2841,11 @@ PDP10.opCAIG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAML = function(op, acc) +PDP10.opCAML = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) < 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) < 0) this.setPC(this.regPC + 1); }; /** @@ -2821,11 +2859,11 @@ PDP10.opCAML = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAME = function(op, acc) +PDP10.opCAME = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) == 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) == 0) this.setPC(this.regPC + 1); }; /** @@ -2839,11 +2877,11 @@ PDP10.opCAME = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAMLE = function(op, acc) +PDP10.opCAMLE = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) <= 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) <= 0) this.setPC(this.regPC + 1); }; /** @@ -2857,9 +2895,9 @@ PDP10.opCAMLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAMA = function(op, acc) +PDP10.opCAMA = function(op, ac) { // TODO: Determine if there's any need to actually perform the comparison. this.setPC(this.regPC + 1); @@ -2876,11 +2914,11 @@ PDP10.opCAMA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAMGE = function(op, acc) +PDP10.opCAMGE = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) >= 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) >= 0) this.setPC(this.regPC + 1); }; /** @@ -2894,11 +2932,11 @@ PDP10.opCAMGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAMN = function(op, acc) +PDP10.opCAMN = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) != 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) != 0) this.setPC(this.regPC + 1); }; /** @@ -2912,11 +2950,11 @@ PDP10.opCAMN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opCAMG = function(op, acc) +PDP10.opCAMG = function(op, ac) { - if (PDP10.CMP(this.readWord(acc), this.readWord(this.regEA)) > 0) this.setPC(this.regPC + 1); + if (PDP10.CMP(this.readWord(ac), this.readWord(this.regEA)) > 0) this.setPC(this.regPC + 1); }; /** @@ -2929,11 +2967,11 @@ PDP10.opCAMG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPL = function(op, acc) +PDP10.opJUMPL = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) < 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) < 0) this.setPC(this.regEA); }; /** @@ -2946,11 +2984,11 @@ PDP10.opJUMPL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPE = function(op, acc) +PDP10.opJUMPE = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) == 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) == 0) this.setPC(this.regEA); }; /** @@ -2963,11 +3001,11 @@ PDP10.opJUMPE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPLE = function(op, acc) +PDP10.opJUMPLE = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) <= 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) <= 0) this.setPC(this.regEA); }; /** @@ -2980,9 +3018,9 @@ PDP10.opJUMPLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPA = function(op, acc) +PDP10.opJUMPA = function(op, ac) { this.setPC(this.regEA); }; @@ -2997,11 +3035,11 @@ PDP10.opJUMPA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPGE = function(op, acc) +PDP10.opJUMPGE = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) >= 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) >= 0) this.setPC(this.regEA); }; /** @@ -3014,11 +3052,11 @@ PDP10.opJUMPGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPN = function(op, acc) +PDP10.opJUMPN = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) != 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) != 0) this.setPC(this.regEA); }; /** @@ -3031,11 +3069,11 @@ PDP10.opJUMPN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opJUMPG = function(op, acc) +PDP10.opJUMPG = function(op, ac) { - if (PDP10.SIGN(this.readWord(acc)) > 0) this.setPC(this.regEA); + if (PDP10.SIGN(this.readWord(ac)) > 0) this.setPC(this.regEA); }; /** @@ -3049,11 +3087,11 @@ PDP10.opJUMPG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIP = function(op, acc) +PDP10.opSKIP = function(op, ac) { - if (acc) this.writeWord(acc, this.readWord(this.regEA)); + if (ac) this.writeWord(ac, this.readWord(this.regEA)); }; /** @@ -3067,13 +3105,13 @@ PDP10.opSKIP = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPL = function(op, acc) +PDP10.opSKIPL = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) < 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3087,13 +3125,13 @@ PDP10.opSKIPL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPE = function(op, acc) +PDP10.opSKIPE = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) == 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3107,13 +3145,13 @@ PDP10.opSKIPE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPLE = function(op, acc) +PDP10.opSKIPLE = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3127,12 +3165,12 @@ PDP10.opSKIPLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPA = function(op, acc) +PDP10.opSKIPA = function(op, ac) { this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, this.readWord(this.regEA)); + if (ac) this.writeWord(ac, this.readWord(this.regEA)); }; /** @@ -3146,13 +3184,13 @@ PDP10.opSKIPA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPGE = function(op, acc) +PDP10.opSKIPGE = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3166,13 +3204,13 @@ PDP10.opSKIPGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPN = function(op, acc) +PDP10.opSKIPN = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) != 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3186,13 +3224,13 @@ PDP10.opSKIPN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSKIPG = function(op, acc) +PDP10.opSKIPG = function(op, ac) { var dst = this.readWord(this.regEA); if (PDP10.SIGN(dst) > 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3207,11 +3245,11 @@ PDP10.opSKIPG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJ = function(op, acc) +PDP10.opAOJ = function(op, ac) { - this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); }; /** @@ -3226,11 +3264,11 @@ PDP10.opAOJ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJL = function(op, acc) +PDP10.opAOJL = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) < 0) this.setPC(this.regEA); }; @@ -3246,11 +3284,11 @@ PDP10.opAOJL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJE = function(op, acc) +PDP10.opAOJE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) == 0) this.setPC(this.regEA); }; @@ -3266,11 +3304,11 @@ PDP10.opAOJE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJLE = function(op, acc) +PDP10.opAOJLE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regEA); }; @@ -3286,11 +3324,11 @@ PDP10.opAOJLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJA = function(op, acc) +PDP10.opAOJA = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); this.setPC(this.regEA); }; @@ -3306,11 +3344,11 @@ PDP10.opAOJA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJGE = function(op, acc) +PDP10.opAOJGE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regEA); }; @@ -3326,11 +3364,11 @@ PDP10.opAOJGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJN = function(op, acc) +PDP10.opAOJN = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) != 0) this.setPC(this.regEA); }; @@ -3346,11 +3384,11 @@ PDP10.opAOJN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOJG = function(op, acc) +PDP10.opAOJG = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), 1)); if (PDP10.SIGN(dst) > 0) this.setPC(this.regEA); }; @@ -3366,12 +3404,12 @@ PDP10.opAOJG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOS = function(op, acc) +PDP10.opAOS = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3386,13 +3424,13 @@ PDP10.opAOS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSL = function(op, acc) +PDP10.opAOSL = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) < 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3407,13 +3445,13 @@ PDP10.opAOSL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSE = function(op, acc) +PDP10.opAOSE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) == 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3428,13 +3466,13 @@ PDP10.opAOSE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSLE = function(op, acc) +PDP10.opAOSLE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3449,13 +3487,13 @@ PDP10.opAOSLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSA = function(op, acc) +PDP10.opAOSA = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3470,13 +3508,13 @@ PDP10.opAOSA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSGE = function(op, acc) +PDP10.opAOSGE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3491,13 +3529,13 @@ PDP10.opAOSGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSN = function(op, acc) +PDP10.opAOSN = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) != 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3512,13 +3550,13 @@ PDP10.opAOSN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAOSG = function(op, acc) +PDP10.opAOSG = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); if (PDP10.SIGN(dst) > 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3533,11 +3571,11 @@ PDP10.opAOSG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJ = function(op, acc) +PDP10.opSOJ = function(op, ac) { - this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); }; /** @@ -3552,11 +3590,11 @@ PDP10.opSOJ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJL = function(op, acc) +PDP10.opSOJL = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) < 0) this.setPC(this.regEA); }; @@ -3572,11 +3610,11 @@ PDP10.opSOJL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJE = function(op, acc) +PDP10.opSOJE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) == 0) this.setPC(this.regEA); }; @@ -3592,11 +3630,11 @@ PDP10.opSOJE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJLE = function(op, acc) +PDP10.opSOJLE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regEA); }; @@ -3612,11 +3650,11 @@ PDP10.opSOJLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJA = function(op, acc) +PDP10.opSOJA = function(op, ac) { - this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); this.setPC(this.regEA); }; @@ -3632,11 +3670,11 @@ PDP10.opSOJA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJGE = function(op, acc) +PDP10.opSOJGE = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regEA); }; @@ -3652,11 +3690,11 @@ PDP10.opSOJGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJN = function(op, acc) +PDP10.opSOJN = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) != 0) this.setPC(this.regEA); }; @@ -3672,11 +3710,11 @@ PDP10.opSOJN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOJG = function(op, acc) +PDP10.opSOJG = function(op, ac) { - var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); + var dst = this.writeWord(ac, PDP10.doADD.call(this, this.readWord(ac), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) > 0) this.setPC(this.regEA); }; @@ -3692,12 +3730,12 @@ PDP10.opSOJG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOS = function(op, acc) +PDP10.opSOS = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3712,13 +3750,13 @@ PDP10.opSOS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSL = function(op, acc) +PDP10.opSOSL = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) < 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3733,13 +3771,13 @@ PDP10.opSOSL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSE = function(op, acc) +PDP10.opSOSE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) == 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3754,13 +3792,13 @@ PDP10.opSOSE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSLE = function(op, acc) +PDP10.opSOSLE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3775,13 +3813,13 @@ PDP10.opSOSLE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSA = function(op, acc) +PDP10.opSOSA = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3796,13 +3834,13 @@ PDP10.opSOSA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSGE = function(op, acc) +PDP10.opSOSGE = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3817,13 +3855,13 @@ PDP10.opSOSGE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSN = function(op, acc) +PDP10.opSOSN = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) != 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3838,13 +3876,13 @@ PDP10.opSOSN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSOSG = function(op, acc) +PDP10.opSOSG = function(op, ac) { var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) > 0) this.setPC(this.regPC + 1); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -3857,11 +3895,11 @@ PDP10.opSOSG = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETZ = function(op, acc) +PDP10.opSETZ = function(op, ac) { - this.writeWord(acc, 0); + this.writeWord(ac, 0); }; /** @@ -3873,9 +3911,9 @@ PDP10.opSETZ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETZM = function(op, acc) +PDP10.opSETZM = function(op, ac) { this.writeWord(this.regEA, 0); }; @@ -3889,11 +3927,11 @@ PDP10.opSETZM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETZB = function(op, acc) +PDP10.opSETZB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, 0)); + this.writeWord(this.regEA, this.writeWord(ac, 0)); }; /** @@ -3905,11 +3943,11 @@ PDP10.opSETZB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opAND = function(op, acc) +PDP10.opAND = function(op, ac) { - this.writeWord(acc, PDP10.AND(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.AND(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -3921,11 +3959,11 @@ PDP10.opAND = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDI = function(op, acc) +PDP10.opANDI = function(op, ac) { - this.writeWord(acc, PDP10.AND(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.AND(this.readWord(ac), this.regEA)); }; /** @@ -3937,11 +3975,11 @@ PDP10.opANDI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDM = function(op, acc) +PDP10.opANDM = function(op, ac) { - this.writeWord(this.regEA, PDP10.AND(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.AND(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -3954,11 +3992,11 @@ PDP10.opANDM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDB = function(op, acc) +PDP10.opANDB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.AND(this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.AND(this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -3971,11 +4009,11 @@ PDP10.opANDB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCA = function(op, acc) +PDP10.opANDCA = function(op, ac) { - this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -3988,11 +4026,11 @@ PDP10.opANDCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCAI = function(op, acc) +PDP10.opANDCAI = function(op, ac) { - this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), this.regEA)); }; /** @@ -4005,11 +4043,11 @@ PDP10.opANDCAI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCAM = function(op, acc) +PDP10.opANDCAM = function(op, ac) { - this.writeWord(this.regEA, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4022,11 +4060,11 @@ PDP10.opANDCAM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCAB = function(op, acc) +PDP10.opANDCAB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -4039,11 +4077,11 @@ PDP10.opANDCAB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCM = function(op, acc) +PDP10.opANDCM = function(op, ac) { - this.writeWord(acc, PDP10.AND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(ac, PDP10.AND(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4056,11 +4094,11 @@ PDP10.opANDCM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCMI = function(op, acc) +PDP10.opANDCMI = function(op, ac) { - this.writeWord(acc, PDP10.AND(this.readWord(acc), PDP10.WORD_MASK - this.regEA)); + this.writeWord(ac, PDP10.AND(this.readWord(ac), PDP10.WORD_MASK - this.regEA)); }; /** @@ -4073,11 +4111,11 @@ PDP10.opANDCMI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCMM = function(op, acc) +PDP10.opANDCMM = function(op, ac) { - this.writeWord(this.regEA, PDP10.AND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.AND(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4090,11 +4128,11 @@ PDP10.opANDCMM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCMB = function(op, acc) +PDP10.opANDCMB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.AND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.AND(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** @@ -4107,11 +4145,11 @@ PDP10.opANDCMB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opXOR = function(op, acc) +PDP10.opXOR = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4124,11 +4162,11 @@ PDP10.opXOR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opXORI = function(op, acc) +PDP10.opXORI = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.regEA)); }; /** @@ -4141,11 +4179,11 @@ PDP10.opXORI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opXORM = function(op, acc) +PDP10.opXORM = function(op, ac) { - this.writeWord(this.regEA, PDP10.XOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.XOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4158,11 +4196,11 @@ PDP10.opXORM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opXORB = function(op, acc) +PDP10.opXORB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -4175,11 +4213,11 @@ PDP10.opXORB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIOR = function(op, acc) +PDP10.opIOR = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4192,11 +4230,11 @@ PDP10.opIOR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIORI = function(op, acc) +PDP10.opIORI = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.regEA)); }; /** @@ -4209,11 +4247,11 @@ PDP10.opIORI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIORM = function(op, acc) +PDP10.opIORM = function(op, ac) { - this.writeWord(this.regEA, PDP10.IOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.IOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4226,11 +4264,11 @@ PDP10.opIORM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opIORB = function(op, acc) +PDP10.opIORB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -4243,11 +4281,11 @@ PDP10.opIORB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCB = function(op, acc) +PDP10.opANDCB = function(op, ac) { - this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4260,11 +4298,11 @@ PDP10.opANDCB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCBI = function(op, acc) +PDP10.opANDCBI = function(op, ac) { - this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.regEA)); + this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.regEA)); }; /** @@ -4277,11 +4315,11 @@ PDP10.opANDCBI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCBM = function(op, acc) +PDP10.opANDCBM = function(op, ac) { - this.writeWord(this.regEA, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4294,11 +4332,11 @@ PDP10.opANDCBM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opANDCBB = function(op, acc) +PDP10.opANDCBB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.AND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.AND(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** @@ -4311,11 +4349,11 @@ PDP10.opANDCBB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opEQV = function(op, acc) +PDP10.opEQV = function(op, ac) { - this.writeWord(acc, PDP10.EQV(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.EQV(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4328,11 +4366,11 @@ PDP10.opEQV = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opEQVI = function(op, acc) +PDP10.opEQVI = function(op, ac) { - this.writeWord(acc, PDP10.EQV(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.EQV(this.readWord(ac), this.regEA)); }; /** @@ -4345,11 +4383,11 @@ PDP10.opEQVI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opEQVM = function(op, acc) +PDP10.opEQVM = function(op, ac) { - this.writeWord(this.regEA, PDP10.EQV(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.EQV(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4362,11 +4400,11 @@ PDP10.opEQVM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opEQVB = function(op, acc) +PDP10.opEQVB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.EQV(this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.EQV(this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -4379,11 +4417,11 @@ PDP10.opEQVB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCA = function(op, acc) +PDP10.opSETCA = function(op, ac) { - this.writeWord(acc, PDP10.WORD_MASK - this.readWord(acc)); + this.writeWord(ac, PDP10.WORD_MASK - this.readWord(ac)); }; /** @@ -4395,11 +4433,11 @@ PDP10.opSETCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCAM = function(op, acc) +PDP10.opSETCAM = function(op, ac) { - this.writeWord(this.regEA, PDP10.WORD_MASK - this.readWord(acc)); + this.writeWord(this.regEA, PDP10.WORD_MASK - this.readWord(ac)); }; /** @@ -4411,11 +4449,11 @@ PDP10.opSETCAM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCAB = function(op, acc) +PDP10.opSETCAB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK - this.readWord(acc))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.WORD_MASK - this.readWord(ac))); }; /** @@ -4428,11 +4466,11 @@ PDP10.opSETCAB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCA = function(op, acc) +PDP10.opORCA = function(op, ac) { - this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4445,11 +4483,11 @@ PDP10.opORCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCAI = function(op, acc) +PDP10.opORCAI = function(op, ac) { - this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), this.regEA)); }; /** @@ -4462,11 +4500,11 @@ PDP10.opORCAI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCAM = function(op, acc) +PDP10.opORCAM = function(op, ac) { - this.writeWord(this.regEA, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -4479,11 +4517,11 @@ PDP10.opORCAM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCAB = function(op, acc) +PDP10.opORCAB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), this.readWord(this.regEA)))); }; /** @@ -4496,11 +4534,11 @@ PDP10.opORCAB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCM = function(op, acc) +PDP10.opSETCM = function(op, ac) { - this.writeWord(acc, PDP10.WORD_MASK - this.readWord(this.regEA)); + this.writeWord(ac, PDP10.WORD_MASK - this.readWord(this.regEA)); }; /** @@ -4513,11 +4551,11 @@ PDP10.opSETCM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCMI = function(op, acc) +PDP10.opSETCMI = function(op, ac) { - this.writeWord(acc, PDP10.WORD_MASK - this.regEA); + this.writeWord(ac, PDP10.WORD_MASK - this.regEA); }; /** @@ -4530,9 +4568,9 @@ PDP10.opSETCMI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCMM = function(op, acc) +PDP10.opSETCMM = function(op, ac) { this.writeWord(this.regEA, PDP10.WORD_MASK - this.readWord(this.regEA)); }; @@ -4547,11 +4585,11 @@ PDP10.opSETCMM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETCMB = function(op, acc) +PDP10.opSETCMB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4564,11 +4602,11 @@ PDP10.opSETCMB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCM = function(op, acc) +PDP10.opORCM = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4581,11 +4619,11 @@ PDP10.opORCM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCMI = function(op, acc) +PDP10.opORCMI = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), PDP10.WORD_MASK - this.regEA)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), PDP10.WORD_MASK - this.regEA)); }; /** @@ -4598,11 +4636,11 @@ PDP10.opORCMI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCMM = function(op, acc) +PDP10.opORCMM = function(op, ac) { - this.writeWord(this.regEA, PDP10.IOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.IOR(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4615,11 +4653,11 @@ PDP10.opORCMM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCMB = function(op, acc) +PDP10.opORCMB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.IOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.IOR(this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** @@ -4632,11 +4670,11 @@ PDP10.opORCMB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCB = function(op, acc) +PDP10.opORCB = function(op, ac) { - this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4649,11 +4687,11 @@ PDP10.opORCB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCBI = function(op, acc) +PDP10.opORCBI = function(op, ac) { - this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.regEA)); + this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.regEA)); }; /** @@ -4666,11 +4704,11 @@ PDP10.opORCBI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCBM = function(op, acc) +PDP10.opORCBM = function(op, ac) { - this.writeWord(this.regEA, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); + this.writeWord(this.regEA, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** @@ -4683,11 +4721,11 @@ PDP10.opORCBM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opORCBB = function(op, acc) +PDP10.opORCBB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.IOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.IOR(PDP10.WORD_MASK - this.readWord(ac), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** @@ -4700,11 +4738,11 @@ PDP10.opORCBB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETO = function(op, acc) +PDP10.opSETO = function(op, ac) { - this.writeWord(acc, PDP10.WORD_MASK); + this.writeWord(ac, PDP10.WORD_MASK); }; /** @@ -4716,9 +4754,9 @@ PDP10.opSETO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETOM = function(op, acc) +PDP10.opSETOM = function(op, ac) { this.writeWord(this.regEA, PDP10.WORD_MASK); }; @@ -4732,11 +4770,11 @@ PDP10.opSETOM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opSETOB = function(op, acc) +PDP10.opSETOB = function(op, ac) { - this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK)); + this.writeWord(this.regEA, this.writeWord(ac, PDP10.WORD_MASK)); }; /** @@ -4751,13 +4789,13 @@ PDP10.opSETOB = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLL = function(op, acc) +PDP10.opHLL = function(op, ac) { var src = this.readWord(this.regEA); - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHR(op, dst, src) + (src - (src & PDP10.HALF_MASK))); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHR(op, dst, src) + (src - (src & PDP10.HALF_MASK))); }; /** @@ -4775,12 +4813,12 @@ PDP10.opHLL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLLI = function(op, acc) +PDP10.opHLLI = function(op, ac) { - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHR(op, dst, 0)); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHR(op, dst, 0)); }; /** @@ -4795,11 +4833,11 @@ PDP10.opHLLI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLLM = function(op, acc) +PDP10.opHLLM = function(op, ac) { - var src = this.readWord(acc); + var src = this.readWord(ac); var dst = this.readWord(this.regEA); this.writeWord(this.regEA, PDP10.GETHR(op, dst, src) + (src - (src & PDP10.HALF_MASK))); }; @@ -4818,14 +4856,14 @@ PDP10.opHLLM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLLS = function(op, acc) +PDP10.opHLLS = function(op, ac) { var dst = this.readWord(this.regEA); dst = PDP10.SETHR(op, dst, dst); this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -4841,13 +4879,13 @@ PDP10.opHLLS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRL = function(op, acc) +PDP10.opHRL = function(op, ac) { var src = (this.readWord(this.regEA) & PDP10.HALF_MASK) * PDP10.HALF_SHIFT; - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHR(op, dst, src) + src); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHR(op, dst, src) + src); }; /** @@ -4863,13 +4901,13 @@ PDP10.opHRL = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRLI = function(op, acc) +PDP10.opHRLI = function(op, ac) { var src = this.regEA * PDP10.HALF_SHIFT; - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHR(op, dst, src) + src); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHR(op, dst, src) + src); }; /** @@ -4885,11 +4923,11 @@ PDP10.opHRLI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRLM = function(op, acc) +PDP10.opHRLM = function(op, ac) { - var src = (this.readWord(acc) & PDP10.HALF_MASK) * PDP10.HALF_SHIFT; + var src = (this.readWord(ac) & PDP10.HALF_MASK) * PDP10.HALF_SHIFT; var dst = this.readWord(this.regEA); this.writeWord(this.regEA, PDP10.GETHR(op, dst, src) + src); }; @@ -4907,15 +4945,15 @@ PDP10.opHRLM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRLS = function(op, acc) +PDP10.opHRLS = function(op, ac) { var dst = this.readWord(this.regEA); var src = (dst & PDP10.HALF_MASK) * PDP10.HALF_SHIFT; dst = PDP10.GETHR(op, dst, src) + src; this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -4931,13 +4969,13 @@ PDP10.opHRLS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRR = function(op, acc) +PDP10.opHRR = function(op, ac) { var src = this.readWord(this.regEA) & PDP10.HALF_MASK; - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHL(op, dst, src) + src); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHL(op, dst, src) + src); }; /** @@ -4953,12 +4991,12 @@ PDP10.opHRR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRRI = function(op, acc) +PDP10.opHRRI = function(op, ac) { - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHL(op, dst, this.regEA) + this.regEA); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHL(op, dst, this.regEA) + this.regEA); }; /** @@ -4974,11 +5012,11 @@ PDP10.opHRRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRRM = function(op, acc) +PDP10.opHRRM = function(op, ac) { - var src = this.readWord(acc) & PDP10.HALF_MASK; + var src = this.readWord(ac) & PDP10.HALF_MASK; var dst = this.readWord(this.regEA); this.writeWord(this.regEA, PDP10.GETHL(op, dst, src) + src); }; @@ -4998,14 +5036,14 @@ PDP10.opHRRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHRRS = function(op, acc) +PDP10.opHRRS = function(op, ac) { var dst = this.readWord(this.regEA); dst = PDP10.SETHL(op, dst, dst); this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -5020,13 +5058,13 @@ PDP10.opHRRS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLR = function(op, acc) +PDP10.opHLR = function(op, ac) { var src = (this.readWord(this.regEA) / PDP10.HALF_SHIFT)|0; - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHL(op, dst, src) + src); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHL(op, dst, src) + src); }; /** @@ -5043,12 +5081,12 @@ PDP10.opHLR = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLRI = function(op, acc) +PDP10.opHLRI = function(op, ac) { - var dst = this.readWord(acc); - this.writeWord(acc, PDP10.GETHL(op, dst, 0)); + var dst = this.readWord(ac); + this.writeWord(ac, PDP10.GETHL(op, dst, 0)); }; /** @@ -5063,11 +5101,11 @@ PDP10.opHLRI = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLRM = function(op, acc) +PDP10.opHLRM = function(op, ac) { - var src = (this.readWord(acc) / PDP10.HALF_SHIFT)|0; + var src = (this.readWord(ac) / PDP10.HALF_SHIFT)|0; var dst = this.readWord(this.regEA); this.writeWord(this.regEA, PDP10.GETHL(op, dst, src) + src); }; @@ -5084,15 +5122,15 @@ PDP10.opHLRM = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opHLRS = function(op, acc) +PDP10.opHLRS = function(op, ac) { var dst = this.readWord(this.regEA); var src = (dst / PDP10.HALF_SHIFT)|0; dst = PDP10.GETHL(op, dst, src) + src; this.writeWord(this.regEA, dst); - if (acc) this.writeWord(acc, dst); + if (ac) this.writeWord(ac, dst); }; /** @@ -5100,11 +5138,11 @@ PDP10.opHLRS = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRNE = function(op, acc) +PDP10.opTRNE = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.regEA) == 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.regEA) == 0) this.setPC(this.regPC + 1); }; /** @@ -5112,11 +5150,11 @@ PDP10.opTRNE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLNE = function(op, acc) +PDP10.opTLNE = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT) == 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT) == 0) this.setPC(this.regPC + 1); }; /** @@ -5124,9 +5162,9 @@ PDP10.opTLNE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRNA = function(op, acc) +PDP10.opTRNA = function(op, ac) { this.setPC(this.regPC + 1); }; @@ -5136,9 +5174,9 @@ PDP10.opTRNA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLNA = function(op, acc) +PDP10.opTLNA = function(op, ac) { this.setPC(this.regPC + 1); }; @@ -5148,11 +5186,11 @@ PDP10.opTLNA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRNN = function(op, acc) +PDP10.opTRNN = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.regEA) != 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.regEA) != 0) this.setPC(this.regPC + 1); }; /** @@ -5160,11 +5198,11 @@ PDP10.opTRNN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLNN = function(op, acc) +PDP10.opTLNN = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT) != 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT) != 0) this.setPC(this.regPC + 1); }; /** @@ -5172,11 +5210,11 @@ PDP10.opTLNN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDNE = function(op, acc) +PDP10.opTDNE = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.readWord(this.regEA)) == 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.readWord(this.regEA)) == 0) this.setPC(this.regPC + 1); }; /** @@ -5184,11 +5222,11 @@ PDP10.opTDNE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSNE = function(op, acc) +PDP10.opTSNE = function(op, ac) { - if (PDP10.AND(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA))) == 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA))) == 0) this.setPC(this.regPC + 1); }; /** @@ -5196,9 +5234,9 @@ PDP10.opTSNE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDNA = function(op, acc) +PDP10.opTDNA = function(op, ac) { this.setPC(this.regPC + 1); }; @@ -5208,9 +5246,9 @@ PDP10.opTDNA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSNA = function(op, acc) +PDP10.opTSNA = function(op, ac) { this.setPC(this.regPC + 1); }; @@ -5220,11 +5258,11 @@ PDP10.opTSNA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDNN = function(op, acc) +PDP10.opTDNN = function(op, ac) { - if (PDP10.AND(this.readWord(acc), this.readWord(this.regEA)) != 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), this.readWord(this.regEA)) != 0) this.setPC(this.regPC + 1); }; /** @@ -5232,11 +5270,11 @@ PDP10.opTDNN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSNN = function(op, acc) +PDP10.opTSNN = function(op, ac) { - if (PDP10.AND(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA))) != 0) this.setPC(this.regPC + 1); + if (PDP10.AND(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA))) != 0) this.setPC(this.regPC + 1); }; /** @@ -5244,11 +5282,11 @@ PDP10.opTSNN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRZ = function(op, acc) +PDP10.opTRZ = function(op, ac) { - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.regEA)); }; /** @@ -5256,11 +5294,11 @@ PDP10.opTRZ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLZ = function(op, acc) +PDP10.opTLZ = function(op, ac) { - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5268,13 +5306,13 @@ PDP10.opTLZ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRZE = function(op, acc) +PDP10.opTRZE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, this.regEA)); + this.writeWord(ac, PDP10.CLR(dst, this.regEA)); }; /** @@ -5282,14 +5320,14 @@ PDP10.opTRZE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLZE = function(op, acc) +PDP10.opTLZE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.regEA * PDP10.HALF_SHIFT; if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5297,12 +5335,12 @@ PDP10.opTLZE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRZA = function(op, acc) +PDP10.opTRZA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.regEA)); }; /** @@ -5310,12 +5348,12 @@ PDP10.opTRZA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLZA = function(op, acc) +PDP10.opTLZA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5323,13 +5361,13 @@ PDP10.opTLZA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRZN = function(op, acc) +PDP10.opTRZN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, this.regEA)); + this.writeWord(ac, PDP10.CLR(dst, this.regEA)); }; /** @@ -5337,14 +5375,14 @@ PDP10.opTRZN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLZN = function(op, acc) +PDP10.opTLZN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.regEA * PDP10.HALF_SHIFT; if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5352,11 +5390,11 @@ PDP10.opTLZN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDZ = function(op, acc) +PDP10.opTDZ = function(op, ac) { - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5364,11 +5402,11 @@ PDP10.opTDZ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSZ = function(op, acc) +PDP10.opTSZ = function(op, ac) { - this.writeWord(acc, PDP10.CLR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5376,14 +5414,14 @@ PDP10.opTSZ = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDZE = function(op, acc) +PDP10.opTDZE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5391,14 +5429,14 @@ PDP10.opTDZE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSZE = function(op, acc) +PDP10.opTSZE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5406,12 +5444,12 @@ PDP10.opTSZE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDZA = function(op, acc) +PDP10.opTDZA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5419,12 +5457,12 @@ PDP10.opTDZA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSZA = function(op, acc) +PDP10.opTSZA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.CLR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5432,14 +5470,14 @@ PDP10.opTSZA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDZN = function(op, acc) +PDP10.opTDZN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5447,14 +5485,14 @@ PDP10.opTDZN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSZN = function(op, acc) +PDP10.opTSZN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.CLR(dst, src)); + this.writeWord(ac, PDP10.CLR(dst, src)); }; /** @@ -5462,11 +5500,11 @@ PDP10.opTSZN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRC = function(op, acc) +PDP10.opTRC = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.regEA)); }; /** @@ -5474,11 +5512,11 @@ PDP10.opTRC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLC = function(op, acc) +PDP10.opTLC = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5486,13 +5524,13 @@ PDP10.opTLC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRCE = function(op, acc) +PDP10.opTRCE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, this.regEA)); + this.writeWord(ac, PDP10.XOR(dst, this.regEA)); }; /** @@ -5500,14 +5538,14 @@ PDP10.opTRCE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLCE = function(op, acc) +PDP10.opTLCE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.regEA * PDP10.HALF_SHIFT; if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5515,12 +5553,12 @@ PDP10.opTLCE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRCA = function(op, acc) +PDP10.opTRCA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.regEA)); }; /** @@ -5528,12 +5566,12 @@ PDP10.opTRCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLCA = function(op, acc) +PDP10.opTLCA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5541,13 +5579,13 @@ PDP10.opTLCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRCN = function(op, acc) +PDP10.opTRCN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, this.regEA)); + this.writeWord(ac, PDP10.XOR(dst, this.regEA)); }; /** @@ -5555,14 +5593,14 @@ PDP10.opTRCN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLCN = function(op, acc) +PDP10.opTLCN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.regEA * PDP10.HALF_SHIFT; if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5570,11 +5608,11 @@ PDP10.opTLCN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDC = function(op, acc) +PDP10.opTDC = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5582,11 +5620,11 @@ PDP10.opTDC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSC = function(op, acc) +PDP10.opTSC = function(op, ac) { - this.writeWord(acc, PDP10.XOR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5594,14 +5632,14 @@ PDP10.opTSC = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDCE = function(op, acc) +PDP10.opTDCE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5609,14 +5647,14 @@ PDP10.opTDCE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSCE = function(op, acc) +PDP10.opTSCE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5624,12 +5662,12 @@ PDP10.opTSCE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDCA = function(op, acc) +PDP10.opTDCA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5637,12 +5675,12 @@ PDP10.opTDCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSCA = function(op, acc) +PDP10.opTSCA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.XOR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5650,14 +5688,14 @@ PDP10.opTSCA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDCN = function(op, acc) +PDP10.opTDCN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5665,14 +5703,14 @@ PDP10.opTDCN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSCN = function(op, acc) +PDP10.opTSCN = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.XOR(dst, src)); + this.writeWord(ac, PDP10.XOR(dst, src)); }; /** @@ -5680,11 +5718,11 @@ PDP10.opTSCN = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRO = function(op, acc) +PDP10.opTRO = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.regEA)); }; /** @@ -5692,11 +5730,11 @@ PDP10.opTRO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLO = function(op, acc) +PDP10.opTLO = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5704,13 +5742,13 @@ PDP10.opTLO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTROE = function(op, acc) +PDP10.opTROE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, this.regEA)); + this.writeWord(ac, PDP10.IOR(dst, this.regEA)); }; /** @@ -5718,13 +5756,13 @@ PDP10.opTROE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLOE = function(op, acc) +PDP10.opTLOE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA * PDP10.HALF_SHIFT) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.IOR(dst, this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5732,12 +5770,12 @@ PDP10.opTLOE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTROA = function(op, acc) +PDP10.opTROA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.regEA)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.regEA)); }; /** @@ -5745,12 +5783,12 @@ PDP10.opTROA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLOA = function(op, acc) +PDP10.opTLOA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.regEA * PDP10.HALF_SHIFT)); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.regEA * PDP10.HALF_SHIFT)); }; /** @@ -5758,13 +5796,13 @@ PDP10.opTLOA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTRON = function(op, acc) +PDP10.opTRON = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); if (PDP10.AND(dst, this.regEA) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, this.regEA)); + this.writeWord(ac, PDP10.IOR(dst, this.regEA)); }; /** @@ -5772,14 +5810,14 @@ PDP10.opTRON = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTLON = function(op, acc) +PDP10.opTLON = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.regEA * PDP10.HALF_SHIFT; if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, src)); + this.writeWord(ac, PDP10.IOR(dst, src)); }; /** @@ -5787,11 +5825,11 @@ PDP10.opTLON = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDO = function(op, acc) +PDP10.opTDO = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5799,11 +5837,11 @@ PDP10.opTDO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSO = function(op, acc) +PDP10.opTSO = function(op, ac) { - this.writeWord(acc, PDP10.IOR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5811,14 +5849,14 @@ PDP10.opTSO = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDOE = function(op, acc) +PDP10.opTDOE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, src)); + this.writeWord(ac, PDP10.IOR(dst, src)); }; /** @@ -5826,14 +5864,14 @@ PDP10.opTDOE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSOE = function(op, acc) +PDP10.opTSOE = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) == 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, src)); + this.writeWord(ac, PDP10.IOR(dst, src)); }; /** @@ -5841,12 +5879,12 @@ PDP10.opTSOE = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDOA = function(op, acc) +PDP10.opTDOA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(this.readWord(acc), this.readWord(this.regEA))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), this.readWord(this.regEA))); }; /** @@ -5854,12 +5892,12 @@ PDP10.opTDOA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSOA = function(op, acc) +PDP10.opTSOA = function(op, ac) { this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(this.readWord(acc), PDP10.SWAP(this.readWord(this.regEA)))); + this.writeWord(ac, PDP10.IOR(this.readWord(ac), PDP10.SWAP(this.readWord(this.regEA)))); }; /** @@ -5867,14 +5905,14 @@ PDP10.opTSOA = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTDON = function(op, acc) +PDP10.opTDON = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = this.readWord(this.regEA); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, src)); + this.writeWord(ac, PDP10.IOR(dst, src)); }; /** @@ -5882,14 +5920,14 @@ PDP10.opTDON = function(op, acc) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opTSON = function(op, acc) +PDP10.opTSON = function(op, ac) { - var dst = this.readWord(acc); + var dst = this.readWord(ac); var src = PDP10.SWAP(this.readWord(this.regEA)); if (PDP10.AND(dst, src) != 0) this.setPC(this.regPC + 1); - this.writeWord(acc, PDP10.IOR(dst, src)); + this.writeWord(ac, PDP10.IOR(dst, src)); }; /** @@ -6027,39 +6065,39 @@ PDP10.opIO = function(op) }; /** - * opNOP(op, acc) + * opNOP(op, ac) * * Used for all "defined" operations that, in fact, do nothing (eg, SETA, SETAI, CAI, JUMP). * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opNOP = function(op, acc) +PDP10.opNOP = function(op, ac) { }; /** - * opNOPM(op, acc) + * opNOPM(op, ac) * * Used for all "defined" operations that, in fact, do nothing (eg, SETMM, CAM) EXCEPT reference memory. * * @this {CPUStatePDP10} * @param {number} op - * @param {number} acc + * @param {number} ac */ -PDP10.opNOPM = function(op, acc) +PDP10.opNOPM = function(op, ac) { }; /** - * opUndefined(op, acc) + * opUndefined(op, ac) * * @this {CPUStatePDP10} * @param {number} op - * @param {number} [acc] + * @param {number} [ac] */ -PDP10.opUndefined = function(op, acc) +PDP10.opUndefined = function(op, ac) { this.println("undefined opcode: " + Str.toOct(op)); this.advancePC(-1); diff --git a/modules/pdp10/lib/macro10.js b/modules/pdp10/lib/macro10.js index d7faa9e49..56ad69785 100644 --- a/modules/pdp10/lib/macro10.js +++ b/modules/pdp10/lib/macro10.js @@ -378,19 +378,70 @@ class Macro10 { this.error("open scope from line " + this.stackScopes[0].nLine); } - for (let i = 0; i < this.aLiterals.length; i++) { - let lit = this.aLiterals[i]; - this.addSymbol(lit.name, this.nLocation, Macro10.SYMTYPE.LABEL); - lit.aWords.forEach(function(w, nLocation) { - macro10.genWord(w, lit.aFixups[nLocation]); - }); + let nLocationLiterals = this.nLocation; + for (let i = 0; i < this.aLiterals.length; i++) { /* - * TODO: Add support for "literal collapsing"; ie, if two or more literals generate the same - * set of values, then all instances after the first should refer back to the first (subject to - * exceptions identified by MACRO-10: eg, "literals that contain errors, undefined expressions, - * or EXTERNAL symbols.") + * Apparently, the time has come to implement "literal collapsing"; I was treating it as just + * a nice optimization, but it turns out that DEC has written tests that actually DEPEND on it: + * + * C26300: HRRZI [135531,,246642] ;PRELOAD AC0 WITH 0,, LITERAL ADDRESS + * JRA .+1 ;*JRA SHOULD PLACE C(AC0) INTO AC0 + * CAIE [135531,,246642] ;PASS IF JRA PLACED C(AC0) INTO AC0 + * STOP + * + * If the HRRZI and CAIE instructions don't refer to the same exact literal, the test will fail. + * For purposes of this particular test, the values they stuffed into the literals are essentially + * gibberish, but the same literal may be used in another test where the values are significant. + * + * However, I'm still going to keep it simple. In this example from p. 2-8 of the April 1978 + * MACRO-10 manual, I will NOT be attempting to collapse null words at the end of ASCIZ sequences + * with other null words, especially if they were defined before the ASCIZ: + * + * Literals having the same value are collapsed in MACRO's literal pool. + * Thus for the statements: + * + * PUSH P,[0] + * PUSH P,[0] + * MOVEI 1,[ASCIZ /TEST1/] + * + * the same address is shared by the two literals [0], and by the null word + * generated at the end of [ASCIZ /TEST1/]. */ + let lit = this.aLiterals[i]; + /* + * First things first: verify that the literal is one contiguous set of words (I'm not sure how + * it couldn't be, but better safe than sorry). + */ + let aWords = []; + let nWords = 0; + lit.aWords.forEach(function(w, nLocation) { + if (nLocation === aWords.length) aWords.push(w); + nWords++; + }); + if (nWords == aWords.length) { + /* + * So far, so good. Now we'll simply brute-force-search our way through the existing set of + * literals, looking for a complete match. + */ + for (let nLocation = nLocationLiterals; nLocation + nWords <= this.nLocation; nLocation++) { + let n; + for (n = 0; n < nWords; n++) { + if (aWords[n] !== this.aWords[nLocation + n] || lit.aFixups[n] != this.aFixups[nLocation]) break; + } + if (n == nWords) { + this.addSymbol(lit.name, nLocation, Macro10.SYMTYPE.LABEL); + lit = null; + break; + } + } + } + if (lit) { + this.addSymbol(lit.name, this.nLocation, Macro10.SYMTYPE.LABEL); + lit.aWords.forEach(function(w, nLocation) { + macro10.genWord(w, lit.aFixups[nLocation]); + }); + } } for (let i = 0; i < this.aVariables.length; i++) { @@ -701,9 +752,14 @@ class Macro10 { */ pushScope(name) { - this.stackScopes.push( - {name, aWords: this.aWords, aFixups: this.aFixups, nLocation: this.nLocation, nLocationScope: this.nLocationScope, nLine: this.nLine} - ); + this.stackScopes.push({ + name, + aWords: this.aWords, + aFixups: this.aFixups, + nLocation: this.nLocation, + nLocationScope: this.nLocationScope, + nLine: this.nLine + }); this.aWords = []; this.aFixups = []; this.nLocationScope = this.nLocation; diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index be37c4132..63a868901 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -872,26 +872,30 @@ class Debugger extends Component * * Although I started listing the operators in the RegExp in "precedential" order, that's not important; * what IS important is listing operators than contain shorter operators first. For example, bitwise - * shift operators must be listed BEFORE the logical less-than or greater-than operators. + * shift operators must be listed BEFORE the logical less-than or greater-than operators. aBinOpPrecedence + * is what determines precedence. * - * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^!' (since - * MACRO-10 uses prefixes like "^D", "^O" and "^B" with numeric constants to indicate a base override). - * Similarly, I've added '!' as an alias for '|' (bitwise inclusive-or), '^-' as an alias for '~' (unary - * complement "not" operator), and '_' as a shift operator. + * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^!', and I've + * added '!' as an alias for '|' (bitwise inclusive-or), '^-' as an alias for '~' (one's complement operator), + * and '_' as a shift operator (+/- values specify a left/right shift, and the count is not limited to 32). * * The MACRO-10 binary shifting suffix ('B') is a bit more problematic, since a capital B can also appear * inside symbols. So I pre-scan for that suffix and replace all non-symbolic occurrences with an internal * shift operator ('^_'). * * Note that Str.parseInt(), which parseValue() relies on, supports both the MACRO-10 base prefix overrides - * and the binary shifting suffix. But since the B suffix can also be a bracketed expression, we have to + * and the binary shifting suffix ('B'), but since that suffix can also be a bracketed expression, we have to * support it here as well. * - * MACRO-10 supports only a subset of all the PCjs operators; for example, MACRO-10 doesn't support bitwise - * exclusive-or, shift operators, or any of the boolean logical/compare operators. But unless we run into - * conflicts, I prefer sticking with this common set of operators. + * MACRO-10 supports only a subset of all the PCjs operators; for example, MACRO-10 doesn't support any of + * the boolean logical/compare operators. But unless we run into conflicts, I prefer sticking with this + * common set of operators. * - * WARNING: Whenever you make changes to this RegExp, make sure you update aBinOpPrecedence as needed, too. + * All whitespace in the expression is collapsed to single spaces, and space has been added to the list + * of "operators", but its sole function is as a separator, not as an operator. parseArray() will ignore + * single spaces as long as they are preceded and/or followed by a "real" operator. It would be dangerous + * to remove spaces entirely, because if an operator-less expression like "A B" was passed in, we would want + * that to generate an error; if we converted it to "AB", evaluation might inadvertently succeed. */ var regExp = /(\{|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/; sExp = sExp.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/, "$1$2^_").replace(/\s+/g, ' '); diff --git a/versions/pc8080/1.34.3/pc8080-dbg.js b/versions/pc8080/1.34.3/pc8080-dbg.js index 0d801fa5c..3a18f0f96 100644 --- a/versions/pc8080/1.34.3/pc8080-dbg.js +++ b/versions/pc8080/1.34.3/pc8080-dbg.js @@ -201,8 +201,8 @@ ag.prototype.Ab=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);i function bg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?(a<2*-b&&(d=a%(2*b)),d+=2*b):d>=b&&(a>=2*b&&(d=a%(2*b)),d-=2*b));a!=d&&(a=d);return a} function cg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=bg(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=dg(a,b,0,b.length,a.w,c);void 0!==d&&!1===c&&jg(a,null,d)}return d} function kg(a,b){var c,d=a.W[0],e=a.W[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=ig(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?hg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= diff --git a/versions/pcx86/1.34.3/pcx86-dbg.js b/versions/pcx86/1.34.3/pcx86-dbg.js index 3ccbb7d6b..9d2208647 100644 --- a/versions/pcx86/1.34.3/pcx86-dbg.js +++ b/versions/pcx86/1.34.3/pcx86-dbg.js @@ -719,8 +719,8 @@ Vx.prototype.Cg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);i function Wx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?(a<2*-b&&(d=a%(2*b)),d+=2*b):d>=b&&(a>=2*b&&(d=a%(2*b)),d-=2*b));a!=d&&(a=d);return a} function Xx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Wx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=Yx(a,b,0,b.length,a.F,c);void 0!==d&&!1===c&&dy(a,null,d)}return d} function ey(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=cy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?by(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== diff --git a/versions/pdpjs/1.34.3/pdp10-dbg.js b/versions/pdpjs/1.34.3/pdp10-dbg.js index 8f5bb4427..b2f2ac39f 100644 --- a/versions/pdpjs/1.34.3/pdp10-dbg.js +++ b/versions/pdpjs/1.34.3/pdp10-dbg.js @@ -31,8 +31,8 @@ var m,aa="function"==typeof Object.defineProperties?Object.defineProperty:functi function ga(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(this)}});ga=function(){}}function ha(a){var b=0;return ja(function(){return ba?-b:b}});la("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ra={rc:0,Jb:1,tc:2,uc:3,vc:4,wc:5,xc:6,yc:7,wb:8,zc:9,Kb:10,Ac:11,Bc:12,Lb:13,Cc:14,Dc:15,Ec:16,Fc:17,Gc:18,Hc:19,Ic:20,Jc:21,Kc:22,Lc:23,Mc:24,Nc:25,Oc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,vb:65,qc:66,sc:67,Pc:68,E:69,Qc:70,Rc:71,Sc:72,Tc:73,Uc:74,Vc:75,Wc:76,Xc:77,Yc:78,Zc:79,$c:80,Q:81,ad:82,bd:83,cd:84,dd:85,ed:86,fd:87, -gd:88,hd:89,Nb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,jd:97,kd:98,ld:99,d:100,e:101,md:102,nd:103,od:104,pd:105,qd:106,k:107,rd:108,sd:109,n:110,td:111,p:112,q:113,r:114,ud:115,t:116,wd:117,xd:118,yd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Mb:127}; +var ra={sc:0,Kb:1,uc:2,vc:3,wc:4,xc:5,yc:6,zc:7,xb:8,Ac:9,Lb:10,Bc:11,Cc:12,Mb:13,Dc:14,Ec:15,Fc:16,Gc:17,Hc:18,Ic:19,Jc:20,Kc:21,Lc:22,Mc:23,Nc:24,Oc:25,Pc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,wb:65,rc:66,tc:67,Qc:68,E:69,Rc:70,Sc:71,Tc:72,Uc:73,Vc:74,Wc:75,Xc:76,Yc:77,Zc:78,$c:79,ad:80,Q:81,bd:82,cd:83,dd:84,ed:85,fd:86,gd:87, +hd:88,jd:89,Ob:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,kd:97,ld:98,md:99,d:100,e:101,nd:102,od:103,pd:104,qd:105,rd:106,k:107,sd:108,td:109,n:110,ud:111,p:112,q:113,r:114,vd:115,t:116,xd:117,yd:118,zd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Nb:127}; function sa(a,b){var c;if(a){b||(b=10);var d,e,f=0g&&(g+=Math.pow(2,36)),g=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));for(var g=e||-1;0=h?48:55),f=String.fromCharCode(h)+f;a=Math.trunc(a/b)}g--}return(void 0===d?"":d)+f}function ua(a,b,c){b?12=b?6:16777215>=b?8:12);return ta(a,8,b,c?"0o":"")} @@ -41,74 +41,74 @@ function za(a){return a.replace(/[&<>"']/g,function(a){return Aa[a]})}function D function Ga(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ha(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var k="",l;for(l in b)b.hasOwnProperty(l)&&(k&&(k+="&"),k+=l+"="+encodeURIComponent(b[l]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ia(a,b){var c,d={ca:null,W:null,wa:null,va:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.wa=g.load;d.va=g.exec;if(e=g.bytes)d.ca=e;else if(e=g.words)for(d.ca=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.ca=Array(4*e.length),f=c=0;c>8&255,d.ca[f++]=e[c]>>16&255,d.ca[f++]=e[c]>>24&255;else(e=g.data)?d.Na=e:d.ca=g;d.ca&&(d.ca.length?1==d.ca.length&&(q(d.ca[0]),d=null):(q("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.wa=g.load;d.va=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else(e=g.data)?d.Oa=e:d.da=g;d.da&&(d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null));d.X=g.symbols}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Za=this.id:(this.$a=this.id.substr(0,a),this.Za=this.id.substr(a+1));this.A={ready:!1,Sa:!1,ob:!1,X:!1,error:!1};this.cb=null;this.A.error=!1;this.aa=c||0;this.D=this.v=this.G=this.H=this.xa=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} +function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Cb=b.comment;this.Sb=b;this.exports={};this.J=this.bindings={};a=this.id.indexOf(".");0>a?this.$a=this.id:(this.ab=this.id.substr(0,a),this.$a=this.id.substr(a+1));this.A={ready:!1,Ua:!1,pb:!1,Y:!1,error:!1};this.eb=null;this.A.error=!1;this.ba=c||0;this.D=this.v=this.G=this.H=this.xa=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} function q(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.ac,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Sb,toggle:this.lc,reset:this.hc, -set:this.kc};Mb(this)}ka(bc,r);m=bc.prototype;m.reset=function(a){this.stop();a&&dc(this,this.w=0)}; -m.pa=function(a,b,c,d){if(this.H&&this.H.pa(a,b,c,d)||this.v&&this.v.pa(a,b,c,d)||this.D&&this.D.pa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ec(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fc(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){ec(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fc(a,b)}}(this,b),!0):r.prototype.pa.call(this,a,b,c,d)}};m.Ja=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};m.ya=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};m.oa=function(a){return a?this.save():!0};m.save=function(){var a=new F(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; -m.restore=function(a){if(a=a[0])jc(this,this.i=a[0]),dc(this,this.w=a[1]),kc(this,a[2]);return!0};m.hc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}hc(this);return!0};function lc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gc(a,b){for(var c in a.C)lc(a,c,null!=b?b:a.C[c])}function mc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hc(a){for(var b in a.b)mc(a,b,a.b[b][1])} -m.Sb=function(a,b,c){if(ec(this,b)){if(c){var d=this;setTimeout(function(){fc(d,b);a&&a()},+c);return!1}fc(this,b)}return!0};m.kc=function(a,b){if("SR"==a)return kc(this,sa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,mc(this,a,c[1]),!0):!1};m.lc=function(a){return ec(this,a)?(fc(this,a),!0):!1};function ec(a,b){var c=a.b[b];return c?(mc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.P=b==oc,a.R=b==pc),!0):!1} -function fc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(mc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}m.bc=function(a){a||this.v.A.O||(G(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};m.cc=function(){};m.Xb=function(a){a||this.v.V()}; -m.Vb=function(a){if(!a&&!this.v.A.O)if(this.b[qc]&&this.b[qc][1])rc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),sc(a,0,null),Ob(a,!1);else try{var b=this.v.Xa(1);0a;a++)this.b["S"+a]=[0,0,!1,!1,this.bc,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Tb,toggle:this.mc,reset:this.ic, +set:this.lc};Mb(this)}ka(bc,r);m=bc.prototype;m.reset=function(a){this.stop();a&&dc(this,this.w=0)}; +m.qa=function(a,b,c,d){if(this.H&&this.H.qa(a,b,c,d)||this.v&&this.v.qa(a,b,c,d)||this.D&&this.D.qa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ec(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fc(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){ec(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fc(a,b)}}(this,b),!0):r.prototype.qa.call(this,a,b,c,d)}};m.Ka=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};m.za=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};m.pa=function(a){return a?this.save():!0};m.save=function(){var a=new F(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; +m.restore=function(a){if(a=a[0])jc(this,this.i=a[0]),dc(this,this.w=a[1]),kc(this,a[2]);return!0};m.ic=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}hc(this);return!0};function lc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gc(a,b){for(var c in a.C)lc(a,c,null!=b?b:a.C[c])}function mc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hc(a){for(var b in a.b)mc(a,b,a.b[b][1])} +m.Tb=function(a,b,c){if(ec(this,b)){if(c){var d=this;setTimeout(function(){fc(d,b);a&&a()},+c);return!1}fc(this,b)}return!0};m.lc=function(a,b){if("SR"==a)return kc(this,sa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,mc(this,a,c[1]),!0):!1};m.mc=function(a){return ec(this,a)?(fc(this,a),!0):!1};function ec(a,b){var c=a.b[b];return c?(mc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.P=b==oc,a.R=b==pc),!0):!1} +function fc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(mc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}m.cc=function(a){a||this.v.A.O||(G(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};m.dc=function(){};m.Yb=function(a){a||this.v.W()}; +m.Wb=function(a){if(!a&&!this.v.A.O)if(this.b[qc]&&this.b[qc][1])rc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),sc(a,0,null),Ob(a,!1);else try{var b=this.v.Ya(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(l=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Va+=h.B-e,h.B=e,!0;if(e>=h.B+h.Va){l=h.size-(e-k);l>f&&(l=f);h.Va=e-h.B+l;e=k+16384;f-=l;g++;continue}}return Ec(Fc,e,f)}e=new Ac(a,e,l,16384,d);Bc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=l}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+ua(b)),!0):Ec(Lc,b,c)} -function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Cc(a){for(var b=0,c=[],d=0;d=a.ja&&(a.ja+=a.qa,c=!0);0<=a.ka&&a.ka<=fd(a)&&(a.qa=a.ka=-1,bd(a),a.V(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+n(a.Ea))}} -m.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.Y/a.Z?b=1:d=!0;a.ea=b;b=a.jb*a.ea;if(a.Z!=b){a.Z=b;b=a.Z.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=ob();a.R=0;hd(a);return d}function kd(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cd.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(l=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Wa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Wa){l=h.size-(e-k);l>f&&(l=f);h.Wa=e-h.B+l;e=k+16384;f-=l;g++;continue}}return Ec(Fc,e,f)}e=new Ac(a,e,l,16384,d);Bc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=l}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+ua(b)),!0):Ec(Lc,b,c)} +function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.w(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.D(c,b&16383,b);a.w--}function Cc(a){for(var b=0,c=[],d=0;d=a.ka&&(a.ka+=a.ra,c=!0);0<=a.la&&a.la<=fd(a)&&(a.ra=a.la=-1,bd(a),a.W(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+n(a.Fa))}} +m.qa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.Y)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.Z/a.aa?b=1:d=!0;a.ga=b;b=a.kb*a.ga;if(a.aa!=b){a.aa=b;b=a.aa.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=ob();a.R=0;hd(a);return d}function kd(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function md(a,b){var c=a.T-=a.N;a.N=0;b&&(a.T=0);return c} -m.ic=function(){if(this.A.O){this.ab>=this.lb&&hd(this,!0);this.la=0;this.Da=ob();if(this.R){var a=this.Da-this.R;a>this.kb&&(this.L+=a,this.L>this.Da&&(this.L=this.Da))}try{do{var b=kd(this,this.A.Ra?1:this.Ga);try{this.Xa(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.la+=b;this.M+=b;vc(this,b);tc(this,b);this.ha-=b;if(0>=this.ha){this.ha+=this.Ga;++this.mb>=nd&&(this.H&&J(this.H,void 0),this.mb=0);break}}while(this.A.O)}catch(e){this.V();this.H&&this.H.stop(ob(),fd(this));zb(this, -e.stack||e.message);return}if(this.A.O){a=setTimeout;b=this.Eb;this.R=ob();var c=this.kb;this.la&&(c=Math.round(c*this.la/this.Ga));var c=c-(this.R-this.Da),d=this.R-this.L;d&&(this.Y=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,gd(this)));if(0>c||this.Yc&&(this.L-=c),c=0;this.ab+=this.la;this.R+=c;a(b,c)}}}; -function rc(a,b){if(!Bb(a))if(a.A.O)a.u(a.toString()+" busy");else{gd(a);a.A.O=!0;a.A.hb=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.Eb,0)}}m.Xa=function(){return 0};m.V=function(a){var b=!1;if(this.A.O){md(this);uc(this,this.M);this.M=0;this.A.O=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; -function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.Cb=b;this.Ya=+a.addrReset||0;this.Ob=pd.bind(this);this.w=L.bind(this);this.Ba=null;this.ub=[];this.A.complete=!1}ka(od,Yc);m=od.prototype; -m.reset=function(){this.status("Model "+this.Cb);this.A.O&&this.V();this.Ha=this.Ia=this.b=this.K=0;this.i=this.Ca=this.Ya;this.I=this.ta=-1;this.F=this.j=0;this.nb=[0,0];this.ra=[0,0];this.ia=[0,0];this.sa=[0,0];this.Aa=this.i;this.C=0;this.f=this.ec;this.g=this.pc;this.Ba=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};m.Hb=function(){return 0}; -m.save=function(){var a=new F(this);a.set(0,[this.b,this.K,this.Ha,this.Ia,this.i,this.ta,this.I,this.j,this.C,this.Ca,this.Aa,this.Ya]);a.set(1,[]);a.set(2,[this.U,this.ea,this.A.da]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; -m.restore=function(a){var b;b=a[0];ga();ca();ga();var c=b[Symbol.iterator];b=c?c.call(b):ha(b);this.b=b.next().value;this.K=b.next().value;this.Ha=b.next().value;this.Ia=b.next().value;this.i=b.next().value;this.ta=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Ca=b.next().value;this.Aa=b.next().value;this.Ya=b.next().value;b=a[2];this.U=b[0];gd(this,b[1]);this.A.da=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};m.pc=function(a,b){var c=this.G;a=this.Aa=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; -m.Xa=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.hb?-1:0:0,c=a?this.A.hb?0:1:-1;this.A.hb=!1;this.T=this.N=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.Ba||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Ha=this.f(this.b):0<=this.ta?(this.K=this.Ia=this.f(this.ta),this.ta=-1):(this.K= -this.Ia=this.f(this.Ca=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Ha=this.f(a))&Sb;a=this.K&4194304?-1:this.Ia/Zb|0;0<=a&&this.Ob(a);this.N--}while(0>4].call(this,a,a&15)}function N(a){this.w(a)} +m.jc=function(){if(this.A.O){this.bb>=this.mb&&hd(this,!0);this.ma=0;this.Ea=ob();if(this.R){var a=this.Ea-this.R;a>this.lb&&(this.L+=a,this.L>this.Ea&&(this.L=this.Ea))}try{do{var b=kd(this,this.A.Ta?1:this.Ha);try{this.Ya(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.ma+=b;this.M+=b;vc(this,b);tc(this,b);this.ia-=b;if(0>=this.ia){this.ia+=this.Ha;++this.nb>=nd&&(this.H&&J(this.H,void 0),this.nb=0);break}}while(this.A.O)}catch(e){this.W();this.H&&this.H.stop(ob(),fd(this));zb(this, +e.stack||e.message);return}if(this.A.O){a=setTimeout;b=this.Fb;this.R=ob();var c=this.lb;this.ma&&(c=Math.round(c*this.ma/this.Ha));var c=c-(this.R-this.Ea),d=this.R-this.L;d&&(this.Z=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,gd(this)));if(0>c||this.Zc&&(this.L-=c),c=0;this.bb+=this.ma;this.R+=c;a(b,c)}}}; +function rc(a,b){if(!Bb(a))if(a.A.O)a.u(a.toString()+" busy");else{gd(a);a.A.O=!0;a.A.ib=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.Fb,0)}}m.Ya=function(){return 0};m.W=function(a){var b=!1;if(this.A.O){md(this);uc(this,this.M);this.M=0;this.A.O=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; +function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.Db=b;this.Za=+a.addrReset||0;this.Pb=pd.bind(this);this.w=L.bind(this);this.Ca=null;this.vb=[];this.A.complete=!1}ka(od,Yc);m=od.prototype; +m.reset=function(){this.status("Model "+this.Db);this.A.O&&this.W();this.Ia=this.Ja=this.b=this.K=0;this.i=this.Da=this.Za;this.I=this.ua=-1;this.F=this.j=0;this.ob=[0,0];this.sa=[0,0];this.ja=[0,0];this.ta=[0,0];this.Ba=this.i;this.C=0;this.f=this.fc;this.g=this.qc;this.Ca=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};m.Ib=function(){return 0}; +m.save=function(){var a=new F(this);a.set(0,[this.b,this.K,this.Ia,this.Ja,this.i,this.ua,this.I,this.j,this.C,this.Da,this.Ba,this.Za]);a.set(1,[]);a.set(2,[this.U,this.ga,this.A.ea]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; +m.restore=function(a){var b;b=a[0];ga();ca();ga();var c=b[Symbol.iterator];b=c?c.call(b):ha(b);this.b=b.next().value;this.K=b.next().value;this.Ia=b.next().value;this.Ja=b.next().value;this.i=b.next().value;this.ua=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Da=b.next().value;this.Ba=b.next().value;this.Za=b.next().value;b=a[2];this.U=b[0];gd(this,b[1]);this.A.ea=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};m.qc=function(a,b){var c=this.G;a=this.Ba=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; +m.Ya=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.ib?-1:0:0,c=a?this.A.ib?0:1:-1;this.A.ib=!1;this.T=this.N=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.W();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.Ca||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.W();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Ia=this.f(this.b):0<=this.ua?(this.K=this.Ja=this.f(this.ua),this.ua=-1):(this.K= +this.Ja=this.f(this.Da=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Ia=this.f(a))&Sb;a=this.K&4194304?-1:this.Ja/Zb|0;0<=a&&this.Pb(a);this.N--}while(0>4].call(this,a,a&15)}function N(a){this.w(a)} function vd(){var a=0,b=this.f(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%C);this.g(this.b,b)}function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} function xd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%C;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function yd(a,b){this.g(b,this.f(this.b))}function zd(a,b){this.g(b,this.b)}function Ad(a,b){this.g(this.b,this.f(b))}function Bd(a,b){this.g(b,0)}function Cd(a,b){this.g(b,B-this.f(b))}function Dd(a,b){this.g(b,B)} -function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Fd(a,d,c)+(c-(c&x)))}function Gd(a,b){var c=this.f(b);this.g(b,Fd(a,c,0))}function Hd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Fd(a,c,b)+(b-(b&x)))}function Zd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&x,a){case 256:d+=x;break;case 384:d+=c>z?x:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function $d(a,b){var c=(this.f(this.b)&x)*y,d=this.f(b);this.g(b,Fd(a,d,c)+c)} +function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Fd(a,d,c)+(c-(c&x)))}function Gd(a,b){var c=this.f(b);this.g(b,Fd(a,c,0))}function Hd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Fd(a,c,b)+(b-(b&x)))}function Id(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&x,a){case 256:d+=x;break;case 384:d+=c>z?x:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function Jd(a,b){var c=(this.f(this.b)&x)*y,d=this.f(b);this.g(b,Fd(a,d,c)+c)} function ae(a,b){var c=this.b*y,d=this.f(b);this.g(b,Fd(a,d,c)+c)}function be(a,b){b=(this.f(b)&x)*y;var c=this.f(this.b);this.g(this.b,Fd(a,c,b)+b)}function ce(a,b){var c=this.f(this.b),d=(c&x)*y,c=Fd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function de(a,b){var c=this.f(this.b)&x,d=this.f(b);this.g(b,ee(a,d,c)+c)}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,this.b)+this.b)}function ge(a,b){b=this.f(b)&x;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)} function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=x,a){case 256:d+=x*y;break;case 384:d+=c>Ub?x*y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=this.f(this.b)/y|0,d=this.f(b);this.g(b,ee(a,d,c)+c)}function je(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ke(a,b){b=this.f(b)/y|0;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=c/y|0,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function O(a){me[a&7].call(this,a,a>>3&127)} -function ne(){}function oe(){}function L(a){this.u("undefined opcode: "+ua(a));rd(this,-1);this.V()}function pe(a){a>z&&(a!=A?a=Wb-a:this.j|=163840);return a}function Q(a,b){var c=(a+b)%C;qe.call(this,a,b,c);return c} -function re(a,b,c){var d=!1,e=!1,f=b-b%A;a=a%A+b*A%C;b=this.F=f+Math.trunc(b/2);c>z&&(c=C-c,d=!d);b>z&&(a?(b=B-b,a=C-a):b&&(b=C-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.nb;f[0]=0;f[1]=0;f=this.ra;f[0]=1;f[1]=0;f=this.ia;f[0]=c;f[1]=0;c=this.sa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=C,b[1]--),te(this.nb,this.ra),ue(this.sa)))break;ve(this.ia);ve(this.ra)}while(!ue(this.ra)); -a=this.nb[0];this.F=this.sa[0];d&&a&&(a=C-a);e&&this.F&&(this.F=C-this.F);return a} +function ne(){}function oe(){}function L(a){this.u("undefined opcode: "+ua(a));rd(this,-1);this.W()}function pe(a){a>z&&(a!=A?a=Wb-a:this.j|=163840);return a}function Q(a,b){var c=(a+b)%C;qe.call(this,a,b,c);return c} +function re(a,b,c){var d=!1,e=!1,f=b-b%A;a=a%A+b*A%C;b=this.F=f+Math.trunc(b/2);c>z&&(c=C-c,d=!d);b>z&&(a?(b=B-b,a=C-a):b&&(b=C-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.ob;f[0]=0;f[1]=0;f=this.sa;f[0]=1;f[1]=0;f=this.ja;f[0]=c;f[1]=0;c=this.ta;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=C,b[1]--),te(this.ob,this.sa),ue(this.ta)))break;ve(this.ja);ve(this.sa)}while(!ue(this.sa)); +a=this.ob[0];this.F=this.ta[0];d&&a&&(a=C-a);e&&this.F&&(this.F=C-this.F);return a} function we(a,b,c){var d=a,e=b;b=!1;var f;d>z&&(d=C-d,b=!b);e>z&&(e=C-e,b=!b);if(dz)&&(f!=B||a<=z)&&(this.j|=131072),a;c=a;b=f;a=b-b%A;b=2*b%C+Math.trunc(c/A);c=a+c%A;d=b-b%A;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} function xe(a){a?a==A?this.j|=163840:a=Wb-a:this.j|=98304;return a}function ye(a,b){var c=a-b;0>c&&(c+=C);qe.call(this,c,b,a);return c}function qe(a,b,c){a=Math.trunc(a/Vb);b=Math.trunc(b/Vb);c=Math.trunc(c/Vb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/E|0)&(b/E|0))*E+((a&b)>>>0)}function S(a,b){return R(a,(~(b/E|0)&15)*E+(~b>>>0))}function T(a,b){return(a>>0)}function U(a,b){return(a/E|0|b/E|0)*E+((a|b)>>>0)}function V(a){return a>>0)}function X(a){return(a/y|0)+(a&x)*y}function ee(a,b,c){switch(a&384){case 0:b-=b&x;break;case 128:b=0;break;case 256:b=x*y;break;case 384:b=c>Ub?x*y:0}return b}function Fd(a,b,c){switch(a&384){case 0:b&=x;break;case 128:b=0;break;case 256:b=x;break;case 384:b=c>z?x:0}return b} @@ -124,158 +124,158 @@ this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36 dz&&ez&&(this.j|=131072):e-c<=z&&(this.j|=131072);e=0;f>z&&(d+=A,e+=A)}else d=d*Math.pow(2,a)%A+Math.trunc(e%A/Math.pow(2,35-a)),e=e*Math.pow(2,a)%A,c=A-Math.pow(2,35-a),f<=z?f+c>z&&(this.j|=131072):(f-c<=z&&(this.j|=131072),d+=A,e+=A)}else-36>=a?(e=-72>=a?d>z?B:0:Math.trunc(d%A/Math.pow(2,-a-35)),d<=z?d=0:(d=B,e+=A)):(c=d>z?C-Math.pow(2,36+a):0,e=Math.trunc(e%A/Math.pow(2,-a))+ d%A*Math.pow(2,35+a)%A,d=Math.trunc(d/Math.pow(2,-a))+c,d>z&&(e+=A));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%C+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%C+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%C+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%C+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ 1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%C,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},L,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/y|0,c=c&x;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&x,c=c+1&x,this.A.O||(this.g(b,d* -y+c),a||rd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a=A&&G(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Ha,c=c/y|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);G(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,G(this,this.b))},function(){this.ta=this.b},L,function(a){this.w(a)},function(a,b){a= -this.f(b);a+=262145;this.g(a&x,this.f(this.b));a>=C&&(a-=C);a/y|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&x);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=C);(a/y|0)==x&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&x)*y+this.i);G(this,this.b+1)},function(a,b){this.g(b,(this.j&x)*y+this.i);G(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,ye.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,ye.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,ye.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,ye.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>T(this.f(b),this.b)&&G(this, -this.i+1)},function(a,b){T(this.f(b),this.b)||G(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&G(this,this.i+1)},function(){G(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&G(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&G(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||G(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&G(this,this.i+1)}, -function(){G(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){0V(this.f(b))&&G(this,this.b)},function(a,b){V(this.f(b))||G(this,this.b)},function(a,b){0>=V(this.f(b))&&G(this,this.b)},function(){G(this,this.b)},function(a,b){0<=V(this.f(b))&&G(this,this.b)},function(a,b){V(this.f(b))&&G(this,this.b)},function(a,b){0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){G(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); -0V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&G(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b), -1));V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, -Q.call(this,this.f(this.b),1));G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0V(a)&&G(this,this.b)},function(a, -b){a=this.g(b,Q.call(this,this.f(b),B));V(a)||G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0>=V(a)&&G(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),B));G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0<=V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)}, -function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0=A&&G(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Ia,c=c/y|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.W();b&8&&this.w(a);G(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,G(this,this.b))},function(){this.ua=this.b},L,function(a){this.w(a)},function(a,b){a= +this.f(b);a+=262145;this.g(a&x,this.f(this.b));a>=C&&(a-=C);a/y|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&x);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=C);(a/y|0)==x&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&x)*y+this.i);G(this,this.b+1)},function(a,b){this.g(b,(this.j&x)*y+this.i);G(this,this.b)},function(a,b){this.g(this.b,this.f(b));this.g(b,this.b*y+this.i);G(this,this.b+1)},function(a,b){a=this.f(b);this.g(b, +this.f(a/y|0));G(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,ye.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,ye.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,ye.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b, +this.g(b,ye.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>T(this.f(b),this.b)&&G(this,this.i+1)},function(a,b){T(this.f(b),this.b)||G(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&G(this,this.i+1)},function(){G(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&G(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&G(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){T(this.f(b), +this.f(this.b))||G(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(){G(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&G(this,this.i+1)},function(a,b){0V(this.f(b))&&G(this,this.b)},function(a,b){V(this.f(b))||G(this,this.b)},function(a,b){0>=V(this.f(b))&&G(this,this.b)},function(){G(this,this.b)},function(a,b){0<=V(this.f(b))&& +G(this,this.b)},function(a,b){V(this.f(b))&&G(this,this.b)},function(a,b){0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){G(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a, +b){a=this.f(this.b);V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&G(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));G(this,this.b)},function(a,b){a=this.g(b,Q.call(this, +this.f(b),1));0<=V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this, +this.f(this.b),1));0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));V(a)||G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0>=V(a)&&G(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),B));G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0<=V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));V(a)&&G(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));V(a)||G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0>=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));G(this,this.i+1);b&&this.g(b,a)},function(a, +b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0<=V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));V(a)&&G(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0>>f.i;0>>= f.i;0>>a.i;0g&&g>=-A&&(g+=C);for(var g=Math.trunc(Math.abs(g))%C,h=d;f--&&h=ra.vb&&c<=ra.Nb&&(b=c-(ra.vb-ra.Jb));b&&(a.preventDefault&&a.preventDefault(),d.fb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ra.Lb&&(b=ra.Kb);d.fb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.fb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};m.Ja=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; -m.Ib=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ea(c[0]);if(d!=this.Za)return;c=Ea(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.$a+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};m.ya=function(a,b){if(!b)if(this.Ib(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -m.oa=function(a){return a?this.save():!0};m.reset=function(){};m.save=function(){var a=new F(this);a.set(0,[]);return a.data()};m.restore=function(){return!0};m.fb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d>>a.i;0g&&g>=-A&&(g+=C);for(var g=Math.trunc(Math.abs(g))%C,h=d;f--&&h=ra.wb&&c<=ra.Ob&&(b=c-(ra.wb-ra.Kb));b&&(a.preventDefault&&a.preventDefault(),d.gb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ra.Mb&&(b=ra.Lb);d.gb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.gb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};m.Ka=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; +m.Jb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ea(c[0]);if(d!=this.$a)return;c=Ea(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.ab+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};m.za=function(a,b){if(!b)if(this.Jb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +m.pa=function(a){return a?this.save():!0};m.reset=function(){};m.save=function(){var a=new F(this);a.set(0,[]);return a.data()};m.restore=function(){return!0};m.gb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.T?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Ea(b.substring(c,f))),c=f+1}}return a}function Ke(a,b,c){if(32>=a.L)return b&c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Le|0)&(c/Le|0))*Le+((b&c)>>>0)} function Me(a,b,c){if(32>=a.L)return b|c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Le|0)^(c/Le|0))*Le+((b^c)>>>0)}function Y(a,b,c,d){var e=b;c=c||a.L;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?(b<2*-a&&(e=b%(2*a)),e+=2*a):e>=a&&(b>=2*a&&(e=b%(2*a)),e-=2*a));b!=e&&(b=e);return b} function Ne(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; case "&":f=Ke(a,f,g);break;case "!":case "|":e=a;32>=e.L?f|=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^!":f=Me(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Y(a,f,0,!0),f=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=Oe(a,b,0,b.length,a.S,c);void 0!==d&&!1===c&&Te(a,null,d)}return d} -function Pe(a,b,c,d,e){e=void 0===e?0:e;var f;if(null!=b)if(f=a.rb(b),0<=f?f=a.sb(f):(f=a.I[b],null==f&&(f=sa(b,1>>=2}f=Y(a,f)}else d||a.u("invalid "+(c?c:"value")+": "+b);else d||a.u("missing "+(c||"value"));return f} +function Se(a,b,c){var d=void 0;a.ja=null;if(b){"{"!=a.aa[0]&&(b=b.split(a.aa[0]).join("{").split(a.aa[1]).join("}"));b=Re(a,b,'"',7,5,c);if(!b)return d;b=Re(a,b,"'",6,6,c);if(!b)return d;b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," ");b=b.split(/(\{|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=Oe(a,b,0,b.length,a.S,c);void 0!==d&&!1===c&&Te(a,null,d)}return d} +function Pe(a,b,c,d,e){e=void 0===e?0:e;var f;if(null!=b)if(f=a.sb(b),0<=f?f=a.tb(f):(f=a.I[b],null==f&&(f=sa(b,1>>=2}f=Y(a,f)}else d||a.u("invalid "+(c?c:"value")+": "+b);else d||a.u("missing "+(c||"value"));return f} function Te(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.S?K(a,c,a.L,8,1)+" "+c+".":K(a,c,a.L,16,1)+" "+K(a,c,a.L,8,1)+" "+K(a,c,a.L,2,32>=a.L?8:6)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.u((null!=b?b+": ":"")+d);return e}function Ue(a){var b=a.I;a.I={};return b}function Ve(a,b){if(b)return Te(a,b,a.I[b]);var c=0;for(b in a.I)Te(a,b,a.I[b]),c++;return 0=a?8:262143>=a?18:36);b=ta(b,2,a,"",e);break;case 8:b=ua(b,0>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} var Qe={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11},Le=Math.pow(2,32); -function We(a){Ie.call(this,a);this.Ga=!1;this.Ea=18;this.L=36;this.Z=["<",">"];this.ra=[];this.Fa=Z();this.M=Z(0);this.ka=Z(0);this.ha=Z(0);this.F=[];this.b=this.N=this.K=[];Xe(this);this.U=this.la=0;this.i=[];this.Ca=void 0;Ye(this);this.D=this;this.Aa={};this.aa=this.Db=0;this.Y=null;this.R=[];Ze(this,a.messages);this.ta=a.commands;this.P=0;this.Ma=this.Da=null;this.C=this.Ia=this.Ha=this.ja=this.Ba=0;this.sa=this.qa=this.ea=null;var b=this;window?void 0===window[v]&&(window[v]=function(a){return ed(b, -a)}):void 0===global[v]&&(global[v]=function(a){return ed(b,a)})}ka(We,Ie);function $e(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,bb:void 0===b?!1:b,na:!1,S:c}}function af(a,b,c,d){a.B=b;a.bb=c||!1;a.na=!1;a.S=d}function bf(a){return[a.B,a.bb,a.na,a.S,a.gb]}function cf(a,b){var c=Z(b[0],b[1],b[2]);c.na=b[3];b[4]&&(c.yb=Je(a,c.gb=b[4]));return c}m=We.prototype; -m.Ja=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.qa=a.j;this.Ea=b.F;(b=$c(a,"messages"))&&Ze(this,b);if(a=$c(a,"commands"))this.ta=a;df(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=$e(ef(d,c,d.ka));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,l=0;k--;){var p=b[e];p.type==c?l++||d.u("..."):(c=p.type,l=Kc[c],p&&d.u(n(p.id,8)+" %"+ -n(e<"];this.sa=[];this.Ga=Z();this.M=Z(0);this.la=Z(0);this.ia=Z(0);this.F=[];this.b=this.N=this.K=[];Xe(this);this.U=this.ma=0;this.i=[];this.Da=void 0;Ye(this);this.D=this;this.Ba={};this.ba=this.Eb=0;this.Z=null;this.R=[];Ze(this,a.messages);this.ua=a.commands;this.P=0;this.Na=this.Ea=null;this.C=this.Ja=this.Ia=this.ka=this.Ca=0;this.ta=this.ra=this.ga=null;var b=this;window?void 0===window[v]&&(window[v]=function(a){return ed(b, +a)}):void 0===global[v]&&(global[v]=function(a){return ed(b,a)})}ka(We,Ie);function $e(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,cb:void 0===b?!1:b,oa:!1,S:c}}function af(a,b,c,d){a.B=b;a.cb=c||!1;a.oa=!1;a.S=d}function bf(a){return[a.B,a.cb,a.oa,a.S,a.hb]}function cf(a,b){var c=Z(b[0],b[1],b[2]);c.oa=b[3];b[4]&&(c.zb=Je(a,c.hb=b[4]));return c}m=We.prototype; +m.Ka=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ra=a.j;this.Fa=b.F;(b=$c(a,"messages"))&&Ze(this,b);if(a=$c(a,"commands"))this.ua=a;df(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=$e(ef(d,c,d.la));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,l=0;k--;){var p=b[e];p.type==c?l++||d.u("..."):(c=p.type,l=Kc[c],p&&d.u(n(p.id,8)+" %"+ +n(e<a&&a>=-A&&(a+=C);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function hf(a,b){return K(a,b/Tb,18)+" "+K(a,b%Tb,18)} -function Ze(a,b){a.D=a;a.aa=a.Db=536870916;a.Y=null;a.R=[];b=Je(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in ac){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;dd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.Ca==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(af(a.i[a.U],b),++a.U==a.i.length&&(a.U=0)));return!1} -function zf(a,b,c,d){var e=Z(b.B),f=a.La(b,1),g,h,k,l=0,p=f/Xb|0,u;for(u in Af)if(g=Af[u][p&u]){h=+u;p>>=6;switch(h){case 32512:k=Bf;l=p&3;break;case 32256:k=Cf;l=p&7;break;case 29248:k=Df,l=(p&48)>>2|(p&6)>>1}break}k=k&&k[l]||"";"S"==k&&g>Ef&&(k="B");k=Ff[g||0]+k;if(g){if(28700==h)h=f/Yb&127,l=K(a,h,-1);else for(h=f>>23&15,l=K(a,h,-1),p=0;l&&p>18&15)&&(k+="("+K(a,f, --1)+")")}else k=Da(k,8)+hf(a,f);f=k;g="";h=K(a,e.B,18)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.La(e,1),g+=" "+hf(a,k),null==e.B)break;while(e.B!=b.B)}h+=Da(g,16)+f;c&&(h=Da(h,48)+";"+(c||""),h=a.v.A.Ra?h+("cycles="+fd(a.v).toString()+" cs="+n(a.v.Ea)):h+(null!=d?"="+d.toString():""));return h} -function Hf(a,b,c,d,e){var f=-1,g,h;a.ia=null;if(b){for(var k=b.toUpperCase(),l=0;lEf&&(P="B");if(k==Ff[h]+P){f=29248!=g?I:(I&3)<<1|(I&12)<<2;f=(D|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}0>f&&c&&!c.match(/^[0-9A-Z$%.?]/i)&& +function sc(a,b,c,d){if(!uf(a))return!1;var e="";null===c&&(e=(c=!a.Ea||"tr"==a.Ea)?"tr":"t");a.C=0;b||sd(a)&&td(a,a.v.i,0);try{b=kd(a.v,b);var f=a.v.Ya(b);0>23&&a.v.Da==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(af(a.i[a.U],b),++a.U==a.i.length&&(a.U=0)));return!1} +function zf(a,b,c,d){var e=Z(b.B),f=a.Ma(b,1),g,h,k,l=0,p=f/Xb|0,u;for(u in Af)if(g=Af[u][p&u]){h=+u;p>>=6;switch(h){case 32512:k=Bf;l=p&3;break;case 32256:k=Cf;l=p&7;break;case 29248:k=Df,l=(p&48)>>2|(p&6)>>1}break}k=k&&k[l]||"";"S"==k&&g>Ef&&(k="B");k=Ff[g||0]+k;if(g){if(28700==h)h=f/Yb&127,l=K(a,h,-1);else for(h=f>>23&15,l=K(a,h,-1),p=0;l&&p>18&15)&&(k+="("+K(a,f, +-1)+")")}else k=Da(k,8)+hf(a,f);f=k;g="";h=K(a,e.B,18)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ma(e,1),g+=" "+hf(a,k),null==e.B)break;while(e.B!=b.B)}h+=Da(g,16)+f;c&&(h=Da(h,48)+";"+(c||""),h=a.v.A.Ta?h+("cycles="+fd(a.v).toString()+" cs="+n(a.v.Fa)):h+(null!=d?"="+d.toString():""));return h} +function Hf(a,b,c,d,e){var f=-1,g,h;a.ja=null;if(b){for(var k=b.toUpperCase(),l=0;lEf&&(P="B");if(k==Ff[h]+P){f=29248!=g?I:(I&3)<<1|(I&12)<<2;f=(D|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}0>f&&c&&!c.match(/^[0-9A-Z$%.?]/i)&& (c=b+c,b="",f=0)}else c&&(f=g=0);if(0<=f&&c)for(k=c.split(","),u=0;uh||15h||127 -h||15h||262143f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Xe(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b>>d.i],!0);a.K=["bw"];a.Ba=0;a.la=0} -m.Pa=function(a,b,c){var d=!0;c||If(this,a,b,!1,!0);if(a!=this.b){var e=$e(b);if(-1===e)this.u("invalid address: "+K(this,b.B,18)),d=!1;else{var f=this.G;f.b[e>>>f.i].Pa(e&16383,a==this.K)}}d&&(a.push(b),c?b.na=!0:(Jf(this,a,a.length-1,"set"),Ye(this)));return d};function If(a,b,c,d,e){var f=!1;c=$e(c);for(var g=1;g>>d.i],b==a.K));h.na||Ye(a);break}}return f} -function Kf(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=ua(d,2);af(e.Fa,d);f+="="+K(e,e.La(e.Fa),36)+" ";c+=f}if(b){b="";for(d=0;d=nf?1:d==lf?23:18)+" "),b+=e;c+="\n"+b}return c}m.Fb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],u=Fa(p,k,a.Fb);0>u&&p.splice(-(u+1),0,k)}l&&(h.a=l.replace(/''/g,'"'))}a.F.push({vd:b,B:c,Tb:d,W:e,Ab:f})}function ng(a,b,c){var d=[],e=$e(b)>>>0;for(b=0;b>>0,h=f.Tb;if(e>=g&&eh||262143f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Xe(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b>>d.i],!0);a.K=["bw"];a.Ca=0;a.ma=0} +m.Qa=function(a,b,c){var d=!0;c||If(this,a,b,!1,!0);if(a!=this.b){var e=$e(b);if(-1===e)this.u("invalid address: "+K(this,b.B,18)),d=!1;else{var f=this.G;f.b[e>>>f.i].Qa(e&16383,a==this.K)}}d&&(a.push(b),c?b.oa=!0:(Jf(this,a,a.length-1,"set"),Ye(this)));return d};function If(a,b,c,d,e){var f=!1;c=$e(c);for(var g=1;g>>d.i],b==a.K));h.oa||Ye(a);break}}return f} +function Kf(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=ua(d,2);af(e.Ga,d);f+="="+K(e,e.Ma(e.Ga),36)+" ";c+=f}if(b){b="";for(d=0;d=nf?1:d==lf?23:18)+" "),b+=e;c+="\n"+b}return c}m.Gb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],u=Fa(p,k,a.Gb);0>u&&p.splice(-(u+1),0,k)}l&&(h.a=l.replace(/''/g,'"'))}a.F.push({wd:b,B:c,Ub:d,X:e,Bb:f})}function ng(a,b,c){var d=[],e=$e(b)>>>0;for(b=0;b>>0,h=f.Ub;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case kf:G(h, +function wf(a,b){var c;if(b&&"?"==b[1])a.u("register commands:"),a.u("\tr\tdump registers"),a.u("\trm\tdump misc registers"),a.u("\trx [#]\tset flag or register x to [#]");else{var d=a.v,e=void 0;null==c&&(c=!0);if(b&&1b){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case kf:G(h, g);af(a.M,h.i);break;case nf:f=65536;break;case of:f=32768;break;case pf:f=131072;break;case qf:f=32;break;case rf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);J(a.H);a.u("updated registers:")}}a.u(lg(a,e));c&&(af(a.M,d.i),xf(a,K(a,a.M.B,18)))}}function ug(a,b){b=Ea(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var l=h[0]+":";h[2]&&(l+=" "+h[2]);a.u(l)}h[3]&&(g=h[3],f=null);h=a.ha;l=b;h.B=l.B;h.bb=l.bb;h.na=l.na;h.S=l.S;a.u(zf(a,b,g,f));e-=b.B-k;c++}}} -function Lf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(vf+b):(a.T&&(a.u("ended assemble at "+K(a,a.ha.B,18)),a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Y=null;if(Lb(a)&&0p||"z"na.length&&(a.u("note: only "+na.length+" available"),da=na.length);ia-=da;0>ia&&(null==na[na.length-1].B?(da=ia+da,ia=0):ia+=na.length);var Ld= -[];"call"==Qf&&(Cb=1E5,Ld=["CALL"]);for(void 0!==Pf&&a.u(da+" instructions earlier:");0=na.length&&(ia=0);a.Ca=da;Sf++;Cb--}}Sf||(a.u("no "+Rf+"history available"),a.Ca=void 0)}else{var hb=ef(a,ma,a.ka);if(hb){var Ka=0,Vf="ds"==eb;if(Ba){if("l"==Ba.charAt(0))Ba=Ba.substr(1)||wh,Ka=Pe(a,Ba);else{var Wf=ef(a,Ba);Wf&& -(Ka=Wf.B-hb.B)}0>Ka&&(Ka=0);65536Eb?".":String.fromCharCode(Eb)),Gc=Gc-7}La&&(La+="\n");La=Vf?La+(oa+","):La+(ma+": "+oa+(0>Yf? -" "+Od:""))}La&&a.u(La);a.S=yh}}}}break;case "e":if("else"==g[0])break;var Zf,$f,ag=g[0],Qd=g[1];"e"==ag||"ew"==ag?(Zf=a.La,$f=a.xb):Qd=null;if(null==Qd)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Hc=ef(a,Qd,a.ka);if(Hc)for(var Rd=2;Rd -Ud;){for(var Ma=null,Dh=256;65536>Hb.B>>>0;){Vd.B=a.La(Hb,2);if(null==Hb.B||!Dh--)break;if(!(Vd.B&1)){for(var Eh=a,Ic=Vd,cg=null,Ib=Ic.B,dg=Ib,Wd=1;6>=Wd&&Ib;Wd++){if(2jg)a.u("step commands:"), -a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.P)a.u("step in progress");else{var kg=Z(a.v.i);a.La(kg);a.P?(a.Pa(a.b,kg,!0),tf(a)||(a.H&&jd(a.H),a.P=0)):vg(a,jg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}wf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var ib=+g[2];if(2==ib||8==ib||10==ib||16==ib)a.S=ib;else{a.u("invalid base: "+ib);break}}a.u("default base: "+a.S);break;case "cs":var Kb;void 0!==g[3]&&(Kb=+g[3]);switch(g[2]){case "int":a.v.qa= -Kb;break;case "start":a.v.Fa=Kb;break;case "stop":a.v.ka=Kb;break;default:a.u("unknown cs option");break a}void 0!==Kb&&bd(a.v);a.u("checksums "+(a.v.A.Ra?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.Z.toFixed(2)+"Mhz")+" ("+a.v.ea+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), -a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":vg(a,g[0],g[1]);break;case "u":xf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){sg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.3 ("+a.v.Cb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){ug(a,b.substr(1));break}var Xd="commands:",Yd;for(Yd in xg)Xd+="\n"+ -Da(Yd,9)+xg[Yd];sd(a)||(Xd+="\nnote: history disabled if no exec breakpoints");a.u(Xd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(mg){a.u("Debugger "+(mg.stack||mg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!Lf(a,b[+d]))return!1;return!0} +function vg(a,b,c){if("?"==c)a.u("trace commands:"),a.u("\tt [#]\ttrace # instructions"),a.u("\ttr [#]\ttrace # instructions with register updates"),a.u("\ttc [#]\ttrace # cycles"),a.u("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=Pe(a,c,null,!0)||1;var e=0;"tc"==b&&(e=c,c=1);a.Ea=b;Ua(c,function(){return Ob(a,!0)&&sc(a,e,d,!1)},function(){a.ra&&a.ra.stop();J(a.H,-1);Ob(a,!1)})}} +function xf(a,b,c,d){if(b=ef(a,b,a.M)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=Pe(a,c.substr(1)),null!=c&&(d=c);else{d=ef(a,c);if(!d||d.Bh[0].indexOf("+"))){var l=h[0]+":";h[2]&&(l+=" "+h[2]);a.u(l)}h[3]&&(g=h[3],f=null);h=a.ia;l=b;h.B=l.B;h.cb=l.cb;h.oa=l.oa;h.S=l.S;a.u(zf(a,b,g,f));e-=b.B-k;c++}}} +function Lf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(vf+b):(a.T&&(a.u("ended assemble at "+K(a,a.ia.B,18)),a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Z=null;if(Lb(a)&&0p||"z"na.length&&(a.u("note: only "+na.length+" available"),da=na.length);ia-=da;0>ia&&(null==na[na.length-1].B?(da=ia+da,ia=0):ia+=na.length);var Nd= +[];"call"==Qf&&(Cb=1E5,Nd=["CALL"]);for(void 0!==Pf&&a.u(da+" instructions earlier:");0=na.length&&(ia=0);a.Da=da;Sf++;Cb--}}Sf||(a.u("no "+Rf+"history available"),a.Da=void 0)}else{var hb=ef(a,ma,a.la);if(hb){var Ka=0,Vf="ds"==eb;if(Ba){if("l"==Ba.charAt(0))Ba=Ba.substr(1)||wh,Ka=Pe(a,Ba);else{var Wf=ef(a,Ba);Wf&& +(Ka=Wf.B-hb.B)}0>Ka&&(Ka=0);65536Eb?".":String.fromCharCode(Eb)),Gc=Gc-7}La&&(La+="\n");La=Vf?La+(oa+","):La+(ma+": "+oa+(0>Yf? +" "+Qd:""))}La&&a.u(La);a.S=yh}}}}break;case "e":if("else"==g[0])break;var Zf,$f,ag=g[0],Sd=g[1];"e"==ag||"ew"==ag?(Zf=a.Ma,$f=a.yb):Sd=null;if(null==Sd)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Hc=ef(a,Sd,a.la);if(Hc)for(var Td=2;Td +Wd;){for(var Ma=null,Dh=256;65536>Hb.B>>>0;){Xd.B=a.Ma(Hb,2);if(null==Hb.B||!Dh--)break;if(!(Xd.B&1)){for(var Eh=a,Ic=Xd,cg=null,Ib=Ic.B,dg=Ib,Yd=1;6>=Yd&&Ib;Yd++){if(2jg)a.u("step commands:"), +a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.P)a.u("step in progress");else{var kg=Z(a.v.i);a.Ma(kg);a.P?(a.Qa(a.b,kg,!0),tf(a)||(a.H&&jd(a.H),a.P=0)):vg(a,jg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}wf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var ib=+g[2];if(2==ib||8==ib||10==ib||16==ib)a.S=ib;else{a.u("invalid base: "+ib);break}}a.u("default base: "+a.S);break;case "cs":var Kb;void 0!==g[3]&&(Kb=+g[3]);switch(g[2]){case "int":a.v.ra= +Kb;break;case "start":a.v.Ga=Kb;break;case "stop":a.v.la=Kb;break;default:a.u("unknown cs option");break a}void 0!==Kb&&bd(a.v);a.u("checksums "+(a.v.A.Ta?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.aa.toFixed(2)+"Mhz")+" ("+a.v.ga+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), +a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":vg(a,g[0],g[1]);break;case "u":xf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){sg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.3 ("+a.v.Db+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){ug(a,b.substr(1));break}var Zd="commands:",$d;for($d in xg)Zd+="\n"+ +Da($d,9)+xg[$d];sd(a)||(Zd+="\nnote: history disabled if no exec breakpoints");a.u(Zd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(mg){a.u("Debugger "+(mg.stack||mg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!Lf(a,b[+d]))return!1;return!0} var xg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Ef=20,Ff=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), kf=0,lf=1,mf=2,nf=3,of=4,pf=5,qf=6,rf=7,jf="PC RA EA C0 C1 OV ND PD".split(" "),yg={},Af=(yg[28672]={0:101},yg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},yg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Ef,9216:53,9472:52, 9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},yg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},yg[29248]={24576:79,24640:80,25088:81,25152:82},yg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, 28692:98,28696:99,28700:100},yg),Bf=["","I","M","S"],Cf=" L E LE A GE N G".split(" "),Df="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Gf=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],sf=1E3,vf=">> ";Xa(function(){for(var a=w(document,v,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Bg(a,"unrecognized HTML entity: "+c[0])}a.G=a.G.concat(e.split(/(\r?\n)/));setTimeout(function(){zg(a)}, 0)}})}} -function Ag(a){if(0<=a.ea.indexOf("p"))return a.u(a.G.join("")),0;var b=Ue(a.b);try{for(var c=0;cI)break;var u= -I+1,P=I+l.length,cb="",Ab="";I&&(cb=b[I-1]).match(/[0-9A-Z$%.]/i)||!(P>=b.length)&&(Ab=b[P]).match(/[0-9A-Z$%.]/i)||("'"==cb&&I--,"'"==Ab&&P++,b=b.substr(0,I)+p+b.substr(P),u=I+p.length,g=!0)}c=null}}d=h[1];c=h[3];b=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Dg(a,d,a.ga,Eg));var H;f&&(H=b.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=H[1],b=H[2],"=="==f?e|=Ng:"=:"==f&&(e|=Og),Dg(a,d,b,e),f=b="");if(!f&&!b)return!0;a.I=f;for((H=Pg(a,b))&&(b=b.replace(H,Qg(a,Rg,Pg(a,h))));H=Sg(a,b);)b=b.replace(H,H.slice(0,-1)); -if(!Tg(a,f,b))switch(f){case Ug:case Vg:case Wg:Kg(a,h);break;case Xg:(f=b)?(a.C=Hg(a,f,!0),void 0===a.C&&a.error("unrecognized expression: "+f)):a.C=a.T;break;case Yg:Zg(a,b);break;case $g:Zg(a,b.replace(",",",,"));break;case ah:case bh:case ch:case Lg:case Mg:case dh:Qg(a,f,h);break;case eh:case fh:case gh:case hh:break;default:H=-1,h=(f+c+b).trim(),0>b.indexOf(",,")&&(H=Hf(a.b,f,b,a.ga,!0)),0>H&&(H=Hg(a,h,!0)),void 0!==H?Fg(a,H,a.b.ia):a.error("unrecognized expression: "+h)}return!0} -function Tg(a,b,c){var d=a.j[b];if(!d)return!1;if(null!=c)return b=a.v,a.v=d,d.Oa=ih(a,c,!0),Gg(a,d.za,d.Qa,d.Oa,d.zb),a.v=b,!0;if("?"!=b[0])return!1;switch(b.substr(1)){case bh:d.eb||Gg(a,d.za);break;case ch:d.eb&&Gg(a,d.za);break;case Lg:case Mg:for(b=0;bI)break;var u= +I+1,P=I+l.length,cb="",Ab="";I&&(cb=b[I-1]).match(/[0-9A-Z$%.]/i)||!(P>=b.length)&&(Ab=b[P]).match(/[0-9A-Z$%.]/i)||("'"==cb&&I--,"'"==Ab&&P++,b=b.substr(0,I)+p+b.substr(P),u=I+p.length,g=!0)}c=null}}d=h[1];c=h[3];b=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Dg(a,d,a.fa,Eg));var H;f&&(H=b.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=H[1],b=H[2],"=="==f?e|=Ng:"=:"==f&&(e|=Og),Dg(a,d,b,e),f=b="");if(!f&&!b)return!0;a.I=f;for((H=Pg(a,b))&&(b=b.replace(H,Qg(a,Rg,Pg(a,h))));H=Sg(a,b);)b=b.replace(H,H.slice(0,-1)); +if(!Tg(a,f,b))switch(f){case Ug:case Vg:case Wg:Kg(a,h);break;case Xg:(f=b)?(a.C=Hg(a,f,!0),void 0===a.C&&a.error("unrecognized expression: "+f)):a.C=a.T;break;case Yg:Zg(a,b);break;case $g:Zg(a,b.replace(",",",,"));break;case ah:case bh:case ch:case Lg:case Mg:case dh:Qg(a,f,h);break;case eh:case fh:case gh:case hh:break;default:H=-1,h=(f+c+b).trim(),0>b.indexOf(",,")&&(H=Hf(a.b,f,b,a.fa,!0)),0>H&&(H=Hg(a,h,!0)),void 0!==H?Fg(a,H,a.b.ja):a.error("unrecognized expression: "+h)}return!0} +function Tg(a,b,c){var d=a.j[b];if(!d)return!1;if(null!=c)return b=a.v,a.v=d,d.Pa=ih(a,c,!0),Gg(a,d.Aa,d.Sa,d.Pa,d.Ab),a.v=b,!0;if("?"!=b[0])return!1;switch(b.substr(1)){case bh:d.fb||Gg(a,d.Aa);break;case ch:d.fb&&Gg(a,d.Aa);break;case Lg:case Mg:for(b=0;b"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0=--c){g=e;break}}0>c&&a.error("missing bracket(s): "+b);0<=f&&(d=b.substr(f,g-f));return d}function Sg(a,b){var c=null;if(b=b.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)){c=b[0];b=b[1];var d="?"+b;a.j[d]&&a.error("reserved symbol redefined: "+c);var e,f,g;e=f=g=[];a.j[d]={name:d,eb:kh,Qa:e,zb:f,Oa:g,za:b+": 0",ba:a.ba};a.K.push(d)}return c} +function Hg(a,b,c,d){var e,f=b.match(/^([^,]*),,([^,]*)$/);f?(b=f[1]?Hg(a,f[1],c,d):0,void 0!==b&&(c=f[2]?Hg(a,f[2],c,d):0,void 0!==c&&(e=Y(a.b,b,18,!0)*Math.pow(2,18)+Y(a.b,c,18,!0)))):(void 0===d&&(d=0<=a.La?a.La:a.fa),e=Se(a.b,b.replace(/\.([^0-9]|$)/g,K(a.b,d,-1)+"$1"),c),void 0===e&&a.error("error parsing expression: "+b));return e} +function Pg(a,b){for(var c=0,d="",e=0,f=-1,g=b.length;e=--c){g=e;break}}0>c&&a.error("missing bracket(s): "+b);0<=f&&(d=b.substr(f,g-f));return d}function Sg(a,b){var c=null;if(b=b.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)){c=b[0];b=b[1];var d="?"+b;a.j[d]&&a.error("reserved symbol redefined: "+c);var e,f,g;e=f=g=[];a.j[d]={name:d,fb:kh,Sa:e,Ab:f,Pa:g,Aa:b+": 0",ca:a.ca};a.K.push(d)}return c} function ih(a,b,c){var d=[];for(c&&(b=b.replace(/^\(?(.*?)\)?$/,"$1"));b;){b=b.trim();c=jh(a,b);if(!c)break;d.push(c);b=b.substr(c.length+1)}return d} -function Kg(a,b){var c=b;null==a.w&&(a.w=a.H="",b&&(a.w=b[0],c=b=b.substr(1)));if(a.w){var d=b.indexOf(a.w);0>d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.w=null);a.H+=b}if(null==a.w){var d=b=0,e,f,g=a.H.length;a.I==Vg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Fg(a,d),b=0)}b&&Fg(a,d)}return c} -function Qg(a,b,c){var d,e,f,g,h,k;a.J="<";a.M=">";g=h=k=[];if(b==ah){e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;f=e[1];if(e[2]){h=g=ih(a,e[2],!0);b=[];for(c=0;c");0>l&&(l=h[c].length);b[c]=h[c].substr(d,l-d);h[c]=h[c].substr(0,d)}h=b}b=lh;c=3}else if(b==Rg)a.J="[",a.M="]",f="?"+va(++a.Y,5),a.j[f]&&a.error("literal symbol redefined: "+f),e=[c[0],c.substr(1)], -b=mh,c=0;else if(b==Lg||b==Mg){a.v||a.error(b+" outside of macro");e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;for(d=0;d=C)&&Bg(a,"truncated value "+ua(b)+" at location "+ua(c)+" to "+ua(d));return d}rg.prototype.u=function(a){this.b?this.b.u(a):console.log(a)};var Eg=1,Ng=2,Og=4,Ug="ASCII",Vg="ASCIZ",ah="DEFINE",Xg="END",Yg="EXP",bh="IFE",ch="IFN",Lg="IRP",Mg="IRPC",eh="LALL",Rg="LITERAL",fh="PAGE",dh="REPEAT",Wg="SIXBIT",gh="SUBTTL",hh="TITLE",$g="XWD",lh=-1,mh=-2,kh=-3; -function nh(a,b,c){r.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;oh(this,b);this.N=$c(this,"autoPower",a,6);this.w=0;this.Y=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.T=this.P=!1;this.Z=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=ph(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new zc({id:this.$a+".bus",busWidth:this.Y},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.xa)for(b= -0;b\nLicense: GPL version 3 or later ");for(b=0;bd?c="":(c=b.substr(d+1),b=b.substr(0,d),a.D=null);a.H+=b}if(null==a.D){var d=b=0,e,f,g=a.H.length;a.I==Vg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Fg(a,d),b=0)}b&&Fg(a,d)}return c} +function Qg(a,b,c){var d,e,f,g,h,k;a.J="<";a.M=">";g=h=k=[];if(b==ah){e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;f=e[1];if(e[2]){h=g=ih(a,e[2],!0);b=[];for(c=0;c");0>l&&(l=h[c].length);b[c]=h[c].substr(d,l-d);h[c]=h[c].substr(0,d)}h=b}b=lh;c=3}else if(b==Rg)a.J="[",a.M="]",f="?"+va(++a.Z,5),a.j[f]&&a.error("literal symbol redefined: "+f),e=[c[0],c.substr(1)], +b=mh,c=0;else if(b==Lg||b==Mg){a.v||a.error(b+" outside of macro");e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;for(d=0;d=C)&&Bg(a,"truncated value "+ua(b)+" at location "+ua(c)+" to "+ua(d));return d}rg.prototype.u=function(a){this.b?this.b.u(a):console.log(a)};var Eg=1,Ng=2,Og=4,Ug="ASCII",Vg="ASCIZ",ah="DEFINE",Xg="END",Yg="EXP",bh="IFE",ch="IFN",Lg="IRP",Mg="IRPC",eh="LALL",Rg="LITERAL",fh="PAGE",dh="REPEAT",Wg="SIXBIT",gh="SUBTTL",hh="TITLE",$g="XWD",lh=-1,mh=-2,kh=-3; +function nh(a,b,c){r.call(this,"Computer",a,33554432);this.A.Y=!1;this.R=null;oh(this,b);this.N=$c(this,"autoPower",a,6);this.w=0;this.Z=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.T=this.P=!1;this.aa=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=ph(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new zc({id:this.ab+".bus",busWidth:this.Z},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.xa)for(b= +0;b\nLicense: GPL version 3 or later ");for(b=0;bqh){if(rh(d,this.L)){this.C=new F(this,"1.34.3",Lh);rh(this.C)&&(Mh(this,d),a=Nh,Oh(this.C));this.C.set(Ih,Ga());Ph(this.C);var e=this.b&&!this.K;if(a==Jh||pb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=Hh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rh(d,g):("error"==f&&"no machine state"!= -g?(this.fa("Error: "+g),"unable to verify user"==g&&(Qa(Qh,""),this.i=null)):this.u(f+": "+g),Oh(d),rh(d)?(c=Hh(d),e=!0):c=!1))}e&&uh(this,c?d:null)}else a==Nh&&d.clear()}else uh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Rh(this,this.v,b,c,a),J(this,-2),this.v.da());this.P&&(Mh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function Mh(a,b){if(pb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.Z;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.3";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} -function wg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new F(a,"1.34.3"),g=new F(a,"1.34.3",vh),h=Ga();g.set(Ih,h);f.set(Ih,h);f.set(Sh,"1.34.3");f.set(Th,window?window.location.href:null);f.set(Uh,window?window.navigator.userAgent:"");a.v&&a.v.oa&&(c&&(b&&(a.v.A.da=a.v.A.O),a.v.V()),d=a.v.oa(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;kqh){if(rh(d,this.L)){this.C=new F(this,"1.34.3",Lh);rh(this.C)&&(Mh(this,d),a=Nh,Oh(this.C));this.C.set(Ih,Ga());Ph(this.C);var e=this.b&&!this.K;if(a==Jh||pb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=Hh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rh(d,g):("error"==f&&"no machine state"!= +g?(this.ha("Error: "+g),"unable to verify user"==g&&(Qa(Qh,""),this.i=null)):this.u(f+": "+g),Oh(d),rh(d)?(c=Hh(d),e=!0):c=!1))}e&&uh(this,c?d:null)}else a==Nh&&d.clear()}else uh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.A.Y=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Rh(this,this.v,b,c,a),J(this,-2),this.v.ea());this.P&&(Mh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; +function Mh(a,b){if(pb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.aa;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.3";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} +function wg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new F(a,"1.34.3"),g=new F(a,"1.34.3",vh),h=Ga();g.set(Ih,h);f.set(Ih,h);f.set(Sh,"1.34.3");f.set(Th,window?window.location.href:null);f.set(Uh,window?window.navigator.userAgent:"");a.v&&a.v.pa&&(c&&(b&&(a.v.A.ea=a.v.A.O),a.v.W()),d=a.v.pa(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.Y=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.ib+=d))&&(e.textContent=c.A.O?c.Y.toFixed(2)+"Mhz":"Stopped",c.ib=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.O;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.S||8,e=e||0,e=8==f?ua(e,void 0):n(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0=d||30<=(c.jb+=d))&&(e.textContent=c.A.O?c.Z.toFixed(2)+"Mhz":"Stopped",c.jb=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.O;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.S||8,e=e||0,e=8==f?ua(e,void 0):n(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0>14)%36){var c=this.b(b);0>a&&(a=36+a);c=c*M 35+a)%G,d=Math.trunc(d/Math.pow(2,-a))+c,d>F&&(e+=G));this.c(b,d);this.c(b+1&15,e)}},function(a,b){if(a=(this.a<<14>>14)%72){var c=this.b(b),d=this.b(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%J+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%J+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%J+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%J+Math.trunc(d/Math.pow(2,72-a)));this.c(b,c);this.c(b+1&15,d)}},function(a,b){if(a=(this.a<<14>>14)%256){var c=this.b(b),d=this.b(b+1&15);0< a?36<=a?(c=72<=a?0:d*Math.pow(2,a-36)%J,d=0):(c=c*Math.pow(2,a)%J+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%J):-36>=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%J,c=Math.trunc(c/Math.pow(2,-a)));this.c(b,c);this.c(b+1&15,d)}},O,function(a,b){a=this.b(b);this.c(b,this.b(this.a));this.c(this.a,a)},function(a,b){a=!1;for(var c=this.b(b),d=c/E|0,c=c&C;!a;)this.c(c,this.b(d)),c==this.a&&(a=!0),d=d+1&C,c=c+1&C,this.i.B||(this.c(b,d*E+c),a|| (this.f=(this.f+-1)%$a),a=!0)},function(a,b){a=(this.b(b)+262145)%J;this.c(b,a);a=G&&M(this,this.a)},function(a,b){b&1&&(this.g|=4096);if(b&2){var c=this.qa,c=c/E|0;this.g=this.g&-254049|c&254048;this.g|=c&4096;c&2048?this.g&4096||(this.g|=2048):this.g&=-2049}b&4&&N(this);b&8&&this.h(a);M(this,this.a)},function(a,b){a=b<<14;this.g&a&&(this.g&=~a,M(this,this.a))},function(){this.da=this.a},O,function(a){this.h(a)},function(a,b){a= -this.b(b);a+=262145;this.c(a&C,this.b(this.a));a>=J&&(a-=J);a/E|0||(this.g|=262144);this.c(b,a)},function(a,b){a=this.b(b);var c=this.b(a&C);this.c(this.a,c);this.a==b&&(a=c);a-=262145;0>a&&(a+=J);(a/E|0)==C&&(this.g|=262144);this.c(b,a)},function(a){this.h(a)},function(){this.c(this.a,(this.g&C)*E+this.f);M(this,this.a+1)},function(a,b){this.c(b,(this.g&C)*E+this.f);M(this,this.a)},function(a){this.h(a)},function(a){this.h(a)},function(a,b){this.c(b,R.call(this,this.b(b),this.b(this.a)))},function(a, -b){this.c(b,R.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,R.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,R.call(this,this.b(b),this.b(this.a))))},function(a,b){this.c(b,Wc.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(b,Wc.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,Wc.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,Wc.call(this,this.b(b),this.b(this.a))))},Mc,function(a,b){0>V(this.b(b),this.a)&&M(this, -this.f+1)},function(a,b){V(this.b(b),this.a)||M(this,this.f+1)},function(a,b){0>=V(this.b(b),this.a)&&M(this,this.f+1)},function(){M(this,this.f+1)},function(a,b){0<=V(this.b(b),this.a)&&M(this,this.f+1)},function(a,b){V(this.b(b),this.a)&&M(this,this.f+1)},function(a,b){0V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){V(this.b(b),this.b(this.a))||M(this,this.f+1)},function(a,b){0>=V(this.b(b),this.b(this.a))&&M(this,this.f+1)}, -function(){M(this,this.f+1)},function(a,b){0<=V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){0X(this.b(b))&&M(this,this.a)},function(a,b){X(this.b(b))||M(this,this.a)},function(a,b){0>=X(this.b(b))&&M(this,this.a)},function(){M(this,this.a)},function(a,b){0<=X(this.b(b))&&M(this,this.a)},function(a,b){X(this.b(b))&&M(this,this.a)},function(a,b){0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){M(this,this.f+1);b&&this.c(b,this.b(this.a))},function(a,b){a=this.b(this.a);0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a); -0X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));X(a)||M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));0>=X(a)&&M(this,this.a)},function(a,b){this.c(b,R.call(this,this.b(b),1));M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));0<=X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b), -1));X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a, -R.call(this,this.b(this.a),1));M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));0X(a)&&M(this,this.a)},function(a, -b){a=this.c(b,R.call(this,this.b(b),I));X(a)||M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0>=X(a)&&M(this,this.a)},function(a,b){this.c(b,R.call(this,this.b(b),I));M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0<=X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)}, -function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));0=J&&(a-=J);a/E|0||(this.g|=262144);this.c(b,a)},function(a,b){a=this.b(b);var c=this.b(a&C);this.c(this.a,c);this.a==b&&(a=c);a-=262145;0>a&&(a+=J);(a/E|0)==C&&(this.g|=262144);this.c(b,a)},function(a){this.h(a)},function(){this.c(this.a,(this.g&C)*E+this.f);M(this,this.a+1)},function(a,b){this.c(b,(this.g&C)*E+this.f);M(this,this.a)},function(a,b){this.c(this.a,this.b(b));this.c(b,this.a*E+this.f);M(this,this.a+1)},function(a,b){a=this.b(b);this.c(b, +this.b(a/E|0));M(this,this.a)},function(a,b){this.c(b,R.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(b,R.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,R.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,R.call(this,this.b(b),this.b(this.a))))},function(a,b){this.c(b,Wc.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(b,Wc.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,Wc.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a, +this.c(b,Wc.call(this,this.b(b),this.b(this.a))))},Mc,function(a,b){0>V(this.b(b),this.a)&&M(this,this.f+1)},function(a,b){V(this.b(b),this.a)||M(this,this.f+1)},function(a,b){0>=V(this.b(b),this.a)&&M(this,this.f+1)},function(){M(this,this.f+1)},function(a,b){0<=V(this.b(b),this.a)&&M(this,this.f+1)},function(a,b){V(this.b(b),this.a)&&M(this,this.f+1)},function(a,b){0V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){V(this.b(b), +this.b(this.a))||M(this,this.f+1)},function(a,b){0>=V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(){M(this,this.f+1)},function(a,b){0<=V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){V(this.b(b),this.b(this.a))&&M(this,this.f+1)},function(a,b){0X(this.b(b))&&M(this,this.a)},function(a,b){X(this.b(b))||M(this,this.a)},function(a,b){0>=X(this.b(b))&&M(this,this.a)},function(){M(this,this.a)},function(a,b){0<=X(this.b(b))&& +M(this,this.a)},function(a,b){X(this.b(b))&&M(this,this.a)},function(a,b){0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){M(this,this.f+1);b&&this.c(b,this.b(this.a))},function(a,b){a=this.b(this.a);0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a, +b){a=this.b(this.a);X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);0X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));X(a)||M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));0>=X(a)&&M(this,this.a)},function(a,b){this.c(b,R.call(this,this.b(b),1));M(this,this.a)},function(a,b){a=this.c(b,R.call(this, +this.b(b),1));0<=X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),1));0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this, +this.b(this.a),1));0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),1));0X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));X(a)||M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0>=X(a)&&M(this,this.a)},function(a,b){this.c(b,R.call(this,this.b(b),I));M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0<=X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));X(a)&&M(this,this.a)},function(a,b){a=this.c(b,R.call(this,this.b(b),I));0X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));X(a)||M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));0>=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));M(this,this.f+1);b&&this.c(b,a)},function(a, +b){a=this.c(this.a,R.call(this,this.b(this.a),I));0<=X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));X(a)&&M(this,this.f+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,R.call(this,this.b(this.a),I));0>>f.f;0a.u&&a.j.length&&(a.u=0);if(0>a.u||b!=a.j[a.u] function zj(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?(a<2*-b&&(d=a%(2*b)),d+=2*b):d>=b&&(a>=2*b&&(d=a%(2*b)),d-=2*b));a!=d&&(a=d);return a} function Aj(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=zj(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*| )/);d=Bj(a,b,0,b.length,a.W,c);void 0!==d&&!1===c&&Gj(a,null,d)}return d} function Cj(a,b,c,d,e){e=void 0===e?0:e;var f;if(null!=b)if(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(f=ma(b,1>>=2}f=zj(f)}else d||a.v("invalid "+(c?c:"value")+": "+b);else d||a.v("missing "+(c||"value"));return f}