diff --git a/_posts/2016-11-13-curious-pdp-11-features.md b/_posts/2016-11-13-curious-pdp-11-features.md index 6188ad998..7bf72dad3 100644 --- a/_posts/2016-11-13-curious-pdp-11-features.md +++ b/_posts/2016-11-13-curious-pdp-11-features.md @@ -34,21 +34,19 @@ And finally, the most interesting bug uncovered by Test 14 involved instructions MOV R0,(R0)+ -Imagine that R0 contains 1000. PDPjs (as well as several other emulators I tested) would write the value 1000 to address -1000 after auto-incrementing R0 to 1002. +Imagine that R0 contains 1000. PDPjs would write the value 1000 to address 1000 after auto-incrementing R0 to +1002. -Unfortunately, that's wrong. Apparently, the PDP-11 performs both source and destination address calculations *before* -reading and writing the source and destination values. So, in the above example, the value 1002 must be written to address 1000. - -I should add that not all emulators get this wrong: [SimH](https://github.com/simh/simh), the gold standard of PDP-11 -emulators, handles it correctly. +Unfortunately, that's wrong -- for the PDP-11/20 anyway. Apparently, unlike later (micro-coded) models, the +PDP-11/20 performs both source and destination address calculations *before* reading and writing the source and +destination values. So, in the above example, the value 1002 must be written to address 1000. Don't confuse this behavior with the order in which the source and destination operands are processed (source operands are always decoded first, destination operands next), or with the fact that the auto-increment mode is actually a *post*- increment mode, whereas auto-decrement is a *pre*-decrement mode. Those things are also true, but they have nothing to do -with this bug. +with this behavior. -PDPjs resolved the bug by using a special (negative) value to indicate a register source operand, which is then converted +PDPjs resolved this by using a special (negative) value to indicate a register source operand, which is then converted to the register's current value after both operands have been decoded. Test 14 now passes. Next up: [Test 15](/apps/pdp11/tapes/diags/#test-15), which uncovered a couple more problems: diff --git a/apps/pdp11/tapes/diags/README.md b/apps/pdp11/tapes/diags/README.md index c63d30098..1ad6050f9 100644 --- a/apps/pdp11/tapes/diags/README.md +++ b/apps/pdp11/tapes/diags/README.md @@ -144,17 +144,12 @@ This test is also noteworthy because it uncovered a bug involving instructions l MOV R0,(R0)+ -Imagine that R0 contains 1000. PDPjs (as well as several other emulators I tested) would write the value 1000 -to address 1000 after auto-incrementing R0 to 1002. +Imagine that R0 contains 1000. PDPjs would write the value 1000 to address 1000 after auto-incrementing R0 to +1002. -Unfortunately, that’s wrong. Apparently, the PDP-11 performs both source and destination address calculations -before reading and writing the source and destination values. So, in the above example, the value 1002 must be -written to address 1000. - -I should add that not all emulators get this wrong: [SimH](https://github.com/simh/simh), the gold standard of -PDP-11 emulators, handles it correctly. However, it's unclear how much confidence one should place in SimH, -because as I discovered later when running the [11/70 CPU EXERCISER](#md-11-1170-cpu-exerciser) diagnostic, -SimH is not infallible. +Unfortunately, that's wrong -- for the PDP-11/20 anyway. Apparently, unlike later (micro-coded) models, the +PDP-11/20 performs both source and destination address calculations *before* reading and writing the source and +destination values. So, in the above example, the value 1002 must be written to address 1000. MAINDEC-11-D0NA (NEW NUMBER - DAKAA) @@ -381,7 +376,7 @@ checkStackLimit() handlers based on the CPU model. --- Here's the next test that PDPjs failed. Again, I found the same sequence of instructions in the 11/40 and 11/45 -version of the diagnostic, at PC 023360 rather than 023450, so I have annotated the code below with DEC's comments: +version of the diagnostic, at PC 023360 rather than 023450, so I've annotated the code below with DEC's comments: 023450: 012704 000001 MOV #1,R4 ;SET R4 023454: 006767 000060 SXT 023540 ;PRESET DATA=0 @@ -400,30 +395,5 @@ version of the diagnostic, at PC 023360 rather than 023450, so I have annotated 023532: 001401 BEQ 023536 023534: 104000 EMT 000 ;ERROR: XOR TESTS ABOVE FAILED [They use HLT instead of EMT here] -In my case, the failure was caused by the XOR instruction: it hadn't been updated along with the rest of the -PDPjs instructions to defer evaluating register operands until BOTH *src* and *dst* operands have been decoded. -So at this point: - - R0=154343 R1=154112 R2=023422 R3=154501 R4=100000 R5=155066 - SP=000700 PC=023502 PS=000010 IR=000000 SL=000377 T0 N1 Z0 V0 C0 - 023502: 074767 000032 XOR PC,023540 ;XOR PC WITH XOR6A (177777) - -the XOR instruction was using 23504 for the *src* operand instead of 23506. - -Interestingly, this test PASSES in SimH, even though it *also* incorrectly uses 23504 for XOR's *src* operand. -Why? Because when SimH gets to this instruction: - - 023506: 010767 000030 MOV PC,023542 ;FORM PC AS USED IN XOR ABOVE - -it incorrectly stores 023510 instead of 023512 into memory, and both mistakes end up canceling each other out. - -In fact, I'm less impressed with the accuracy of [SimH's](https://github.com/simh/simh) PDP-11 emulation -than I used to be, because in the process of getting to this particular test within the "11/70 CPU EXERCISER" -(MAINDEC-11-DEQKC-B1-PB) diagnostic, there were numerous other failures as well (eg, TEST 41 and TEST 45). -However, SimH is not my baby, so delving into those failures is an exercise for another day. - -DISCLAIMER: Until I can run this test on real PDP-11 hardware, I have to acknowledge another possible -explanation for the above failure: that SimH is *correct*, and that unlike all other registers, the value -of the PC register is always used immediately, rather than after both *src* and *dst* have been decoded. -But that strikes me as a strange architectural inconsistency, and given SimH's other "11/70 CPU EXERCISER" -test failures, I'm going to stick with my original assumption -- for now. +In my case, the failure was caused by the XOR instruction. When I fixed the PDP-11/20 issue uncovered by +[Test 14](#test-14), I had neglected to update XOR, which has some unique operand decoding logic. diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 069785f56..2432070b1 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1883,11 +1883,7 @@ PDP11.opWAIT = function(opCode) PDP11.opXOR = function(opCode) { var reg = (opCode >> PDP11.SRCMODE.SHIFT) & PDP11.OPREG.MASK; - /* - * As per the WARNING in readSrcWord(), we must supply a register number rather than a register value, - * which will then be evaluated by updateDstWord() after both the SRC and DST operands have been decoded. - */ - this.updateDstWord(opCode, -reg-1 /* this.regsGen[reg] */, PDP11.fnXOR); + this.updateDstWord(opCode, this.regsGen[reg + this.offRegSrc], PDP11.fnXOR); this.nStepCycles -= (this.dstMode? (8 + 1) : (2 + 1) + (this.dstReg == 7? 2 : 0)); }; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 93ceab729..4577e1943 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -123,9 +123,21 @@ var Trigger; */ CPUStatePDP11.prototype.initProcessor = function() { + /* + * offRegSrc is a bias added to the register index calculated in readSrcWord() and readSrcByte(), + * and by default has no effect on the register index, UNLESS this is a PDP-11/20, in which case the + * bias is changed to 8 and we return one of the negative values you see above. Those negative values + * act as signals to writeDstWord() and writeDstByte(), effectively delaying evaluation of the register + * until then. + */ + this.offRegSrc = 0; + this.maskRegSrcByte = 0xff; + if (this.model == PDP11.MODEL_1120) { this.decode = PDP11.op1120.bind(this); this.checkStackLimit = this.checkStackLimit1120; + this.offRegSrc = 8; + this.maskRegSrcByte = -1; } else { this.decode = PDP11.op1145.bind(this); this.checkStackLimit = this.checkStackLimit1145; @@ -177,10 +189,12 @@ CPUStatePDP11.prototype.initRegs = function() this.flagZ = f; // ~ PSW Z bit (TODO: Why do we clear instead of set Z, like other flags?) this.flagN = 0x8000; // PSW N bit this.regPSW = 0x000f; // PSW other bits (TODO: What's the point of setting the flag bits here, too?) - this.regsGen = [ // General R0 - R7 - 0, 0, 0, 0, 0, 0, 0, this.addrReset + this.regsGen = [ // General R0-R7 + 0, 0, 0, 0, 0, 0, 0, this.addrReset, + -1, -2, -3, -4, -5, -6, -7, -8 ]; - this.regsAlt = [ // Alternate R0 - R5 + + this.regsAlt = [ // Alternate R0-R5 0, 0, 0, 0, 0, 0 ]; this.regsAltStack = [ // Alternate R6 stack pointers (KERNEL, SUPER, UNUSED, USER) @@ -2197,10 +2211,10 @@ CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, access, data) /** * readSrcByte(opCode) * - * WARNING: If the SRC operand is a register, we return a negative register number rather than the - * register value, because the final value of the register must be resolved AFTER the DST operand has - * been decoded and any pre-decrement or post-increment operations affecting the SRC register have - * been completed. See readSrcWord() for more details. + * WARNING: If the SRC operand is a register, offRegSrc ensures we return a negative register number + * rather than the register value, because on the PDP-11/20, the final value of the register must be + * resolved AFTER the DST operand has been decoded and any pre-decrement or post-increment operations + * affecting the SRC register have been completed. See readSrcWord() for more details. * * @this {CPUStatePDP11} * @param {number} opCode @@ -2213,7 +2227,7 @@ CPUStatePDP11.prototype.readSrcByte = function(opCode) var reg = this.srcReg = opCode & PDP11.OPREG.MASK; var mode = this.srcMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT; if (!mode) { - result = -reg-1; + result = this.regsGen[reg + this.offRegSrc] & this.maskRegSrcByte; } else { result = this.readByteFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_BYTE)); } @@ -2223,10 +2237,10 @@ CPUStatePDP11.prototype.readSrcByte = function(opCode) /** * readSrcWord(opCode) * - * WARNING: If the SRC operand is a register, we return a negative register number rather than the - * register value, because the final value of the register must be resolved AFTER the DST operand has - * been decoded and any pre-decrement or post-increment operations affecting the SRC register have - * been completed. + * WARNING: If the SRC operand is a register, offRegSrc ensures we return a negative register number + * rather than the register value, because on the PDP-11/20, the final value of the register must be + * resolved AFTER the DST operand has been decoded and any pre-decrement or post-increment operations + * affecting the SRC register have been completed. * * Here's an example from DEC's "TRAP TEST" (MAINDEC-11-D0NA-PB): * @@ -2255,7 +2269,7 @@ CPUStatePDP11.prototype.readSrcWord = function(opCode) var reg = this.srcReg = opCode & PDP11.OPREG.MASK; var mode = this.srcMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT; if (!mode) { - result = -reg-1; + result = this.regsGen[reg + this.offRegSrc]; } else { result = this.bus.getWord(this.getAddr(mode, reg, PDP11.ACCESS.READ_WORD)); } diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 89f5264f3..92c870a4c 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -46,97 +46,97 @@ function Fa(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Ka(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function La(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ma(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.bb=this.id:(this.Ua=this.id.substr(0,b),this.bb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,eb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.A.error=!1;this.G={};this.j=null;this.la=d||0;y.push(this)}var db=void 0,eb={}; +function w(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Dc=b.comment;this.he=b;b=this.id.indexOf(".");0>b?this.bb=this.id:(this.Ua=this.id.substr(0,b),this.bb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,eb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.A.error=!1;this.G={};this.j=null;this.la=d||0;y.push(this)}var db=void 0,eb={}; if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function A(a,b){b||(b=w);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var jb=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else jb={},y=[];function kb(a,b,c){jb[a]&&b&&(jb[a][b]=c)}function sb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,0,!1,!1,this.md,a]}A(Db);var Eb=7;function Fb(a,b){return a.f[b]&&a.f[b][1]}k=Db.prototype;k.reset=function(){this.stop()}; +function Db(a){w.call(this,"Panel",a,Db,2048);this.ua=this.w=this.Za=this.tb=this.B=this.D=0;this.I=this.K=this.H=!1;this.L=Eb;this.g={};this.f={START:[1,1,!0,!1,this.ld],STEP:[1,1,!1,!1,this.md],ENABLE:[1,1,!1,!1,this.gd],CONT:[1,1,!0,!1,this.ed],DEP:[0,0,!0,!1,this.fd],EXAM:[1,1,!0,!1,this.hd],LOAD:[1,1,!0,!1,this.kd],TEST:[0,0,!0,!1,this.jd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.nd,a]}A(Db);var Eb=7;function Fb(a,b){return a.f[b]&&a.f[b][1]}k=Db.prototype;k.reset=function(){this.stop()}; k.wa=function(a,b,c,d){if(this.C&&this.C.wa(a,b,c,d)||this.b&&this.b.wa(a,b,c,d)||this.j&&this.j.wa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.g[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, b){return function(){Gb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Hb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Gb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Hb(a,b)}}(this,b),!0):this.parent.wa.call(this,a,b,c,d)}};k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.j=d;Ib(b,this,Jb);Kb(b,this.reset.bind(this));Lb(this);Mb(this)};k.Ka=function(a,b){b||(Nb(),this.reset());return!0};k.Ja=function(){return!0}; function Ob(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Lb(a,b){for(var c in a.g)Ob(a,c,null!=b?b:a.g[c])}function Pb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Mb(a){for(var b in a.f)Pb(a,b,a.f[b][1])}function Qb(a,b,c,d){a.G[b]&&(void 0===c&&(zb(a,"Value for "+b+" is invalid"),a.b.da()),c=8==(a.j&&a.j.ca||8)?na(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -function Gb(a,b){var c=a.f[b];Pb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Hb(a,b){var c=a.f[b];c[2]&&c[3]&&(Pb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.kd=function(a){a||this.b.A.W||(a=this.b,a.v.reset(),Rb(a),Fb(this,"ENABLE")&&this.b.jb())};k.ld=function(){};k.fd=function(a){a||this.b.da()}; -k.dd=function(a){if(!a&&!this.b.A.W)if(Fb(this,"ENABLE"))this.b.jb();else{if((a=this.j)&&!wb(a,!0))vb(a,!0),a.kb(0,null),vb(a,!1);else try{var b=this.b.kb(1);0a.b.fb?8:16,c=65472<=a.ua&&a.ua<65472+b,b=c?1:2,c=c?15:a.v.Qa;Fb(a,"STEP")||(b=-b);jc(a,a.ua&~c|a.ua+b&c)} -function jc(a,b){a.ua=b&a.v.Qa;b=a.ua;for(var c=0;22>c;c++)lc(a,"A"+c,b&1<c;c++)lc(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.v=this.Da-1;this.D=this.H/this.Da|0;this.cb=[];this.ma=0;this.f=!1;this.gc=0;this.B=[];this.Rc=[qc,rc,sc,tc];a=new J(this);uc(a,this.j);this.Y=Array(this.D);for(b=0;ba.b.fb?8:16,c=65472<=a.ua&&a.ua<65472+b,b=c?1:2,c=c?15:a.v.Qa;Fb(a,"STEP")||(b=-b);jc(a,a.ua&~c|a.ua+b&c)} +function jc(a,b){a.ua=b&a.v.Qa;b=a.ua;for(var c=0;22>c;c++)lc(a,"A"+c,b&1<c;c++)lc(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.v=this.Da-1;this.D=this.H/this.Da|0;this.cb=[];this.ma=0;this.f=!1;this.gc=0;this.B=[];this.Tc=[qc,rc,sc,tc];a=new J(this);uc(a,this.j);this.Y=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.cb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&H(this.j,e[5])&&F(this.j,e[4]+".readByte("+K(this.j,b)+"): "+K(this.j,c),!0,!d.ma),c;d.Ha(b,16,3);c=255;this.j&&H(this.j,64)&&F(this.j,"warning: unconverted read access to byte @"+K(this.j,b)+": "+K(this.j,c),!0,!d.ma);return c} function rc(a,b,c){var d=!1,e=this.controller,f=e.cb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.cb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&H(this.j,f[5])&&F(this.j,f[4]+".writeByte("+K(this.j,c)+","+K(this.j,b)+")",!0,!e.ma):(e.Ha(c,16,5),this.j&&H(this.j,64)&&F(this.j,"warning: unconverted write access to byte @"+K(this.j,c)+": "+K(this.j, b),!0,!e.ma))}function sc(a,b){var c=-1,d=this.controller;a=d.cb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&H(this.j,a[5])&&F(this.j,a[4]+".readWord("+K(this.j,b)+"): "+K(this.j,c),!0,!d.ma),c;d.Ha(b,16,2);c=65535;this.j&&H(this.j,64)&&F(this.j,"warning: unconverted read access to word @"+K(this.j,b)+": "+K(this.j,c),!0,!d.ma);return c} function tc(a,b,c){var d=!1,e=this.controller;a=e.cb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&H(this.j,a[5])&&F(this.j,a[4]+".writeWord("+K(this.j,c)+","+K(this.j,b)+")",!0,!e.ma):(e.Ha(c,16,4),this.j&&H(this.j,64)&&F(this.j,"warning: unconverted write access to word @"+K(this.j,c)+": "+K(this.j,b),!0,!e.ma))} function wc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Tb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Tb){n=l.size-(f-m);n>g&&(n=g);l.Tb=f-l.F+n;f=m+a.Da;g-=n;h++;continue}}return Bc(1,f,g)}f=new J(a,f,n,a.Da,d,e);uc(f,a.j,l);a.Y[h++]=f;f=m+a.Da;g-=n}return 0>=g?(d==Cc&&(a.gc+=c),a.status((c>>10)+"Kb "+Dc[d]+" at "+na(b)),!0):Bc(2,b,c)} -function yc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].$b(a&this.v,a)};k.Zb=function(a){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;a=this.Y[(a&this.Qa)>>>this.ka].mc(a&this.v,a);this.ma--;return a}; -k.oa=function(a){3932160<=a&&(a=Ec(this.b,a));return this.Y[(a&this.Qa)>>>this.ka].ta(a&this.v,a)};k.Ya=function(a){3932160<=a&&(a=Ec(this.b,a));var b=a&this.v,c=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;a=this.Y[c].nc(b,a);this.ma--;return a};k.Fb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].cc(a&this.v,b&255,a)};k.tb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;this.Y[(a&this.Qa)>>>this.ka].dc(a&this.v,b&255,a);this.ma--}; -k.vb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].Ub(a&this.v,b&65535,a)};k.wb=function(a,b){3932160<=a&&(a=Ec(this.b,a));var c=a&this.v,d=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;this.Y[d].qc(c,b&65535,a);this.ma--}; -function Fc(a){for(var b=0,c=[],d=0;d>>=a.ka;0>>=a.ka;0>>this.ka].$b(a&this.v,a)};k.Zb=function(a){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;a=this.Y[(a&this.Qa)>>>this.ka].nc(a&this.v,a);this.ma--;return a}; +k.oa=function(a){3932160<=a&&(a=Ec(this.b,a));return this.Y[(a&this.Qa)>>>this.ka].ta(a&this.v,a)};k.Ya=function(a){3932160<=a&&(a=Ec(this.b,a));var b=a&this.v,c=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;a=this.Y[c].oc(b,a);this.ma--;return a};k.Fb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].cc(a&this.v,b&255,a)};k.ub=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;this.Y[(a&this.Qa)>>>this.ka].dc(a&this.v,b&255,a);this.ma--}; +k.wb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].Ub(a&this.v,b&65535,a)};k.xb=function(a,b){3932160<=a&&(a=Ec(this.b,a));var c=a&this.v,d=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;this.Y[d].rc(c,b&65535,a);this.ma--}; +function Fc(a){for(var b=0,c=[],d=0;da.b.fb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;tb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+K(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Nb=128;Kc(this.b,this.f.pc,1E3/60,!0)};k.xd=function(){return this.f.Nb};k.se=function(a){this.f.Nb=a&192};k.zd=function(){return Wc(this.b)};k.ue=function(a){Xc(this.b,a&-129|this.b.za&128)};k.Ad=function(){return Yc(this.b)}; -k.Bd=function(){return Zc(this.b)};k.Cd=function(){return this.b.Ta};k.ve=function(a){$c(this.b,a)};k.ce=function(a){a=a>>1&63;var b=this.b.Sb[a>>1];return a&1?b>>16:b&65535};k.We=function(a,b){b=b>>1&63;var c=b>>1;this.b.Sb[c]=b&1?this.b.Sb[c]&65535|(a&63)<<16:this.b.Sb[c]&-65536|a&65534};k.Wd=function(a){return this.b.P[1][a>>1&7]};k.Pe=function(a,b){this.b.P[1][b>>1&7]=a&65295};k.Ud=function(a){return this.b.P[1][(a>>1&7)+8]};k.Ne=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295}; -k.Vd=function(a){return this.b.ha[1][a>>1&7]};k.Oe=function(a,b){b=b>>1&7;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.Td=function(a){return this.b.ha[1][(a>>1&7)+8]};k.Me=function(a,b){b=(b>>1&7)+8;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.wd=function(a){return this.b.P[0][a>>1&7]};k.re=function(a,b){b=b>>1&7;this.b.P[0][b]=a&=65295;H(this,256)&&F(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.ud=function(a){return this.b.P[0][(a>>1&7)+8]};k.pe=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295}; -k.vd=function(a){return this.b.ha[0][a>>1&7]};k.qe=function(a,b){b=b>>1&7;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.td=function(a){return this.b.ha[0][(a>>1&7)+8]};k.oe=function(a,b){b=(b>>1&7)+8;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.be=function(a){return this.b.P[3][a>>1&7]};k.Ve=function(a,b){this.b.P[3][b>>1&7]=a&65295};k.$d=function(a){return this.b.P[3][(a>>1&7)+8]};k.Te=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};k.ae=function(a){return this.b.ha[3][a>>1&7]}; -k.Ue=function(a,b){b=b>>1&7;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Zd=function(a){return this.b.ha[3][(a>>1&7)+8]};k.Se=function(a,b){b=(b>>1&7)+8;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Db=function(a){a&=7;return this.b.N&2048?this.b.$a[a]:this.b.u[a]};k.Gb=function(a,b){b&=7;this.b.N&2048?this.b.$a[b]=a:this.b.u[b]=a};k.Hd=function(){return this.b.N&49152?this.b.La[0]:this.b.u[6]};k.Ae=function(a){this.b.N&49152?this.b.La[0]=a:this.b.u[6]=a};k.Kd=function(){return this.b.u[7]}; -k.De=function(a){this.b.u[7]=a};k.Eb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.$a[a]};k.Hb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.$a[b]=a};k.Id=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[1]};k.Be=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[1]=a};k.Jd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[3]};k.Ce=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[3]=a};k.rd=function(a){return this.b.Kc[a-65504>>1]}; -k.me=function(a,b){this.b.Kc[b-65504>>1]=a};k.Hc=function(a){if(65520==a){a=0;switch(Cc){case Cc:a=this.v.gc}a=(a>>6)-1}else a=0;return a};k.Oc=function(){};k.Yd=function(){return 1};k.Re=function(){};k.qd=function(){return this.b.va};k.le=function(){this.b.va=0};k.yd=function(){return this.b.Jc};k.te=function(a,b){b&1||(a&=255);this.b.Jc=a};k.Dd=function(a,b){return b?0:this.b.Rb};k.we=function(a){ad(this.b,a)};k.Xd=function(a,b){return b?0:this.b.hb&65280};k.Qe=function(a){this.b.hb=a|255}; -k.Gd=function(){return bd(this.b)};k.ze=function(a){cd(this.b,a&-1793|bd(this.b)&1792);this.b.J|=128};k.Nc=function(a,b){H(this)&&F(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; -var N={},Uc=(N[61568]=[null,null,L.prototype.ce,L.prototype.We,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Wd,L.prototype.Pe,"SIPDR",8,1145,256],N[62608]=[null,null,L.prototype.Ud,L.prototype.Ne,"SDPDR",8,1145,256],N[62624]=[null,null,L.prototype.Vd,L.prototype.Oe,"SIPAR",8,1145,256],N[62640]=[null,null,L.prototype.Td,L.prototype.Me,"SDPAR",8,1145,256],N[62656]=[null,null,L.prototype.wd,L.prototype.re,"KIPDR",8,1145,256],N[62672]=[null,null,L.prototype.ud,L.prototype.pe,"KDPDR",8,1145,256], -N[62688]=[null,null,L.prototype.vd,L.prototype.qe,"KIPAR",8,1145,256],N[62704]=[null,null,L.prototype.td,L.prototype.oe,"KDPAR",8,1145,256],N[62798]=[null,null,L.prototype.Cd,L.prototype.ve,"MMR3",1,1145,256],N[65382]=[null,null,L.prototype.xd,L.prototype.se,"LKS"],N[65402]=[null,null,L.prototype.zd,L.prototype.ue,"MMR0",1,1145,256],N[65404]=[null,null,L.prototype.Ad,L.prototype.Nc,"MMR1",1,1145,256],N[65406]=[null,null,L.prototype.Bd,L.prototype.Nc,"MMR2",1,1145,256],N[65408]=[null,null,L.prototype.be, -L.prototype.Ve,"UIPDR",8,1145,256],N[65424]=[null,null,L.prototype.$d,L.prototype.Te,"UDPDR",8,1145,256],N[65440]=[null,null,L.prototype.ae,L.prototype.Ue,"UIPAR",8,1145,256],N[65456]=[null,null,L.prototype.Zd,L.prototype.Se,"UDPAR",8,1145,256],N[65472]=[null,null,L.prototype.Db,L.prototype.Gb,"R0SET0"],N[65473]=[null,null,L.prototype.Db,L.prototype.Gb,"R1SET0"],N[65474]=[null,null,L.prototype.Db,L.prototype.Gb,"R2SET0"],N[65475]=[null,null,L.prototype.Db,L.prototype.Gb,"R3SET0"],N[65476]=[null,null, -L.prototype.Db,L.prototype.Gb,"R4SET0"],N[65477]=[null,null,L.prototype.Db,L.prototype.Gb,"R5SET0"],N[65478]=[null,null,L.prototype.Hd,L.prototype.Ae,"R6KERNEL"],N[65479]=[null,null,L.prototype.Kd,L.prototype.De,"R7KERNEL"],N[65480]=[null,null,L.prototype.Eb,L.prototype.Hb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Eb,L.prototype.Hb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Eb,L.prototype.Hb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Eb,L.prototype.Hb,"R3SET1",1,1145],N[65484]= -[null,null,L.prototype.Eb,L.prototype.Hb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Eb,L.prototype.Hb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Id,L.prototype.Be,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Jd,L.prototype.Ce,"R6USER",1,1145],N[65504]=[null,null,L.prototype.rd,L.prototype.me,"CTRL",8,1170],N[65520]=[null,null,L.prototype.Hc,L.prototype.Oc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Hc,L.prototype.Oc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Yd,L.prototype.Re, -"SYSID",1,1170],N[65526]=[null,null,L.prototype.qd,L.prototype.le,"CPUERR",1,1170],N[65528]=[null,null,L.prototype.yd,L.prototype.te,"MB",1,1170],N[65530]=[null,null,L.prototype.Dd,L.prototype.we,"PIR"],N[65532]=[null,null,L.prototype.Xd,L.prototype.Qe,"SL"],N[65534]=[null,null,L.prototype.Gd,L.prototype.ze,"PSW"],N); +k.Ha=function(a,b,c){this.f=!0;this.ma||(this.j&&H(this.j,32)&&F(this.j,"memory fault ("+c+") on "+K(this.j,a),!0,!0),b&&(this.b.va|=b),this.b.qa(4,0,a))};function Hc(a){var b=a.f;a.f=!1;return b}function Bc(a,b,c){u("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function L(a){w.call(this,"Device",a,L,1024);this.f={fa:0,qc:-1}}A(L);k=L.prototype; +k.Ia=function(a,b,c,d){this.v=b;this.C=a;this.b=c;this.j=d;var e=this;this.f.qc=Ic(c,function(){e.f.Nb|=128;e.f.Nb&64&&Jc(e.b,e.f.je);e.C&&e.C.ra(1);Kc(e.b,e.f.qc,1E3/60)});this.f.je=Lc(64,6);Ib(b,this,Uc);Kb(b,this.reset.bind(this));d&&Vc(d,256,function(a){var b=e.b;M(e,"KIPDR",b.P[0],0,a[0]);M(e,"KDPDR",b.P[0],8,a[0]);M(e,"KIPAR",b.ha[0],0,a[0]);M(e,"KDPAR",b.ha[0],8,a[0],!0);M(e,"SIPDR",b.P[1],0,a[0]);M(e,"SDPDR",b.P[1],8,a[0]);M(e,"SIPAR",b.ha[1],0,a[0]);M(e,"SDPAR",b.ha[1],8,a[0],!0);M(e,"UIPDR", +b.P[3],0,a[0]);M(e,"UDPDR",b.P[3],8,a[0]);M(e,"UIPAR",b.ha[3],0,a[0]);M(e,"UDPAR",b.ha[3],8,a[0],!0)});I(this)};function M(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+K(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Nb=128;Kc(this.b,this.f.qc,1E3/60,!0)};k.xd=function(){return this.f.Nb};k.ue=function(a){this.f.Nb=a&192};k.zd=function(){return Wc(this.b)};k.we=function(a){Xc(this.b,a&-129|this.b.za&128)};k.Ad=function(){return Yc(this.b)}; +k.Bd=function(){return Zc(this.b)};k.Cd=function(){return this.b.Ta};k.xe=function(a){$c(this.b,a)};k.ce=function(a){a=a>>1&63;var b=this.b.Sb[a>>1];return a&1?b>>16:b&65535};k.Ye=function(a,b){b=b>>1&63;var c=b>>1;this.b.Sb[c]=b&1?this.b.Sb[c]&65535|(a&63)<<16:this.b.Sb[c]&-65536|a&65534};k.Wd=function(a){return this.b.P[1][a>>1&7]};k.Re=function(a,b){this.b.P[1][b>>1&7]=a&65295};k.Ud=function(a){return this.b.P[1][(a>>1&7)+8]};k.Pe=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295}; +k.Vd=function(a){return this.b.ha[1][a>>1&7]};k.Qe=function(a,b){b=b>>1&7;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.Td=function(a){return this.b.ha[1][(a>>1&7)+8]};k.Oe=function(a,b){b=(b>>1&7)+8;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.wd=function(a){return this.b.P[0][a>>1&7]};k.te=function(a,b){b=b>>1&7;this.b.P[0][b]=a&=65295;H(this,256)&&F(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.ud=function(a){return this.b.P[0][(a>>1&7)+8]};k.re=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295}; +k.vd=function(a){return this.b.ha[0][a>>1&7]};k.se=function(a,b){b=b>>1&7;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.td=function(a){return this.b.ha[0][(a>>1&7)+8]};k.qe=function(a,b){b=(b>>1&7)+8;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.be=function(a){return this.b.P[3][a>>1&7]};k.Xe=function(a,b){this.b.P[3][b>>1&7]=a&65295};k.$d=function(a){return this.b.P[3][(a>>1&7)+8]};k.Ve=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};k.ae=function(a){return this.b.ha[3][a>>1&7]}; +k.We=function(a,b){b=b>>1&7;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Zd=function(a){return this.b.ha[3][(a>>1&7)+8]};k.Ue=function(a,b){b=(b>>1&7)+8;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Db=function(a){a&=7;return this.b.N&2048?this.b.$a[a]:this.b.u[a]};k.Gb=function(a,b){b&=7;this.b.N&2048?this.b.$a[b]=a:this.b.u[b]=a};k.Hd=function(){return this.b.N&49152?this.b.La[0]:this.b.u[6]};k.Ce=function(a){this.b.N&49152?this.b.La[0]=a:this.b.u[6]=a};k.Kd=function(){return this.b.u[7]}; +k.Fe=function(a){this.b.u[7]=a};k.Eb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.$a[a]};k.Hb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.$a[b]=a};k.Id=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[1]};k.De=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[1]=a};k.Jd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[3]};k.Ee=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[3]=a};k.rd=function(a){return this.b.Mc[a-65504>>1]}; +k.oe=function(a,b){this.b.Mc[b-65504>>1]=a};k.Jc=function(a){if(65520==a){a=0;switch(Cc){case Cc:a=this.v.gc}a=(a>>6)-1}else a=0;return a};k.Qc=function(){};k.Yd=function(){return 1};k.Te=function(){};k.qd=function(){return this.b.va};k.ne=function(){this.b.va=0};k.yd=function(){return this.b.Lc};k.ve=function(a,b){b&1||(a&=255);this.b.Lc=a};k.Dd=function(a,b){return b?0:this.b.Rb};k.ye=function(a){ad(this.b,a)};k.Xd=function(a,b){return b?0:this.b.hb&65280};k.Se=function(a){this.b.hb=a|255}; +k.Gd=function(){return bd(this.b)};k.Be=function(a){cd(this.b,a&-1793|bd(this.b)&1792);this.b.J|=128};k.Pc=function(a,b){H(this)&&F(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; +var N={},Uc=(N[61568]=[null,null,L.prototype.ce,L.prototype.Ye,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Wd,L.prototype.Re,"SIPDR",8,1145,256],N[62608]=[null,null,L.prototype.Ud,L.prototype.Pe,"SDPDR",8,1145,256],N[62624]=[null,null,L.prototype.Vd,L.prototype.Qe,"SIPAR",8,1145,256],N[62640]=[null,null,L.prototype.Td,L.prototype.Oe,"SDPAR",8,1145,256],N[62656]=[null,null,L.prototype.wd,L.prototype.te,"KIPDR",8,1145,256],N[62672]=[null,null,L.prototype.ud,L.prototype.re,"KDPDR",8,1145,256], +N[62688]=[null,null,L.prototype.vd,L.prototype.se,"KIPAR",8,1145,256],N[62704]=[null,null,L.prototype.td,L.prototype.qe,"KDPAR",8,1145,256],N[62798]=[null,null,L.prototype.Cd,L.prototype.xe,"MMR3",1,1145,256],N[65382]=[null,null,L.prototype.xd,L.prototype.ue,"LKS"],N[65402]=[null,null,L.prototype.zd,L.prototype.we,"MMR0",1,1145,256],N[65404]=[null,null,L.prototype.Ad,L.prototype.Pc,"MMR1",1,1145,256],N[65406]=[null,null,L.prototype.Bd,L.prototype.Pc,"MMR2",1,1145,256],N[65408]=[null,null,L.prototype.be, +L.prototype.Xe,"UIPDR",8,1145,256],N[65424]=[null,null,L.prototype.$d,L.prototype.Ve,"UDPDR",8,1145,256],N[65440]=[null,null,L.prototype.ae,L.prototype.We,"UIPAR",8,1145,256],N[65456]=[null,null,L.prototype.Zd,L.prototype.Ue,"UDPAR",8,1145,256],N[65472]=[null,null,L.prototype.Db,L.prototype.Gb,"R0SET0"],N[65473]=[null,null,L.prototype.Db,L.prototype.Gb,"R1SET0"],N[65474]=[null,null,L.prototype.Db,L.prototype.Gb,"R2SET0"],N[65475]=[null,null,L.prototype.Db,L.prototype.Gb,"R3SET0"],N[65476]=[null,null, +L.prototype.Db,L.prototype.Gb,"R4SET0"],N[65477]=[null,null,L.prototype.Db,L.prototype.Gb,"R5SET0"],N[65478]=[null,null,L.prototype.Hd,L.prototype.Ce,"R6KERNEL"],N[65479]=[null,null,L.prototype.Kd,L.prototype.Fe,"R7KERNEL"],N[65480]=[null,null,L.prototype.Eb,L.prototype.Hb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Eb,L.prototype.Hb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Eb,L.prototype.Hb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Eb,L.prototype.Hb,"R3SET1",1,1145],N[65484]= +[null,null,L.prototype.Eb,L.prototype.Hb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Eb,L.prototype.Hb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Id,L.prototype.De,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Jd,L.prototype.Ee,"R6USER",1,1145],N[65504]=[null,null,L.prototype.rd,L.prototype.oe,"CTRL",8,1170],N[65520]=[null,null,L.prototype.Jc,L.prototype.Qc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Jc,L.prototype.Qc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Yd,L.prototype.Te, +"SYSID",1,1170],N[65526]=[null,null,L.prototype.qd,L.prototype.ne,"CPUERR",1,1170],N[65528]=[null,null,L.prototype.yd,L.prototype.ve,"MB",1,1170],N[65530]=[null,null,L.prototype.Dd,L.prototype.ye,"PIR"],N[65532]=[null,null,L.prototype.Xd,L.prototype.Se,"SL"],N[65534]=[null,null,L.prototype.Gd,L.prototype.Be,"PSW"],N); $a(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,this.size>>2),kd(this,gd?ld:md);else{a=this.b=Array(this.size>> +function J(a,b,c,d,e,f){this.v=a;this.id=hd+=2;this.b=null;this.F=b;this.Tb=c;this.size=d||0;this.type=e||id;this.f=e==jd;this.controller=null;uc(this);this.Xa=this.$c=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],kd(this,f.Tc);else if(Ab)this.B=new ArrayBuffer(this.size),this.D=new DataView(this.B,0,this.size),this.G=new Uint8Array(this.B,0,this.size),this.I=new Uint16Array(this.B,0,this.size>>1),this.b=new Int32Array(this.B,0,this.size>>2),kd(this,gd?ld:md);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},T:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.v.Ha(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},O:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,1,c.M)&&c.da(!0)}return this.mc(a,b)},Ua:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,2,c.M)&&c.da(!0)}return this.nc(a,b)},na:function(a, -b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,1,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.dc(a,b,c)},Ba:function(a,b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,2,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.qc(a,b,c)},M:function(a){return this.G[a]},S:function(a,b){a=this.G[a];this.j&&H(this.j,128)&&F(this.j,"Memory.readByte("+K(this.j,b)+"): "+K(this.j,a),!0);return a},X:function(a,b){a&1&&this.v.Ha(b,64,2);return this.D.getUint16(a,!0)},ba:function(a,b){a&1&&this.v.Ha(b,64,2); +1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},O:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,1,c.M)&&c.da(!0)}return this.nc(a,b)},Ua:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,2,c.M)&&c.da(!0)}return this.oc(a,b)},na:function(a, +b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,1,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.dc(a,b,c)},Ba:function(a,b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,2,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.rc(a,b,c)},M:function(a){return this.G[a]},S:function(a,b){a=this.G[a];this.j&&H(this.j,128)&&F(this.j,"Memory.readByte("+K(this.j,b)+"): "+K(this.j,a),!0);return a},X:function(a,b){a&1&&this.v.Ha(b,64,2);return this.D.getUint16(a,!0)},ba:function(a,b){a&1&&this.v.Ha(b,64,2); a=this.I[a>>1];this.j&&H(this.j,128)&&F(this.j,"Memory.readWord("+K(this.j,b)+"): "+K(this.j,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Xa=!0},bb:function(a,b,c){this.G[a]=b;this.Xa=!0;this.j&&H(this.j,128)&&F(this.j,"Memory.writeByte("+K(this.j,c)+","+K(this.j,b)+")",!0)},Aa:function(a,b,c){a&1&&this.v.Ha(c,64,4);this.D.setUint16(a,b,!0);this.Xa=!0},Ca:function(a,b,c){a&1&&this.v.Ha(c,64,4);this.I[a>>1]=b;this.Xa=!0;this.j&&H(this.j,128)&&F(this.j,"Memory.writeWord("+K(this.j,c)+","+K(this.j, -b)+")",!0)}};function uc(a,b,c){a.j=b;a.g=a.C=0;c&&((a.g=c.g)&&qd(a,pd,!1),(a.C=c.C)&&od(a,pd,!1))}function sd(a,b){b?--a.C||(a.cc=a.f?a.w:a.dc,a.Ub=a.f?a.H:a.qc):--a.g||(a.$b=a.mc,a.ta=a.nc)}function od(a,b,c){c&&a.C||(a.cc=!a.f&&b[1]||a.w,a.Ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.dc=b[1]||a.w,a.qc=b[3]||a.H}function qd(a,b,c){c&&a.g||(a.$b=b[0]||a.K,a.ta=b[2]||a.L);if(c||void 0===c)a.mc=b[0]||a.K,a.nc=b[2]||a.L}function kd(a,b){b||(b=td);qd(a,b,void 0);od(a,b,void 0)} +b)+")",!0)}};function uc(a,b,c){a.j=b;a.g=a.C=0;c&&((a.g=c.g)&&qd(a,pd,!1),(a.C=c.C)&&od(a,pd,!1))}function sd(a,b){b?--a.C||(a.cc=a.f?a.w:a.dc,a.Ub=a.f?a.H:a.rc):--a.g||(a.$b=a.nc,a.ta=a.oc)}function od(a,b,c){c&&a.C||(a.cc=!a.f&&b[1]||a.w,a.Ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.dc=b[1]||a.w,a.rc=b[3]||a.H}function qd(a,b,c){c&&a.g||(a.$b=b[0]||a.K,a.ta=b[2]||a.L);if(c||void 0===c)a.nc=b[0]||a.K,a.oc=b[2]||a.L}function kd(a,b){b||(b=td);qd(a,b,void 0);od(a,b,void 0)} var td=[],nd=[J.prototype.T,J.prototype.xa,J.prototype.ca,J.prototype.Ma],pd=[J.prototype.O,J.prototype.na,J.prototype.Ua,J.prototype.Ba];if(Ab)var md=[J.prototype.M,J.prototype.ja,J.prototype.X,J.prototype.Aa],ld=[J.prototype.S,J.prototype.bb,J.prototype.ba,J.prototype.Ca]; -function ud(a,b){w.call(this,"CPU",a,ud,1);b=a.cycles||b;var c=a.multiplier||1;this.zb=0;this.pb=b;this.gb=c;this.Jb=Math.round(this.pb/1E4)/100;this.rb=this.Jb*this.gb;this.A.W=!1;this.A.bc=!1;this.A.xb=a.autoStart;this.A.yb=!1;this.Ob=this.Aa=0;this.Pb=a.csStart;this.Ab=a.csInterval;this.Bb=a.csStop;this.L=[];this.Gc=this.ge.bind(this);I(this)}A(ud);var vd=["power","reset"];k=ud.prototype; -k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Aa&&(a.Aa+=a.Ab,c=!0);0<=a.Bb&&a.Bb<=Bd(a)&&(a.Ab=a.Bb=-1,yd(a),a.da(),c=!0);c&&a.i(Bd(a)+" cycles: checksum="+p(a.Ob))}} +function ud(a,b){w.call(this,"CPU",a,ud,1);b=a.cycles||b;var c=a.multiplier||1;this.Ib=0;this.pb=b;this.gb=c;this.Kb=Math.round(this.pb/1E4)/100;this.sb=this.Kb*this.gb;this.A.W=!1;this.A.bc=!1;this.A.yb=a.autoStart;this.A.zb=!1;this.Ob=this.Aa=0;this.Pb=a.csStart;this.Ab=a.csInterval;this.Bb=a.csStop;this.L=[];this.Ic=this.ge.bind(this);I(this)}A(ud);var vd=["power","reset"];k=ud.prototype; +k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Aa&&(a.Aa+=a.Ab,c=!0);0<=a.Bb&&a.Bb<=Bd(a)&&(a.Ab=a.Bb=-1,yd(a),a.da(),c=!0);c&&a.i(Bd(a)+" cycles: checksum="+p(a.Ob))}} k.wa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.A.ia)a=!0;else{var b=null,c,h=sb(a.id);for(c=0;ca.xa/a.rb?b=1:d=!0;a.gb=b;b=a.Jb*a.gb;if(a.rb!=b){a.rb=b;b=a.rb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.ub()}Tb(a,a.X);a.X=0;a.T=Ba();a.ba=0;Dd(a);return d}function Ic(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Kc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.pb*a.gb/1E3*c|0,a.A.W&&(c+=Ed(a)),a.L[b][0]=c)} +!0;case "speed":return this.G[b]=c,!0;case "setSpeed":return this.G[b]=c,c.onclick=function(){Cd(d,d.gb<<1,!0)},c.textContent=this.sb.toFixed(2)+"Mhz",!0}return!1};k.ra=function(a){this.C&&this.C.ra(a)};function Tb(a,b,c){a.ja+=b;c&&(a.ca=a.b=a.I=0)}function Dd(a,b){var c=1;b&&1a.xa/a.sb?b=1:d=!0;a.gb=b;b=a.Kb*a.gb;if(a.sb!=b){a.sb=b;b=a.sb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.vb()}Tb(a,a.X);a.X=0;a.T=Ba();a.ba=0;Dd(a);return d}function Ic(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Kc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.pb*a.gb/1E3*c|0,a.A.W&&(c+=Ed(a)),a.L[b][0]=c)} function Fd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Sb(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ed(a,b){var c=a.ca-=a.b;a.b=a.I=0;b&&(a.ca=0);return c} -k.ge=function(){if(this.A.W){this.Kb>=this.pb&&Dd(this,!0);this.Va=0;this.nb=Ba();if(this.ba){var a=this.nb-this.ba;a>this.Dc&&(this.T+=a,this.T>this.nb&&(this.T=this.nb))}try{do{var b=Fd(this,this.A.yb?1:this.qb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=Ed(this,!0);this.Va+=b;this.X+=b;Ub(this,b);Sb(this,b);this.Ba-=b;if(0>=this.Ba){this.Ba+=this.qb;15<=++this.Fc&&(this.ra(),this.Fc=0);break}}while(this.A.W)}catch(e){this.da();this.C&&this.C.stop(Ba(),Bd(this));zb(this,e.stack||e.message); -return}if(this.A.W){a=setTimeout;b=this.Gc;this.ba=Ba();var c=this.Dc;this.Va&&(c=Math.round(c*this.Va/this.qb));var c=c-(this.ba-this.nb),d=this.ba-this.T;d&&(this.xa=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ja=0,Cd(this)));if(0>c||this.xac&&(this.T-=c),c=0;this.Kb+=this.Va;this.ba+=c;a(b,c)}}}; -k.jb=function(a){if(yb(this))return!1;if(this.A.W)return this.i(this.toString()+" busy"),!1;Cd(this);this.A.W=!0;this.A.bc=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.ub(!0),this.C.start(this.T,Bd(this)));setTimeout(this.Gc,0);return!0};k.kb=function(){return 0};k.da=function(a){var b=!1;if(this.A.W){Ed(this);Tb(this,this.X);this.X=0;this.A.W=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Ba(),Bd(this));b=!0}this.A.complete=a;return b}; -function Gd(a){this.fb=+a.model||1170;this.Bc=a.addrReset||0;ud.call(this,a,6666667);1120==this.fb?(this.decode=Hd.bind(this),this.na=this.Vc):(this.decode=Id.bind(this),this.na=this.Wc);Jd(this);this.K=0;this.O=null;this.A.complete=!1}A(Gd,ud);k=Gd.prototype;k.reset=function(){this.status("model "+this.fb);this.A.W&&this.da();Jd(this);xd(this);this.A.error=!1;this.parent.reset.call(this)}; -function Jd(a){a.U=65536;a.V=32768;a.$=65535;a.Z=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Bc];a.$a=[0,0,0,0,0,0];a.La=[0,0,0,0];a.B=0;a.lb=0;a.cd=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ha=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Sb= -[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Kc=[0,0,0,0,0,0,0,0];a.Jc=0;a.J=0;a.D=a.H=0;a.g=a.f=a.Ib=0;a.Ca=-1;Rb(a)}function Rb(a){a.za=0;a.Lb=0;a.lc=0;a.Ta=0;a.va=0;a.Rb=0;a.hb=255;a.M=0;a.mb=0;a.Ma=262143;a.Mb=0;a.pa=0;a.O=null;a.v&&Kd(a)}function Kd(a){a.M?(a.S=65536,a.Ac=a.Ta&16?4186112:253952,a.aa=a.ad,a.ta=a.de,a.Ub=a.Xe,wc(a.v,a.Ta&16?22:18)):(a.S=0,a.Ac=57344,a.aa=a.$c,a.ta=a.Ic,a.Ub=a.Pc,wc(a.v,16))} -function Wc(a){var b=a.za;b&57344||(b=b&-3199|a.mb<<5|a.lb<<1);return b}function Xc(a,b){b&=-3073;if(a.za!=b){b&57344&&!(a.za&57344)&&(a.Lb=a.pa>>16&65535,a.lc=a.pa&65535);a.za=b;a.mb=b>>5&3;a.lb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.M!=c&&(a.M=c,Kd(a))}}function Yc(a){a.za&57344||(a.Lb=a.pa>>16&65535);a=a.Lb;a&65280&&(a=(a<<8|a>>8)&65535);return a}function Zc(a){a.za&57344||(a.lc=a.pa&65535);return a.lc}function $c(a,b){1170>a.fb&&(b&=-49);a.Ta!=b&&(a.Ta=b,a.Ma=b&16?4194303:262143,Kd(a))} -k.wc=function(){return 0};k.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ja,this.gb]);a.set(2,Fc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];Cd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c=this.pb&&Dd(this,!0);this.Va=0;this.nb=Ba();if(this.ba){var a=this.nb-this.ba;a>this.Gc&&(this.T+=a,this.T>this.nb&&(this.T=this.nb))}try{do{var b=Fd(this,this.A.zb?1:this.qb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=Ed(this,!0);this.Va+=b;this.X+=b;Ub(this,b);Sb(this,b);this.Ba-=b;if(0>=this.Ba){this.Ba+=this.qb;15<=++this.Hc&&(this.ra(),this.Hc=0);break}}while(this.A.W)}catch(e){this.da();this.C&&this.C.stop(Ba(),Bd(this));zb(this,e.stack||e.message); +return}if(this.A.W){a=setTimeout;b=this.Ic;this.ba=Ba();var c=this.Gc;this.Va&&(c=Math.round(c*this.Va/this.qb));var c=c-(this.ba-this.nb),d=this.ba-this.T;d&&(this.xa=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ja=0,Cd(this)));if(0>c||this.xac&&(this.T-=c),c=0;this.Lb+=this.Va;this.ba+=c;a(b,c)}}}; +k.jb=function(a){if(yb(this))return!1;if(this.A.W)return this.i(this.toString()+" busy"),!1;Cd(this);this.A.W=!0;this.A.bc=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.vb(!0),this.C.start(this.T,Bd(this)));setTimeout(this.Ic,0);return!0};k.kb=function(){return 0};k.da=function(a){var b=!1;if(this.A.W){Ed(this);Tb(this,this.X);this.X=0;this.A.W=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Ba(),Bd(this));b=!0}this.A.complete=a;return b}; +function Gd(a){this.fb=+a.model||1170;this.Cc=a.addrReset||0;ud.call(this,a,6666667);this.rb=0;this.Fc=255;1120==this.fb?(this.decode=Hd.bind(this),this.na=this.Xc,this.rb=8,this.Fc=-1):(this.decode=Id.bind(this),this.na=this.Yc);Jd(this);this.K=0;this.O=null;this.A.complete=!1}A(Gd,ud);k=Gd.prototype;k.reset=function(){this.status("model "+this.fb);this.A.W&&this.da();Jd(this);xd(this);this.A.error=!1;this.parent.reset.call(this)}; +function Jd(a){a.U=65536;a.V=32768;a.$=65535;a.Z=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Cc,-1,-2,-3,-4,-5,-6,-7,-8];a.$a=[0,0,0,0,0,0];a.La=[0,0,0,0];a.B=0;a.lb=0;a.od=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ha=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0]];a.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Mc=[0,0,0,0,0,0,0,0];a.Lc=0;a.J=0;a.D=a.H=0;a.g=a.f=a.Jb=0;a.Ca=-1;Rb(a)}function Rb(a){a.za=0;a.lc=0;a.mc=0;a.Ta=0;a.va=0;a.Rb=0;a.hb=255;a.M=0;a.mb=0;a.Ma=262143;a.Mb=0;a.pa=0;a.O=null;a.v&&Kd(a)}function Kd(a){a.M?(a.S=65536,a.Bc=a.Ta&16?4186112:253952,a.aa=a.cd,a.ta=a.de,a.Ub=a.Ze,wc(a.v,a.Ta&16?22:18)):(a.S=0,a.Bc=57344,a.aa=a.bd,a.ta=a.Kc,a.Ub=a.Rc,wc(a.v,16))} +function Wc(a){var b=a.za;b&57344||(b=b&-3199|a.mb<<5|a.lb<<1);return b}function Xc(a,b){b&=-3073;if(a.za!=b){b&57344&&!(a.za&57344)&&(a.lc=a.pa>>16&65535,a.mc=a.pa&65535);a.za=b;a.mb=b>>5&3;a.lb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.M!=c&&(a.M=c,Kd(a))}}function Yc(a){a.za&57344||(a.lc=a.pa>>16&65535);a=a.lc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function Zc(a){a.za&57344||(a.mc=a.pa&65535);return a.mc}function $c(a,b){1170>a.fb&&(b&=-49);a.Ta!=b&&(a.Ta=b,a.Ma=b&16?4194303:262143,Kd(a))} +k.xc=function(){return 0};k.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ja,this.gb]);a.set(2,Fc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];Cd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.B!=c&&(a.La[c]=a.u[6],a.u[6]=a.La[a.B]);a.N=b;a.J|=2}function ad(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1)}a.Rb=b;a.J|=2}function S(a,b){a.J&128||(a.Z=a.$=b,a.V=0)}function ne(a,b,c){a.J&128||(a.Z=a.$=a.U=b,a.V=c||0)}function oe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^b)&(d^b))} -function pe(a,b){a.J&128||(a.Z=a.$=a.U=b,a.V=a.Z^a.U>>1)}function qe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^d)&(d^b))}k.qa=function(a,b,c){if(!this.K){0>this.Ca?this.Ca=bd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.va|=4,this.u[6]=4,d=!0);this.pa=a|4143316992;this.B=0;var e=this.ta(a|this.S),f=this.ta(a+2&65535|this.S);cd(this,f&-12289|this.Ca>>2&12288);re(this,this.Ca,d);re(this,this.u[7],d);R(this,e);this.J&=~(b|18);this.J|=9;this.Ca=-1;this.he=a;this.od=c;if(-3<=c)throw a;}}; +function pe(a,b){a.J&128||(a.Z=a.$=a.U=b,a.V=a.Z^a.U>>1)}function qe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^d)&(d^b))}k.qa=function(a,b,c){if(!this.K){0>this.Ca?this.Ca=bd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.va|=4,this.u[6]=4,d=!0);this.pa=a|4143316992;this.B=0;var e=this.ta(a|this.S),f=this.ta(a+2&65535|this.S);cd(this,f&-12289|this.Ca>>2&12288);re(this,this.Ca,d);re(this,this.u[7],d);R(this,e);this.J&=~(b|18);this.J|=9;this.Ca=-1;this.ke=a;this.ie=c;if(-3<=c)throw a;}}; function se(a){var b=te(a),c=te(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);R(a,b);cd(a,c);a.J&=-17}function Ec(a,b){var c=b>>13&31;31>c&&(b=a.Ta&32?a.Sb[c]+(b&8190)&4194302:b&-3932161);return b} -function ue(a,b,c){var d,e,f;if(!(c&a.M))return f=b&65535,57344<=f&&(f|=a.Ac),f;d=b>>13;a.Ta&a.cd[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ha[a.B][d]<<6)+(b&8191)&a.Ma;if(a.K)return f;f&1&&!(c&1)&&(a.va|=64,a.qa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.B][d]=e;if(f!=(4194170&a.Ma)||a.B)a.mb= +function ue(a,b,c){var d,e,f;if(!(c&a.M))return f=b&65535,57344<=f&&(f|=a.Bc),f;d=b>>13;a.Ta&a.od[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ha[a.B][d]<<6)+(b&8191)&a.Ma;if(a.K)return f;f&1&&!(c&1)&&(a.va|=64,a.qa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.B][d]=e;if(f!=(4194170&a.Ma)||a.B)a.mb= a.B,a.lb=d;g&&(g&57344&&(0<=a.Ca&&(g|=128),a.za&57344||(g|=a.za&4096|a.mb<<5|a.lb<<1,Xc(a,a.za&-61695|g&61694)),a.qa(168,64,-1)),a.za&61440||!(f<(4191360&a.Ma)||f>(4194239&a.Ma))||(a.za|=4096,a.za&512&&(a.J|=64)));return f}function ve(a,b){return a.v.Yb(b)}function te(a){var b=a.ta(a.u[6]|a.S);a.u[6]=a.u[6]+2&65535;return b}function re(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.pa=a.pa&65535|(a.pa&-65536)<<8|16121856;c||a.na(4,-2,d);a.Ub(d,b)} function we(a,b,c,d){var e,f,g=d&8?0:a.S;switch(b){case 0:return a.qa(4,0,-2),0;case 1:return 6==c&&a.na(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.na(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.ta(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.na(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.ta(e)|g;a.b-=8;break;case 6:return e=a.ta(Qd(a,2)),e=e+a.u[c]&65535,6==c&&a.na(d, -0,e),a.b-=6,e|g;case 7:return e=a.ta(Qd(a,2)),e=e+a.u[c]&65535,e=a.ta(e|a.S),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.pa=a.pa&65535|(a.pa&-65536)<<8|(f<<3&248|c)<<16;return e}k.Vc=function(a,b,c){!this.B&&0>=b&&c<=this.hb&&(this.J|=32)};k.Wc=function(a,b,c){!this.B&&a&4&&c<=this.hb&&(c<=this.hb-32?this.qa(4,0,-3):(this.va|=8,this.J|=32))};k.Zb=function(a){if(!this.M)return this.v.Zb(a);this.K++;a=ve(this,ue(this,a,3));this.K--;return a}; -k.Ya=function(a){if(!this.M)return this.v.Ya(a);this.K++;a=this.Ic(ue(this,a,2));this.K--;return a};k.tb=function(a,b){this.M?(this.K++,a=ue(this,a,5),a&1&&this.b--,this.v.Fb(a,b),this.K--):this.v.tb(a,b)};k.wb=function(a,b){this.M?(this.K++,this.Pc(ue(this,a,4),b),this.K--):this.v.wb(a,b)};k.$c=function(a,b,c){return we(this,a,b,c)};k.ad=function(a,b,c){return ue(this,we(this,a,b,c),c)};k.Ic=function(a){return this.v.oa(this.Mb=a)};k.de=function(a){return this.v.oa(this.Mb=ue(this,a,2))}; -k.Pc=function(a,b){this.v.vb(this.Mb=a,b&65535)};k.Xe=function(a,b){this.v.vb(this.Mb=ue(this,a,4),b)};function xe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=we(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.B=a.N>>12&3,c=a.ta(d|c&a.S),a.B=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.La[a.N>>12&3];return c} -function ye(a,b,c,d){a.pa=a.pa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=we(a,b,e,4),c&65536||(e&=65535),a.B=a.N>>12&3,e=ue(a,e|c&65536,4),a.B=a.N>>14&3,a.v.vb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.La[a.N>>12&3]=d}function ze(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ve(a,a.aa(b,c,3)):-c-1}function Ae(a,b){var c;b>>=6;var d=a.H=b&7;(b=a.D=(b&56)>>3)?c=a.v.oa(a.aa(b,d,2)):c=-d-1;return c}function Be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return we(a,b,c,8)} -function Ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ve(a,a.aa(b,c,3)):a.u[c]&255}function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.oa(a.aa(b,c,2)):a.u[c]}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ib=a.aa(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ve(a,e)),e&1&&a.b--,a.v.Fb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))} -function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.v.vb(e,d.call(a,0>c?a.u[-c-1]:c,a.v.oa(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Fb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Fe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,d,4),a.v.vb(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c} +0,e),a.b-=6,e|g;case 7:return e=a.ta(Qd(a,2)),e=e+a.u[c]&65535,e=a.ta(e|a.S),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.pa=a.pa&65535|(a.pa&-65536)<<8|(f<<3&248|c)<<16;return e}k.Xc=function(a,b,c){!this.B&&0>=b&&c<=this.hb&&(this.J|=32)};k.Yc=function(a,b,c){!this.B&&a&4&&c<=this.hb&&(c<=this.hb-32?this.qa(4,0,-3):(this.va|=8,this.J|=32))};k.Zb=function(a){if(!this.M)return this.v.Zb(a);this.K++;a=ve(this,ue(this,a,3));this.K--;return a}; +k.Ya=function(a){if(!this.M)return this.v.Ya(a);this.K++;a=this.Kc(ue(this,a,2));this.K--;return a};k.ub=function(a,b){this.M?(this.K++,a=ue(this,a,5),a&1&&this.b--,this.v.Fb(a,b),this.K--):this.v.ub(a,b)};k.xb=function(a,b){this.M?(this.K++,this.Rc(ue(this,a,4),b),this.K--):this.v.xb(a,b)};k.bd=function(a,b,c){return we(this,a,b,c)};k.cd=function(a,b,c){return ue(this,we(this,a,b,c),c)};k.Kc=function(a){return this.v.oa(this.Mb=a)};k.de=function(a){return this.v.oa(this.Mb=ue(this,a,2))}; +k.Rc=function(a,b){this.v.wb(this.Mb=a,b&65535)};k.Ze=function(a,b){this.v.wb(this.Mb=ue(this,a,4),b)};function xe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=we(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.B=a.N>>12&3,c=a.ta(d|c&a.S),a.B=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.La[a.N>>12&3];return c} +function ye(a,b,c,d){a.pa=a.pa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=we(a,b,e,4),c&65536||(e&=65535),a.B=a.N>>12&3,e=ue(a,e|c&65536,4),a.B=a.N>>14&3,a.v.wb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.La[a.N>>12&3]=d}function ze(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ve(a,a.aa(b,c,3)):a.u[c+a.rb]&a.Fc}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.v.oa(a.aa(b,c,2)):a.u[c+a.rb]}function Be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return we(a,b,c,8)} +function Ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ve(a,a.aa(b,c,3)):a.u[c]&255}function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.oa(a.aa(b,c,2)):a.u[c]}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Jb=a.aa(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ve(a,e)),e&1&&a.b--,a.v.Fb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))} +function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.v.wb(e,d.call(a,0>c?a.u[-c-1]:c,a.v.oa(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Fb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Fe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,d,4),a.v.wb(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c} function V(a,b,c){c&&(R(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.kb=function(a){this.A.complete=!0;var b=this.j?Ge(this.j)?1:this.A.bc?-1:0:0,c=a?this.A.bc?0:1:-1;this.A.bc=!1;this.ca=this.b=a;do{if(b){if(He(this.j,this.u[7],c)){this.da();break}c||c++;b++}if(this.J){if(a=this.J&7)if(a=!1,this.J&2){this.J&=-3;var d=160,e=(this.Rb&224)>>5,f=this.O&&this.O.Cb>e?this.O:null;f&&(d=f.je,e=f.Cb);e>(this.N&224)>>5?(this.J&4&&(Qd(this,2),this.J&=-5),this.qa(d,0,-9),e=!0):e=!1;e&&(f&&Rd(this,f),a=!0)}else this.J&1&&this.J++;if(a){if(b&&He(this.j,this.u[7],c)){this.da(); +k.kb=function(a){this.A.complete=!0;var b=this.j?Ge(this.j)?1:this.A.bc?-1:0:0,c=a?this.A.bc?0:1:-1;this.A.bc=!1;this.ca=this.b=a;do{if(b){if(He(this.j,this.u[7],c)){this.da();break}c||c++;b++}if(this.J){if(a=this.J&7)if(a=!1,this.J&2){this.J&=-3;var d=160,e=(this.Rb&224)>>5,f=this.O&&this.O.Cb>e?this.O:null;f&&(d=f.le,e=f.Cb);e>(this.N&224)>>5?(this.J&4&&(Qd(this,2),this.J&=-5),this.qa(d,0,-9),e=!0):e=!1;e&&(f&&Rd(this,f),a=!0)}else this.J&1&&this.J++;if(a){if(b&&He(this.j,this.u[7],c)){this.da(); break}if(0>c)break}if(this.J&112&&me(this)){if(b&&He(this.j,this.u[7],c)){this.da();break}if(0>c)break}}this.J=this.J&7|this.N&16;this.decode(Pd(this))}while(0>1|b<<16;pe(this,a);return a&65535}function Ne(a,b){a=b&128|b>>1|b<<8;pe(this,a<<8);return a&255}function Oe(a,b){a=b&~a;S(this,a);return a}function Pe(a,b){a=b&~a;S(this,a<<8);return a}function Qe(a,b){a|=b;S(this,a);return a}function Re(a,b){a|=b;S(this,a<<8);return a}function Se(a,b){a=~b|65536;ne(this,a);return a&65535} function Te(a,b){a=~b|256;ne(this,a<<8);return a&255}function Ue(a,b){a=b-a;this.J&128||(this.Z=this.$=a,this.V=b&(b^a));return a&65535}function Ve(a,b){a=b-a;var c=a<<8;b<<=8;this.J&128||(this.Z=this.$=c,this.V=b&(b^c));return a&255}function We(a,b){a=b+a;this.J&128||(this.Z=this.$=a,this.V=a&(b^a));return a&65535}function Xe(a,b){a=b+a;var c=a<<8;this.J&128||(this.Z=this.$=c,this.V=c&(b<<8^c));return a&255}function Ye(a,b){a=-b;ne(this,a,a&b&32768);return a&65535} @@ -153,34 +153,34 @@ function Mf(){this.N&49152?(this.va|=128,this.qa(4,0,-7)):(this.w&&1120==this.fb var Tf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Uf(a){var b=Ae(this,a);this.I=this.b;S(this,Fe(this,a,b));this.b=this.I-Tf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Vf(a){var b=ze(this,a);S(this,Ee(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Wf=[7,13,13,17,14,18,17,21]; function Xf(a){var b=De(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&128||(this.Z=b>>16,this.$=this.Z|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)R(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function dg(a){U(this,a,Ae(this,a),df);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function eg(a){U(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)}function fg(){this.qa(28,0,-8);this.b-=5} -function gg(){this.w&&(this.w.oc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=4;Qd(this,-2);this.b-=3}function hg(a){U(this,a,-(a>>6&7)-1,gf);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.j)b=this.j,H(b,1)?(F(b,"undefined opcode "+K(b,a),!0,!0),b=Nf(b)):b=!1;b||this.qa(8,0,-8)}function Hd(a){ig[a>>12].call(this,a)}function jg(a){kg[a>>6&3].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a&15].call(this,a)} -function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a>>6&3].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)} +function gg(){this.w&&(this.w.pc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=4;Qd(this,-2);this.b-=3}function hg(a){U(this,a,this.u[(a>>6&7)+this.rb],gf);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.j)b=this.j,H(b,1)?(F(b,"undefined opcode "+K(b,a),!0,!0),b=Nf(b)):b=!1;b||this.qa(8,0,-8)}function Hd(a){ig[a>>12].call(this,a)}function jg(a){kg[a>>6&3].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)} +function pg(a){qg[a&15].call(this,a)}function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a>>6&3].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)} var ig=[function(a){zg[a>>8&15].call(this,a)},Uf,If,rf,nf,pf,hf,W,function(a){Ag[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,dg,W],zg=[function(a){Bg[a>>4&15].call(this,a)},Ef,Bf,tf,uf,zf,vf,xf,Sf,Sf,jg,lg,ng,W,W,W],kg=[function(a){ne(this,Fe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,Ue);this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){U(this,a,0, Ye);this.b-=this.g?11:6},function(a){U(this,a,Ld(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,Ld(this)?1:0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=De(this,a);ne(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],og=[function(a){U(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,$e);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}], Bg=[function(a){Cg[a&15].call(this,a)},W,W,W,Qf,Qf,Qf,Qf,$f,W,pg,rg,eg,eg,eg,eg],Cg=[Mf,gg,ag,Df,Of,Zf,W,W,W,W,W,W,W,W,W,W],qg=[Yf,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},Hf,function(){this.$=1;this.b-=5},Hf,Hf,Hf,function(){this.Z=0;this.b-=5},Hf,Hf,Hf,Hf,Hf,Hf,Hf],sg=[Yf,function(){this.U=65536;this.b-=5},function(){this.V=32768;this.b-=5},bg,function(){this.$=0;this.b-=5},bg,bg,bg,function(){this.Z=32768;this.b-=5},bg,bg,bg,bg,bg,bg,bg],Ag=[Cf,Af,wf,yf,Ff,Gf,lf,mf,Lf,fg,tg, vg,xg,W,W,W],ug=[function(a){ne(this,Ee(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ve);this.b-=this.g?9:3+(7==this.f?2:0)}],wg=[function(a){T(this,a,0,Ze);this.b-=this.g?11:6},function(a){T(this,a,Ld(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,Ld(this)?1:0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ce(this, -a);ne(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],yg=[function(a){T(this,a,0,cf);this.b-=this.g?9+(this.Ib&1):3+(7==this.f?2:0)},function(a){T(this,a,0,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ne);this.b-=this.g?9+(this.Ib&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}];function Id(a){Dg[a>>12].call(this,a)} +a);ne(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],yg=[function(a){T(this,a,0,cf);this.b-=this.g?9+(this.Jb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ne);this.b-=this.g?9+(this.Jb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}];function Id(a){Dg[a>>12].call(this,a)} var Dg=[function(a){Eg[a>>8&15].call(this,a)},Uf,If,rf,nf,pf,hf,function(a){Fg[a>>8&15].call(this,a)},function(a){Gg[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,dg,W],Eg=[function(a){Hg[a>>4&15].call(this,a)},Ef,Bf,tf,uf,zf,vf,xf,Sf,Sf,jg,lg,ng,function(a){Ig[a>>6&3].call(this,a)},W,W],Ig=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ta(a|this.S);R(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xe(this,a,0);re(this,a);S(this,a);this.b-=11},function(a){var b=te(this);this.I= this.b;ye(this,a,0,b);S(this,b);this.b=this.I-Wf[this.g]},function(a){S(this,Fe(this,a,Od(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Hg=[function(a){Jg[a&15].call(this,a)},W,W,W,Qf,Qf,Qf,Qf,$f,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.J|=1),this.b-=5):W.call(this,a)},pg,rg,eg,eg,eg,eg],Jg=[Mf,gg,function(){se(this);this.J|=this.N&16;this.b-=13},Df,Of,Zf,ag,function(){this.qa(8,0,-8)},W,W,W,W,W,W,W,W],Fg=[Xf,Xf,Kf,Kf,jf,jf,kf,kf,hg,hg,W,W,W,W,cg,cg],Gg=[Cf,Af,wf,yf, Ff,Gf,lf,mf,Lf,fg,tg,vg,xg,function(a){Kg[a>>6&3].call(this,a)},W,W],Kg=[W,function(a){a=xe(this,a,65536);re(this,a);S(this,a);this.b-=11},function(a){var b=te(this);this.I=this.b;ye(this,a,65536,b);S(this,b);this.b=this.I-Wf[this.g]},W]; function Lg(a){w.call(this,"ROM",a,Lg,512);this.ga=this.g=null;this.B=a.addr;this.f=a.size;this.D=!1;this.w=a.alias;this.C=a.file;this.H=oa(this.C);if(this.C){a=this.C;var b=ta(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.R("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(kb(c.Ua,a,b),(a=Ea(a,b))?(c.g=a.ea,c.ga=a.ga):c.C=null);eh(c)})}}A(Lg);k=Lg.prototype; k.Ia=function(a,b,c,d){this.v=b;this.b=c;this.j=d;eh(this)};k.Ka=function(){this.ga&&(this.j&&fh(this.j,this.id,this.B,this.f,this.ga),delete this.ga);return!0};k.Ja=function(){return!0}; -function eh(a){if(!xb(a)){if(a.C){if(!a.g||!a.v)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)zb(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.B;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+pc){var c={};b=(c[b]=[Lg.prototype.Sd,Lg.prototype.Le,null,null,null,a.f>>1],c);if(Ib(a.v,a,b)){b=a.D=!0;break a}}else if(zc(a.v,b,a.f,jd)){for(c=0;c>1],c);if(Ib(a.v,a,b)){b=a.D=!0;break a}}else if(zc(a.v,b,a.f,jd)){for(c=0;c>>a.ka;0=b.length){F(a,"invalid block at offset "+q(m),1048576);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0=b.length){F(a,"insufficient data for block at offset "+q(m),1048576); -break}l+=b[h++]&255;if(l&255){F(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),1048576);break}if(v)for(F(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),1048576);v--;)a.b.tb(r++,b[t++]&255);else r&1?a.b.da():null==d&&(d=r),null!=d&&F(a,"starting address: "+q(d),1048576);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.na))});this.M=Lc(52,4);this.ja=Ic(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.M)});Ib(b,this,lh);Kb(b,this.reset.bind(this));I(this)}; -k.zc=function(){if(!this.I){var a=wd(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.bb)return;b=ya(b[1]);if(this.I=tb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ac=function(){if(!this.I){var a=wd(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.bb)return;b=ya(b[1]);if(this.I=tb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Ac(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ja=function(a){return a?this.save():!0};k.reset=function(){mh(this)};k.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};k.restore=function(){return mh(this)};function mh(a){a.K=0;a.f=0;a.g=128;a.B=[];return!0}k.ac=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.H%a,this.T&&(b=xa("",c)));this.S&&!this.H&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.i(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.ja,1E3/Math.round(this.ca/10))}};var nh={},lh=(nh[65392]=[null,null,X.prototype.Md,X.prototype.Fe,"RCSR"],nh[65394]=[null,null,X.prototype.Ld,X.prototype.Ee,"RBUF"],nh[65396]=[null,null,X.prototype.fe,X.prototype.Ze,"XCSR"],nh[65398]=[null,null,X.prototype.ee,X.prototype.Ye,"XBUF"],nh);$a(function(){for(var a=E(document,"pdp11","serial"),b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.H%a,this.T&&(b=xa("",c)));this.S&&!this.H&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.i(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.ja,1E3/Math.round(this.ca/10))}};var nh={},lh=(nh[65392]=[null,null,X.prototype.Md,X.prototype.He,"RCSR"],nh[65394]=[null,null,X.prototype.Ld,X.prototype.Ge,"RBUF"],nh[65396]=[null,null,X.prototype.fe,X.prototype.af,"XCSR"],nh[65398]=[null,null,X.prototype.ee,X.prototype.$e,"XBUF"],nh);$a(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&qh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;qh(d,oa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; @@ -192,16 +192,16 @@ function zh(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){va e.Na));a.A.eb=!1;a.D&&(a.D--,a.D||I(a));xh(a)})}function uh(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ya);for(d=0;d>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ya);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.jc?"":e)+"&format=json"));return!!Da(f, null,!0,function(b,c,d){Hh(a,b,c,d)})} -function Hh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ia;if(d)a.controller.R('Unable to load disk "'+a.ab+'" (error '+d+": "+b+")",f);else{kb(a.controller.Ua,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function Hh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ia;if(d)a.controller.R('Unable to load disk "'+a.ab+'" (error '+d+": "+b+")",f);else{kb(a.controller.Ua,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(h.length)if(1==h.length)u(h[0]);else{a.ya=h.length;a.Ea=h[0].length;a.sa=h[0][0].length;var l=h[0][0][0];a.Pa=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,z=t.length;z>2,e=Array(d),f=0;f>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Fa?f=a.Sa+a.Fa&&(a.Fa+=f-(a.Sa+a.Fa)+1):(a.Sa=f,a.Fa=1);d[f]=d[f]&~(255<g)break;e|=g<'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=la(c.value,10);null!=a&&Mh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&Nh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[la(a.value,10)||0])if(a=a.Ga){var b;b="";for(var c=0,h;h=Jh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Mh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Oh(this)};k.save=function(){return(new Q(this)).data()}; +k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.C.wc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Mh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Oh(this)};k.save=function(){return(new Q(this)).data()}; k.restore=function(a){return Oh(this,a[0])};function Rh(a,b){b||(a.H=0);if(a.w)for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.R("Unable to load the selected drive");else if(c)if("?"==c)a.R('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=oa(c);a.status("Attempting to load "+c+' as "'+b+'"')}Th(a,e,b,c,!1,d)}else Sh(a,e)} -function Th(a,b,c,d,e,f){var g=-1,h=a.f[b];h.ib.toLowerCase()!=d.toLowerCase()&&(g++,Sh(a,b,!0),h.ic?a.R("RL11 busy"):(h.ic=!0,e&&(h.hc=!0,a.H++,H(a)&&F(a,"auto-loading disk: "+c)),h.Vb=!!f,Gh(new Ch(a,h,"preload"),c,d,f,a.Zc)&&g++));return g} -k.Zc=function(a,b,c,d,e){var f;a.ic=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ya||f[1]>a.Ea)&&(this.R('Disk "'+c+'" too large for drive '+("RL"+a.kc)),b=null);b?(a.Ga=b,a.ab=c,a.ib=d,this.R('Mounted disk "'+c+'" in drive '+("RL"+a.kc),a.hc||e),this.C&&this.C.ub()):a.Vb=!1;a.hc&&(a.hc=!1,--this.H||I(this));Mh(this,a.kc)}; +function Th(a,b,c,d,e,f){var g=-1,h=a.f[b];h.ib.toLowerCase()!=d.toLowerCase()&&(g++,Sh(a,b,!0),h.ic?a.R("RL11 busy"):(h.ic=!0,e&&(h.hc=!0,a.H++,H(a)&&F(a,"auto-loading disk: "+c)),h.Vb=!!f,Gh(new Ch(a,h,"preload"),c,d,f,a.ad)&&g++));return g} +k.ad=function(a,b,c,d,e){var f;a.ic=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ya||f[1]>a.Ea)&&(this.R('Disk "'+c+'" too large for drive '+("RL"+a.kc)),b=null);b?(a.Ga=b,a.ab=c,a.ib=d,this.R('Mounted disk "'+c+'" in drive '+("RL"+a.kc),a.hc||e),this.C&&this.C.vb()):a.Vb=!1;a.hc&&(a.hc=!1,--this.H||I(this));Mh(this,a.kc)}; function Qh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.B=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.sd=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Ga.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ga.read(m,n++))||0>(t=a.Ga.read(m,n++))){h=5120;break}this.v.wb(f,r|t<<8);if(Hc(this.v)){h=8192;break}f+=2;if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ne=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Ya(f);if(Hc(this.v)){h=8192;break}f+=2;if(!m){m=a.Ga.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ga.write(m,n++,r&255)||!a.Ga.write(m,n++,r>>8)){h=5120;break}if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Pd=function(){return this.fa&65535}; -k.Ie=function(a){this.fa=this.fa&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.B&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.B=this.g&4?this.B+b:this.B-b,this.g=this.B=this.B&65408|c);break;case 8:this.D=this.B;break;case 12:b=this.sd;case 10:b||(b=this.ne),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.ya||f>=c.sa?this.fa|=37888: -(g=(this.K&63)<<16|this.I,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Xc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.O))}};k.Nd=function(){return this.I};k.Ge=function(a){this.I=a&65534};k.Qd=function(){return this.g};k.Je=function(a){this.g=a};k.Rd=function(){return this.D};k.Ke=function(a){this.D=a};k.Od=function(){return this.K};k.He=function(a){this.K=a&63}; -var Uh={},Ph=(Uh[63744]=[null,null,O.prototype.Pd,O.prototype.Ie,"RLCS"],Uh[63746]=[null,null,O.prototype.Nd,O.prototype.Ge,"RLBA"],Uh[63748]=[null,null,O.prototype.Qd,O.prototype.Je,"RLDA"],Uh[63750]=[null,null,O.prototype.Rd,O.prototype.Ke,"RLMP"],Uh[63752]=[null,null,O.prototype.Od,O.prototype.He,"RLBE"],Uh);function Vh(a){w.call(this,"Debugger",a,Vh);this.ca=a.base||16;this.Ca=!1;this.K=0;this.T=!1;this.B=-1;this.g=[];this.X={}}A(Vh); -var Wh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Vh.prototype.xc=function(){return-1};Vh.prototype.yc=function(){}; +function Oh(a,b){var c=0;b||(b=[]);a.fa=b[c++]||0;a.I=b[c++]||0;a.g=b[c++]||0;a.B=b[c++]||0;a.D=b[c++]||0;a.K=b[c]||0;for(b=0;b>12&48;this.K=f>>16&63;this.B=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.sd=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Ga.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ga.read(m,n++))||0>(t=a.Ga.read(m,n++))){h=5120;break}this.v.xb(f,r|t<<8);if(Hc(this.v)){h=8192;break}f+=2;if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.pe=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Ya(f);if(Hc(this.v)){h=8192;break}f+=2;if(!m){m=a.Ga.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ga.write(m,n++,r&255)||!a.Ga.write(m,n++,r>>8)){h=5120;break}if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Pd=function(){return this.fa&65535}; +k.Ke=function(a){this.fa=this.fa&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.B&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.B=this.g&4?this.B+b:this.B-b,this.g=this.B=this.B&65408|c);break;case 8:this.D=this.B;break;case 12:b=this.sd;case 10:b||(b=this.pe),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.ya||f>=c.sa?this.fa|=37888: +(g=(this.K&63)<<16|this.I,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Zc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.O))}};k.Nd=function(){return this.I};k.Ie=function(a){this.I=a&65534};k.Qd=function(){return this.g};k.Le=function(a){this.g=a};k.Rd=function(){return this.D};k.Me=function(a){this.D=a};k.Od=function(){return this.K};k.Je=function(a){this.K=a&63}; +var Uh={},Ph=(Uh[63744]=[null,null,O.prototype.Pd,O.prototype.Ke,"RLCS"],Uh[63746]=[null,null,O.prototype.Nd,O.prototype.Ie,"RLBA"],Uh[63748]=[null,null,O.prototype.Qd,O.prototype.Le,"RLDA"],Uh[63750]=[null,null,O.prototype.Rd,O.prototype.Me,"RLMP"],Uh[63752]=[null,null,O.prototype.Od,O.prototype.Je,"RLBE"],Uh);function Vh(a){w.call(this,"Debugger",a,Vh);this.ca=a.base||16;this.Ca=!1;this.K=0;this.T=!1;this.B=-1;this.g=[];this.X={}}A(Vh); +var Wh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Vh.prototype.yc=function(){return-1};Vh.prototype.zc=function(){}; function Xh(a,b,c,d){if(c)if(b){0>a.B&&a.g.length&&(a.B=0);if(0>a.B||b!=a.g[a.B])a.g.splice(0,0,b),a.B=0;a.B--}else a.T?b="end":b=a.g[a.B+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(ya(b.substring(c,f))),c=f+1}}return a} function Yh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} function Zh(a,b,c){var d;if(b){b=$h(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ci(a,b){if(b)return bi(a,b,a.X[b]);var c=0;for(b in a.X)bi(a,b,a.X[b]),c++;return 0this.b.fb?mi:[];Vc(this,64,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.aa(ni(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.ka;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Dc[c],n&&d.i(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} -k.yc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.$a[a-8];else if(20>a)b=this.b.La[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=bd(this.b);break;case 21:b=c.Rb;break;case 22:b=c.va;break;case 23:b=c.hb;break;case 24:b=Wc(c);break;case 25:b=Yc(c);break;case 26:b=Zc(c);break;case 27:b=c.Ta;break;case 28:d&&(b=d.ua);break;case 29:d&&(b=d.sb);break;case 30:d&&mc(d)&&(b=d.Za)}}return b}; +d.na.value="";Ad(d,a,!0);return!0}return!1}),!0;case "step":return this.G[b]=c,Ua(c,function(a){var b=!1;wb(d,!0)||(vb(d,!0),b=d.kb(a?1:0,null),vb(d,!1));return b}),!0}return!1};k.vb=function(a){if(this.na){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.na.focus();!a&&window&&window.scrollTo(b,c)}};k.aa=function(a){a=a&&a.F;null==a&&(a=-1);return a};k.Yb=function(a,b){var c=255,d=this.aa(a,!1,1);-1!==d&&(c=a.Wb?this.v.Zb(d):this.b.Zb(d),b&&oi(a,b));return c}; +k.oa=function(a,b){var c=65535,d=this.aa(a,!1,2);-1!==d&&(c=a.Wb?this.v.Ya(d):this.b.Ya(d),b&&oi(a,b));return c};k.Fb=function(a,b,c){var d=this.aa(a,!0,1);-1!==d&&(a.Wb?this.v.ub(d,b):this.b.ub(d,b),c&&oi(a,c),this.C.ra(-1))};k.wb=function(a,b,c){var d=this.aa(a,!0,2);-1!==d&&(a.Wb?this.v.xb(d,b):this.b.xb(d,b),c&&oi(a,c),this.C.ra(-1))};function Y(a,b){return{F:a,Wb:b,Ra:!1}}k.pc=function(a,b){a.F=b;a.Ra=!1;return a};function pi(a){return[a.F,a.Ra]}function qi(a){return{F:a[0],Ra:a[1]}} +function ni(a,b,c){var d,e=(c?a.L:a.mb).F;c=!1;if(void 0!==b){b=$h(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;ed&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} +k.zc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.$a[a-8];else if(20>a)b=this.b.La[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=bd(this.b);break;case 21:b=c.Rb;break;case 22:b=c.va;break;case 23:b=c.hb;break;case 24:b=Wc(c);break;case 25:b=Yc(c);break;case 26:b=Zc(c);break;case 27:b=c.Ta;break;case 28:d&&(b=d.ua);break;case 29:d&&(b=d.tb);break;case 30:d&&mc(d)&&(b=d.Za)}}return b}; k.message=function(a,b){b&&(a+=" @"+K(this,Y(this.b.pa&65535).F));if(this.la&1073741824)this.Aa.push(a);else if(!this.ja||a!=this.ja){this.ja=a;b=!1;if(this.la&-2147483648&&this.b&&(b=this.b.A.W)||wb(this,!0))this.da(),b&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Ed(a),a.Ba=0,a.ra())}}; function fi(a){var b;if(!Ge(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ba=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.i("trapped to "+K(a,c&255,1)+" ("+(0>d?Bb[-d]:K(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.O?ui(a):vi(a)}}function ti(a,b){var c;(c=!a.b||!xb(a.b))||(c=a.b,c.A.ia?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!yb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.kb=function(a,b,c){if(!ti(this))return!1;null===b&&(b=!this.rb||"tr"==this.rb);this.K=0;a||Ge(this)&&He(this,this.b.u[7],0);try{a=Fd(this.b,a);var d=this.b.kb(a);0>8;a.i("trapped to "+K(a,c&255,1)+" ("+(0>d?Bb[-d]:K(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.O?ui(a):vi(a)}}function ti(a,b){var c;(c=!a.b||!xb(a.b))||(c=a.b,c.A.ia?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!yb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){fi(this);this.Ba=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.W=!1;wi(this);a||zd(this)};k.save=function(){var a=new Q(this);a.set(0,pi(this.L));a.set(1,pi(this.S));a.set(2,[this.g,this.T,this.la]);a.set(3,this.I);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=qi(a[b++]),this.S=qi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.T=a[b][1],this.la|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.O||this.i("running");this.A.W=!0;this.Jb=a;this.Kb=b}; -k.stop=function(a,b){if(this.A.W){this.A.W=!1;this.K=b-this.Kb;if(!this.O){b="stopped";if(this.K){a-=this.Jb;var c=0d&&(d=a.b.Ya(b)),65535!=(d&65535)&&(a.oc(a.H[a.ba],b),++a.ba==a.H.length&&(a.ba=0)));return!1}function Nf(a){var b=a.b;if(b.A.W)throw R(b,a.b.pa&65535),a.da(),-1;return!1} +k.stop=function(a,b){if(this.A.W){this.A.W=!1;this.K=b-this.Kb;if(!this.O){b="stopped";if(this.K){a-=this.Jb;var c=0d&&(d=a.b.Ya(b)),65535!=(d&65535)&&(a.pc(a.H[a.ba],b),++a.ba==a.H.length&&(a.ba=0)));return!1}function Nf(a){var b=a.b;if(b.A.W)throw R(b,a.b.pa&65535),a.da(),-1;return!1} function ei(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.nb=0}k.ob=function(a,b,c){var d=!0;c||xi(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.i("invalid address: "+K(this,b.F)),d=!1;else{var f=this.v;f.Y[e>>>f.ka].ob(e&f.v,a==this.D)}}d&&(a.push(b),c?b.Ra=!0:(yi(this,a,a.length-1,"set"),fi(this)));return d}; -function xi(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.D));h.Ra||fi(a);break}}return f}function zi(a,b){for(var c=1;c>>d.ka],b==a.D));h.Ra||fi(a);break}}return f}function zi(a,b){for(var c=1;c>23)&65535,x=K(v,t);else if(8192==B)t=t.F-((f&63)<<1)&65535,x=K(v,t);else if(12288==B)x=K(v,f&7,1);else if(24576==B)x=K(v,f&63,1);else if(32768==B)x=K(v,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), z&63)switch(z=B&7,B&56){case 0:x=si(z);break;case 8:x="@"+si(z);break;case 16:7>z?x="("+si(z)+")+":(B=v.oa(t,2),x="#"+K(v,B,0,!0));break;case 24:7>z?x="@("+si(z)+")+":(B=v.oa(t,2),x="@#"+K(v,B,0,!0));break;case 32:x="-("+si(z)+")";break;case 40:x="@-("+si(z)+")";break;case 48:B=v.oa(t,2);x=K(v,B,0,!0)+"("+si(z)+")";7==z&&(x=K(v,B+t.F&65535));break;case 56:B=v.oa(t,2),x="@"+K(v,B)+"("+si(z)+")",7==z&&(x="@"+K(v,B+t.F&65535))}v=x;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]); -0b)c=si(b),c+="="+K(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+K(a,d.$a[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+K(a,d.La[b-16]);else switch(b){case 20:c="PS="+K(a,bd(d));break;case 21:c="IR="+K(a,d.Rb);break;case 22:c="ER="+K(a,d.va);break;case 23:c="SL="+K(a,d.hb);break;case 24:c="MMR0="+K(a,Wc(d));break;case 25:c="MMR1="+K(a,Yc(d));break;case 26:c="MMR2="+K(a,Zc(d));break;case 27:c="MMR3="+K(a,d.Ta);break;case 28:a.w&&(c="AR="+K(a,a.w.ua,3));break;case 29:a.w&& -(c="DR="+K(a,a.w.sb));break;case 30:a.w&&mc(a.w)&&(c="SR="+K(a,a.w.Za,3))}c&&(c+=" ");return c}function Di(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ci(a,"T")+Ci(a,"N")+Ci(a,"Z")+Ci(a,"V")+Ci(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({ef:b,F:c,bd:d,ga:e,rc:f})}function Ei(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.bd;if(e>=g&&ec;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ci(a,"T")+Ci(a,"N")+Ci(a,"Z")+Ci(a,"V")+Ci(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.uc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.uc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({gf:b,F:c,dd:d,ga:e,sc:f})}function Ei(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.dd;if(e>=g&&eb)){e.u[b]= +g);a.L=Y(e.u[7]);break;case "N":e.Z=g?32768:0;break;case "Z":e.$=g?0:1;break;case "V":e.V=g?32768:0;break;case "C":e.U=g?65536:0;break;case "PS":cd(e,g);break;case "IR":ad(e,g);break;case "ER":e.va=g;d=!0;break;case "SL":e.hb=g|255;break;case "MMR0":Xc(e,g);d=!0;break;case "MMR3":$c(e,g);d=!0;break;case "AR":a.w&&(d=a.w,jc(d,d.ua=g));d=!0;break;case "DR":a.w&&(d=a.w,ic(d,d.tb=g));d=!0;break;case "SR":if(a.w&&mc(a.w)){kc(a.w,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.u[b]= g&65535;break}a.i("unknown register: "+f);return}a.C.ra();a.i("updated registers:")}}a.i(Di(a,d));c&&(a.L=Y(e.u[7]),vi(a,K(a,a.L.F)))}}function Ii(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Bi(a,b,g,f);a.i(f);a.L=b;e-=b.F-l;c++}}} function Ai(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.T&&(a.i("ended assemble at "+K(a,a.S.F)),a.L=a.S,a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(xb(a)&&0n||"z"qa.length&&(a.i("note: only "+qa.length+" available"),ca=qa.length);ia-=ca;0>ia&&(null==qa[qa.length-1].F?(ca=ia+ca,ia=0):ia+=qa.length);var Ud=[];"call"==Rg&&(Wb=1E5,Ud=["CALL"]);for(void 0!==Qg&&a.i(ca+" instructions earlier:");0=qa.length&&(ia=0);a.pb=ca;Tg++;Wb--}}Tg||(a.i("no "+Sg+"history available"),a.pb=void 0)}else{var ob=ni(a,pa);if(ob){var Yb=0,Vd=!1,Wd="ds"==Pa;Qa&&(Vd=!0,"l"==Qa.charAt(0)&&(Vd=!1,Qa=Qa.substr(1)||bj),Yb=ai(a,Qa)>>>0,65536Zd?String.fromCharCode(Zd):"."),Oc=Oc>>8}Ra&&(Ra+="\n");Ra=Wd?Ra+(Sa+","):Ra+(pa+" "+Sa+(0==Nc?" "+Yd:""))}Ra&&a.i(Ra);a.mb=ob}}}}break;case "e":if("else"==g[0])break;var rb,$d,ae,be,ce=g[0],de=g[1];"eb"==ce?(rb=1,$d=255,ae=a.Yb,be=a.Fb):"e"==ce||"ew"==ce?(rb=2,$d=65535,ae=a.oa,be=a.vb):de=null;if(null==de)a.i("edit memory commands:"), +2),Zb=Zb|Oc<<($b<<3),$b=$b+qb;$b==pb&&(Wd?(Sa&&(Sa+=","),Sa+="0x"+p(Zb,2*pb)):(Sa+=K(a,Zb,pb),Sa+=1==pb?9==Nc?"-":" ":" "),Zb=$b=0);Nc-=qb;for(Mc-=qb;qb--;)var Zd=Oc&255,Yd=Yd+(32<=Zd&&128>Zd?String.fromCharCode(Zd):"."),Oc=Oc>>8}Ra&&(Ra+="\n");Ra=Wd?Ra+(Sa+","):Ra+(pa+" "+Sa+(0==Nc?" "+Yd:""))}Ra&&a.i(Ra);a.mb=ob}}}}break;case "e":if("else"==g[0])break;var rb,$d,ae,be,ce=g[0],de=g[1];"eb"==ce?(rb=1,$d=255,ae=a.Yb,be=a.Fb):"e"==ce||"ew"==ce?(rb=2,$d=65535,ae=a.oa,be=a.wb):de=null;if(null==de)a.i("edit memory commands:"), a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Pc=ni(a,de);if(Pc)for(var Qc=2;Qcge;){for(var Ta=null,gj=256;65536> cc.F>>>0;){he.F=a.oa(cc,2);if(null==cc.F||!gj--)break;if(!(he.F&1)){for(var hj=a,Rc=he,Xg=null,dc=Rc.F,Yg=dc,ie=1;6>=ie&&dc;ie++){if(2Ni){if(Pi(d,this.I)){this.B=new Q(this,"1.30.3","failsafe");Pi(this.B)&&(Ui(this,d),a=2,Vi(this.B));this.B.set("timestamp",Ca());Wi(this.B);var e=this.f&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ti(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pi(d,g):("error"== -f&&"no machine state"!=g?(this.R("Error: "+g),"unable to verify user"==g&&(La("user",""),this.g=null)):this.i(f+": "+g),Vi(d),Pi(d)?(c=Ti(d),e=!0):c=!1))}e&&Si(this,c?d:null)}else 2==a&&d.clear()}else Si(this);delete this.I;delete this.K}e=sb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Xi(this,this.b,b,c,a),this.ra(),this.b.xb());this.O&&(Ui(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; +f&&"no machine state"!=g?(this.R("Error: "+g),"unable to verify user"==g&&(La("user",""),this.g=null)):this.i(f+": "+g),Vi(d),Pi(d)?(c=Ti(d),e=!0):c=!1))}e&&Si(this,c?d:null)}else 2==a&&d.clear()}else Si(this);delete this.I;delete this.K}e=sb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Xi(this,this.b,b,c,a),this.ra(),this.b.yb());this.O&&(Ui(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; function Ui(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} function Ki(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.da(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=sb(a.id),l=0;l=c||30<=(b.zb+=c))&&(d.textContent=b.A.W?b.xa.toFixed(2)+"Mhz":"Stopped",b.zb=0)}if(this.w&&(b=this.w,a=a||0,b.D)){c=b.b.A.W;d=!!(b.b.J&4);if(0>=a||60<=(b.B+=a)){for(var e=0;e=c||30<=(b.Ib+=c))&&(d.textContent=b.A.W?b.xa.toFixed(2)+"Mhz":"Stopped",b.Ib=0)}if(this.w&&(b=this.w,a=a||0,b.D)){c=b.b.A.W;d=!!(b.b.J&4);if(0>=a||60<=(b.B+=a)){for(var e=0;e>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function t(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}xa=a}return xa} function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var x={init:[],show:[],exit:[]},Ca=!1,Da=!1,Ea=!0; function Fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ga(a){x.init.push(a)}function Ha(a){if(Ea)try{for(var b=0;bb?this.Fa=this.id:(this.ra=this.id.substr(0,b),this.Fa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Da:!1,ub:!1,N:!1,error:!1};this.nb=null;this.j.error=!1;this.o={};this.F=null;this.ud=d||0;z.push(this)}var Ka=void 0,La={}; +Fa(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ha(x.exit)});function y(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Vb=b.comment;this.oe=b;b=this.id.indexOf(".");0>b?this.Fa=this.id:(this.ra=this.id.substr(0,b),this.Fa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Da:!1,vb:!1,N:!1,error:!1};this.nb=null;this.j.error=!1;this.o={};this.F=null;this.xd=d||0;z.push(this)}var Ka=void 0,La={}; if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function A(a,b){b||(b=y);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},z=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function B(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.zc,a]}A(Ya);var Za=7;function $a(a,b){return a.b[b]&&a.b[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; -h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.f[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, +function Ya(a){y.call(this,"Panel",a,Ya,2048);this.ea=this.i=this.c=this.m=this.s=this.v=0;this.A=this.B=this.w=!1;this.D=Za;this.g={};this.b={START:[1,1,!0,!1,this.zc],STEP:[1,1,!1,!1,this.Ac],ENABLE:[1,1,!1,!1,this.vc],CONT:[1,1,!0,!1,this.tc],DEP:[0,0,!0,!1,this.uc],EXAM:[1,1,!0,!1,this.wc],LOAD:[1,1,!0,!1,this.yc],TEST:[0,0,!0,!1,this.xc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Bc,a]}A(Ya);var Za=7;function $a(a,b){return a.b[b]&&a.b[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.g[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ja=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.la=function(a,b){b||(hb(),this.reset());return!0};h.ka=function(){return!0}; -function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.f)ib(a,c,null!=b?b:a.f[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.b)jb(a,b,a.b[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.F&&a.F.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -function ab(a,b){var c=a.b[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.B="EXAM"==b)}function bb(a,b){var c=a.b[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.xc=function(a){a||this.a.j.P||(a=this.a,a.h.reset(),lb(a),$a(this,"ENABLE")&&mb(this.a))};h.yc=function(){};h.tc=function(a){a||G(this.a)}; -h.rc=function(a){if(!a&&!this.a.j.P)if($a(this,"ENABLE"))mb(this.a);else{a=this.F;var b;if(b=a)a.j.Da&&(a.j.ub=!0),b=!a.j.Da;if(b)Ua(a,!0),a.rb(0,null),Ua(a,!1);else try{var c=this.a.rb(1);0a;a++)this.b["S"+a][1]=0&1<a.a.La?8:16,c=65472<=a.ea&&a.ea<65472+b,b=c?1:2,c=c?15:a.h.pa;$a(a,"STEP")||(b=-b);sb(a,a.ea&~c|a.ea+b&c)}function sb(a,b){a.ea=b&a.h.pa;b=a.ea;for(var c=0;22>c;c++)tb(a,"A"+c,b&1<c;c++)tb(a,"D"+c,b&1<>2;this.l=this.b-1;this.A=this.B/this.b|0;this.Aa=[];this.f=0;this.m=!1;this.vb=0;this.w=[];this.hc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.F);this.h=Array(this.A);for(b=0;ba;a++)this.b["S"+a][1]=0&1<a.a.La?8:16,c=65472<=a.ea&&a.ea<65472+b,b=c?1:2,c=c?15:a.h.pa;$a(a,"STEP")||(b=-b);sb(a,a.ea&~c|a.ea+b&c)}function sb(a,b){a.ea=b&a.h.pa;b=a.ea;for(var c=0;22>c;c++)tb(a,"A"+c,b&1<c;c++)tb(a,"D"+c,b&1<>2;this.l=this.b-1;this.A=this.B/this.b|0;this.Aa=[];this.g=0;this.m=!1;this.wb=0;this.w=[];this.jc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.F);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Aa[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} function xb(a,b,c){var d=!1,e=this.controller,f=e.Aa[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Aa[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.Aa[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} function zb(a,b,c){var d=!1,e=this.controller;a=e.Aa[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.sb+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.sb){p=l.size-(f-n);p>g&&(p=g);l.sb=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.F,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.vb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} -function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Gb(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.pa)>>>a.c].V(b&a.l,b)}h.Ya=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.pa)>>>this.c;this.m=!1;this.f++;a=this.h[c].Xb(b,a);this.f--;return a}; -function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.pa)>>>a.c].Kb(b&a.l,c&255,b)}h.cb=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.h[(a&this.pa)>>>this.c].Lb(a&this.l,b&255,a);this.f--};function Ob(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.pa)>>>a.c].tb(b&a.l,c&65535,b)}h.eb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.pa)>>>this.c;this.m=!1;this.f++;this.h[d].fc(c,b&65535,a);this.f--}; -function Pb(a){for(var b=0,c=[],d=0;da.a.La)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,w=0;w>16&65535);a=a.Eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Mc=function(){var a=this.a;a.W&57344||(a.Fb=a.A&65535);return a.Fb};h.Nc=function(){return this.a.Ba}; -h.Jd=function(a){var b=this.a;1170>b.La&&(a&=-49);b.Ba!=a&&(b.Ba=a,b.Sa=a&16?4194303:262143,Yb(b))};h.od=function(a){a=a>>1&63;var b=this.a.fb[a>>1];return a&1?b>>16:b&65535};h.je=function(a,b){b=b>>1&63;var c=b>>1;this.a.fb[c]=b&1?this.a.fb[c]&65535|(a&63)<<16:this.a.fb[c]&-65536|a&65534};h.gd=function(a){return this.a.H[1][a>>1&7]};h.ce=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[1][(a>>1&7)+8]};h.ae=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.fd=function(a){return this.a.Y[1][a>>1&7]};h.be=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.dd=function(a){return this.a.Y[1][(a>>1&7)+8]};h.$d=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Hc=function(a){return this.a.H[0][a>>1&7]};h.Fd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Fc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Dd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Gc=function(a){return this.a.Y[0][a>>1&7]}; -h.Ed=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.Ec=function(a){return this.a.Y[0][(a>>1&7)+8]};h.Cd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.nd=function(a){return this.a.H[3][a>>1&7]};h.ie=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ld=function(a){return this.a.H[3][(a>>1&7)+8]};h.ge=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.md=function(a){return this.a.Y[3][a>>1&7]};h.he=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.kd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.fe=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Na=function(a){a&=7;return this.a.C&2048?this.a.Ea[a]:this.a.g[a]};h.Pa=function(a,b){b&=7;this.a.C&2048?this.a.Ea[b]=a:this.a.g[b]=a};h.Sc=function(){return this.a.C&49152?this.a.qa[0]:this.a.g[6]};h.Od=function(a){this.a.C&49152?this.a.qa[0]=a:this.a.g[6]=a};h.Vc=function(){return this.a.g[7]};h.Rd=function(a){this.a.g[7]=a}; -h.Oa=function(a){a&=7;return this.a.C&2048?this.a.g[a]:this.a.Ea[a]};h.Qa=function(a,b){b&=7;this.a.C&2048?this.a.g[b]=a:this.a.Ea[b]=a};h.Tc=function(){return 1==(this.a.C&49152)>>14?this.a.g[6]:this.a.qa[1]};h.Pd=function(a){1==(this.a.C&49152)>>14?this.a.g[6]=a:this.a.qa[1]=a};h.Uc=function(){return 3==(this.a.C&49152)>>14?this.a.g[6]:this.a.qa[3]};h.Qd=function(a){3==(this.a.C&49152)>>14?this.a.g[6]=a:this.a.qa[3]=a};h.Cc=function(a){return this.a.$b[a-65504>>1]}; -h.Ad=function(a,b){this.a.$b[b-65504>>1]=a};h.Wb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.vb}a=(a>>6)-1}else a=0;return a};h.ec=function(){};h.jd=function(){return 1};h.ee=function(){};h.Bc=function(){return this.a.fa};h.zd=function(){this.a.fa=0};h.Jc=function(){return this.a.Zb};h.Hd=function(a,b){b&1||(a&=255);this.a.Zb=a};h.Oc=function(a,b){return b?0:this.a.Hb};h.Kd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Hb=a;b.u|=2}; -h.hd=function(a,b){return b?0:this.a.bb&65280};h.de=function(a){this.a.bb=a|255};h.Rc=function(){return Zb(this.a)};h.Nd=function(a){$b(this.a,a&-1793|Zb(this.a)&1792);this.a.u|=128};h.dc=function(){}; -var M={},Wb=(M[61568]=[null,null,L.prototype.od,L.prototype.je,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.gd,L.prototype.ce,"SIPDR",8,1145,256],M[62608]=[null,null,L.prototype.ed,L.prototype.ae,"SDPDR",8,1145,256],M[62624]=[null,null,L.prototype.fd,L.prototype.be,"SIPAR",8,1145,256],M[62640]=[null,null,L.prototype.dd,L.prototype.$d,"SDPAR",8,1145,256],M[62656]=[null,null,L.prototype.Hc,L.prototype.Fd,"KIPDR",8,1145,256],M[62672]=[null,null,L.prototype.Fc,L.prototype.Dd,"KDPDR",8,1145,256], -M[62688]=[null,null,L.prototype.Gc,L.prototype.Ed,"KIPAR",8,1145,256],M[62704]=[null,null,L.prototype.Ec,L.prototype.Cd,"KDPAR",8,1145,256],M[62798]=[null,null,L.prototype.Nc,L.prototype.Jd,"MMR3",1,1145,256],M[65382]=[null,null,L.prototype.Ic,L.prototype.Gd,"LKS"],M[65402]=[null,null,L.prototype.Kc,L.prototype.Id,"MMR0",1,1145,256],M[65404]=[null,null,L.prototype.Lc,L.prototype.dc,"MMR1",1,1145,256],M[65406]=[null,null,L.prototype.Mc,L.prototype.dc,"MMR2",1,1145,256],M[65408]=[null,null,L.prototype.nd, -L.prototype.ie,"UIPDR",8,1145,256],M[65424]=[null,null,L.prototype.ld,L.prototype.ge,"UDPDR",8,1145,256],M[65440]=[null,null,L.prototype.md,L.prototype.he,"UIPAR",8,1145,256],M[65456]=[null,null,L.prototype.kd,L.prototype.fe,"UDPAR",8,1145,256],M[65472]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET0"],M[65473]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET0"],M[65474]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET0"],M[65475]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET0"],M[65476]=[null,null, -L.prototype.Na,L.prototype.Pa,"R4SET0"],M[65477]=[null,null,L.prototype.Na,L.prototype.Pa,"R5SET0"],M[65478]=[null,null,L.prototype.Sc,L.prototype.Od,"R6KERNEL"],M[65479]=[null,null,L.prototype.Vc,L.prototype.Rd,"R7KERNEL"],M[65480]=[null,null,L.prototype.Oa,L.prototype.Qa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Oa,L.prototype.Qa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Oa,L.prototype.Qa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Oa,L.prototype.Qa,"R3SET1",1,1145],M[65484]= -[null,null,L.prototype.Oa,L.prototype.Qa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Oa,L.prototype.Qa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Tc,L.prototype.Pd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Uc,L.prototype.Qd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.Cc,L.prototype.Ad,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Wb,L.prototype.ec,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Wb,L.prototype.ec,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.jd,L.prototype.ee, -"SYSID",1,1170],M[65526]=[null,null,L.prototype.Bc,L.prototype.zd,"CPUERR",1,1170],M[65528]=[null,null,L.prototype.Jc,L.prototype.Hd,"MB",1,1170],M[65530]=[null,null,L.prototype.Oc,L.prototype.Kd,"PIR"],M[65532]=[null,null,L.prototype.hd,L.prototype.de,"SL"],M[65534]=[null,null,L.prototype.Rc,L.prototype.Nd,"PSW"],M); +function Fb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.tb+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.tb){p=l.size-(f-n);p>g&&(p=g);l.tb=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.F,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.wb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Hb(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.pa)>>>a.c].V(b&a.l,b)}h.Ya=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.pa)>>>this.c;this.m=!1;this.g++;a=this.h[c].Xb(b,a);this.g--;return a}; +function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.pa)>>>a.c].Lb(b&a.l,c&255,b)}h.cb=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.g++;this.h[(a&this.pa)>>>this.c].Mb(a&this.l,b&255,a);this.g--};function Ob(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.pa)>>>a.c].ub(b&a.l,c&65535,b)}h.eb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.pa)>>>this.c;this.m=!1;this.g++;this.h[d].hc(c,b&65535,a);this.g--}; +function Pb(a){for(var b=0,c=[],d=0;da.a.La)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,w=0;w>16&65535);a=a.Fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Oc=function(){var a=this.a;a.W&57344||(a.Gb=a.A&65535);return a.Gb};h.Pc=function(){return this.a.Ba}; +h.Jd=function(a){var b=this.a;1170>b.La&&(a&=-49);b.Ba!=a&&(b.Ba=a,b.Sa=a&16?4194303:262143,Yb(b))};h.qd=function(a){a=a>>1&63;var b=this.a.fb[a>>1];return a&1?b>>16:b&65535};h.je=function(a,b){b=b>>1&63;var c=b>>1;this.a.fb[c]=b&1?this.a.fb[c]&65535|(a&63)<<16:this.a.fb[c]&-65536|a&65534};h.jd=function(a){return this.a.H[1][a>>1&7]};h.ce=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.gd=function(a){return this.a.H[1][(a>>1&7)+8]};h.ae=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.hd=function(a){return this.a.Y[1][a>>1&7]};h.be=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.fd=function(a){return this.a.Y[1][(a>>1&7)+8]};h.$d=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Jc=function(a){return this.a.H[0][a>>1&7]};h.Fd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Hc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Dd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ic=function(a){return this.a.Y[0][a>>1&7]}; +h.Ed=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.Gc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.Cd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.pd=function(a){return this.a.H[3][a>>1&7]};h.ie=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.nd=function(a){return this.a.H[3][(a>>1&7)+8]};h.ge=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.od=function(a){return this.a.Y[3][a>>1&7]};h.he=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.md=function(a){return this.a.Y[3][(a>>1&7)+8]};h.fe=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Na=function(a){a&=7;return this.a.C&2048?this.a.Ea[a]:this.a.f[a]};h.Pa=function(a,b){b&=7;this.a.C&2048?this.a.Ea[b]=a:this.a.f[b]=a};h.Uc=function(){return this.a.C&49152?this.a.qa[0]:this.a.f[6]};h.Od=function(a){this.a.C&49152?this.a.qa[0]=a:this.a.f[6]=a};h.Xc=function(){return this.a.f[7]};h.Rd=function(a){this.a.f[7]=a}; +h.Oa=function(a){a&=7;return this.a.C&2048?this.a.f[a]:this.a.Ea[a]};h.Qa=function(a,b){b&=7;this.a.C&2048?this.a.f[b]=a:this.a.Ea[b]=a};h.Vc=function(){return 1==(this.a.C&49152)>>14?this.a.f[6]:this.a.qa[1]};h.Pd=function(a){1==(this.a.C&49152)>>14?this.a.f[6]=a:this.a.qa[1]=a};h.Wc=function(){return 3==(this.a.C&49152)>>14?this.a.f[6]:this.a.qa[3]};h.Qd=function(a){3==(this.a.C&49152)>>14?this.a.f[6]=a:this.a.qa[3]=a};h.Ec=function(a){return this.a.$b[a-65504>>1]}; +h.Ad=function(a,b){this.a.$b[b-65504>>1]=a};h.Wb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.wb}a=(a>>6)-1}else a=0;return a};h.gc=function(){};h.ld=function(){return 1};h.ee=function(){};h.Dc=function(){return this.a.fa};h.zd=function(){this.a.fa=0};h.Lc=function(){return this.a.Zb};h.Hd=function(a,b){b&1||(a&=255);this.a.Zb=a};h.Qc=function(a,b){return b?0:this.a.Ib};h.Kd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ib=a;b.u|=2}; +h.kd=function(a,b){return b?0:this.a.bb&65280};h.de=function(a){this.a.bb=a|255};h.Tc=function(){return Zb(this.a)};h.Nd=function(a){$b(this.a,a&-1793|Zb(this.a)&1792);this.a.u|=128};h.fc=function(){}; +var M={},Wb=(M[61568]=[null,null,L.prototype.qd,L.prototype.je,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.jd,L.prototype.ce,"SIPDR",8,1145,256],M[62608]=[null,null,L.prototype.gd,L.prototype.ae,"SDPDR",8,1145,256],M[62624]=[null,null,L.prototype.hd,L.prototype.be,"SIPAR",8,1145,256],M[62640]=[null,null,L.prototype.fd,L.prototype.$d,"SDPAR",8,1145,256],M[62656]=[null,null,L.prototype.Jc,L.prototype.Fd,"KIPDR",8,1145,256],M[62672]=[null,null,L.prototype.Hc,L.prototype.Dd,"KDPDR",8,1145,256], +M[62688]=[null,null,L.prototype.Ic,L.prototype.Ed,"KIPAR",8,1145,256],M[62704]=[null,null,L.prototype.Gc,L.prototype.Cd,"KDPAR",8,1145,256],M[62798]=[null,null,L.prototype.Pc,L.prototype.Jd,"MMR3",1,1145,256],M[65382]=[null,null,L.prototype.Kc,L.prototype.Gd,"LKS"],M[65402]=[null,null,L.prototype.Mc,L.prototype.Id,"MMR0",1,1145,256],M[65404]=[null,null,L.prototype.Nc,L.prototype.fc,"MMR1",1,1145,256],M[65406]=[null,null,L.prototype.Oc,L.prototype.fc,"MMR2",1,1145,256],M[65408]=[null,null,L.prototype.pd, +L.prototype.ie,"UIPDR",8,1145,256],M[65424]=[null,null,L.prototype.nd,L.prototype.ge,"UDPDR",8,1145,256],M[65440]=[null,null,L.prototype.od,L.prototype.he,"UIPAR",8,1145,256],M[65456]=[null,null,L.prototype.md,L.prototype.fe,"UDPAR",8,1145,256],M[65472]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET0"],M[65473]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET0"],M[65474]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET0"],M[65475]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET0"],M[65476]=[null,null, +L.prototype.Na,L.prototype.Pa,"R4SET0"],M[65477]=[null,null,L.prototype.Na,L.prototype.Pa,"R5SET0"],M[65478]=[null,null,L.prototype.Uc,L.prototype.Od,"R6KERNEL"],M[65479]=[null,null,L.prototype.Xc,L.prototype.Rd,"R7KERNEL"],M[65480]=[null,null,L.prototype.Oa,L.prototype.Qa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Oa,L.prototype.Qa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Oa,L.prototype.Qa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Oa,L.prototype.Qa,"R3SET1",1,1145],M[65484]= +[null,null,L.prototype.Oa,L.prototype.Qa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Oa,L.prototype.Qa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Vc,L.prototype.Pd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Wc,L.prototype.Qd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.Ec,L.prototype.Ad,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Wb,L.prototype.gc,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Wb,L.prototype.gc,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.ld,L.prototype.ee, +"SYSID",1,1170],M[65526]=[null,null,L.prototype.Dc,L.prototype.zd,"CPUERR",1,1170],M[65528]=[null,null,L.prototype.Lc,L.prototype.Hd,"MB",1,1170],M[65530]=[null,null,L.prototype.Qc,L.prototype.Kd,"PIR"],M[65532]=[null,null,L.prototype.kd,L.prototype.de,"SL"],M[65534]=[null,null,L.prototype.Tc,L.prototype.Nd,"PSW"],M); Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),hc(this,dc?ic:jc);else{a=this.a=Array(this.size>> +function I(a,b,c,d,e,f){this.h=a;this.id=ec+=2;this.a=null;this.Ka=b;this.tb=c;this.size=d||0;this.type=e||fc;this.l=e==gc;this.controller=null;Ab(this);this.wa=this.pc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],hc(this,f.jc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),hc(this,dc?ic:jc);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.wa=!0},D:function(a,b){return this.I(a,b)},R:function(a,b){return this.Xb(a,b)},na:function(a,b,c){this.l?this.f(a,b,c):this.Lb(a,b,c)},ua:function(a,b,c){this.l?this.f(a,b,c):this.fc(a,b,c)},B:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ma:function(a,b){this.o[a]=b;this.wa=!0},ra:function(a,b){this.o[a]=b;this.wa=!0},ta:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.wa=!0},va:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.wa=!0}};function Ab(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&nc(a,oc,!1),(a.m=c.m)&&pc(a,oc,!1))}function pc(a,b,c){c&&a.m||(a.Kb=!a.l&&b[1]||a.f,a.tb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Lb=b[1]||a.f,a.fc=b[3]||a.A}function nc(a,b,c){c&&a.i||(a.Gb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Xb=b[2]||a.w}function hc(a,b){b||(b=qc);nc(a,b,void 0);pc(a,b,void 0)} +I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Xa)for(a=Array(this.size>>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.wa=!0},D:function(a,b){return this.I(a,b)},R:function(a,b){return this.Xb(a,b)},na:function(a,b,c){this.l?this.g(a,b,c):this.Mb(a,b,c)},ua:function(a,b,c){this.l?this.g(a,b,c):this.hc(a,b,c)},B:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ma:function(a,b){this.o[a]=b;this.wa=!0},ra:function(a,b){this.o[a]=b;this.wa=!0},ta:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.wa=!0},va:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.wa=!0}};function Ab(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&nc(a,oc,!1),(a.m=c.m)&&pc(a,oc,!1))}function pc(a,b,c){c&&a.m||(a.Lb=!a.l&&b[1]||a.g,a.ub=!a.l&&b[3]||a.A);if(c||void 0===c)a.Mb=b[1]||a.g,a.hc=b[3]||a.A}function nc(a,b,c){c&&a.i||(a.Hb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Xb=b[2]||a.w}function hc(a,b){b||(b=qc);nc(a,b,void 0);pc(a,b,void 0)} var qc=[],mc=[I.prototype.M,I.prototype.sa,I.prototype.ba,I.prototype.za],oc=[I.prototype.D,I.prototype.na,I.prototype.R,I.prototype.ua];if(Xa)var jc=[I.prototype.B,I.prototype.ma,I.prototype.O,I.prototype.ta],ic=[I.prototype.J,I.prototype.ra,I.prototype.aa,I.prototype.va]; -function rc(a,b){y.call(this,"CPU",a,rc,1);b=a.cycles||b;var c=a.multiplier||1;this.Ab=0;this.ob=b;this.ua=c;this.Cb=Math.round(this.ob/1E4)/100;this.Ha=this.Cb*this.ua;this.j.P=!1;this.j.Ib=!1;this.j.Wa=a.autoStart;this.j.ib=!1;this.kb=this.Ia=0;this.mb=a.csStart;this.Ta=a.csInterval;this.Ua=a.csStop;this.J=[];this.cc=this.sd.bind(this);F(this)}A(rc);var sc=["power","reset"];h=rc.prototype; +function rc(a,b){y.call(this,"CPU",a,rc,1);b=a.cycles||b;var c=a.multiplier||1;this.Bb=0;this.ob=b;this.ua=c;this.Db=Math.round(this.ob/1E4)/100;this.Ha=this.Db*this.ua;this.j.P=!1;this.j.Jb=!1;this.j.Wa=a.autoStart;this.j.ib=!1;this.kb=this.Ia=0;this.mb=a.csStart;this.Ta=a.csInterval;this.Ua=a.csStop;this.J=[];this.ec=this.ud.bind(this);F(this)}A(rc);var sc=["power","reset"];h=rc.prototype; h.ja=function(a,b,c,d){this.l=a;this.h=b;this.F=d;this.w=a.w;for(b=0;b=a.Ia&&(a.Ia+=a.Ta,c=!0);0<=a.Ua&&a.Ua<=wc(a)&&(a.Ta=a.Ua=-1,vc(a),G(a),c=!0);c&&a.T(wc(a)+" cycles: checksum="+m(a.kb))}} +h.Wa=function(){return this.j.Wa||void 0===this.o.run?(mb(this),!0):!1};h.Qb=function(){return 0};function vc(a){void 0===a.mb&&(a.mb=0);void 0===a.Ta&&(a.Ta=-1);void 0===a.Ua&&(a.Ua=-1);a.j.ib=0<=a.mb&&0=a.Ia&&(a.Ia+=a.Ta,c=!0);0<=a.Ua&&a.Ua<=wc(a)&&(a.Ta=a.Ua=-1,vc(a),G(a),c=!0);c&&a.T(wc(a)+" cycles: checksum="+m(a.kb))}} h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.N)a=!0;else{var b=null,c,k=B(a.id);for(c=0;ca.Ga/a.Ha&&(b=1);a.ua=b;b=a.Cb*a.ua;if(a.Ha!=b){a.Ha=b;b=a.Ha.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&zc(a.l)}ob(a,a.na);a.na=0;a.ba=ra();a.sa=0;yc(a)}function Sb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Ub(a,b,c,d){0<=b&&ba.J[b][0])&&(c=a.ob*a.ua/1E3*c|0,a.j.P&&(c+=Ac(a)),a.J[b][0]=c)} +c,!0;case "setSpeed":return this.o[b]=c,c.onclick=function(){xc(d,d.ua<<1,!0)},c.textContent=this.Ha.toFixed(2)+"Mhz",!0}return!1};h.ya=function(a){this.l&&this.l.ya(a)};function ob(a,b,c){a.va+=b;c&&(a.ta=a.a=a.I=0)}function yc(a,b){var c=1;b&&1a.Ga/a.Ha&&(b=1);a.ua=b;b=a.Db*a.ua;if(a.Ha!=b){a.Ha=b;b=a.Ha.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&zc(a.l)}ob(a,a.na);a.na=0;a.ba=ra();a.sa=0;yc(a)}function Sb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Ub(a,b,c,d){0<=b&&ba.J[b][0])&&(c=a.ob*a.ua/1E3*c|0,a.j.P&&(c+=Ac(a)),a.J[b][0]=c)} function nb(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ac(a,b){var c=a.ta-=a.a;a.a=a.I=0;b&&(a.ta=0);return c} -h.sd=function(){if(this.j.P){this.Db>=this.ob&&yc(this,!0);this.Va=0;this.jb=ra();if(this.sa){var a=this.jb-this.sa;a>this.Vb&&(this.ba+=a,this.ba>this.jb&&(this.ba=this.jb))}try{do{for(var b,c=this.j.ib?1:this.pb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(f){if("number"!=typeof f)throw f;}b=Ac(this,!0);this.Va+=b;this.na+=b;pb(this,b);nb(this,b);this.Ra-=b;if(0>=this.Ra){this.Ra+=this.pb;15<=++this.bc&&(this.ya(),this.bc=0);break}}while(this.j.P)}catch(f){G(this); -this.l&&this.l.stop(ra(),wc(this));Wa(this,f.stack||f.message);return}if(this.j.P){a=setTimeout;b=this.cc;this.sa=ra();c=this.Vb;this.Va&&(c=Math.round(c*this.Va/this.pb));c-=this.sa-this.jb;if(d=this.sa-this.ba)this.Ga=Math.round(this.na/(10*d))/100,864E5<=d&&(this.va=0,xc(this));if(0>c||this.Gac&&(this.ba-=c),c=0;this.Db+=this.Va;this.sa+=c;a(b,c)}}}; -function mb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.P)a.T(a.toString()+" busy");else{xc(a);a.j.P=!0;a.j.Ib=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.ba,wc(a));setTimeout(a.cc,0)}}h.rb=function(){return 0};function G(a){var b=!1;if(a.j.P){Ac(a);ob(a,a.na);a.na=0;a.j.P=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),wc(a));b=!0}a.j.complete=void 0;return b} -function Bc(a){this.La=+a.model||1170;this.Tb=a.addrReset||0;rc.call(this,a,6666667);1120==this.La?(this.decode=Cc.bind(this),this.za=this.kc):(this.decode=Dc.bind(this),this.za=this.lc);Ec(this);this.ma=0;this.O=null;this.j.complete=!1}A(Bc,rc);h=Bc.prototype;h.reset=function(){this.status("model "+this.La);this.j.P&&G(this);Ec(this);uc(this);this.j.error=!1;this.parent.reset.call(this)}; -function Ec(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.C=15;a.g=[0,0,0,0,0,0,0,a.Tb];a.Ea=[0,0,0,0,0,0];a.qa=[0,0,0,0];a.v=0;a.hb=0;a.vd=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.fb= -[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.$b=[0,0,0,0,0,0,0,0];a.Zb=0;a.u=0;a.B=a.D=0;a.c=a.b=a.Bb=0;a.Ja=-1;lb(a)}function lb(a){a.W=0;a.Eb=0;a.Fb=0;a.Ba=0;a.fa=0;a.Hb=0;a.bb=255;a.aa=0;a.gb=0;a.Sa=262143;a.Za=0;a.A=0;a.O=null;a.h&&Yb(a)}function Yb(a){a.aa?(a.R=65536,a.Sb=a.Ba&16?4186112:253952,a.M=a.qc,a.V=a.pd,a.tb=a.ke,Cb(a.h,a.Ba&16?22:18)):(a.R=0,a.Sb=57344,a.M=a.pc,a.V=a.Yb,a.tb=a.gc,Cb(a.h,16))} -function Xb(a,b){b&=-3073;if(a.W!=b){b&57344&&!(a.W&57344)&&(a.Eb=a.A>>16&65535,a.Fb=a.A&65535);a.W=b;a.gb=b>>5&3;a.hb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.aa!=c&&(a.aa=c,Yb(a))}}h.Pb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.va,this.ua]);a.set(2,Pb(this.h));return a.data()}; -h.restore=function(a){var b=a[1];this.va=b[1];xc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.C>>14&3;a.v!=c&&(a.qa[c]=a.g[6],a.g[6]=a.qa[a.v]);a.C=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Kc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Lc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))} -function Mc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Nc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))}function K(a,b,c,d){if(!a.ma){0>a.Ja?a.Ja=Zb(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.fa|=4,a.g[6]=4,e=!0);a.A=b|4143316992;a.v=0;var f=a.V(b|a.R),g=a.V(b+2&65535|a.R);$b(a,g&-12289|a.Ja>>2&12288);Oc(a,a.Ja,e);Oc(a,a.g[7],e);Q(a,f);a.u&=~(c|18);a.u|=9;a.Ja=-1;if(-3<=d)throw b;}}function Pc(a){var b=Qc(a),c=Qc(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);Q(a,b);$b(a,c);a.u&=-17} +h.ud=function(){if(this.j.P){this.Eb>=this.ob&&yc(this,!0);this.Va=0;this.jb=ra();if(this.sa){var a=this.jb-this.sa;a>this.cc&&(this.ba+=a,this.ba>this.jb&&(this.ba=this.jb))}try{do{for(var b,c=this.j.ib?1:this.pb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.sb(b)}catch(f){if("number"!=typeof f)throw f;}b=Ac(this,!0);this.Va+=b;this.na+=b;pb(this,b);nb(this,b);this.Ra-=b;if(0>=this.Ra){this.Ra+=this.pb;15<=++this.dc&&(this.ya(),this.dc=0);break}}while(this.j.P)}catch(f){G(this); +this.l&&this.l.stop(ra(),wc(this));Wa(this,f.stack||f.message);return}if(this.j.P){a=setTimeout;b=this.ec;this.sa=ra();c=this.cc;this.Va&&(c=Math.round(c*this.Va/this.pb));c-=this.sa-this.jb;if(d=this.sa-this.ba)this.Ga=Math.round(this.na/(10*d))/100,864E5<=d&&(this.va=0,xc(this));if(0>c||this.Gac&&(this.ba-=c),c=0;this.Eb+=this.Va;this.sa+=c;a(b,c)}}}; +function mb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.P)a.T(a.toString()+" busy");else{xc(a);a.j.P=!0;a.j.Jb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.ba,wc(a));setTimeout(a.ec,0)}}h.sb=function(){return 0};function G(a){var b=!1;if(a.j.P){Ac(a);ob(a,a.na);a.na=0;a.j.P=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),wc(a));b=!0}a.j.complete=void 0;return b} +function Bc(a){this.La=+a.model||1170;this.Ub=a.addrReset||0;rc.call(this,a,6666667);this.qb=0;this.bc=255;1120==this.La?(this.decode=Cc.bind(this),this.za=this.mc,this.qb=8,this.bc=-1):(this.decode=Dc.bind(this),this.za=this.nc);Ec(this);this.ma=0;this.O=null;this.j.complete=!1}A(Bc,rc);h=Bc.prototype;h.reset=function(){this.status("model "+this.La);this.j.P&&G(this);Ec(this);uc(this);this.j.error=!1;this.parent.reset.call(this)}; +function Ec(a){a.m=65536;a.g=32768;a.i=65535;a.s=32768;a.C=15;a.f=[0,0,0,0,0,0,0,a.Ub,-1,-2,-3,-4,-5,-6,-7,-8];a.Ea=[0,0,0,0,0,0];a.qa=[0,0,0,0];a.v=0;a.hb=0;a.ne=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0]];a.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.$b=[0,0,0,0,0,0,0,0];a.Zb=0;a.u=0;a.B=a.D=0;a.c=a.b=a.Cb=0;a.Ja=-1;lb(a)}function lb(a){a.W=0;a.Fb=0;a.Gb=0;a.Ba=0;a.fa=0;a.Ib=0;a.bb=255;a.aa=0;a.gb=0;a.Sa=262143;a.Za=0;a.A=0;a.O=null;a.h&&Yb(a)}function Yb(a){a.aa?(a.R=65536,a.Tb=a.Ba&16?4186112:253952,a.M=a.sc,a.V=a.rd,a.ub=a.ke,Cb(a.h,a.Ba&16?22:18)):(a.R=0,a.Tb=57344,a.M=a.rc,a.V=a.Yb,a.ub=a.ic,Cb(a.h,16))} +function Xb(a,b){b&=-3073;if(a.W!=b){b&57344&&!(a.W&57344)&&(a.Fb=a.A>>16&65535,a.Gb=a.A&65535);a.W=b;a.gb=b>>5&3;a.hb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.aa!=c&&(a.aa=c,Yb(a))}}h.Qb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.va,this.ua]);a.set(2,Pb(this.h));return a.data()}; +h.restore=function(a){var b=a[1];this.va=b[1];xc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.C>>14&3;a.v!=c&&(a.qa[c]=a.f[6],a.f[6]=a.qa[a.v]);a.C=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.g=0)}function Kc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.g=c||0)}function Lc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.g=(c^b)&(d^b))} +function Mc(a,b){a.u&128||(a.s=a.i=a.m=b,a.g=a.s^a.m>>1)}function Nc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.g=(c^d)&(d^b))}function K(a,b,c,d){if(!a.ma){0>a.Ja?a.Ja=Zb(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.fa|=4,a.f[6]=4,e=!0);a.A=b|4143316992;a.v=0;var f=a.V(b|a.R),g=a.V(b+2&65535|a.R);$b(a,g&-12289|a.Ja>>2&12288);Oc(a,a.Ja,e);Oc(a,a.f[7],e);Q(a,f);a.u&=~(c|18);a.u|=9;a.Ja=-1;if(-3<=d)throw b;}}function Pc(a){var b=Qc(a),c=Qc(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);Q(a,b);$b(a,c);a.u&=-17} function Lb(a,b){var c=b>>13&31;31>c&&(b=a.Ba&32?a.fb[c]+(b&8190)&4194302:b&-3932161);return b} -function Rc(a,b,c){var d,e,f;if(!(c&a.aa))return f=b&65535,57344<=f&&(f|=a.Sb),f;d=b>>13;a.Ba&a.vd[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Sa;if(a.ma)return f;f&1&&!(c&1)&&(a.fa|=64,K(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(f!=(4194170&a.Sa)||a.v)a.gb= -a.v,a.hb=d;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.W&57344||(g|=a.W&4096|a.gb<<5|a.hb<<1,Xb(a,a.W&-61695|g&61694)),K(a,168,64,-1)),a.W&61440||!(f<(4191360&a.Sa)||f>(4194239&a.Sa))||(a.W|=4096,a.W&512&&(a.u|=64)));return f}function Qc(a){var b=a.V(a.g[6]|a.R);a.g[6]=a.g[6]+2&65535;return b}function Oc(a,b,c){var d=a.g[6]-2&65535;a.g[6]=d;a.A=a.A&65535|(a.A&-65536)<<8|16121856;c||a.za(4,-2,d);a.tb(d,b)} -function Sc(a,b,c,d){var e,f,g=d&8?0:a.R;switch(b){case 0:return K(a,4,0,-2),0;case 1:return 6==c&&a.za(d,0,a.g[6]),a.a-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.za(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.za(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.V(e)|g;a.a-=8;break;case 6:return e=a.V(Hc(a,2)),e=e+a.g[c]&65535,6==c&&a.za(d,0, -e),a.a-=6,e|g;case 7:return e=a.V(Hc(a,2)),e=e+a.g[c]&65535,e=a.V(e|a.R),a.a-=10,e|g}a.g[c]=a.g[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;return e}h.kc=function(a,b,c){!this.v&&0>=b&&c<=this.bb&&(this.u|=32)};h.lc=function(a,b,c){!this.v&&a&4&&c<=this.bb&&(c<=this.bb-32?K(this,4,0,-3):(this.fa|=8,this.u|=32))};h.Ya=function(a){if(!this.aa)return this.h.Ya(a);this.ma++;a=this.Yb(Rc(this,a,2));this.ma--;return a}; -h.cb=function(a,b){this.aa?(this.ma++,a=Rc(this,a,5),a&1&&this.a--,Nb(this.h,a,b),this.ma--):this.h.cb(a,b)};h.eb=function(a,b){this.aa?(this.ma++,this.gc(Rc(this,a,4),b),this.ma--):this.h.eb(a,b)};h.pc=function(a,b,c){return Sc(this,a,b,c)};h.qc=function(a,b,c){return Rc(this,Sc(this,a,b,c),c)};h.Yb=function(a){return Mb(this.h,this.Za=a)};h.pd=function(a){return Mb(this.h,this.Za=Rc(this,a,2))};h.gc=function(a,b){Ob(this.h,this.Za=a,b&65535)};h.ke=function(a,b){Ob(this.h,this.Za=Rc(this,a,4),b)}; -function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Sc(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=a.V(d|c&a.R),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.g[d]:a.qa[a.C>>12&3];return c}function Uc(a,b,c,d){a.A=a.A&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Sc(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Rc(a,e|c&65536,4),a.v=a.C>>14&3,Ob(a.h,e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.g[e]=d:a.qa[a.C>>12&3]=d} -function Vc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.h,c)):a=-c-1;return a}function Wc(a,b){var c;b>>=6;var d=a.D=b&7;(b=a.B=(b&56)>>3)?c=Mb(a.h,a.M(b,d,2)):c=-d-1;return c}function Xc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Sc(a,b,c,8)}function Yc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Zc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.M(b,c,2)):a.g[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Bb=a.M(b,e,7),c=0>c?a.g[-c-1]&255:c,c=d.call(a,c,Kb(a.h,e)),e&1&&a.a--,Nb(a.h,e,c)):(b=a.g[e],c=0>c?a.g[-c-1]&255:c,a.g[e]=b&65280|d.call(a,c,b&255))}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.M(b,e,6),Ob(a.h,e,d.call(a,0>c?a.g[-c-1]:c,Mb(a.h,e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])} -function $c(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.M(b,e,5),e=c=0>c?a.g[-c-1]&255:c,d&1&&a.a--,Nb(a.h,d,e)):c?(c=0>c?a.g[-c-1]&255:c,a.g[e]=a.g[e]&~d|c<<24>>24&d):a.g[e]&=~d;return c}function ad(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.M(b,d,4),Ob(a.h,d,c=0>c?a.g[-c-1]:c)):a.g[d]=c=0>c?a.g[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.rb=function(a){this.j.complete=!0;var b=a?this.j.Ib?0:1:-1;this.j.Ib=!1;this.ta=this.a=a;do{if(this.u){if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Hb&224)>>5,e=this.O&&this.O.Ma>d?this.O:null;e&&(c=e.wd,d=e.Ma);d>(this.C&224)>>5?(this.u&4&&(Hc(this,2),this.u&=-5),K(this,c,0,-9),d=!0):d=!1;d&&(e&&Ic(this,e),a=!0)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Jc(this)&&0>b)break}this.u=this.u&7|this.C&16;this.decode(Gc(this))}while(0>13;a.Ba&a.ne[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Sa;if(a.ma)return f;f&1&&!(c&1)&&(a.fa|=64,K(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(f!=(4194170&a.Sa)||a.v)a.gb= +a.v,a.hb=d;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.W&57344||(g|=a.W&4096|a.gb<<5|a.hb<<1,Xb(a,a.W&-61695|g&61694)),K(a,168,64,-1)),a.W&61440||!(f<(4191360&a.Sa)||f>(4194239&a.Sa))||(a.W|=4096,a.W&512&&(a.u|=64)));return f}function Qc(a){var b=a.V(a.f[6]|a.R);a.f[6]=a.f[6]+2&65535;return b}function Oc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.A=a.A&65535|(a.A&-65536)<<8|16121856;c||a.za(4,-2,d);a.ub(d,b)} +function Sc(a,b,c,d){var e,f,g=d&8?0:a.R;switch(b){case 0:return K(a,4,0,-2),0;case 1:return 6==c&&a.za(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.za(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.za(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.V(e)|g;a.a-=8;break;case 6:return e=a.V(Hc(a,2)),e=e+a.f[c]&65535,6==c&&a.za(d,0, +e),a.a-=6,e|g;case 7:return e=a.V(Hc(a,2)),e=e+a.f[c]&65535,e=a.V(e|a.R),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;return e}h.mc=function(a,b,c){!this.v&&0>=b&&c<=this.bb&&(this.u|=32)};h.nc=function(a,b,c){!this.v&&a&4&&c<=this.bb&&(c<=this.bb-32?K(this,4,0,-3):(this.fa|=8,this.u|=32))};h.Ya=function(a){if(!this.aa)return this.h.Ya(a);this.ma++;a=this.Yb(Rc(this,a,2));this.ma--;return a}; +h.cb=function(a,b){this.aa?(this.ma++,a=Rc(this,a,5),a&1&&this.a--,Nb(this.h,a,b),this.ma--):this.h.cb(a,b)};h.eb=function(a,b){this.aa?(this.ma++,this.ic(Rc(this,a,4),b),this.ma--):this.h.eb(a,b)};h.rc=function(a,b,c){return Sc(this,a,b,c)};h.sc=function(a,b,c){return Rc(this,Sc(this,a,b,c),c)};h.Yb=function(a){return Mb(this.h,this.Za=a)};h.rd=function(a){return Mb(this.h,this.Za=Rc(this,a,2))};h.ic=function(a,b){Ob(this.h,this.Za=a,b&65535)};h.ke=function(a,b){Ob(this.h,this.Za=Rc(this,a,4),b)}; +function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Sc(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=a.V(d|c&a.R),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.qa[a.C>>12&3];return c}function Uc(a,b,c,d){a.A=a.A&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Sc(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Rc(a,e|c&65536,4),a.v=a.C>>14&3,Ob(a.h,e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.qa[a.C>>12&3]=d} +function Vc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.h,c)):a=a.f[c+a.qb]&a.bc;return a}function Wc(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?Mb(a.h,a.M(b,c,2)):a.f[c+a.qb]}function Xc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Sc(a,b,c,8)}function Yc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.h,c)):a=a.f[c]&255;return a}function Zc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.M(b,c,2)):a.f[c]} +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Cb=a.M(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Kb(a.h,e)),e&1&&a.a--,Nb(a.h,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.M(b,e,6),Ob(a.h,e,d.call(a,0>c?a.f[-c-1]:c,Mb(a.h,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])} +function $c(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.M(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Nb(a.h,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function ad(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.M(b,d,4),Ob(a.h,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.sb=function(a){this.j.complete=!0;var b=a?this.j.Jb?0:1:-1;this.j.Jb=!1;this.ta=this.a=a;do{if(this.u){if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ib&224)>>5,e=this.O&&this.O.Ma>d?this.O:null;e&&(c=e.wd,d=e.Ma);d>(this.C&224)>>5?(this.u&4&&(Hc(this,2),this.u&=-5),K(this,c,0,-9),d=!0):d=!1;d&&(e&&Ic(this,e),a=!0)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Jc(this)&&0>b)break}this.u=this.u&7|this.C&16;this.decode(Gc(this))}while(0>1|b<<16;Mc(this,a);return a&65535}function gd(a,b){a=b&128|b>>1|b<<8;Mc(this,a<<8);return a&255} -function hd(a,b){a=b&~a;R(this,a);return a}function id(a,b){a=b&~a;R(this,a<<8);return a}function jd(a,b){a|=b;R(this,a);return a}function kd(a,b){a|=b;R(this,a<<8);return a}function ld(a,b){a=~b|65536;Kc(this,a);return a&65535}function md(a,b){a=~b|256;Kc(this,a<<8);return a&255}function nd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function od(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255} -function pd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function qd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function rd(a,b){a=-b;Kc(this,a,a&b&32768);return a&65535}function sd(a,b){a=-b;Kc(this,a<<8,(a&b&128)<<8);return a&255}function td(a,b){a=b<<1|this.m>>16&1;Mc(this,a);return a&65535}function ud(a,b){a=b<<1|this.m>>16&1;Mc(this,a<<8);return a&255}function vd(a,b){a=(this.m&65536|b)>>1|b<<16;Mc(this,a);return a&65535} -function wd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Mc(this,a<<8);return a&255}function xd(a,b){var c=b-a;Nc(this,c,a,b);return c&65535}function yd(a,b){var c=b-a;Nc(this,c<<8,a<<8,b<<8);return c&255}function zd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535}function Ad(a,b){a^=b;R(this,a);return a&65535}function Bd(a){U(this,a,Wc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function Cd(a){var b=Zc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function Dd(a){var b=Zc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Ed(a){V(this,a,!P(this))}function Fd(a){V(this,a,P(this))} +function hd(a,b){a=b&~a;R(this,a);return a}function id(a,b){a=b&~a;R(this,a<<8);return a}function jd(a,b){a|=b;R(this,a);return a}function kd(a,b){a|=b;R(this,a<<8);return a}function ld(a,b){a=~b|65536;Kc(this,a);return a&65535}function md(a,b){a=~b|256;Kc(this,a<<8);return a&255}function nd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.g=b&(b^a));return a&65535}function od(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.g=b&(b^c));return a&255} +function pd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.g=a&(b^a));return a&65535}function qd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.g=c&(b<<8^c));return a&255}function rd(a,b){a=-b;Kc(this,a,a&b&32768);return a&65535}function sd(a,b){a=-b;Kc(this,a<<8,(a&b&128)<<8);return a&255}function td(a,b){a=b<<1|this.m>>16&1;Mc(this,a);return a&65535}function ud(a,b){a=b<<1|this.m>>16&1;Mc(this,a<<8);return a&255}function vd(a,b){a=(this.m&65536|b)>>1|b<<16;Mc(this,a);return a&65535} +function wd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Mc(this,a<<8);return a&255}function xd(a,b){var c=b-a;Nc(this,c,a,b);return c&65535}function yd(a,b){var c=b-a;Nc(this,c<<8,a<<8,b<<8);return c&255}function zd(a,b){this.u&128||(this.s=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Ad(a,b){a^=b;R(this,a);return a&65535}function Bd(a){U(this,a,Wc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function Cd(a){var b=Zc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function Dd(a){var b=Zc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Ed(a){V(this,a,!P(this))}function Fd(a){V(this,a,P(this))} function Gd(a){U(this,a,Wc(this,a),hd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Hd(a){S(this,a,Vc(this,a),id);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Id(a){U(this,a,Wc(this,a),jd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Jd(a){S(this,a,Vc(this,a),kd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function Kd(a){var b=Wc(this,a);a=Zc(this,a);R(this,(0>b?this.g[-b-1]:b)&a);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Ld(a){var b=Vc(this,a);a=Yc(this,a);R(this,((0>b?this.g[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Md(a){V(this,a,this.i&65535?0:4)}function Nd(a){V(this,a,!Fc(this)==!(this.f&32768))}function Od(a){V(this,a,!!(this.i&65535)&&!Fc(this)==!(this.f&32768))} -function Pd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Qd(a){V(this,a,(this.i&65535?0:4)||!Fc(this)!=!(this.f&32768))}function Rd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Sd(a){V(this,a,!Fc(this)!=!(this.f&32768))}function Td(a){V(this,a,Fc(this))}function Ud(a){V(this,a,!!(this.i&65535))}function Vd(a){V(this,a,!Fc(this))}function Wd(){K(this,12,0,-8);this.a-=5}function Xd(a){V(this,a,!0)}function Yd(a){V(this,a,!(this.f&32768))}function Zd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function $d(a){var b=Wc(this,a);a=Zc(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Nc(this,c,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ae(a){var b=Vc(this,a);a=Yc(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Nc(this,c,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} -function be(a){var b=Zc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function ce(){K(this,24,0,-8);this.a-=25} -function de(){this.C&49152?(this.fa|=128,K(this,4,0,-7)):(this.w&&1120==this.La&&this.w.setData(this.g[0],!0),this.F?this.F.b():G(this));this.a-=7}function ee(){K(this,16,0,-8);this.a-=25}var fe=[0,7,7,10,7,11,9,13];function ge(a){this.I=this.a;Q(this,Xc(this,a));this.a=this.I-fe[this.c]}var he=[0,14,14,17,14,18,16,20];function ie(a){this.I=this.a;var b=Xc(this,a);a=a>>6&7;Oc(this,this.g[a]);this.g[a]=this.g[7];Q(this,b);this.a=this.I-he[this.c]}var je=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Kd(a){var b=Wc(this,a);a=Zc(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Ld(a){var b=Vc(this,a);a=Yc(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Md(a){V(this,a,this.i&65535?0:4)}function Nd(a){V(this,a,!Fc(this)==!(this.g&32768))}function Od(a){V(this,a,!!(this.i&65535)&&!Fc(this)==!(this.g&32768))} +function Pd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Qd(a){V(this,a,(this.i&65535?0:4)||!Fc(this)!=!(this.g&32768))}function Rd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Sd(a){V(this,a,!Fc(this)!=!(this.g&32768))}function Td(a){V(this,a,Fc(this))}function Ud(a){V(this,a,!!(this.i&65535))}function Vd(a){V(this,a,!Fc(this))}function Wd(){K(this,12,0,-8);this.a-=5}function Xd(a){V(this,a,!0)}function Yd(a){V(this,a,!(this.g&32768))}function Zd(a){V(this,a,this.g&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function $d(a){var b=Wc(this,a);a=Zc(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Nc(this,c,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ae(a){var b=Vc(this,a);a=Yc(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Nc(this,c,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} +function be(a){var b=Zc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.g=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.g=32768,this.m=65536,this.a-=7}function ce(){K(this,24,0,-8);this.a-=25} +function de(){this.C&49152?(this.fa|=128,K(this,4,0,-7)):(this.w&&1120==this.La&&this.w.setData(this.f[0],!0),this.F?this.F.b():G(this));this.a-=7}function ee(){K(this,16,0,-8);this.a-=25}var fe=[0,7,7,10,7,11,9,13];function ge(a){this.I=this.a;Q(this,Xc(this,a));this.a=this.I-fe[this.c]}var he=[0,14,14,17,14,18,16,20];function ie(a){this.I=this.a;var b=Xc(this,a);a=a>>6&7;Oc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.I-he[this.c]}var je=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function ke(a){var b=Wc(this,a);this.I=this.a;R(this,ad(this,a,b));this.a=this.I-je[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function le(a){var b=Vc(this,a);R(this,$c(this,a,b,65535)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var me=[7,13,13,17,14,18,17,21]; -function ne(a){var b=Zc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)Q(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function te(a){U(this,a,Wc(this,a),xd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ue(a){U(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)}function ve(){K(this,28,0,-8);this.a-=5} -function we(){this.w&&(this.w.ea=this.g[7],this.w.setData(this.g[0],!0));this.u|=4;Hc(this,-2);this.a-=3}function xe(a){U(this,a,-(a>>6&7)-1,Ad);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,0,-8)}function Cc(a){ye[a>>12].call(this,a)}function ze(a){Ae[a>>6&3].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a&15].call(this,a)}function He(a){Ie[a&15].call(this,a)}function Je(a){Ke[a>>6&3].call(this,a)} +function ne(a){var b=Zc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function te(a){U(this,a,Wc(this,a),xd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ue(a){U(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)}function ve(){K(this,28,0,-8);this.a-=5} +function we(){this.w&&(this.w.ea=this.f[7],this.w.setData(this.f[0],!0));this.u|=4;Hc(this,-2);this.a-=3}function xe(a){U(this,a,this.f[(a>>6&7)+this.qb],Ad);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,0,-8)}function Cc(a){ye[a>>12].call(this,a)}function ze(a){Ae[a>>6&3].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a&15].call(this,a)}function He(a){Ie[a&15].call(this,a)}function Je(a){Ke[a>>6&3].call(this,a)} function Le(a){Me[a>>6&3].call(this,a)}function Ne(a){Oe[a>>6&3].call(this,a)} var ye=[function(a){Pe[a>>8&15].call(this,a)},ke,$d,Kd,Gd,Id,Bd,Y,function(a){Qe[a>>8&15].call(this,a)},le,ae,Ld,Hd,Jd,te,Y],Pe=[function(a){Re[a>>4&15].call(this,a)},Xd,Ud,Md,Nd,Sd,Od,Qd,ie,ie,ze,Be,De,Y,Y,Y],Ae=[function(a){Kc(this,ad(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ce=[function(a){U(this,a,0, rd);this.a-=this.c?11:6},function(a){U(this,a,P(this)?1:0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,P(this)?1:0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Zc(this,a);Kc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Ee=[function(a){U(this,a,0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)}], -Re=[function(a){Se[a&15].call(this,a)},Y,Y,Y,ge,ge,ge,ge,qe,Y,Fe,He,ue,ue,ue,ue],Se=[de,we,re,Wd,ee,pe,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ge=[oe,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ie=[oe,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Qe=[Vd,Td,Pd,Rd,Yd,Zd,Ed,Fd,ce,ve,Je,Le,Ne,Y,Y,Y],Ke=[function(a){Kc(this, +Re=[function(a){Se[a&15].call(this,a)},Y,Y,Y,ge,ge,ge,ge,qe,Y,Fe,He,ue,ue,ue,ue],Se=[de,we,re,Wd,ee,pe,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ge=[oe,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ie=[oe,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Qe=[Vd,Td,Pd,Rd,Yd,Zd,Ed,Fd,ce,ve,Je,Le,Ne,Y,Y,Y],Ke=[function(a){Kc(this, $c(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,od);this.a-=this.c?9:3+(7==this.b?2:0)}],Me=[function(a){S(this,a,0,sd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Yc(this,a);Kc(this,a<<8);this.a-=this.c?4:3+(7== -this.b?2:0)}],Oe=[function(a){S(this,a,0,wd);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,gd);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)}];function Dc(a){Te[a>>12].call(this,a)} -var Te=[function(a){Ue[a>>8&15].call(this,a)},ke,$d,Kd,Gd,Id,Bd,function(a){Ve[a>>8&15].call(this,a)},function(a){We[a>>8&15].call(this,a)},le,ae,Ld,Hd,Jd,te,Y],Ue=[function(a){Xe[a>>4&15].call(this,a)},Xd,Ud,Md,Nd,Sd,Od,Qd,ie,ie,ze,Be,De,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);Q(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Tc(this,a,0);Oc(this,a);R(this,a);this.a-=11},function(a){var b=Qc(this);this.I= +this.b?2:0)}],Oe=[function(a){S(this,a,0,wd);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,gd);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)}];function Dc(a){Te[a>>12].call(this,a)} +var Te=[function(a){Ue[a>>8&15].call(this,a)},ke,$d,Kd,Gd,Id,Bd,function(a){Ve[a>>8&15].call(this,a)},function(a){We[a>>8&15].call(this,a)},le,ae,Ld,Hd,Jd,te,Y],Ue=[function(a){Xe[a>>4&15].call(this,a)},Xd,Ud,Md,Nd,Sd,Od,Qd,ie,ie,ze,Be,De,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Tc(this,a,0);Oc(this,a);R(this,a);this.a-=11},function(a){var b=Qc(this);this.I= this.a;Uc(this,a,0,b);R(this,b);this.a=this.I-me[this.c]},function(a){R(this,ad(this,a,Fc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xe=[function(a){Ze[a&15].call(this,a)},Y,Y,Y,ge,ge,ge,ge,qe,function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,0,-8)},Fe,He,ue,ue,ue,ue],Ze=[de,we,function(){Pc(this);this.u|=this.C&16;this.a-=13},Wd,ee,pe,re,function(){K(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ve=[ne,ne,be,be,Cd,Cd,Dd,Dd,xe,xe,Y,Y,Y,Y,se,se],We=[Vd,Td,Pd,Rd, Yd,Zd,Ed,Fd,ce,ve,Je,Le,Ne,function(a){$e[a>>6&3].call(this,a)},Y,Y],$e=[Y,function(a){a=Tc(this,a,65536);Oc(this,a);R(this,a);this.a-=11},function(a){var b=Qc(this);this.I=this.a;Uc(this,a,65536,b);R(this,b);this.a=this.I-me[this.c]},Y]; -function af(a){y.call(this,"ROM",a,af,512);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.ra,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.l=null);bf(c)})}}A(af);h=af.prototype; +function af(a){y.call(this,"ROM",a,af,512);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.g=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.ra,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.l=null);bf(c)})}}A(af);h=af.prototype; h.ja=function(a,b,c,d){this.h=b;this.a=c;this.F=d;bf(this)};h.la=function(){this.X&&(this.F&&this.F.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ka=function(){return!0}; -function bf(a){if(!Va(a)){if(a.l){if(!a.c||!a.h)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[af.prototype.cd,af.prototype.Zd,null,null,null,a.b>>1],c);if(cb(a.h,a,b)){b=a.m=!0;break a}}else if(Fb(a.h,b,a.b,gc)){for(c=0;c>>a.c;0>1],c);if(cb(a.h,a,b)){b=a.m=!0;break a}}else if(Fb(a.h,b,a.b,gc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.cb(p++,b[u++]&255);else p&1?G(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Tb(e.a,e.ba))});this.B=Vb(52,4);this.aa=Sb(this.a,function(){e.c|=128;e.c&64&&Tb(e.a,e.B)});cb(b,this,hf);eb(b,this.reset.bind(this));F(this)}; -h.Qb=function(){if(!this.v){var a=tc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Fa)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.ra+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ka=function(a){return a?this.save():!0};h.reset=function(){jf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return jf(this)};function jf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.qb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.I&&!this.s&&c&&(b=String.fromCharCode(this.I)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<= -this.m.length)this.T(this.m),this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ub(this.a,this.aa,1E3/Math.round(this.R/10))}};var kf={},hf=(kf[65392]=[null,null,Z.prototype.Xc,Z.prototype.Td,"RCSR"],kf[65394]=[null,null,Z.prototype.Wc,Z.prototype.Sd,"RBUF"],kf[65396]=[null,null,Z.prototype.rd,Z.prototype.me,"XCSR"],kf[65398]=[null,null,Z.prototype.qd,Z.prototype.le,"XBUF"],kf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b");if(2==b.length){var c=pa(b[0]);if(c!=this.Fa)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.ra+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Rb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ka=function(a){return a?this.save():!0};h.reset=function(){jf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return jf(this)};function jf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.rb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.I&&!this.s&&c&&(b=String.fromCharCode(this.I)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<= +this.m.length)this.T(this.m),this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ub(this.a,this.aa,1E3/Math.round(this.R/10))}};var kf={},hf=(kf[65392]=[null,null,Z.prototype.Zc,Z.prototype.Td,"RCSR"],kf[65394]=[null,null,Z.prototype.Yc,Z.prototype.Sd,"RBUF"],kf[65396]=[null,null,Z.prototype.td,Z.prototype.me,"XCSR"],kf[65398]=[null,null,Z.prototype.sd,Z.prototype.le,"XBUF"],kf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= d.o.listTapes;a&&nf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.D){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;nf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; h.ja=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;this.J=of(a);var e=this;if((this.c=tc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.M=Vb(56,4);this.R=Sb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.N;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.ra,e,f),(e=ta(e,f))&&xf(a,b,c,d,e.K,e.ha,e.ga)); a.j.Da=!1;a.m&&(a.m--,a.m||F(a));uf(a)})}function rf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.U);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.yb?"":e)+"&format=json"));return!!r(f, +!0),e=e+fg&-1;kc.ca=c;va[wa]=kc}a.b=e;c=a}else a.G("Unrecognized disk format ("+d+" bytes)");a.h&&(a.h.call(a.controller,a.g,c,a.xa,a.Ca),a.h=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.zb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){Ef(a,b,c,d)})} function Ef(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.N;if(d)a.controller.G('Unable to load disk "'+a.xa+'" (error '+d+": "+b+")",f);else{Ra(a.controller.ra,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(k.length)if(1==k.length)t(k[0]);else{a.U=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ia=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var T=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ca?f=a.oa+a.ca&&(a.ca+=f-(a.oa+a.ca)+1):(a.oa=f,a.ca=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.xa+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Gf(this,a++);)If(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function If(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){y.call(this,"RL11",a,N,8388608);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; +function If(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){y.call(this,"RL11",a,N,8388608);this.g=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){t("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Jf(d,a)},!0;case "loadDrive":return this.o[b]= c,c.onclick=function(){var a=d.o.listDisks;a&&Kf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.da){var b;b="";for(var c=0,k;k=Gf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Jf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Lf(this)};h.save=function(){return(new O(this)).data()}; -h.restore=function(a){return Lf(this,a[0])};function Of(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Jf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Lf(this)};h.save=function(){return(new O(this)).data()}; +h.restore=function(a){return Lf(this,a[0])};function Of(a,b){b||(a.s=0);if(a.g)for(var c in a.g){var d=a.g[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Qf(a,e,b,c,!1,d)}else Pf(a,e)} -function Qf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ca.toLowerCase()!=d.toLowerCase()&&(g++,Pf(a,b,!0),k.xb?a.G("RL11 busy"):(k.xb=!0,e&&(k.wb=!0,a.s++),k.lb=!!f,Df(new zf(a,k,"preload"),c,d,f,a.oc)&&g++));return g} -h.oc=function(a,b,c,d,e){var f;a.xb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.U||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.da=b,a.xa=c,a.Ca=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.wb||e),this.l&&zc(this.l)):a.lb=!1;a.wb&&(a.wb=!1,--this.s||F(this));Jf(this,a.zb)}; +function Qf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ca.toLowerCase()!=d.toLowerCase()&&(g++,Pf(a,b,!0),k.yb?a.G("RL11 busy"):(k.yb=!0,e&&(k.xb=!0,a.s++),k.lb=!!f,Df(new zf(a,k,"preload"),c,d,f,a.qc)&&g++));return g} +h.qc=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.U||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.Ab)),b=null);b?(a.da=b,a.xa=c,a.Ca=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.Ab),a.xb||e),this.l&&zc(this.l)):a.lb=!1;a.xb&&(a.xb=!1,--this.s||F(this));Jf(this,a.Ab)}; function Nf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.Dc=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.da.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.da.read(n,p++))||0>(w=a.da.read(n,p++))){k=5120;break}this.h.eb(f,u|w<<8);if(Rb(this.h)){k=8192;break}f+=2;if(p>=l.ia&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.Bd=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.h.Ya(f);if(Rb(this.h)){k=8192;break}f+=2;if(!n){n=a.da.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.da.write(n,p++,u&255)||!a.da.write(n,p++,u>>8)){k=5120;break}if(p>=l.ia&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)};h.$c=function(){return this.L&65535}; -h.Wd=function(a){this.L=this.L&-1023|a&1022;this.B=this.B&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.Dc;case 10:b||(b=this.Bd),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.U||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.mc.bind(this)))}a&&(this.L|=129,this.L&64&&Tb(this.a,this.D))}};h.Yc=function(){return this.v};h.Ud=function(a){this.v=a&65534};h.ad=function(){return this.c};h.Xd=function(a){this.c=a};h.bd=function(){return this.m};h.Yd=function(a){this.m=a};h.Zc=function(){return this.w};h.Vd=function(a){this.w=a&63}; -var Rf={},Mf=(Rf[63744]=[null,null,N.prototype.$c,N.prototype.Wd,"RLCS"],Rf[63746]=[null,null,N.prototype.Yc,N.prototype.Ud,"RLBA"],Rf[63748]=[null,null,N.prototype.ad,N.prototype.Xd,"RLDA"],Rf[63750]=[null,null,N.prototype.bd,N.prototype.Yd,"RLMP"],Rf[63752]=[null,null,N.prototype.Zc,N.prototype.Vd,"RLBE"],Rf); +function Lf(a,b){var c=0;b||(b=[]);a.L=b[c++]||0;a.v=b[c++]||0;a.c=b[c++]||0;a.i=b[c++]||0;a.m=b[c++]||0;a.w=b[c]||0;for(b=0;b>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.Fc=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.da.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.da.read(n,p++))||0>(w=a.da.read(n,p++))){k=5120;break}this.h.eb(f,u|w<<8);if(Rb(this.h)){k=8192;break}f+=2;if(p>=l.ia&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.Bd=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.h.Ya(f);if(Rb(this.h)){k=8192;break}f+=2;if(!n){n=a.da.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.da.write(n,p++,u&255)||!a.da.write(n,p++,u>>8)){k=5120;break}if(p>=l.ia&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)};h.bd=function(){return this.L&65535}; +h.Wd=function(a){this.L=this.L&-1023|a&1022;this.B=this.B&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.Fc;case 10:b||(b=this.Bd),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.U||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.oc.bind(this)))}a&&(this.L|=129,this.L&64&&Tb(this.a,this.D))}};h.$c=function(){return this.v};h.Ud=function(a){this.v=a&65534};h.cd=function(){return this.c};h.Xd=function(a){this.c=a};h.dd=function(){return this.m};h.Yd=function(a){this.m=a};h.ad=function(){return this.w};h.Vd=function(a){this.w=a&63}; +var Rf={},Mf=(Rf[63744]=[null,null,N.prototype.bd,N.prototype.Wd,"RLCS"],Rf[63746]=[null,null,N.prototype.$c,N.prototype.Ud,"RLBA"],Rf[63748]=[null,null,N.prototype.cd,N.prototype.Xd,"RLDA"],Rf[63750]=[null,null,N.prototype.dd,N.prototype.Yd,"RLMP"],Rf[63752]=[null,null,N.prototype.ad,N.prototype.Vd,"RLBE"],Rf); function Sf(a,b,c){y.call(this,"Computer",a,Sf,67108864);this.j.N=!1;Tf(this,b);this.A=tc(this,"autoPower",a);this.l=0;this.M=a.busWidth||a.buswidth;this.b=Uf;this.s=null;this.i=this.I=!1;this.O=tc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Vf(this);if(this.a=Ta("CPU",this.id)){this.F=Ta("Debugger",this.id);this.h=new vb({id:this.ra+".bus",busWidth:this.M},this.a,this.F);var d,e=B(this.id);if((this.w=Ta("Panel",this.id))&&this.w.Xa)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bUf){if(Wf(d,this.s)){this.f=new O(this,"1.30.3","failsafe");Wf(this.f)&&(ag(this,d),a=2,bg(this.f));this.f.set("timestamp",sa());cg(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=$f(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Wf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),bg(d),Wf(d)?(c=$f(d),e=!0):c=!1))}e&&Zf(this,c?d:null)}else 2==a&&d.clear()}else Zf(this);delete this.s;delete this.v}e=B(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.N=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(dg(this,this.a,b,c,a),this.ya(),this.a.Wa());this.D&&(ag(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; +h.ab=function(a){void 0===a&&(a=this.b||(this.s?1:Uf));if(!this.l){this.l++;var b=!1,c=!1;this.D=!1;var d=this.v||new O(this,"1.30.3");if(-1==a)b=!0;else if(a>Uf){if(Wf(d,this.s)){this.g=new O(this,"1.30.3","failsafe");Wf(this.g)&&(ag(this,d),a=2,bg(this.g));this.g.set("timestamp",sa());cg(this.g);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=$f(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Wf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),bg(d),Wf(d)?(c=$f(d),e=!0):c=!1))}e&&Zf(this,c?d:null)}else 2==a&&d.clear()}else Zf(this);delete this.s;delete this.v}e=B(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.N=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(dg(this,this.a,b,c,a),this.ya(),this.a.Wa());this.D&&(ag(this,b),b.clear());!c&&this.g&&(this.g.clear(),delete this.g);this.l=0}; function ag(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} function gg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.N=!1,!1===d&&(e=null)));for(var k=B(a.id),l=0;l=c||30<=(b.Ab+=c))&&(d.textContent=b.j.P?b.Ga.toFixed(2)+"Mhz":"Stopped",b.Ab=0)}if(this.w&&(b=this.w,a=a||0,b.v)){c=b.a.j.P;d=!!(b.a.u&4);if(0>=a||60<=(b.s+=a)){for(var e=0;e=c||30<=(b.Bb+=c))&&(d.textContent=b.j.P?b.Ga.toFixed(2)+"Mhz":"Stopped",b.Bb=0)}if(this.w&&(b=this.w,a=a||0,b.v)){c=b.a.j.P;d=!!(b.a.u&4);if(0>=a||60<=(b.s+=a)){for(var e=0;e