From ae30a5e93c3f280ae80fb01a2a8404df5f8e0a7e Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 27 Mar 2017 19:00:10 -0700 Subject: [PATCH] PDPjs passes the first four PDP-10 Basic Instruction Diagnostics (finally) --- ...-24-stepping-through-pdp-10-diagnostics.md | 27 ++- modules/pdp10/lib/cpuops.js | 32 +-- modules/pdp10/lib/debugger.js | 60 +++-- versions/pdpjs/1.34.3/pdp10-dbg.js | 216 +++++++++--------- 4 files changed, 191 insertions(+), 144 deletions(-) diff --git a/_posts/2017-03-24-stepping-through-pdp-10-diagnostics.md b/_posts/2017-03-24-stepping-through-pdp-10-diagnostics.md index e55ad0552..a6ef0c632 100644 --- a/_posts/2017-03-24-stepping-through-pdp-10-diagnostics.md +++ b/_posts/2017-03-24-stepping-through-pdp-10-diagnostics.md @@ -59,7 +59,9 @@ Happily, this was a good outcome, because 035057 is the end of the test. If you 035057 254 00 0 00 030057 ENDXX: JRST BEGEND ;LOOP PROGRAM -Next, I tried [KA10 Basic Instruction Diagnostic #4 (MAINDEC-10-DAKAD-B-D)](/apps/pdp10/diags/klad/dakad/): +I had similar success with Basic Instruction Diagnostics #2 (MAINDEC-10-DAKAB-B-D) and #3 (MAINDEC-10-DAKAC-B-D). + +However, when I tried [KA10 Basic Instruction Diagnostic #4 (MAINDEC-10-DAKAD-B-D)](/apps/pdp10/diags/klad/dakad/): >> a 30724 /apps/pdp10/diags/klad/dakad/DAKAD.MAC starting PCjs MACRO-10 Mini-Assembler... @@ -177,8 +179,27 @@ not WORD_MASK, to truncate the value to 36 bits. Here's the corrected line: var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_LIMIT; ``` -There are more PDPjs emulation failures in these [Basic Instruction Diagnostics](/apps/pdp10/diags/klad/) from DEC, -but I've run out of time today. To be continued.... +The next problem I encountered involved this instruction in DEC's "DAKAC" diagnostic: + + CAME [0,-1] ;PASS TEST IF C(AC)=0,,-1 + +Based on the comment, it's clear what they really meant was either "[0,,-1]" or "[XWD 0,-1]". However, they still got the +desired result, which means that even when the assembler parses an mnemonic-less instruction like "0,-1", it must still truncate +the second (address) operand. + +The last few problems I ran into during my initial testing were in DEC's "DAKAD" diagnostic. When it tests the `SOJ` and `SOS` +instructions, it expects the carry and overflow flags to be set consistently with an *addition* of negative 1 (777777,777777) +rather than a *subtraction* of positive 1. That was an easy fix, but I'm not convinced that all flag-related issues are resolved, +so more arithmetic operation testing will be performed at a later date. + +Finally, when the "DAKAD" diagnostic generated an indirect word reference: + + E217: E217A(3) + +my MACRO-10 Mini-Assembler passed the reference to the Debugger's assembler function first, because that function already knows +how to parse address expressions that use indirection and/or indexing, including expressions (eg, "E217A") that require a fix-up. +Unfortunately, the Debugger failed to pass the fix-up information back to the MACRO-10 Mini-Assembler, because evaluation of the +indexing expression was overwriting fix-up information, if any, from the preceding expression. *[@jeffpar](http://twitter.com/jeffpar)* *Mar 24, 2017* diff --git a/modules/pdp10/lib/cpuops.js b/modules/pdp10/lib/cpuops.js index fb50fb749..1786310d2 100644 --- a/modules/pdp10/lib/cpuops.js +++ b/modules/pdp10/lib/cpuops.js @@ -3537,7 +3537,7 @@ PDP10.opAOSG = function(op, acc) */ PDP10.opSOJ = function(op, acc) { - this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); }; /** @@ -3556,7 +3556,7 @@ PDP10.opSOJ = function(op, acc) */ PDP10.opSOJL = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) < 0) this.setPC(this.regEA); }; @@ -3576,7 +3576,7 @@ PDP10.opSOJL = function(op, acc) */ PDP10.opSOJE = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) == 0) this.setPC(this.regEA); }; @@ -3596,7 +3596,7 @@ PDP10.opSOJE = function(op, acc) */ PDP10.opSOJLE = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) <= 0) this.setPC(this.regEA); }; @@ -3616,7 +3616,7 @@ PDP10.opSOJLE = function(op, acc) */ PDP10.opSOJA = function(op, acc) { - this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); this.setPC(this.regEA); }; @@ -3636,7 +3636,7 @@ PDP10.opSOJA = function(op, acc) */ PDP10.opSOJGE = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) >= 0) this.setPC(this.regEA); }; @@ -3656,7 +3656,7 @@ PDP10.opSOJGE = function(op, acc) */ PDP10.opSOJN = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) != 0) this.setPC(this.regEA); }; @@ -3676,7 +3676,7 @@ PDP10.opSOJN = function(op, acc) */ PDP10.opSOJG = function(op, acc) { - var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), PDP10.WORD_MASK)); if (PDP10.SIGN(dst) > 0) this.setPC(this.regEA); }; @@ -3696,7 +3696,7 @@ PDP10.opSOJG = function(op, acc) */ PDP10.opSOS = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), PDP10.WORD_MASK)); if (acc) this.writeWord(acc, dst); }; @@ -3716,7 +3716,7 @@ PDP10.opSOS = function(op, acc) */ PDP10.opSOSL = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3737,7 +3737,7 @@ PDP10.opSOSL = function(op, acc) */ PDP10.opSOSE = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3758,7 +3758,7 @@ PDP10.opSOSE = function(op, acc) */ PDP10.opSOSLE = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3779,7 +3779,7 @@ PDP10.opSOSLE = function(op, acc) */ PDP10.opSOSA = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3800,7 +3800,7 @@ PDP10.opSOSA = function(op, acc) */ PDP10.opSOSGE = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3821,7 +3821,7 @@ PDP10.opSOSGE = function(op, acc) */ PDP10.opSOSN = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; @@ -3842,7 +3842,7 @@ PDP10.opSOSN = function(op, acc) */ PDP10.opSOSG = function(op, acc) { - var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + 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); }; diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index 4ec44b4a5..afd87af05 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -1717,24 +1717,49 @@ class DebuggerPDP10 extends Debugger { if (sOperands) { var aOperands = sOperands.split(','); for (var i = 0; i < aOperands.length; i++) { + var sOperand = aOperands[i].trim(); if (!sOperand) continue; + if (i > 1) { this.println("too many operands: " + sOperands); opCode = -1; break; } + var match = sOperand.match(/(@?)([^(]*)\(?([^)]*)\)?/); if (!match) { this.println("unknown operand: " + sOperand); opCode = -1; break; } + + /* + * If the operand contains an indirection operator (@) and/or index register (X), we parse those + * first and update the indirect (I) bit and index (X) bits as appropriate. The order is important, + * because if we parse them AFTER parsing the address expression, we might lose an undefined symbol + * indication, and if the caller needs to handle address fixups, that would be bad. + */ + if (match[1]) opCode += PDP10.OPCODE.I_BIT; + + sOperand = match[3]; + if (sOperand) { + operand = this.parseExpression(sOperand, fQuiet); + if (operand == undefined) { + opCode = -1; + break; + } + if (operand < 0 || operand > PDP10.OPCODE.X_MASK) { + operand &= PDP10.OPCODE.X_MASK; + if (MAXDEBUG) this.println("index (" + sOperand + ") truncated to " + this.toStrBase(operand)); + } + opCode += operand << PDP10.OPCODE.X_SHIFT; + } + sOperand = match[2]; if (i || aOperands.length == 1) { /* - * If this is NOT the first operand, then replace all periods NOT preceded - * by a digit with the current address. + * If this is NOT the first operand, replace all periods NOT preceded by a digit with the current address. */ if (!sOperand) { sOperand = "0"; @@ -1742,11 +1767,13 @@ class DebuggerPDP10 extends Debugger { sOperand = sOperand.replace(/(^|[^0-9])\./g, "$1" + this.toStrOffset(addr)); } } + var operand = this.parseExpression(sOperand, fQuiet); if (operand == undefined) { opCode = -1; break; } + if (!i && aOperands.length > 1) { if (opMask == PDP10.OPCODE.OPIO) { if (operand < 0 || operand > PDP10.OPCODE.IO_MASK) { @@ -1764,27 +1791,26 @@ class DebuggerPDP10 extends Debugger { } continue; } - if (sOpcode) { + + /* + * I came across what I believe is a typo in the DEC "DAKAC" diagnostic: + * + * CAME [0,-1] ;PASS TEST IF C(AC)=0,,-1 + * + * Based on the comment, it's clear what they really meant was either "[0,,-1]" or "[XWD 0,-1]". + * However, they still got the desired result, which means when the assembler parses an mnemonic-less + * instruction like "0,-1", it must truncate the second (address) operand. + * + * TODO: Determine if I should ALWAYS truncate. I'm trying to retain the flexibility of allowing + * a full 36-bit instruction to be encoded with a single numeric expression (ie, one operand). + */ + if (sOpcode || i) { if (operand < 0 || operand > PDP10.OPCODE.Y_MASK) { operand &= PDP10.ADDR_MASK; if (MAXDEBUG) this.println("address (" + sOperand + ") truncated to " + this.toStrBase(operand)); } } opCode += operand; - sOperand = match[3]; - if (sOperand) { - operand = this.parseExpression(sOperand, fQuiet); - if (operand == undefined) { - opCode = -1; - break; - } - if (operand < 0 || operand > PDP10.OPCODE.X_MASK) { - operand &= PDP10.OPCODE.X_MASK; - if (MAXDEBUG) this.println("index (" + sOperand + ") truncated to " + this.toStrBase(operand)); - } - opCode += operand << PDP10.OPCODE.X_SHIFT; - } - if (match[1]) opCode += PDP10.OPCODE.I_BIT; } } // diff --git a/versions/pdpjs/1.34.3/pdp10-dbg.js b/versions/pdpjs/1.34.3/pdp10-dbg.js index 328cedc82..0f4ee3039 100644 --- a/versions/pdpjs/1.34.3/pdp10-dbg.js +++ b/versions/pdpjs/1.34.3/pdp10-dbg.js @@ -27,42 +27,42 @@ http://pcjs.org/modules/pdp10/lib/debugger.js (C) Jeff Parsons 2012-2017 http://pcjs.org/modules/pdp10/lib/macro10.js (C) Jeff Parsons 2012-2017 */ -var l,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var fa=0;function da(a){return"jscomp_symbol_"+(a||"")+fa++} -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 ia(function(){return ba?-b:b}});la("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ma={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, +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}; 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":"")} function va(a,b){b?11=Math.abs(a)?5:11;return ta(a,10,b)}function n(a,b,c){b?9=b?4:4294967295>=b?8:9);return ta(a,16,b,c?"0x":"")}function wa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Aa[a]})}function Ba(a,b){return(a+" ").slice(0,b)}function Ea(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0"']/g,function(a){return Aa[a]})}function Da(a,b){return(a+" ").slice(0,b)}function Ea(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"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="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));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;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 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);l=bc.prototype;l.reset=function(a){this.stop();a&&dc(this,this.w=0)}; @@ -70,16 +70,16 @@ l.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) 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)}};l.Ja=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};l.ya=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.oa=function(a){return a?this.save():!0};l.save=function(){var a=new F(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; l.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};l.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])} l.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};l.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};l.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)}l.bc=function(a){a||this.v.A.O||(I(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};l.cc=function(){};l.Xb=function(a){a||this.v.V()}; +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)}l.bc=function(a){a||this.v.A.O||(G(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};l.cc=function(){};l.Xb=function(a){a||this.v.V()}; l.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);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<c;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&&(m=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){m=h.size-(e-k);m>f&&(m=f);h.Va=e-h.B+m;e=k+16384;f-=m;g++;continue}}return Ec(Fc,e,f)}e=new Ac(a,e,m,16384,d);Bc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}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;da.Y/a.Z?b=1:d=!0;a.ea=b;b=a.jb*a.e function tc(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[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} l.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(!Ab(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)}}l.Xa=function(){return 0};l.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 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)}}l.Xa=function(){return 0};l.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);l=od.prototype; l.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)};l.Hb=function(){return 0}; l.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()}; l.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)};l.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}; +if(e.mc===b[c]){d=e;break a}}d=null}d&&(d.next=this.Ba,this.Ba=d)}a=a[4];for(b=0;b>>b.i].f(a&16383,a)};l.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}; l.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 M(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)%D);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)%D;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)} +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)} +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 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 P(a,b){var c=(a+b)%D;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%D;b=this.F=f+Math.trunc(b/2);c>z&&(c=D-c,d=!d);b>z&&(a?(b=B-b,a=D-a):b&&(b=D-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]+=D,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=D-a);e&&this.F&&(this.F=D-this.F);return a} -function we(a,b,c){var d=a,e=b;b=!1;var f;d>z&&(d=D-d,b=!b);e>z&&(e=D-e,b=!b);if(dz)&&(f!=B||a<=z)&&(this.j|=131072),a;c=a;b=f;a=b-b%A;b=2*b%D+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 R(a,b){var c=a-b;0>c&&(c+=D);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 S(a,b){return((a/E|0)&(b/E|0))*E+((a&b)>>>0)}function T(a,b){return S(a,(~(b/E|0)&15)*E+(~b>>>0))}function ye(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} -function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=D&&(a[0]%=D,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=D);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} -var ud=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, +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 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} +function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=C&&(a[0]%=C,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=C);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} +var ud=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},yd,zd,Ad,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/y|0)+(a&x)*y;this.g(b,a)},function(a,b){this.g(b,this.b*y)},function(a,b){a=this.f(b);a=(a/y|0)+(a&x)*y;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/y|0)+(a&x)*y;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(this.b)))},function(a,b){this.g(b,xe.call(this,this.b))},function(a,b){this.g(this.b, xe.call(this,this.f(b)))},function(a,b){a=xe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,pe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,pe.call(this,this.f(b)))},function(a,b){a=pe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,we.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b), !0))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,we.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ 1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, -function(a,b){a=this.f(b);b=this.f(b+1&15);b=re.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>z?-(D-a):a;0d?A:0,c=z):(d=d*Math.pow(2,c)%A,c=A-Math.pow(2,35-c)),a<=z?a+c>z&&(this.j|=131072):a-c<=z&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+D:d; -this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%D+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0z&& -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?D-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)%D+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%D+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%D+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%D+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)%D,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)%D;this.g(b,a);a=A&&I(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);I(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,I(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>=D&&(a-=D);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+=D);(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);I(this,this.b+1)},function(a,b){this.g(b,(this.j&x)*y+this.i);I(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,P.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,P.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,P.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,P.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,R.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,R.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,R.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>ye(this.f(b),this.b)&&I(this, -this.i+1)},function(a,b){ye(this.f(b),this.b)||I(this,this.i+1)},function(a,b){0>=ye(this.f(b),this.b)&&I(this,this.i+1)},function(){I(this,this.i+1)},function(a,b){0<=ye(this.f(b),this.b)&&I(this,this.i+1)},function(a,b){ye(this.f(b),this.b)&&I(this,this.i+1)},function(a,b){0ye(this.f(b),this.f(this.b))&&I(this,this.i+1)},function(a,b){ye(this.f(b),this.f(this.b))||I(this,this.i+1)},function(a,b){0>=ye(this.f(b),this.f(this.b))&&I(this, -this.i+1)},function(){I(this,this.i+1)},function(a,b){0<=ye(this.f(b),this.f(this.b))&&I(this,this.i+1)},function(a,b){ye(this.f(b),this.f(this.b))&&I(this,this.i+1)},function(a,b){0V(this.f(b))&&I(this,this.b)},function(a,b){V(this.f(b))||I(this,this.b)},function(a,b){0>=V(this.f(b))&&I(this,this.b)},function(){I(this,this.b)},function(a,b){0<=V(this.f(b))&&I(this,this.b)},function(a,b){V(this.f(b))&&I(this,this.b)},function(a,b){0< -V(this.f(b))&&I(this,this.b)},function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0>V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){I(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a, -b){a=this.f(this.b);0V(a)&&I(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));V(a)||I(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0>=V(a)&&I(this,this.b)},function(a,b){this.g(b,P.call(this,this.f(b),1));I(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0<=V(a)&&I(this,this.b)},function(a,b){a=this.g(b, -P.call(this,this.f(b),1));V(a)&&I(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));V(a)||I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0>=V(a)&&I(this,this.i+1);b&&this.g(b, -a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0<=V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0V(a)&&I(this,this.b)},function(a,b){a=this.g(b,R.call(this,this.f(b),1));V(a)||I(this,this.b)},function(a,b){a=this.g(b,R.call(this,this.f(b),1));0>=V(a)&&I(this,this.b)},function(a,b){this.g(b,R.call(this,this.f(b),1));I(this,this.b)},function(a,b){a=this.g(b,R.call(this,this.f(b),1));0<=V(a)&&I(this,this.b)},function(a,b){a=this.g(b,R.call(this,this.f(b),1));V(a)&&I(this,this.b)},function(a,b){a=this.g(b,R.call(this,this.f(b),1));0V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));V(a)||I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));0>=V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));0<=V(a)&& -I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));V(a)&&I(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,R.call(this,this.f(this.b),1));0b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>z?-(C-a):a;0d?A:0,c=z):(d=d*Math.pow(2,c)%A,c=A-Math.pow(2,35-c)),a<=z?a+c>z&&(this.j|=131072):a-c<=z&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+C:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%C+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0z&& +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>>f.i;0>>= -f.i;0>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-A&&(g+=D);for(var g=Math.trunc(Math.abs(g))%D,h=d;f--&&h>>a.i;0g&&g>=-A&&(g+=C);for(var g=Math.trunc(Math.abs(g))%C,h=d;f--&&h=ma.vb&&c<=ma.Nb&&(b=c-(ma.vb-ma.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==ma.Lb&&(b=ma.Kb);d.fb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +l.pa=function(a,b,c){var d=this;switch(b){case He:return this.J[b]=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?ra.wb:ra.Mb:46==c?b=ra.wb:a.ctrlKey&&c>=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};l.Ja=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; l.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)}}};l.ya=function(a,b){if(!b)if(this.Ib(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; l.oa=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new F(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.fb=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} @@ -185,63 +185,63 @@ n(e<a&&a>=-A&&(a+=D);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)} +null;switch(f[1].toLowerCase()){case "ops":h=0}if(null==h)break;b=b.replace(f[0],h.toString())}}"%"==b.charAt(0)&&(d=!0,b=b.substr(1));var p,f=b,u;if(f.match(/^[a-z_][a-z0-9_]*$/i))for(f=f.toUpperCase(),h=0;ha&&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;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,m=0,p=f/Xb|0,t;for(t in Af)if(g=Af[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=Bf;m=p&3;break;case 32256:k=Cf;m=p&7;break;case 29248:k=Df,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Ef&&(k="B");k=Ff[g||0]+k;if(g){if(28700==h)h=f/Yb&127,m=K(a,h,-1);else for(h=f>>23&15,m=K(a,h,-1),p=0;m&&p>18&15)&&(k+="("+K(a,f, --1)+")")}else k=Ba(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+=Ba(g,16)+f;c&&(h=Ba(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(),m=0;mEf&&(Q="B");if(k==Ff[h]+Q){f=29248!=g?H:(H&3)<<1|(H&12)<<2;f=(C|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}0>f&&(c=b+c, -b="",f=0)}else c&&(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!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} +function zf(a,b,c,d){var e=Z(b.B),f=a.La(b,1),g,h,k,m=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;m=p&3;break;case 32256:k=Cf;m=p&7;break;case 29248:k=Df,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Ef&&(k="B");k=Ff[g||0]+k;if(g){if(28700==h)h=f/Yb&127,m=K(a,h,-1);else for(h=f>>23&15,m=K(a,h,-1),p=0;m&&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(),m=0;mEf&&(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=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} l.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}l.Fb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Fa(p,k,a.Fb);0>t&&p.splice(-(t+1),0,k)}m&&(h.a=m.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&&e>>0,g],u=Fa(p,k,a.Fb);0>u&&p.splice(-(u+1),0,k)}m&&(h.a=m.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&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case kf:I(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 m=h[0]+":";h[2]&&(m+=" "+h[2]);a.u(m)}h[3]&&(g=h[3],f=null);h=a.ha;m=b;h.B=m.B;h.bb=m.bb;h.na=m.na;h.S=m.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(Cb(a)&&0p||"z"oa.length&&(a.u("note: only "+oa.length+" available"),ea=oa.length);ja-=ea;0>ja&&(null==oa[oa.length-1].B?(ea=ja+ea,ja=0):ja+=oa.length);var Ld= -[];"call"==Qf&&(Db=1E5,Ld=["CALL"]);for(void 0!==Pf&&a.u(ea+" instructions earlier:");0=oa.length&&(ja=0);a.Ca=ea;Sf++;Db--}}Sf||(a.u("no "+Rf+"history available"),a.Ca=void 0)}else{var ib=ef(a,na,a.ka);if(ib){var La=0,Vf="ds"==fb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||wh,La=Pe(a,Ca);else{var Wf=ef(a,Ca);Wf&& -(La=Wf.B-ib.B)}0>La&&(La=0);65536Fb?".":String.fromCharCode(Fb)),Gc=Gc-7}Ma&&(Ma+="\n");Ma=Vf?Ma+(pa+","):Ma+(na+": "+pa+(0>Yf? -" "+Od:""))}Ma&&a.u(Ma);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 Na=null,Dh=256;65536>Ib.B>>>0;){Vd.B=a.La(Ib,2);if(null==Ib.B||!Dh--)break;if(!(Vd.B&1)){for(var Eh=a,Ic=Vd,cg=null,Jb=Ic.B,dg=Jb,Wd=1;6>=Wd&&Jb;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 jb=+g[2];if(2==jb||8==jb||10==jb||16==jb)a.S=jb;else{a.u("invalid base: "+jb);break}}a.u("default base: "+a.S);break;case "cs":var Lb;void 0!==g[3]&&(Lb=+g[3]);switch(g[2]){case "int":a.v.qa= -Lb;break;case "start":a.v.Fa=Lb;break;case "stop":a.v.ka=Lb;break;default:a.u("unknown cs option");break a}void 0!==Lb&&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 #"), +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"+ -Ba(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} +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} 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> ";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;cH)break;var t= -H+1,Q=H+m.length,db="",Bb="";H&&(db=b[H-1]).match(/[0-9A-Z$%.]/i)||!(Q>=b.length)&&(Bb=b[Q]).match(/[0-9A-Z$%.]/i)||("'"==db&&H--,"'"==Bb&&Q++,b=b.substr(0,H)+p+b.substr(Q),t=H+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 G;f&&(G=b.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=G[1],b=G[2],"=="==f?e|=Ng:"=:"==f&&(e|=Og),Dg(a,d,b,e),f=b="");if(!f&&!b)return!0;a.I=f;for((G=Pg(a,b))&&(b=b.replace(G,Qg(a,Rg,Pg(a,h))));G=Sg(a,b);)b=b.replace(G,G.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:G=-1,h=(f+c+b).trim(),0>b.indexOf(",,")&&(G=Hf(a.b,f,b,a.ga,!0)),0>G&&(G=Hg(a,h,!0)),void 0!==G?Fg(a,G,a.b.ia):a.error("unrecognized expression: "+h)}return!0} +function Cg(a,b,c,d,e){var f;if(a.i&&(1==a.i&&(f=b.indexOf(a.J),0<=f?(a.i++,b=b.substr(f+1)):a.error("expected "+a.I+" definition: "+b)),1I)break;var u= +I+1,P=I+m.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;b"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0=D)&&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 Ig(a,b,c){c=void 0===c?a.ga:c;var d=Y(a.b,b||0,36,!0);(b<-A||b>=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;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;fg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255).*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){g=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);bi(a,b,c)}})}else c(a,null)} -function ci(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&w(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);m&&(--Zh||ab(!0));m=!1}var h,k,m=!0;Zh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");C.type="text/css";C.styleSheet?C.styleSheet.cssText=p:C.appendChild(document.createTextNode(p));t.appendChild(C)}d|| +function ci(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&w(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);m&&(--Zh||ab(!0));m=!1}var h,k,m=!0;Zh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=p:D.appendChild(document.createTextNode(p));u.appendChild(D)}d|| (p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.3/components.xsl");p=function(e,k){k?$h(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Zh||ab(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Zh|| -ab(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?$h(c,b,a,e,!0,f,p):ai(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(H){g(H.message)}return m}window.embedPDP10=function(a,b,c,d){ab(!1);return ci("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ab(!1);return ci("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p