From 884b74d96f8ca2210d62c3d3b3390e9d8a371252 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 23 Feb 2017 16:56:08 -0800 Subject: [PATCH] Cleaned up PDP register dump code --- README.md | 2 +- modules/pdp10/lib/debugger.js | 10 +- modules/pdp11/lib/debugger.js | 71 +--- versions/pdpjs/1.34.0/pdp10-dbg.js | 306 ++++++++-------- versions/pdpjs/1.34.0/pdp10.js | 190 +++++----- versions/pdpjs/1.34.0/pdp11-dbg.js | 541 ++++++++++++++--------------- versions/pdpjs/1.34.0/pdp11.js | 70 ++-- 7 files changed, 574 insertions(+), 616 deletions(-) diff --git a/README.md b/README.md index 4374aa725..219c2274b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ includes: * [PCx86](/docs/pcx86/), an x86-based emulator of [IBM PC and PC-compatible](/devices/pcx86/machine/) machines * [PC8080](/modules/pc8080/), an 8080 machine emulator (e.g., [Space Invaders](/devices/pc8080/machine/invaders/) and the [VT100 Terminal](/devices/pc8080/machine/vt100/)) * [C1Pjs](/docs/c1pjs/), an emulation of the 6502-based [Ohio Scientific Challenger 1P](/devices/c1p/) -* [PDPjs](/docs/pdpjs/) emulators, with support for [PDP-10](/devices/pdp10/machine/) and [PDP-11](/devices/pdp11/machine/) machines +* [PDPjs](/docs/pdpjs/), a set of emulation modules supporting [PDP-10](/devices/pdp10/machine/) and [PDP-11](/devices/pdp11/machine/) machines All PCjs machine simulations are written entirely in [JavaScript](/modules/). No Flash, Java or other plugins are required. Supported browsers include modern versions of Chrome, Safari, Firefox, Internet Explorer (v9.0 and up), Edge, diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index 478ab9cdf..173457c11 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -812,11 +812,11 @@ class DebuggerPDP10 extends Debugger { * * @this {DebuggerPDP10} * @param {number} iReg (0-7; not used for other registers) - * @return {string|undefined} + * @return {string} */ getRegName(iReg) { - return DebuggerPDP10.REGNAMES[iReg]; + return DebuggerPDP10.REGNAMES[iReg] || ""; } /** @@ -1885,8 +1885,10 @@ class DebuggerPDP10 extends Debugger { */ getRegOutput(iReg) { - var sReg = this.getRegName(iReg) || "undefined"; - if (sReg) sReg += ' '; + var sReg = this.getRegName(iReg); + if (sReg) { + sReg += '=' + this.toStrBase(this.getRegValue(iReg)) + ' '; + } return sReg; } diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index d11d53b56..468738cb9 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -912,7 +912,9 @@ class DebuggerPDP11 extends Debugger { */ getRegName(iReg) { - return (iReg < 6? ("R" + iReg) : (iReg == 6? "SP" : "PC")); + var sReg; + if (iReg < DebuggerPDP11.REG_AR || this.panel) sReg = DebuggerPDP11.REGNAMES[iReg]; + return sReg || ""; } /** @@ -2273,63 +2275,10 @@ class DebuggerPDP11 extends Debugger { */ getRegOutput(iReg) { - var sReg = ""; - var cpu = this.cpu; - - if (iReg < 8) { - sReg = this.getRegName(iReg); - sReg += '=' + this.toStrBase(cpu.regsGen[iReg]); + var sReg = this.getRegName(iReg); + if (sReg) { + sReg += '=' + this.toStrBase(this.getRegValue(iReg)) + ' '; } - else if (iReg < 13) { - sReg = "A" + (iReg - 8) + '=' + this.toStrBase(cpu.regsAlt[iReg - 8]); - } - else if (iReg >= 16 && iReg < 20) { - sReg = "S" + (iReg - 16) + '=' + this.toStrBase(cpu.regsAltStack[iReg - 16]); - } - else { - switch(iReg) { - case DebuggerPDP11.REG_PS: - sReg = "PS=" + this.toStrBase(cpu.getPSW()); - break; - case DebuggerPDP11.REG_PI: - sReg = "PI=" + this.toStrBase(cpu.getPIR()); - break; - case DebuggerPDP11.REG_ER: - sReg = "ER=" + this.toStrBase(cpu.regErr); - break; - case DebuggerPDP11.REG_SL: - sReg = "SL=" + this.toStrBase(cpu.getSLR()); - break; - case DebuggerPDP11.REG_M0: - sReg = "M0=" + this.toStrBase(cpu.getMMR0()); - break; - case DebuggerPDP11.REG_M1: - sReg = "M1=" + this.toStrBase(cpu.getMMR1()); - break; - case DebuggerPDP11.REG_M2: - sReg = "M2=" + this.toStrBase(cpu.getMMR2()); - break; - case DebuggerPDP11.REG_M3: - sReg = "M3=" + this.toStrBase(cpu.getMMR3()); - break; - case DebuggerPDP11.REG_AR: - if (this.panel) { - sReg = "AR=" + this.toStrBase(this.panel.getAR(), 3); - } - break; - case DebuggerPDP11.REG_DR: - if (this.panel) { - sReg = "DR=" + this.toStrBase(this.panel.getDR()); - } - break; - case DebuggerPDP11.REG_SR: - if (this.panel) { - sReg = "SR=" + this.toStrBase(this.panel.getSR(), 3); - } - break; - } - } - if (sReg) sReg += ' '; return sReg; } @@ -4181,6 +4130,14 @@ if (DEBUGGER) { "SR": DebuggerPDP11.REG_SR }; + DebuggerPDP11.REGNAMES = [ + "R0", "R1", "R2", "R3", "R4", "R5", "SP", "PC", + "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", + "S0", "S1", "S2", "S3", + "PS", "PI", "ER", "SL", "M0", "M1", "M2", "M3", + "AR", "DR", "SR" + ]; + DebuggerPDP11.MODES = ["KI","KD","SI","SD","??","??","UI","UD"]; /* diff --git a/versions/pdpjs/1.34.0/pdp10-dbg.js b/versions/pdpjs/1.34.0/pdp10-dbg.js index 199809a2f..465ffc82a 100644 --- a/versions/pdpjs/1.34.0/pdp10-dbg.js +++ b/versions/pdpjs/1.34.0/pdp10-dbg.js @@ -31,174 +31,174 @@ var l,aa="function"==typeof Object.defineProperties?Object.defineProperty:functi function ha(){ea();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return oa(this)}});ha=function(){}}function oa(a){var b=0;return pa(function(){return ba?-b:b}});qa("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ra=Math.pow(2,36),sa=-Math.pow(2,35),t={Yb:0,nb:1,$b:2,ac:3,bc:4,cc:5,dc:6,ec:7,Ya:8,fc:9,ob:10,gc:11,hc:12,pb:13,ic:14,jc:15,kc:16,lc:17,mc:18,nc:19,oc:20,pc:21,qc:22,rc:23,sc:24,tc:25,uc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Xa:65,Xb:66,Zb:67,vc:68,E:69,wc:70,xc:71,yc:72,zc:73,Ac:74,Bc:75,Cc:76,Dc:77,Ec:78,Fc:79,Gc:80,Q:81, -Hc:82,Ic:83,Jc:84,Kc:85,Lc:86,Mc:87,Nc:88,Oc:89,sb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Pc:97,Qc:98,Rc:99,d:100,e:101,Sc:102,Tc:103,Uc:104,Vc:105,Wc:106,k:107,Xc:108,Yc:109,n:110,Zc:111,p:112,q:113,r:114,$c:115,t:116,bd:117,cd:118,dd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,qb:127}; -function u(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.$a=b.comment;this.rb=b;this.exports={};this.F=this.bindings={};a=this.id.indexOf(".");0>a?this.Ja=this.id:(this.Ka=this.id.substr(0,a),this.Ja=this.id.substr(a+1));this.i={ready:!1,Ea:!1,Ua:!1,S:!1,error:!1};this.Na=null;this.i.error=!1;this.V=c||0;this.A=this.b=this.B=this.C=this.ja=null;v.push(this)}function ta(a,b,c){ua[a]&&b&&(ua[a][b]=c)}function va(){return Date.now()||+new Date} -function x(a){window&&window.alert(a)}function xa(a){var b=!1;window&&(b=window.confirm(a));return b}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b":62,"?":63,"@":64,Va:65,Ub:66,Wb:67,sc:68,E:69,tc:70,uc:71,vc:72,wc:73,xc:74,yc:75,zc:76,Ac:77,Bc:78,Cc:79,Dc:80,Q:81, +Ec:82,Fc:83,Gc:84,Hc:85,Ic:86,Jc:87,Kc:88,Lc:89,ob:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Mc:97,Nc:98,Oc:99,d:100,e:101,Pc:102,Qc:103,Rc:104,Sc:105,Tc:106,k:107,Uc:108,Vc:109,n:110,Wc:111,p:112,q:113,r:114,Xc:115,t:116,Zc:117,$c:118,ad:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,mb:127}; +function u(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ya=b.comment;this.nb=b;this.exports={};this.F=this.bindings={};a=this.id.indexOf(".");0>a?this.Ka=this.id:(this.La=this.id.substr(0,a),this.Ka=this.id.substr(a+1));this.i={ready:!1,Ea:!1,Sa:!1,T:!1,error:!1};this.Oa=null;this.i.error=!1;this.V=c||0;this.A=this.b=this.C=this.D=this.ja=null;v.push(this)}function ta(a,b,c){ua[a]&&b&&(ua[a][b]=c)}function va(){return Date.now()||+new Date} +function x(a){window&&window.alert(a)}function wa(a){var b=!1;window&&(b=window.confirm(a));return b}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function H(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function Oa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function H(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function I(a){return H(a,4,!0)}function Qa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return gb[a]})}function hb(a,b){return(a+" ").slice(0,b)} -function ib(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var gb={"&":"&","<":"<",">":">",'"':""","'":"'"};function jb(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function J(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, -f,e))});if(b&&"object"==typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function lb(a,b){var c,d={W:null,R:null,ia:null,ha:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ia=g.load;d.ha=g.exec;if(e=g.bytes)d.W=e;else if(e=g.words)for(d.W=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.W=Array(4*e.length),f=c=0;c>8&255,d.W[f++]=e[c]>>16&255,d.W[f++]=e[c]>>24&255;else d.W=g;d.R=g.symbols;d.W.length?1==d.W.length&&(x(d.W[0]),d=null):(x("Empty resource: "+a),d=null)}catch(h){x("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c":">",'"':""","'":"'"};function jb(a,b,c){var d=0,e=a.length,g=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[f]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function J(a,b,c,d){c=void 0===c?!1:c;var e=0,g=null,f=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,e),[g,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),f;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(g=h.responseText,200==h.status||!h.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +g,e))});if(b&&"object"==typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(g=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,g,e),f=[g,e]);return f} +function lb(a,b){var c,d={W:null,S:null,ia:null,ha:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,g,f;if("<"==b.substr(0,1))throw Error(b);f=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ia=f.load;d.ha=f.exec;if(e=f.bytes)d.W=e;else if(e=f.words)for(d.W=Array(2*e.length),g=c=0;c>8&255;else if(e=f.data)for(d.W=Array(4*e.length),g=c=0;c>8&255,d.W[g++]=e[c]>>16&255,d.W[g++]=e[c]>>24&255;else d.W=f;d.S=f.symbols;d.W.length?1==d.W.length&&(x(d.W[0]),d=null):(x("Empty resource: "+a),d=null)}catch(h){x("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca;a++)this.g["S"+a]=[0,0,!1,!1,this.Db,a];this.A=this.b=this.B=this.C=null;this.exports={hold:this.vb,toggle:this.Qb,reset:this.Mb, -set:this.Pb};F(this)}q(Kb,u);l=Kb.prototype;l.reset=function(a){this.stop();a&&Mb(this,this.w=0)}; -l.da=function(a,b,c,d){if(this.C&&this.C.da(a,b,c,d)||this.b&&this.b.da(a,b,c,d)||this.A&&this.A.da(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.F[b]=c,this.K++,!0;default:return"led"==a||"rled"==a?(this.F[b]=c,this.D[b]=d?1:0,this.K++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.F[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Nb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ob(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Nb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ob(a,b)}}(this,b),!0):u.prototype.da.call(this,a,b,c,d)}};l.ta=function(a,b,c,d){this.C=a;this.B=b;this.b=c;this.A=d;Pb(this);Qb(this)};l.la=function(a,b){if(!b)if(this.U&&Rb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0}; -l.ca=function(a){return a?this.save():!0};l.save=function(){var a=new N(this);a.set(0,[this.j,this.w,this.v]);return a.data()};l.restore=function(a){if(a=a[0])Sb(this,this.j=a[0]),Mb(this,this.w=a[1]),Tb(this,a[2]);return!0};l.Mb=function(){for(var a in this.g){var b=this.g[a];b[1]=b[0]}Qb(this);return!0};function Ub(a,b,c){if(a=a.F[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Pb(a,b){for(var c in a.D)Ub(a,c,null!=b?b:a.D[c])} -function Vb(a,b,c){if(a=a.F[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Qb(a){for(var b in a.g)Vb(a,b,a.g[b][1])}l.vb=function(a,b,c){if(Nb(this,b)){if(c){var d=this;setTimeout(function(){Ob(d,b);a&&a()},+c);return!1}Ob(this,b)}return!0};l.Pb=function(a,b){if("SR"==a)return Tb(this,Oa(b,8));var c=this.g[a];return c?(c[1]=+b?1:0,Vb(this,a,c[1]),!0):!1};l.Qb=function(a){return Nb(this,a)?(Ob(this,a),!0):!1}; -function Nb(a,b){var c=a.g[b];return c?(Vb(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=Wb&&(a.N=b==Xb,a.O=b==Yb),!0):!1}function Ob(a,b){var c=a.g[b];c&&(c[2]&&c[3]&&(Vb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Eb=function(a){a||this.b.i.J||(this.b.g=this.j%Ib,this.g[Zb]&&this.g[Zb][1]&&$b(this.b))};l.Fb=function(){};l.zb=function(a){a||this.b.T()}; -l.xb=function(a){if(!a&&!this.b.i.J)if(this.g[Zb]&&this.g[Zb][1])$b(this.b);else{if((a=this.A)&&!La(a,!0))Ma(a,!0),ac(a,0,null),Ma(a,!1);else try{var b=this.b.Ia(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.g["S"+b][1]=a.v&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.j;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.u)return h.Ga+=h.u-e,h.u=e,!0;if(e>=h.u+h.Ga){m=h.size-(e-k);m>f&&(m=f);h.Ga=e-h.u+m;e=k+16384;f-=m;g++;continue}}return lc(mc,e,f)}e=new V(0,e,m,16384,d);ic(e,a.A,h);a.g[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+nc[d]+" at "+Pa(b)),!0):lc(oc,b,c)}function gc(a,b){return a.g[(b&a.v)>>>a.j].Oa(b&16383,b)} -function fc(a,b,c){a.g[(b&a.v)>>>a.j].Ha(b&16383,c&65535,b)}function jc(a){for(var b=0,c=[],d=0;d=a+b?c>>a&(1<=a.U&&(a.U+=a.P,c=!0);0<=a.Z&&a.Z<=Zc(a)&&(a.P=a.Z=-1,Vc(a),a.T(),c=!0);c&&a.f(Zc(a)+" cycles: checksum="+H(a.ma))}} -l.da=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.F[b]=c,!0;case "run":return this.F[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.i.S)a=!0;else{var b=null,c,h=y(a.id);for(c=0;ca.L/a.M?b=1:d=!0;a.N=b;b=a.xa*a.N;if(a.M!=b){a.M=b;b=a.M.toFixed(2)+"Mhz";var e=a.F.setSpeed;e&&(e.textContent=b);a.f("target speed: "+b)}c&&a.C&&cd(a.C)}cc(a,a.w);a.w=0;a.v=va();a.G=0;ad(a);return d}function dd(a,b){for(var c=a.D.length-1;0<=c;c--){var d=a.D[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function fd(a,b){var c=a.H-=a.I;a.I=0;b&&(a.H=0);return c} -l.Nb=function(){if(this.i.J){this.ra>=this.za&&ad(this,!0);this.aa=0;this.ga=va();if(this.G){var a=this.ga-this.G;a>this.ya&&(this.v+=a,this.v>this.ga&&(this.v=this.ga))}try{do{var b=dd(this,this.i.Ba?1:this.oa);try{this.Ia(b)}catch(e){if("number"!=typeof e)throw e;}b=fd(this,!0);this.aa+=b;this.w+=b;dc(this,b);bc(this,b);this.O-=b;if(0>=this.O){this.O+=this.oa;++this.Aa>=gd&&(this.C&&P(this.C,void 0),this.Aa=0);break}}while(this.i.J)}catch(e){this.T();this.C&&this.C.stop(va(),Zc(this));Ia(this,e.stack|| -e.message);return}if(this.i.J){a=setTimeout;b=this.bb;this.G=va();var c=this.ya;this.aa&&(c=Math.round(c*this.aa/this.oa));var c=c-(this.G-this.ga),d=this.G-this.v;d&&(this.L=Math.round(this.w/(10*d))/100,864E5<=d&&(this.K=0,$c(this)));if(0>c||this.Lc&&(this.v-=c),c=0;this.ra+=this.aa;this.G+=c;a(b,c)}}}; -function $b(a,b){if(!Ja(a))if(a.i.J)a.f(a.toString()+" busy");else{$c(a);a.i.J=!0;a.i.Ra=!0;var c=a.F.run;c&&(c.textContent="Halt");a.C&&(b&&cd(a.C,!0),a.C.start(a.v,Zc(a)));a.A||a.status("Started");setTimeout(a.bb,0)}}l.Ia=function(){return 0};l.T=function(a){var b=!1;if(this.i.J){fd(this);cc(this,this.w);this.w=0;this.i.J=!1;if(b=this.F.run)b.textContent="Run";this.C&&this.C.stop(va(),Zc(this));b=!0;this.A||this.status("Stopped")}this.i.complete=a;return b};var bd=30,gd=15,Sc=["power","reset"]; -function hd(a){var b=+a.model||1001;Rc.call(this,a,6666667);this.ab=b;this.La=+a.addrReset||0;this.fa=null;this.Da=[];this.i.complete=!1}q(hd,Rc);l=hd.prototype;l.reset=function(){this.status("Model "+this.ab);this.i.J&&this.T();this.ea=this.g=this.sa=this.La;this.j=0;this.pa=this.Jb;this.Ca=this.Wb;this.fa=null;Uc(this);this.i.error=!1;Rc.prototype.reset.call(this)};l.ib=function(){return 0}; -l.save=function(){var a=new N(this);a.set(0,[this.g,this.sa,this.ea,this.j]);a.set(1,[]);a.set(2,[this.K,this.N,this.i.X]);a.set(3,id(this));a.set(4,ed(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ha();ea();ha();var c=b[Symbol.iterator];b=c?c.call(b):oa(b);this.g=b.next().value;this.sa=b.next().value;this.ea=b.next().value;this.j=b.next().value;b=a[2];this.K=b[0];$c(this,b[1]);this.i.X=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.j].pa(a&16383,a)};l.Wb=function(a,b){var c=this.B;a=this.ea=a;c.g[(a&c.v)>>>c.j].Ca(a&16383,b,a)}; -l.Ia=function(a){this.i.complete=!0;var b=this.A?jd(this.A)?1:this.i.Ra?-1:0:0,c=a?this.i.Ra?0:1:-1;this.i.Ra=!1;this.H=this.I=a;this.j=this.j&-5|(b?4:0);do{if(this.j){if(this.j&4){if(kd(this.A,this.g,c)){this.T();break}++b||(this.j&=-5);c||c++}if(a=this.j&11)this.j&2?this.fa||(this.j&=-3):this.j&1&&this.j++,a=!1;if(a){if(this.j&4&&kd(this.A,this.g,c)){this.T();break}if(0>c)break}}this.j&=15;a=this.g;this.pa(a);this.g=(a+1)%Ib}while(0>>f.j;0>>= -f.j;0>>a.j;0g&&g>=sa&&(g+=ra);g=Math.trunc(Math.abs(g))%ra;void 0===f&&(f=e.size);for(h=d;f--&&h=b.length){G(a,"invalid block at offset "+I(p),4096);break}for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,r=b[k++]&255|(b[k++]&255)<<8,m=m+((n&255)+(n>>8)+(r&255)+(r>>8)),Q=k,wa=n-=6;0=b.length){G(a,"insufficient data for block at offset "+I(p),4096);break}m+= -b[k++]&255;if(m&255){G(a,"invalid checksum ("+H(m,2,!0)+") for block at offset "+I(p),4096);break}if(wa)for(G(a,"loading "+I(wa)+" bytes at "+I(r)+"-"+I(r+wa),4096);wa--;)fc(a.B,r++,b[Q++]);else r&1?g=!0:null==d&&(d=r),null!=d&&G(a,"starting address: "+I(d),4096);h=!0}else k++;else k+=2}if(!h&&(null==c&&(c=e),null!=c)){for(h=0;h=t.Xa&&c<=t.sb&&(b=c-(t.Xa-t.nb));b&&(a.preventDefault&&a.preventDefault(),d.Pa(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==t.pb&&(b=t.ob);d.Pa(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Pa(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.ta=function(a,b,c,d){this.C=a;this.B=b;this.b=c;this.A=d;F(this)}; -l.lb=function(a){if(!this.g){var b=Tc(this.C,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ib(c[0]);if(d!=this.Ja)return;c=ib(c[1]);if(this.g=Ca(c)){var e=this.g.exports;if(e){var f=e.connect;f&&f.call(this.g,this.v);if(this.D=e.receiveData){this.v=a;this.status("Connected "+this.Ka+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.la=function(a,b){if(!b)if(this.lb(this.v),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.ca=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new N(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Pa=function(a){if("number"==typeof a)this.j.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.v.length&&(a.w=0);if(0>a.w||b!=a.v[a.w])a.v.splice(0,0,b),a.w=0;a.w--}else a.O?b="end":b=a.v[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ib(b.substring(c,f))),c=f+1}}return a} -function vd(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 wd(a,b,c){var d;if(b){b=xd(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,Q--;g=n+g;d>>=8}d=H(c,0,!0)+" "+c+". "+Pa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.f((null!=b?b+": ":"")+d);return e} +var C="pdp10",Hb="PDPjs",Ib=Math.pow(2,18),Jb=Math.pow(2,36),C="pdp10",Hb="PDPjs",N={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,paper:4096,read:16384,write:32768,serial:1048576,timer:2097152,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function Kb(a,b){u.call(this,"Panel",a,512);this.I=this.K=0;this.U=b;this.j=this.H=this.u=this.w=0;this.L=this.M=-1;this.N=this.O=this.G=!1;this.P=Lb;this.B={};this.g={START:[1,1,!0,!1,this.Bb],STEP:[1,1,!1,!1,this.Cb],ENABLE:[1,1,!1,!1,this.wb],CONT:[1,1,!0,!1,this.ub],DEP:[0,0,!0,!1,this.vb],EXAM:[1,1,!0,!1,this.xb],LOAD:[1,1,!0,!1,this.zb],TEST:[0,0,!0,!1,this.yb]};for(a=0;22>a;a++)this.g["S"+a]=[0,0,!1,!1,this.Ab,a];this.A=this.b=this.C=this.D=null;this.exports={hold:this.sb,toggle:this.Nb,reset:this.Jb, +set:this.Mb};E(this)}q(Kb,u);l=Kb.prototype;l.reset=function(a){this.stop();a&&Mb(this,this.w=0)}; +l.da=function(a,b,c,d){if(this.D&&this.D.da(a,b,c,d)||this.b&&this.b.da(a,b,c,d)||this.A&&this.A.da(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.F[b]=c,this.K++,!0;default:return"led"==a||"rled"==a?(this.F[b]=c,this.B[b]=d?1:0,this.K++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.F[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Nb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ob(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Nb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ob(a,b)}}(this,b),!0):u.prototype.da.call(this,a,b,c,d)}};l.sa=function(a,b,c,d){this.D=a;this.C=b;this.b=c;this.A=d;Pb(this);Qb(this)};l.la=function(a,b){if(!b)if(this.U&&Rb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0}; +l.ca=function(a){return a?this.save():!0};l.save=function(){var a=new O(this);a.set(0,[this.j,this.w,this.u]);return a.data()};l.restore=function(a){if(a=a[0])Sb(this,this.j=a[0]),Mb(this,this.w=a[1]),Tb(this,a[2]);return!0};l.Jb=function(){for(var a in this.g){var b=this.g[a];b[1]=b[0]}Qb(this);return!0};function Ub(a,b,c){if(a=a.F[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Pb(a,b){for(var c in a.B)Ub(a,c,null!=b?b:a.B[c])} +function Vb(a,b,c){if(a=a.F[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Qb(a){for(var b in a.g)Vb(a,b,a.g[b][1])}l.sb=function(a,b,c){if(Nb(this,b)){if(c){var d=this;setTimeout(function(){Ob(d,b);a&&a()},+c);return!1}Ob(this,b)}return!0};l.Mb=function(a,b){if("SR"==a)return Tb(this,Oa(b,8));var c=this.g[a];return c?(c[1]=+b?1:0,Vb(this,a,c[1]),!0):!1};l.Nb=function(a){return Nb(this,a)?(Ob(this,a),!0):!1}; +function Nb(a,b){var c=a.g[b];return c?(Vb(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=Wb&&(a.N=b==Xb,a.O=b==Yb),!0):!1}function Ob(a,b){var c=a.g[b];c&&(c[2]&&c[3]&&(Vb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Bb=function(a){a||this.b.i.J||(this.b.g=this.j%Ib,this.g[Zb]&&this.g[Zb][1]&&$b(this.b))};l.Cb=function(){};l.wb=function(a){a||this.b.R()}; +l.ub=function(a){if(!a&&!this.b.i.J)if(this.g[Zb]&&this.g[Zb][1])$b(this.b);else{if((a=this.A)&&!La(a,!0))Ma(a,!0),ac(a,0,null),Ma(a,!1);else try{var b=this.b.Ja(1);0c;c++){var d=a,e="A"+c,g=b&1<c;c++){var d=a,e="D"+c,g=b&1<b;b++)a.g["S"+b][1]=a.u&1<d.length){for(var e=0,g=Array(4096),f=0;f>>a.j;0g&&(m=g);if(h&&h.size){if(h.type==d){if(e+g<=h.v)return h.Ha+=h.v-e,h.v=e,!0;if(e>=h.v+h.Ha){m=h.size-(e-k);m>g&&(m=g);h.Ha=e-h.v+m;e=k+16384;g-=m;f++;continue}}return lc(mc,e,g)}e=new V(a,e,m,16384,d);ic(e,a.A,h);a.g[f++]=e;e=k+16384;g-=m}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+nc[d]+" at "+Pa(b)),!0):lc(oc,b,c)} +function gc(a,b){var c=a.g[(b&a.u)>>>a.j];a.w++;b=c.j(b&16383,b);a.w--;return b}function fc(a,b,c){var d=a.g[(b&a.u)>>>a.j];a.w++;d.F(b&16383,c&65535,b);a.w--}function jc(a){for(var b=0,c=[],d=0;d=c+d?a>>c&(1<=a.U&&(a.U+=a.P,c=!0);0<=a.Z&&a.Z<=Zc(a)&&(a.P=a.Z=-1,Vc(a),a.R(),c=!0);c&&a.f(Zc(a)+" cycles: checksum="+H(a.ma))}} +l.da=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.F[b]=c,!0;case "run":return this.F[b]=c,c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.i.T)a=!0;else{var b=null,c,h=y(a.id);for(c=0;ca.L/a.M?b=1:d=!0;a.N=b;b=a.ya*a.N;if(a.M!=b){a.M=b;b=a.M.toFixed(2)+"Mhz";var e=a.F.setSpeed;e&&(e.textContent=b);a.f("target speed: "+b)}c&&a.D&&cd(a.D)}cc(a,a.w);a.w=0;a.u=va();a.G=0;ad(a);return d}function dd(a,b){for(var c=a.B.length-1;0<=c;c--){var d=a.B[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function fd(a,b){var c=a.H-=a.I;a.I=0;b&&(a.H=0);return c} +l.Kb=function(){if(this.i.J){this.qa>=this.Aa&&ad(this,!0);this.aa=0;this.ga=va();if(this.G){var a=this.ga-this.G;a>this.za&&(this.u+=a,this.u>this.ga&&(this.u=this.ga))}try{do{var b=dd(this,this.i.Ca?1:this.oa);try{this.Ja(b)}catch(e){if("number"!=typeof e)throw e;}b=fd(this,!0);this.aa+=b;this.w+=b;dc(this,b);bc(this,b);this.O-=b;if(0>=this.O){this.O+=this.oa;++this.Ba>=gd&&(this.D&&Q(this.D,void 0),this.Ba=0);break}}while(this.i.J)}catch(e){this.R();this.D&&this.D.stop(va(),Zc(this));Ia(this,e.stack|| +e.message);return}if(this.i.J){a=setTimeout;b=this.$a;this.G=va();var c=this.za;this.aa&&(c=Math.round(c*this.aa/this.oa));var c=c-(this.G-this.ga),d=this.G-this.u;d&&(this.L=Math.round(this.w/(10*d))/100,864E5<=d&&(this.K=0,$c(this)));if(0>c||this.Lc&&(this.u-=c),c=0;this.qa+=this.aa;this.G+=c;a(b,c)}}}; +function $b(a,b){if(!Ja(a))if(a.i.J)a.f(a.toString()+" busy");else{$c(a);a.i.J=!0;a.i.Ra=!0;var c=a.F.run;c&&(c.textContent="Halt");a.D&&(b&&cd(a.D,!0),a.D.start(a.u,Zc(a)));a.A||a.status("Started");setTimeout(a.$a,0)}}l.Ja=function(){return 0};l.R=function(a){var b=!1;if(this.i.J){fd(this);cc(this,this.w);this.w=0;this.i.J=!1;if(b=this.F.run)b.textContent="Run";this.D&&this.D.stop(va(),Zc(this));b=!0;this.A||this.status("Stopped")}this.i.complete=a;return b};var bd=30,gd=15,Sc=["power","reset"]; +function hd(a){var b=+a.model||1001;Rc.call(this,a,1E6);this.Za=b;this.Ma=+a.addrReset||0;this.fa=null;this.Da=[];this.i.complete=!1}q(hd,Rc);l=hd.prototype;l.reset=function(){this.status("Model "+this.Za);this.i.J&&this.R();this.ea=this.g=this.ra=this.Ma;this.j=0;this.ta=this.Gb;this.Ia=this.Tb;this.fa=null;Uc(this);this.i.error=!1;Rc.prototype.reset.call(this)};l.gb=function(){return 0}; +l.save=function(){var a=new O(this);a.set(0,[this.g,this.ra,this.ea,this.j]);a.set(1,[]);a.set(2,[this.K,this.N,this.i.X]);a.set(3,id(this));a.set(4,ed(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ha();ea();ha();var c=b[Symbol.iterator];b=c?c.call(b):oa(b);this.g=b.next().value;this.ra=b.next().value;this.ea=b.next().value;this.j=b.next().value;b=a[2];this.K=b[0];$c(this,b[1]);this.i.X=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.j].ta(a&16383,a)};l.Tb=function(a,b){var c=this.C;a=this.ea=a;c.g[(a&c.u)>>>c.j].Ia(a&16383,b,a)}; +l.Ja=function(a){this.i.complete=!0;var b=this.A?jd(this.A)?1:this.i.Ra?-1:0:0,c=a?this.i.Ra?0:1:-1;this.i.Ra=!1;this.H=this.I=a;this.j=this.j&-5|(b?4:0);do{if(this.j){if(this.j&4){if(kd(this.A,this.g,c)){this.R();break}++b||(this.j&=-5);c||c++}if(a=this.j&11)this.j&2?this.fa||(this.j&=-3):this.j&1&&this.j++,a=!1;if(a){if(this.j&4&&kd(this.A,this.g,c)){this.R();break}if(0>c)break}}this.j&=15;a=this.g;this.ta(a);this.g=(a+1)%Ib}while(0>>g.j;0>>= +g.j;0>>a.j;0f&&f>=sa&&(f+=ra);f=Math.trunc(Math.abs(f))%ra;void 0===g&&(g=e.size);for(h=d;g--&&h=b.length){G(a,"invalid block at offset "+I(n),4096);break}for(var k=k+2,p=b[k++]&255|(b[k++]&255)<<8,r=b[k++]&255|(b[k++]&255)<<8,m=m+((p&255)+(p>>8)+(r&255)+(r>>8)),K=k,ya=p-=6;0=b.length){G(a,"insufficient data for block at offset "+I(n),4096);break}m+= +b[k++]&255;if(m&255){G(a,"invalid checksum ("+H(m,2,!0)+") for block at offset "+I(n),4096);break}if(ya)for(G(a,"loading "+I(ya)+" bytes at "+I(r)+"-"+I(r+ya),4096);ya--;)fc(a.C,r++,b[K++]);else r&1?f=!0:null==d&&(d=r),null!=d&&G(a,"starting address: "+I(d),4096);h=!0}else k++;else k+=2}if(!h&&(null==c&&(c=e),null!=c)){for(h=0;h=t.Va&&c<=t.ob&&(b=c-(t.Va-t.jb));b&&(a.preventDefault&&a.preventDefault(),d.Pa(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==t.lb&&(b=t.kb);d.Pa(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Pa(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.sa=function(a,b,c,d){this.D=a;this.C=b;this.b=c;this.A=d;E(this)}; +l.ib=function(a){if(!this.g){var b=Tc(this.D,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ib(c[0]);if(d!=this.Ka)return;c=ib(c[1]);if(this.g=xa(c)){var e=this.g.exports;if(e){var g=e.connect;g&&g.call(this.g,this.u);if(this.B=e.receiveData){this.u=a;this.status("Connected "+this.La+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.la=function(a,b){if(!b)if(this.ib(this.u),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.ca=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new O(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Pa=function(a){if("number"==typeof a)this.j.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.u.length&&(a.w=0);if(0>a.w||b!=a.u[a.w])a.u.splice(0,0,b),a.w=0;a.w--}else a.O?b="end":b=a.u[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var g=0;g<=b.length;g++){var f=b.charAt(g);if('"'==f||"'"==f)e?f==e&&(e=null):e=f;else if(f==d&&!e||!f)a.push(ib(b.substring(c,g))),c=g+1}}return a} +function vd(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),g=a.pop();switch(d){case "*":d=g*e;break;case "/":if(!e)return!1;d=g/e;break;case "%":if(!e)return!1;d=g%e;break;case "+":d=g+e;break;case "-":d=g-e;break;case "<<":d=g<>":d=g>>e;break;case ">>>":d=g>>>e;break;case "<":d=g":d=g>e?1:0;break;case ">=":d=g>=e?1:0;break;case "==":d=g==e?1:0;break;case "!=":d=g!=e?1:0;break;case "&":d=g&e;break; +case "^":d=g^e;break;case "|":d=g|e;break;case "&&":d=g&&e?1:0;break;case "||":d=g||e?1:0;break;default:return!1}a.push(d|0)}return!0} +function wd(a,b,c){var d;if(b){b=xd(a,b);for(var e=0,g=!1,f=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,K--;f=p+f;d>>=8}d=H(c,0,!0)+" "+c+". "+Pa(c,0,!0)+" "+("0b"+f);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.f((null!=b?b+": ":"")+d);return e} function Bd(a,b){if(b)return Ad(a,b,a.Z[b]);var c=0;for(b in a.Z)Ad(a,b,a.Z[b]),c++;return 0=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; -function Cd(a){td.call(this,a);this.xa=!1;this.ma=!0;this.I=X();this.wa=X();this.N=X();this.H=[];this.g=this.K=this.G=[];Dd(this);this.P=this.ga=0;this.j=[];this.qa=void 0;Ed(this);this.A=this;this.na={};this.V=this.fb=0;this.U=null;this.M=[];Fd(this,a.messages);this.sa=a.commands;this.Aa=Gd;this.La=[];this.L=0;this.Da=this.ra=null;this.D=this.za=this.ya=this.fa=this.oa=0;this.ea=this.aa=null;var b=this;window?void 0===window[C]&&(window[C]=function(a){return Yc(b,a)}):void 0===global[C]&&(global[C]= -function(a){return Yc(b,a)})}q(Cd,td);function Y(a){a=a&&a.u;null==a&&(a=-1);return a}function X(a,b,c){return{u:void 0===a?null:a,ub:void 0===b?!1:b,ka:!1,ba:c}}function Hd(a){return[a.u,a.ub,a.ba,a.ka,a.Qa]}function Id(a,b){var c=X(b[0],b[1],b[2]);c.ka=b[3];b[4]&&(c.cb=ud(a,c.Qa=b[4]));return c}l=Cd.prototype; -l.ta=function(a,b,c,d){this.B=b;this.C=a;this.b=c;this.ea=a.v;(a=Tc(a,"messages"))&&Fd(this,a);Jd(this,function(a){a:{var b=d.B.g,c=a[0],e=a=0,k=b.length;if(c){a=Y(Z(d,c));if(-1===a){d.f("invalid address: "+c);break a}e=a>>>d.B.j;k=1}d.f("blockid physical blockaddr used size type");d.f("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var p=b[e];p.type==c?m++||d.f("..."):(c=p.type,m=nc[c],p&&d.f(H(p.id,8)+" %"+H(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>>d.C.j;k=1}d.f("blockid physical blockaddr used size type");d.f("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var n=b[e];n.type==c?m++||d.f("..."):(c=n.type,m=nc[c],n&&d.f(H(n.id,8)+" %"+H(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;dd&&(d=a.b.pa(b)),68719476735!=(d&65535)&&(c=a.j[a.P],c.u=b,c.ka=!1,c.ba=void 0,++a.P==a.j.length&&(a.P=0)));return!1} -function Dd(a){var b,c;a.g=["bp"];if(a.K)for(b=1;b>>d.j],!1)}a.K=["br"];if(a.G)for(b=1;b>>d.j],!0);a.G=["bw"];a.oa=0;a.ga=0}l.ua=function(a,b,c){var d=!0;c||te(this,a,b,!1,!0);if(a!=this.g){var e=Y(b);if(-1===e)this.f("invalid address: "+W(this,b.u)),d=!1;else{var f=this.B;f.g[e>>>f.j].ua(e&16383,a==this.G)}}d&&(a.push(b),c?b.ka=!0:(ue(this,a,a.length-1,"set"),Ed(this)));return d}; -function te(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.j],b==a.G));h.ka||Ed(a);break}}return f}function ve(a,b){for(var c=1;cd&&(d=a.b.ta(b)),68719476735!=(d&65535)&&(c=a.j[a.P],c.v=b,c.ka=!1,c.ba=void 0,++a.P==a.j.length&&(a.P=0)));return!1} +function Dd(a){var b,c;a.g=["bp"];if(a.K)for(b=1;b>>d.j],!1)}a.K=["br"];if(a.G)for(b=1;b>>d.j],!0);a.G=["bw"];a.oa=0;a.ga=0}l.va=function(a,b,c){var d=!0;c||te(this,a,b,!1,!0);if(a!=this.g){var e=Y(b);if(-1===e)this.f("invalid address: "+W(this,b.v)),d=!1;else{var g=this.C;g.g[e>>>g.j].va(e&16383,a==this.G)}}d&&(a.push(b),c?b.ka=!0:(ue(this,a,a.length-1,"set"),Ed(this)));return d}; +function te(a,b,c,d,e){var g=!1;c=Y(c);for(var f=1;f>>d.j],b==a.G));h.ka||Ed(a);break}}return g}function ve(a,b){for(var c=1;cb[0]?1:a[0]>>0,g],n=jb(p,k,a.gb);0>n&&p.splice(-(n+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({ad:b,u:c,wb:d,R:e,eb:f})} -function Ae(a,b,c){var d=[],e=Y(b)>>>0;for(b=0;b>>0,h=f.wb;if(e>=g&&eb[0]?1:a[0]>>0,f],p=jb(n,k,a.eb);0>p&&n.splice(-(p+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Yc:b,v:c,tb:d,S:e,bb:g})} +function Ae(a,b,c){var d=[],e=Y(b)>>>0;for(b=0;b>>0,h=g.tb;if(e>=f&&eh[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.f(m)}h[3]&&(g=h[3],f=null);f=xe(a,b,g,f);a.f(f);a.I=b;e-=b.u-k;c++}}} -function we(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.f(Qd+b):(a.O&&(a.f("ended assemble at "+W(a,a.N.u)),a.I=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Ka(a)&&0p||"z"S.length&&(a.f("note: only "+S.length+" available"),K=S.length);O-=K;0>O&&(null==S[S.length-1].u?(K=O+K,O=0):O+=S.length);var tc=[];"call"==Xd&&(Wa=1E5,tc=["CALL"]);for(void 0!==Wd&&a.f(K+" instructions earlier:");0=S.length&&(O=0);a.qa=K;Zd++;Wa--}}Zd||(a.f("no "+Yd+"history available"), -a.qa=void 0)}else{var ja=Z(a,R);if(ja){var ka=0,be="ds"==Ua;if(ca){if("l"==ca.charAt(0))ca=ca.substr(1)||ff,ka=yd(a,ca);else{var ce=Z(a,ca);ce&&(ka=ce.u-ja.u)}0>ka&&(ka=0);65536wc?String.fromCharCode(wc):"."),Ya=Ya/ -256}la&&(la+="\n");la=be?la+(ma+","):la+(R+": "+ma+(de?"":" "+vc))}la&&a.f(la);a.wa=ja;a.ba=hf}}}}break;case "e":if("else"==g[0])break;var Za,ee,fe,ge,he=g[0],xc=g[1];"e"==he||"ew"==he?(Za=2,ee=65535,fe=a.va,ge=a.Za):xc=null;if(null==xc)a.f("edit memory commands:"),a.f("\tew [a] [...] edit words at address a");else{var Cb=Z(a,xc);if(Cb)for(var Db=2;DbAc;){for(var na=null,nf=256;65536>bb.u>>>0;){Bc.u=a.va(bb,2);if(null==bb.u||!nf--)break;if(!(Bc.u&1)){for(var of=a,Eb=Bc,je=null,cb=Eb.u,ke=cb,Cc=1;6>=Cc&&cb;Cc++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.f(m)}h[3]&&(f=h[3],g=null);g=xe(a,b,f,g);a.f(g);a.I=b;e-=b.v-k;c++}}} +function we(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.f(Qd+b):(a.O&&(a.f("ended assemble at "+W(a,a.N.v)),a.I=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Ka(a)&&0n||"z"S.length&&(a.f("note: only "+S.length+" available"),L=S.length);P-=L;0>P&&(null==S[S.length-1].v?(L=P+L,P=0):P+=S.length);var tc=[];"call"==Xd&&(Wa=1E5,tc=["CALL"]);for(void 0!==Wd&&a.f(L+" instructions earlier:");0=S.length&&(P=0);a.pa=L;Zd++;Wa--}}Zd||(a.f("no "+Yd+"history available"), +a.pa=void 0)}else{var ja=Z(a,R);if(ja){var ka=0,be="ds"==Ua;if(ca){if("l"==ca.charAt(0))ca=ca.substr(1)||gf,ka=yd(a,ca);else{var ce=Z(a,ca);ce&&(ka=ce.v-ja.v)}0>ka&&(ka=0);65536wc?String.fromCharCode(wc):"."),Ya=Ya/ +256}la&&(la+="\n");la=be?la+(ma+","):la+(R+": "+ma+(de?"":" "+vc))}la&&a.f(la);a.xa=ja;a.ba=jf}}}}break;case "e":if("else"==f[0])break;var Za,ee,fe,ge,he=f[0],xc=f[1];"e"==he||"ew"==he?(Za=2,ee=65535,fe=a.wa,ge=a.Xa):xc=null;if(null==xc)a.f("edit memory commands:"),a.f("\tew [a] [...] edit words at address a");else{var Cb=Z(a,xc);if(Cb)for(var Db=2;DbAc;){for(var na=null,of=256;65536>bb.v>>>0;){Bc.v=a.wa(bb,2);if(null==bb.v||!of--)break;if(!(Bc.v&1)){for(var pf=a,Eb=Bc,je=null,cb=Eb.v,ke=cb,Cc=1;6>=Cc&&cb;Cc++){if(2> "; -L(function(){for(var a=D(document,C,"debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bLe){if(Me(d,this.K)){this.D=new N(this,"1.34.0",Ve);Me(this.D)&&(We(this,d),a=Xe,Ye(this.D));this.D.set(Se,kb());Ze(this.D);var e=this.g&&!this.I;if(a==Te||xa("Click OK to restore the previous "+Hb+" machine state, or CANCEL to reset the machine.")){if(c=Re(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Me(d,g):("error"==f&&"no machine state"!= -g?(this.Y("Error: "+g),"unable to verify user"==g&&(pb($e,""),this.j=null)):this.f(f+": "+g),Ye(d),Me(d)?(c=Re(d),e=!0):c=!1))}e&&Pe(this,c?d:null)}else a==Xe&&d.clear()}else Pe(this);delete this.K;delete this.H}e=y(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.i.S=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(af(this,this.b,b,c,a),P(this,-2),this.b.X());this.N&&(We(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.w=0}; -function We(a,b){if(xa("There may be a problem with your "+Hb+" machine.\n\nTo help us diagnose it, click OK to send this "+Hb+" machine state to http://www.pcjs.org.")){var c=a.aa;a=a.j||"";b=b.toString();var d={};d.app=Hb;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;J("http://www.pcjs.org/api/v1/report",d,!0)}} -function Ge(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new N(a,"1.34.0"),g=new N(a,"1.34.0",Qe),h=kb();g.set(Se,h);f.set(Se,h);f.set(bf,"1.34.0");f.set(cf,window?window.location.href:null);f.set(df,window?window.navigator.userAgent:"");a.b&&a.b.ca&&(c&&(b&&(a.b.i.X=a.b.i.J),a.b.T()),d=a.b.ca(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.i.S=!1,!1===d&&(e=null)));for(var h=y(a.id),k=0;k=d||30<=(c.wa+=d))&&(e.textContent=c.i.J?c.L.toFixed(2)+"Mhz":"Stopped",c.wa=0)}if(a.v&&(a=a.v,b=b||0,a.K)){c=a.b.i.J;d=!!(a.b.j&8);if(0>=b||60<=(a.I+=b)){e=a.b.g;if(a.F.PC){var f=a.A&&a.A.ba||8,e=e||0,e=8==f?Pa(e,void 0):H(e,void 0);a.F.PC.textContent!=e&&(a.F.PC.textContent=e)}a.I=0}-1>b?a.j=a.b.g:0\nLicense: GPL version 3 or later ");for(b=0;bLe){if(Me(d,this.K)){this.B=new O(this,"1.34.0",Ve);Me(this.B)&&(We(this,d),a=Xe,Ye(this.B));this.B.set(Se,kb());Ze(this.B);var e=this.g&&!this.I;if(a==Te||wa("Click OK to restore the previous "+Hb+" machine state, or CANCEL to reset the machine.")){if(c=Re(d)){var g=d.get("code"),f=d.get("data");g&&("ok"==g?Me(d,f):("error"==g&&"no machine state"!= +f?(this.Y("Error: "+f),"unable to verify user"==f&&(pb($e,""),this.j=null)):this.f(g+": "+f),Ye(d),Me(d)?(c=Re(d),e=!0):c=!1))}e&&Pe(this,c?d:null)}else a==Xe&&d.clear()}else Pe(this);delete this.K;delete this.H}e=y(this.id);for(g=0;ga[1];a=a[2];this.P=!0;this.i.T=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(af(this,this.b,b,c,a),Q(this,-2),this.b.X());this.N&&(We(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.w=0}; +function We(a,b){if(wa("There may be a problem with your "+Hb+" machine.\n\nTo help us diagnose it, click OK to send this "+Hb+" machine state to http://www.pcjs.org.")){var c=a.aa;a=a.j||"";b=b.toString();var d={};d.app=Hb;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;J("http://www.pcjs.org/api/v1/report",d,!0)}} +function Ge(a,b,c){var d,e="none";if(a.w)return null;a.w--;var g=new O(a,"1.34.0"),f=new O(a,"1.34.0",Qe),h=kb();f.set(Se,h);g.set(Se,h);g.set(bf,"1.34.0");g.set(cf,window?window.location.href:null);g.set(df,window?window.navigator.userAgent:"");a.b&&a.b.ca&&(c&&(b&&(a.b.i.X=a.b.i.J),a.b.R()),d=a.b.ca(b,c),"object"===typeof d&&g.set(a.b.id,d),c&&(a.b.i.T=!1,!1===d&&(e=null)));for(var h=y(a.id),k=0;k=d||30<=(c.xa+=d))&&(e.textContent=c.i.J?c.L.toFixed(2)+"Mhz":"Stopped",c.xa=0)}if(a.u&&(a=a.u,b=b||0,a.K)){c=a.b.i.J;d=!!(a.b.j&8);if(0>=b||60<=(a.I+=b)){e=a.b.g;if(a.F.PC){var g=a.A&&a.A.ba||8,e=e||0,e=8==g?Pa(e,void 0):H(e,void 0);a.F.PC.textContent!=e&&(a.F.PC.textContent=e)}a.I=0}-1>b?a.j=a.b.g:0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");J(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Af(a,b,c)}})}else c(a,null)} -function Bf(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=Va(a))}function f(a){e("Error: "+a);k&&(--xf||zb(!0));k=!1}var g,h,k=!0;xf++;ua[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=m:n.appendChild(document.createTextNode(m));p.appendChild(n)}c|| -(c="/versions/pdpjs/1.34.0/components.xsl");m=function(d,h){h?yf(c,null,null,!1,e,function(d,k){k?(ta(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--xf||zb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--xf||zb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?yf(b,a,d,!0,e,m):zf(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return k}window.embedPDP11=function(a,b,c,d){zb(!1);return Bf(a,b,c,d)};window.findMachineComponent=function(a,b){return z(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Ea[a]){for(var c=!0,d=Ea,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;pf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(f?' url="'+f+'"':"")));g||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));f=null;if("<"==a.charAt(0))try{g||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");J(e,null,!0,function(g,f,h){if(h||!f)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=f.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(f=f.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}f=f.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],f);Af(a,b,c)}})}else c(a,null)} +function Bf(a,b,c,d,e){function g(a){if(void 0===k){var b=h&&D(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Va(a))}function f(a){g("Error: "+a);m&&(--xf||zb(!0));m=!1}var h,k,m=!0;xf++;ua[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n));p.appendChild(r)}d|| +(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.0/components.xsl");n=function(e,k){k?yf(d,null,a,null,!1,g,function(a,e){e?(ta(b,d,a),g("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--xf||zb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--xf|| +zb(!0)):f("invalid machine element: "+b):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(a)}):f(e)};"<"!=c.charAt(0)?yf(c,b,a,e,!0,g,n):zf(c,null,b,a,e,!1,g,n)}else f("missing machine element: "+b)}catch(K){f(K.message)}return m}window.embedPDP10=function(a,b,c,d){zb(!1);return Bf("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){zb(!1);return Bf("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return z(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Ea[a]){for(var c=!0,d=Ea,e=a,g=b.length,f=[],h=[],k="",m=null,n=0;na?-b:b}});ha("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ia=Math.pow(2,36),ja=-Math.pow(2,35),t={Ab:0,Qa:1,Cb:2,Db:3,Eb:4,Fb:5,Gb:6,Hb:7,Fa:8,Ib:9,Ra:10,Jb:11,Kb:12,Sa:13,Lb:14,Mb:15,Nb:16,Ob:17,Pb:18,Qb:19,Rb:20,Sb:21,Tb:22,Ub:23,Vb:24,Wb:25,Xb:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ea:65,zb:66,Bb:67,Yb:68,E:69,Zb:70,$b:71,ac:72,bc:73,cc:74,dc:75,ec:76,fc:77,gc:78,hc:79,ic:80,Q:81, -jc:82,kc:83,lc:84,mc:85,nc:86,oc:87,pc:88,qc:89,Wa:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,rc:97,sc:98,tc:99,d:100,e:101,uc:102,vc:103,wc:104,xc:105,yc:106,k:107,zc:108,Ac:109,n:110,Bc:111,p:112,q:113,r:114,Cc:115,t:116,Dc:117,Ec:118,Fc:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Ta:127}; -function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ia=b.comment;this.Va=b;this.exports={};this.i=this.bindings={};a=this.id.indexOf(".");0>a?this.ha=this.id:(this.ia=this.id.substr(0,a),this.ha=this.id.substr(a+1));this.b={ready:!1,ma:!1,za:!1,w:!1,error:!1};this.pa=null;this.b.error=!1;this.o=this.c=this.j=this.m=this.Y=null;v.push(this)}function ka(a,b,c){la[a]&&b&&(la[a][b]=c)}function w(){return Date.now()||+new Date} +var ia=Math.pow(2,36),ja=-Math.pow(2,35),t={yb:0,Oa:1,Ab:2,Bb:3,Cb:4,Db:5,Eb:6,Fb:7,Fa:8,Gb:9,Pa:10,Hb:11,Ib:12,Qa:13,Jb:14,Kb:15,Lb:16,Mb:17,Nb:18,Ob:19,Pb:20,Qb:21,Rb:22,Sb:23,Tb:24,Ub:25,Vb:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ea:65,xb:66,zb:67,Wb:68,E:69,Xb:70,Yb:71,Zb:72,$b:73,ac:74,bc:75,cc:76,dc:77,ec:78,fc:79,gc:80,Q:81, +hc:82,ic:83,jc:84,kc:85,lc:86,mc:87,nc:88,oc:89,Ua:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pc:97,qc:98,rc:99,d:100,e:101,sc:102,tc:103,uc:104,vc:105,wc:106,k:107,xc:108,yc:109,n:110,zc:111,p:112,q:113,r:114,Ac:115,t:116,Bc:117,Cc:118,Dc:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Ra:127}; +function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ia=b.comment;this.Ta=b;this.exports={};this.i=this.bindings={};a=this.id.indexOf(".");0>a?this.ia=this.id:(this.ja=this.id.substr(0,a),this.ia=this.id.substr(a+1));this.b={ready:!1,na:!1,Ba:!1,w:!1,error:!1};this.qa=null;this.b.error=!1;this.o=this.c=this.j=this.m=this.Y=null;v.push(this)}function ka(a,b,c){la[a]&&b&&(la[a][b]=c)}function w(){return Date.now()||+new Date} function x(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return""+c}function F(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function wa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Aa[a]})}function Ba(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"}; -function Ca(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function H(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,h=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),h;var g=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(g.onreadystatechange=function(){4===g.readyState&&(f=g.responseText,200==g.status||!g.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=g.status||-1),d&&d(a, -f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");g.open("POST",a,c);g.setRequestHeader("Content-type","application/x-www-form-urlencoded");g.send(l)}else g.open("GET",a,c),"bytes"==b&&g.overrideMimeType("text/plain; charset=x-user-defined"),g.send();c||(f=g.responseText,200!=g.status&&(e=g.status||-1),d&&d(a,f,e),h=[f,e]);return h} -function Da(a,b){var c,d={D:null,I:null,R:null,P:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,h;if("<"==b.substr(0,1))throw Error(b);h=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.R=h.load;d.P=h.exec;if(e=h.bytes)d.D=e;else if(e=h.words)for(d.D=Array(2*e.length),f=c=0;c>8&255;else if(e=h.data)for(d.D=Array(4*e.length),f=c=0;c>8&255,d.D[f++]=e[c]>>16&255,d.D[f++]=e[c]>>24&255;else d.D=h;d.I=h.symbols;d.D.length?1==d.D.length&&(x(d.D[0]),d=null):(x("Empty resource: "+a),d=null)}catch(g){x("Resource data error ("+a+"): "+g.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c>=3;return""+c}function F(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function xa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Ba[a]})}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"}; +function Da(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function H(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function Ea(a,b){var c,d={D:null,I:null,R:null,P:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.R=g.load;d.P=g.exec;if(e=g.bytes)d.D=e;else if(e=g.words)for(d.D=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.D=Array(4*e.length),f=c=0;c>8&255,d.D[f++]=e[c]>>16&255,d.D[f++]=e[c]>>24&255;else d.D=g;d.I=g.symbols;d.D.length?1==d.D.length&&(x(d.D[0]),d=null):(x("Empty resource: "+a),d=null)}catch(h){x("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca;a++)this.a["S"+a]=[0,0,!1,!1,this.fb,a];this.o=this.c=this.j=this.m=null;this.exports={hold:this.Ya,toggle:this.sb,reset:this.ob, -set:this.rb};E(this)}r(Ua,u);k=Ua.prototype;k.reset=function(a){this.stop();a&&M(this,this.h=0)}; +function Ua(a,b){u.call(this,"Panel",a);this.A=this.B=0;this.O=b;this.f=this.v=this.g=this.h=0;this.F=this.H=-1;this.K=this.L=this.s=!1;this.M=Va;this.l={};this.a={START:[1,1,!0,!1,this.eb],STEP:[1,1,!1,!1,this.fb],ENABLE:[1,1,!1,!1,this.Za],CONT:[1,1,!0,!1,this.Xa],DEP:[0,0,!0,!1,this.Ya],EXAM:[1,1,!0,!1,this.$a],LOAD:[1,1,!0,!1,this.bb],TEST:[0,0,!0,!1,this.ab]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.cb,a];this.o=this.c=this.j=this.m=null;this.exports={hold:this.Wa,toggle:this.qb,reset:this.mb, +set:this.pb};E(this)}r(Ua,u);k=Ua.prototype;k.reset=function(a){this.stop();a&&N(this,this.h=0)}; k.S=function(a,b,c,d){if(this.m&&this.m.S(a,b,c,d)||this.c&&this.c.S(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.i[b]=c,this.B++,!0;default:return"led"==a||"rled"==a?(this.i[b]=c,this.l[b]=d?1:0,this.B++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[b]=[d?1:0,d?1:0]),this.i[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){Wa(a,b)}}(this, -b),a.onmouseup=a.onmouseout=function(a,b){return function(){N(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Wa(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){N(a,b)}}(this,b),!0):u.prototype.S.call(this,a,b,c,d)}};k.U=function(a,b,c,d){this.m=a;this.j=b;this.c=c;this.o=d;Xa(this);Ya(this)};k.T=function(a,b){if(!b)if(this.O&&Za(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.N=function(a){return a?this.save():!0}; -k.save=function(){var a=new O(this);a.set(0,[this.f,this.h,this.g]);return a.data()};k.restore=function(a){if(a=a[0])P(this,this.f=a[0]),M(this,this.h=a[1]),$a(this,a[2]);return!0};k.ob=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}Ya(this);return!0};function ab(a,b,c){if(a=a.i[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Xa(a,b){for(var c in a.l)ab(a,c,null!=b?b:a.l[c])} -function bb(a,b,c){if(a=a.i[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Ya(a){for(var b in a.a)bb(a,b,a.a[b][1])}k.Ya=function(a,b,c){if(Wa(this,b)){if(c){var d=this;setTimeout(function(){N(d,b);a&&a()},+c);return!1}N(this,b)}return!0}; -k.rb=function(a,b){if("SR"==a){a=b;b=8;var c;if(a){b||(b=10);var d=a.charAt(0),e=0>>a.f].Ba(b&16383,b)}else a=this.c.Z(this.f);M(this,this.h=a)}};k.eb=function(a){a||this.c.b.u||P(this,this.g)};k.cb=function(a){a?(this.s=!0,Xa(this,!0)):(this.s=!1,Xa(this),$a(this,0))};k.fb=function(a,b){this.g=a?this.g|1<c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.a["S"+b][1]=a.g&1<d.length){for(var e=0,f=Array(4096),h=0;h>>a.f;0f&&(m=f);if(g&&g.size){if(g.type==d){if(e+f<=g.X)return g.ra+=g.X-e,g.X=e,!0;if(e>=g.X+g.ra){m=g.size-(e-l);m>f&&(m=f);g.ra=e-g.X+m;e=l+16384;f-=m;h++;continue}}return pb(qb,e,f)}e=new T(0,e,m,16384,d);mb(e,g);a.a[h++]=e;e=l+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+rb[d]+" at "+va(b)),!0):pb(sb,b,c)}function kb(a,b,c){a.a[(b&a.g)>>>a.f].sa(b&16383,c&65535,b)} -function nb(a){for(var b=0,c=[],d=0;d=a+b?c>>a&(1<=a.K&&(a.K+=a.da,c=!0);0<=a.ea&&a.ea<=W(a)&&(a.da=a.ea=-1,Fb(a),R(a),c=!0);c&&a.J(W(a)+" cycles: checksum="+F(a.ja))}} -k.S=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.i[b]=c,!0;case "run":return this.i[b]=c,c.onclick=function(){var a;if(a=d.m)if(a=d.m,a.b.w)a=!0;else{var b=null,c,g=y(a.id);for(c=0;ca.F/a.H&&(b=1);a.L=b;b=a.va*a.L;if(a.H!=b){a.H=b;b=a.H.toFixed(2)+"Mhz";var d=a.i.setSpeed;d&&(d.textContent=b);a.J("target speed: "+b)}c&&a.m&&(c=a.m,c.Y&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.Y.focus(),window&&window.scrollTo(b,d)))}hb(a,a.h);a.h=0;a.g=w();a.s=0;Hb(a)}function Jb(a){for(var b=[],c=0;c>>a.f].Ca(b&16383,b)}else a=this.c.ba(this.f);N(this,this.h=a)}};k.bb=function(a){a||this.c.b.u||Q(this,this.g)};k.ab=function(a){a?(this.s=!0,Xa(this,!0)):(this.s=!1,Xa(this),$a(this,0))};k.cb=function(a,b){this.g=a?this.g|1<c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.a["S"+b][1]=a.g&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.f;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.X)return h.sa+=h.X-e,h.X=e,!0;if(e>=h.X+h.sa){m=h.size-(e-l);m>f&&(m=f);h.sa=e-h.X+m;e=l+16384;f-=m;g++;continue}}return pb(qb,e,f)}e=new U(0,e,m,16384,d);mb(e,h);a.a[g++]=e;e=l+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+rb[d]+" at "+wa(b)),!0):pb(sb,b,c)}function kb(a,b,c){a.a[(b&a.g)>>>a.f].ua(b&16383,c&65535,b)} +function nb(a){for(var b=0,c=[],d=0;d=c+d?a>>c&(1<=a.K&&(a.K+=a.ea,c=!0);0<=a.fa&&a.fa<=X(a)&&(a.ea=a.fa=-1,Fb(a),S(a),c=!0);c&&a.J(X(a)+" cycles: checksum="+F(a.ka))}} +k.S=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.i[b]=c,!0;case "run":return this.i[b]=c,c.onclick=function(){var a;if(a=d.m)if(a=d.m,a.b.w)a=!0;else{var b=null,c,h=y(a.id);for(c=0;ca.F/a.H&&(b=1);a.L=b;b=a.xa*a.L;if(a.H!=b){a.H=b;b=a.H.toFixed(2)+"Mhz";var d=a.i.setSpeed;d&&(d.textContent=b);a.J("target speed: "+b)}c&&a.m&&(c=a.m,c.Y&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.Y.focus(),window&&window.scrollTo(b,d)))}hb(a,a.h);a.h=0;a.g=w();a.s=0;Hb(a)}function Jb(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Kb(a,b){var c=a.v-=a.A;a.A=0;b&&(a.v=0);return c} -k.pb=function(){if(this.b.u){this.la>=this.xa&&Hb(this,!0);this.O=0;this.ba=w();if(this.s){var a=this.ba-this.s;a>this.wa&&(this.g+=a,this.g>this.ba&&(this.g=this.ba))}try{do{for(var b,c=this.b.na?1:this.fa,d=this.l.length-1;0<=d;d--){var e=this.l[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ta(b)}catch(f){if("number"!=typeof f)throw f;}b=Kb(this,!0);this.O+=b;this.h+=b;ib(this,b);gb(this,b);this.M-=b;if(0>=this.M){this.M+=this.fa;++this.ya>=Lb&&(this.m&&S(this.m,void 0),this.ya=0);break}}while(this.b.u)}catch(f){R(this); -this.m&&this.m.stop(w(),W(this));a=f.stack||f.message;this.b.error=!0;this.C(a);return}if(this.b.u){a=setTimeout;b=this.Ja;this.s=w();c=this.wa;this.O&&(c=Math.round(c*this.O/this.fa));c-=this.s-this.ba;if(d=this.s-this.g)this.F=Math.round(this.h/(10*d))/100,864E5<=d&&(this.B=0,X(this));if(0>c||this.Fc&&(this.g-=c),c=0;this.la+=this.O;this.s+=c;a(b,c)}}}; -function Q(a){var b;a.b.error?(a.J(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.b.u)a.J(a.toString()+" busy");else{X(a);a.b.u=!0;a.b.Ca=!0;if(b=a.i.run)b.textContent="Halt";a.m&&a.m.start(a.g,W(a));a.o||a.status("Started");setTimeout(a.Ja,0)}}k.ta=function(){return 0};function R(a){var b=!1;if(a.b.u){Kb(a);hb(a,a.h);a.h=0;a.b.u=!1;if(b=a.i.run)b.textContent="Run";a.m&&a.m.stop(w(),W(a));b=!0;a.o||a.status("Stopped")}a.b.complete=void 0;return b}var Ib=30,Lb=15,Db=["power","reset"]; -function Mb(a){var b=+a.model||1001;U.call(this,a,6666667);this.Ua=b;this.Ha=+a.addrReset||0;this.W=null;this.Ga=[];this.b.complete=!1}r(Mb,U);k=Mb.prototype;k.reset=function(){this.status("Model "+this.Ua);this.b.u&&R(this);this.V=this.f=this.Ka=this.Ha;this.a=0;this.Z=this.lb;this.ca=this.yb;this.W=null;Eb(this);this.b.error=!1;U.prototype.reset.call(this)};k.Ma=function(){return 0}; -k.save=function(){var a=new O(this);a.set(0,[this.f,this.Ka,this.V,this.a]);a.set(1,[]);a.set(2,[this.B,this.L,this.b.G]);a.set(3,Nb(this));a.set(4,Jb(this));return a.data()}; -k.restore=function(a){var b;b=a[0];ea();ba();ea();var c=b[Symbol.iterator];b=c?c.call(b):fa(b);this.f=b.next().value;this.Ka=b.next().value;this.V=b.next().value;this.a=b.next().value;b=a[2];this.B=b[0];X(this,b[1]);this.b.G=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.f].Z(a&16383,a)};k.yb=function(a,b){var c=this.j;a=this.V=a;c.a[(a&c.g)>>>c.f].ca(a&16383,b,a)}; -k.ta=function(a){this.b.complete=!0;var b=a?this.b.Ca?0:1:-1;this.b.Ca=!1;this.v=this.A=a;this.a=this.a&-5|0;do{if(a=this.a)if(a=this.a&11)this.a&2?this.W||(this.a&=-3):this.a&1&&this.a++,a=!1;if(a){if(this.a&4&&this.o.h(this.f,b)){R(this);break}if(0>b)break}this.a&=15;a=this.f;this.Z(a);this.f=(a+1)%Sa}while(0=this.za&&Hb(this,!0);this.O=0;this.ca=w();if(this.s){var a=this.ca-this.s;a>this.ya&&(this.g+=a,this.g>this.ca&&(this.g=this.ca))}try{do{for(var b,c=this.b.oa?1:this.ga,d=this.l.length-1;0<=d;d--){var e=this.l[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.va(b)}catch(f){if("number"!=typeof f)throw f;}b=Kb(this,!0);this.O+=b;this.h+=b;ib(this,b);gb(this,b);this.M-=b;if(0>=this.M){this.M+=this.ga;++this.Aa>=Lb&&(this.m&&T(this.m,void 0),this.Aa=0);break}}while(this.b.u)}catch(f){S(this); +this.m&&this.m.stop(w(),X(this));a=f.stack||f.message;this.b.error=!0;this.C(a);return}if(this.b.u){a=setTimeout;b=this.Ja;this.s=w();c=this.ya;this.O&&(c=Math.round(c*this.O/this.ga));c-=this.s-this.ca;if(d=this.s-this.g)this.F=Math.round(this.h/(10*d))/100,864E5<=d&&(this.B=0,Gb(this));if(0>c||this.Fc&&(this.g-=c),c=0;this.ma+=this.O;this.s+=c;a(b,c)}}}; +function R(a){var b;a.b.error?(a.J(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.b.u)a.J(a.toString()+" busy");else{Gb(a);a.b.u=!0;a.b.Da=!0;if(b=a.i.run)b.textContent="Halt";a.m&&a.m.start(a.g,X(a));a.o||a.status("Started");setTimeout(a.Ja,0)}}k.va=function(){return 0};function S(a){var b=!1;if(a.b.u){Kb(a);hb(a,a.h);a.h=0;a.b.u=!1;if(b=a.i.run)b.textContent="Run";a.m&&a.m.stop(w(),X(a));b=!0;a.o||a.status("Stopped")}a.b.complete=void 0;return b}var Ib=30,Lb=15,Db=["power","reset"]; +function Mb(a){var b=+a.model||1001;V.call(this,a,1E6);this.Sa=b;this.Ha=+a.addrReset||0;this.W=null;this.Ga=[];this.b.complete=!1}r(Mb,V);k=Mb.prototype;k.reset=function(){this.status("Model "+this.Sa);this.b.u&&S(this);this.V=this.f=this.Ka=this.Ha;this.a=0;this.ba=this.jb;this.ta=this.wb;this.W=null;Eb(this);this.b.error=!1;V.prototype.reset.call(this)};k.Ma=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[this.f,this.Ka,this.V,this.a]);a.set(1,[]);a.set(2,[this.B,this.L,this.b.G]);a.set(3,Nb(this));a.set(4,Jb(this));return a.data()}; +k.restore=function(a){var b;b=a[0];ea();ba();ea();var c=b[Symbol.iterator];b=c?c.call(b):fa(b);this.f=b.next().value;this.Ka=b.next().value;this.V=b.next().value;this.a=b.next().value;b=a[2];this.B=b[0];Gb(this,b[1]);this.b.G=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.f].ba(a&16383,a)};k.wb=function(a,b){var c=this.j;a=this.V=a;c.a[(a&c.g)>>>c.f].ta(a&16383,b,a)}; +k.va=function(a){this.b.complete=!0;var b=a?this.b.Da?0:1:-1;this.b.Da=!1;this.v=this.A=a;this.a=this.a&-5|0;do{if(a=this.a)if(a=this.a&11)this.a&2?this.W||(this.a&=-3):this.a&1&&this.a++,a=!1;if(a){if(this.a&4&&this.o.h(this.f,b)){S(this);break}if(0>b)break}this.a&=15;a=this.f;this.ba(a);this.f=(a+1)%Sa}while(0>>f.f;0>>=f.f;0>>f.f;0>>=f.f;0>>a.f;0h&&h>=ja&&(h+=ia);h=Math.trunc(Math.abs(h))%ia;void 0===f&&(f=e.size);for(g=d;f--&&g=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,n=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(n&255)+(n>>8)),Qa=l,Gb=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(Gb)for(;Gb--;)kb(a.j,n++,b[Qa++]);else n&1?h=!0:null==d&&(d=n);g=!0}else l++;else l+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g< -b.length;g++)kb(a.j,c+g,b[g]);g=!0}if(g){if(null==d||h)R(a.c),f=!1;null!=d&&(a=a.c,a.Ha=d,a.f=d%Sa,f?a.b.w?a.b.u||Q(a):a.b.G=!0:a.o&&a.b.w?R(a)||a.m.b.reset||(a.o.g(),S(a.m,-1)):!1===f&&R(a),!a.b.u&&a.ga&&a.ga.stop())}return g}I(function(){for(var a=D(document,C,"ram"),b=0;b=t.Ea&&c<=t.Wa&&(b=c-(t.Ea-t.Qa));b&&(a.preventDefault&&a.preventDefault(),d.qa(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==t.Sa&&(b=t.Ra);d.qa(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.qa(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.U=function(a,b,c,d){this.m=a;this.j=b;this.c=c;this.o=d;E(this)}; -k.Na=function(a){if(!this.a){var b=V(this.m,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ba(c[0]);if(d!=this.ha)return;c=Ba(c[1]);if(this.a=na(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.g);if(this.l=e.receiveData){this.g=a;this.status("Connected "+this.ia+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.T=function(a,b){if(!b)if(this.Na(this.g),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -k.N=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.qa=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d>>a.f;0g&&g>=ja&&(g+=ia);g=Math.trunc(Math.abs(g))%ia;void 0===f&&(f=e.size);for(h=d;f--&&h=b.length)break;for(var l=l+2,n=b[l++]&255|(b[l++]&255)<<8,p=b[l++]&255|(b[l++]&255)<<8,m=m+((n&255)+(n>>8)+(p&255)+(p>>8)),M=l,qa=n-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(qa)for(;qa--;)kb(a.j,p++,b[M++]);else p&1?g=!0:null==d&&(d=p);h=!0}else l++;else l+=2}if(!h&&(null==c&&(c=e),null!=c)){for(h=0;h=t.Ea&&c<=t.Ua&&(b=c-(t.Ea-t.Oa));b&&(a.preventDefault&&a.preventDefault(),d.ra(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==t.Qa&&(b=t.Pa);d.ra(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.ra(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.U=function(a,b,c,d){this.m=a;this.j=b;this.c=c;this.o=d;E(this)}; +k.Na=function(a){if(!this.a){var b=W(this.m,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ca(c[0]);if(d!=this.ia)return;c=Ca(c[1]);if(this.a=na(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.g);if(this.l=e.receiveData){this.g=a;this.status("Connected "+this.ja+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.T=function(a,b){if(!b)if(this.Na(this.g),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +k.N=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.ra=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d\nLicense: GPL version 3 or later ");for(b=0;bXb){if(Z(d,this.B)){this.l=new O(this,"1.34.0",fc);Z(this.l)&&(gc(this,d),a=hc,ic(this.l));this.l.set(cc,Ca());jc(this.l);var e=this.a&&!this.A;if(a==dc||ma("Click OK to restore the previous "+L+" machine state, or CANCEL to reset the machine.")){if(c=bc(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?Z(d,h):("error"==f&&"no machine state"!= -h?(this.C("Error: "+h),"unable to verify user"==h&&(Ha(kc,""),this.f=null)):this.J(f+": "+h),ic(d),Z(d)?(c=bc(d),e=!0):c=!1))}e&&$b(this,c?d:null)}else a==hc&&d.clear()}else $b(this);delete this.B;delete this.v}e=y(this.id);for(f=0;fa[1];a=a[2];this.M=!0;this.b.w=!0;var d=this.i.power;d&&(d.textContent="Shutdown");this.c&&(lc(this,this.c,b,c,a),S(this,-2),this.c.G());this.K&&(gc(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.h=0}; +function Ub(a,b,c){u.call(this,"Computer",a);this.b.w=!1;this.L=null;Vb(this,b);this.H=W(this,"autoPower",a,6);this.h=0;this.V=+a.busWidth||+a.buswidth;this.B=this.s=this.F=null;this.A=this.O=!1;this.v=this.l=null;this.M=this.K=!1;this.W=W(this,"url")||"";(Math.random()+.1).toString(36);this.f=Wb(this);if(this.c=z("CPU",this.id)){this.o=z("Debugger",this.id);this.j=new lb({id:this.ja+".bus",busWidth:this.V},this.c,this.o);var d,e=y(this.id);if((this.g=z("Panel",this.id))&&this.g.Y)for(b=0;b\nLicense: GPL version 3 or later ");for(b=0;bXb){if(Z(d,this.B)){this.l=new P(this,"1.34.0",fc);Z(this.l)&&(gc(this,d),a=hc,ic(this.l));this.l.set(cc,Da());jc(this.l);var e=this.a&&!this.A;if(a==dc||ma("Click OK to restore the previous "+L+" machine state, or CANCEL to reset the machine.")){if(c=bc(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Z(d,g):("error"==f&&"no machine state"!= +g?(this.C("Error: "+g),"unable to verify user"==g&&(Ia(kc,""),this.f=null)):this.J(f+": "+g),ic(d),Z(d)?(c=bc(d),e=!0):c=!1))}e&&$b(this,c?d:null)}else a==hc&&d.clear()}else $b(this);delete this.B;delete this.v}e=y(this.id);for(f=0;fa[1];a=a[2];this.M=!0;this.b.w=!0;var d=this.i.power;d&&(d.textContent="Shutdown");this.c&&(lc(this,this.c,b,c,a),T(this,-2),this.c.G());this.K&&(gc(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.h=0}; function gc(a,b){if(ma("There may be a problem with your "+L+" machine.\n\nTo help us diagnose it, click OK to send this "+L+" machine state to http://www.pcjs.org.")){var c=a.W;a=a.f||"";b=b.toString();var d={};d.app=L;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;H("http://www.pcjs.org/api/v1/report",d,!0)}} -function mc(a,b,c){var d,e="none";if(a.h)return null;a.h--;var f=new O(a,"1.34.0"),h=new O(a,"1.34.0",ac),g=Ca();h.set(cc,g);f.set(cc,g);f.set(nc,"1.34.0");f.set(oc,window?window.location.href:null);f.set(pc,window?window.navigator.userAgent:"");a.c&&a.c.N&&(c&&(b&&(a.c.b.G=a.c.b.u),R(a.c)),d=a.c.N(b,c),"object"===typeof d&&f.set(a.c.id,d),c&&(a.c.b.w=!1,!1===d&&(e=null)));for(var g=y(a.id),l=0;l=d||30<=(c.ua+=d))&&(e.textContent=c.b.u?c.F.toFixed(2)+"Mhz":"Stopped",c.ua=0)}if(a.g&&(a=a.g,b=b||0,a.B)){c=a.c.b.u;d=!!(a.c.a&8);if(0>=b||60<=(a.A+=b)){e=a.c.f;if(a.i.PC){var f=a.o&&a.o.l||8,e=e||0,e=8==f?va(e,void 0):F(e,void 0);a.i.PC.textContent!=e&&(a.i.PC.textContent=e)}a.A=0}-1>b?a.f=a.c.f:0=d||30<=(c.wa+=d))&&(e.textContent=c.b.u?c.F.toFixed(2)+"Mhz":"Stopped",c.wa=0)}if(a.g&&(a=a.g,b=b||0,a.B)){c=a.c.b.u;d=!!(a.c.a&8);if(0>=b||60<=(a.A+=b)){e=a.c.f;if(a.i.PC){var f=a.o&&a.o.l||8,e=e||0,e=8==f?wa(e,void 0):F(e,void 0);a.i.PC.textContent!=e&&(a.i.PC.textContent=e)}a.A=0}-1>b?a.f=a.c.f:0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");H(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=g[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);g[0]!=l&&(h=h.replace(g[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);xc(a,b,c)}})}else c(a,null)} -function yc(a,b,c,d){function e(a){if(void 0===g){var b=h&&D(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=za(a))}function f(a){e("Error: "+a);l&&(--uc||K(!0));l=!1}var h,g,l=!0;uc++;la[a]={};try{if(h=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=m:n.appendChild(document.createTextNode(m));p.appendChild(n)}c|| -(c="/versions/pdpjs/1.34.0/components.xsl");m=function(d,g){g?vc(c,null,null,!1,e,function(d,l){l?(ka(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=g.transformNode(l))?(h.outerHTML=l,--uc||K(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(g,document))?h.parentNode?(h.parentNode.replaceChild(l,h),--uc||K(!0)):f("invalid machine element: "+a): -f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?vc(b,a,d,!0,e,m):wc(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(Qa){f(Qa.message)}return l}window.embedPDP11=function(a,b,c,d){K(!1);return yc(a,b,c,d)};window.findMachineComponent=function(a,b){return z(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!pa[a]){for(var c=!0,d=pa,e=a,f=b.length,h=[],g=[],l="",m=null,p=0;pg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){g=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");H(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);xc(a,b,c)}})}else c(a,null)} +function yc(a,b,c,d,e){function f(a){if(void 0===l){var b=h&&D(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--uc||K(!0));m=!1}var h,l,m=!0;uc++;la[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],M=document.createElement("style");M.type="text/css";M.styleSheet?M.styleSheet.cssText=n:M.appendChild(document.createTextNode(n));p.appendChild(M)}d|| +(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.0/components.xsl");n=function(e,l){l?vc(d,null,a,null,!1,f,function(a,e){e?(ka(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(h.outerHTML=e,--uc||K(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--uc|| +K(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?vc(c,b,a,e,!0,f,n):wc(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(qa){g(qa.message)}return m}window.embedPDP10=function(a,b,c,d){K(!1);return yc("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){K(!1);return yc("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return z(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!pa[a]){for(var c=!0,d=pa,e=a,f=b.length,g=[],h=[],l="",m=null,n=0;nc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c":62,"?":63,"@":64,Id:65,wi:66,Ci:67,cj:68,E:69,ij:70,lj:71,xj:72,zj:73,Aj:74,Bj:75,Cj:76,Fj:77,Hj:78,Nj:79,Qj:80,Q:81,Sj:82,Vj:83,dk:84,fk:85,hk:86,ik:87,mk:88,nk:89,xf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pk:97,qk:98,tk:99,d:100,e:101,uk:102,vk:103,wk:104,xk:105,Bk:106,k:107,Ck:108,Dk:109,n:110,Ek:111,p:112,q:113,r:114,Fk:115,t:116,Ik:117,Jk:118,Kk:119,x:120, -y:121,z:122,"{":123,"|":124,"}":125,"~":126,cc:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Vd=b.comment;this.vf=b;this.exports={};this.H=this.bindings={};a=this.id.indexOf(".");0>a?this.Mb=this.id:(this.wb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,fb:!1,wd:!1,aa:!1,error:!1};this.Nc=null;this.A.error=!1;this.ha=c||0;this.F=this.f=this.D=this.J=this.Ua=null;ma.push(this)}function na(a,b,c){pa[a]&&b&&(pa[a][b]=c)} +var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Ai:0,Fe:1,Hi:2,Ii:3,Ji:4,Ki:5,Li:6,Mi:7,Nd:8,Ni:9,Ge:10,Oi:11,Pi:12,He:13,Qi:14,Ri:15,Si:16,Ti:17,Ui:18,Vi:19,Wi:20,Xi:21,Yi:22,Zi:23,$i:24,aj:25,bj:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39, +"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wi:66,Ci:67,cj:68,E:69,ij:70,lj:71,xj:72,zj:73,Aj:74,Bj:75,Cj:76,Fj:77,Hj:78,Nj:79,Qj:80,Q:81,Sj:82,Vj:83,dk:84,fk:85,hk:86,ik:87,mk:88,nk:89,xf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pk:97,qk:98,tk:99,d:100,e:101,uk:102,vk:103,wk:104,xk:105,Bk:106,k:107,Ck:108,Dk:109,n:110,Ek:111,p:112,q:113,r:114,Fk:115,t:116,Ik:117,Jk:118,Kk:119,x:120, +y:121,z:122,"{":123,"|":124,"}":125,"~":126,cc:127};function u(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Wd=b.comment;this.vf=b;this.exports={};this.H=this.bindings={};a=this.id.indexOf(".");0>a?this.Mb=this.id:(this.vb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,eb:!1,wd:!1,aa:!1,error:!1};this.Nc=null;this.A.error=!1;this.ha=c||0;this.F=this.f=this.D=this.J=this.Ta=null;ma.push(this)}function na(a,b,c){pa[a]&&b&&(pa[a][b]=c)} function qa(){return Date.now()||+new Date}function v(a){window&&window.alert(a)}function ra(a){var b=!1;window&&(b=window.confirm(a));return b}function ta(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function bb(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function cb(a,b){var c,d={da:null,ga:null,za:null,ya:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.za=g.load;d.ya=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ga=g.symbols;d.da.length?1==d.da.length&&(v(d.da[0]),d=null):(v("Empty resource: "+a),d=null)}catch(k){v("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ya=g.load;d.xa=g.exec;if(e=g.bytes)d.ca=e;else if(e=g.words)for(d.ca=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ca=Array(4*e.length),f=c=0;c>8&255,d.ca[f++]=e[c]>>16&255,d.ca[f++]=e[c]>>24&255;else d.ca=g;d.ga=g.symbols;d.ca.length?1==d.ca.length&&(v(d.ca[0]),d=null):(v("Empty resource: "+a),d=null)}catch(k){v("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca;a++)this.b["S"+a]=[0,0,!1,!1,this.Sf,a];this.F=this.f=this.D=this.J=null;this.exports={hold:this.Hf,toggle:this.lh, -reset:this.gh,set:this.kh};y(this)}p(Rb,r);function Tb(a,b){return Ub(a,a.qb=b)}h=Rb.prototype;h.reset=function(a){this.stop();a&&Tb(this,0)}; +function Rb(a,b){u.call(this,"Panel",a,512);this.j=this.u=0;this.M=b;this.fa=this.g=this.Wa=this.Eb=0;this.B=this.C=-1;this.G=this.I=this.w=!1;this.L=Sb;this.i={};this.b={START:[1,1,!0,!1,this.Tf],STEP:[1,1,!1,!1,this.Uf],ENABLE:[1,1,!1,!1,this.Of],CONT:[1,1,!0,!1,this.Mf],DEP:[0,0,!0,!1,this.Nf],EXAM:[1,1,!0,!1,this.Pf],LOAD:[1,1,!0,!1,this.Rf],TEST:[0,0,!0,!1,this.Qf]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Sf,a];this.F=this.f=this.D=this.J=null;this.exports={hold:this.Hf,toggle:this.lh, +reset:this.gh,set:this.kh};y(this)}p(Rb,u);function Tb(a,b){return Ub(a,a.Eb=b)}h=Rb.prototype;h.reset=function(a){this.stop();a&&Tb(this,0)}; h.va=function(a,b,c,d){if(this.J&&this.J.va(a,b,c,d)||this.f&&this.f.va(a,b,c,d)||this.F&&this.F.va(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.H[b]=c,this.u++,!0;default:return"led"==a||"rled"==a?(this.H[b]=c,this.i[b]=d?1:0,this.u++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.H[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Vb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Wb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Vb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Wb(a,b)}}(this,b),!0):r.prototype.va.call(this,a,b,c,d)}};h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;Xb(b,this,dc);ec(b,this.reset.bind(this));fc(this);gc(this)}; -h.Da=function(a,b){if(!b)if(this.M&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,[this.ba,this.qb,this.Ra]);return a.data()};h.restore=function(a){if(a=a[0])ic(this,this.ba=a[0]),Tb(this,a[1]),jc(this,a[2]);return!0};h.gh=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}gc(this);return!0};function kc(a,b,c){if(a=a.H[b])a.style.backgroundColor=c?"#ff0000":"#000000"} -function fc(a,b){for(var c in a.i)kc(a,c,null!=b?b:a.i[c])}function lc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gc(a){for(var b in a.b)lc(a,b,a.b[b][1])}function mc(a,b,c,d){if(a.H[b]){var e=a.F&&a.F.Ba||8;c=c||0;c=8==e?E(c,d):F(c,d);a.H[b].textContent!=c&&(a.H[b].textContent=c)}}h.Hf=function(a,b,c){if(Vb(this,b)){if(c){var d=this;setTimeout(function(){Wb(d,b);a&&a()},+c);return!1}Wb(this,b)}return!0}; +b){return function(){Vb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Wb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Vb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Wb(a,b)}}(this,b),!0):u.prototype.va.call(this,a,b,c,d)}};h.za=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;Xb(b,this,dc);ec(b,this.reset.bind(this));fc(this);gc(this)}; +h.Ca=function(a,b){if(!b)if(this.M&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};h.Ba=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,[this.fa,this.Eb,this.Wa]);return a.data()};h.restore=function(a){if(a=a[0])ic(this,this.fa=a[0]),Tb(this,a[1]),jc(this,a[2]);return!0};h.gh=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}gc(this);return!0};function kc(a,b,c){if(a=a.H[b])a.style.backgroundColor=c?"#ff0000":"#000000"} +function fc(a,b){for(var c in a.i)kc(a,c,null!=b?b:a.i[c])}function lc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gc(a){for(var b in a.b)lc(a,b,a.b[b][1])}function mc(a,b,c,d){if(a.H[b]){var e=a.F&&a.F.Aa||8;c=c||0;c=8==e?E(c,d):F(c,d);a.H[b].textContent!=c&&(a.H[b].textContent=c)}}h.Hf=function(a,b,c){if(Vb(this,b)){if(c){var d=this;setTimeout(function(){Wb(d,b);a&&a()},+c);return!1}Wb(this,b)}return!0}; h.kh=function(a,b){if("SR"==a)return jc(this,Ka(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,lc(this,a,c[1]),!0):!1};h.lh=function(a){return Vb(this,a)?(Wb(this,a),!0):!1};function Vb(a,b){var c=a.b[b];return c?(lc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.G=b==oc,a.I=b==pc),!0):!1}function Wb(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(lc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)} -h.Tf=function(a){a||this.f.A.V||(qc(this.f,this.ba),a=this.f,a.D.reset(),rc(a),this.b[sc]&&this.b[sc][1]&&tc(this.f))};h.Uf=function(){};h.Of=function(a){a||this.f.ca()};h.Mf=function(a){if(!a&&!this.f.A.V)if(this.b[sc]&&this.b[sc][1])tc(this.f);else{if((a=this.F)&&!Ha(a,!0))Ja(a,!0),uc(a,0,null),Ja(a,!1);else try{var b=this.f.Cc(1);0=a.f.ka?8:16,c=65472<=a.ba&&a.ba<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[nc]&&a.b[nc][1]||(b=-b);ic(a,a.ba&~c|a.ba+b&c)}function ic(a,b){a.ba=b&a.D.I;if(a.B!==a.ba){a.B=a.ba;b=a.B;for(var c=0;22>c;c++)Dc(a,"A"+c,b&1<c;c++)Dc(a,"D"+c,b&1<b;b++)a.b["S"+b][1]=a.Ra&1<>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.yf=[Hc,Ic,Jc,Kc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Wc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b>>this.g;this.L=0;this.w=this.I;y(this)}p(Fc,r);function Zc(a,b){if(b!=a.L){for(var c=0;c>>a.g,a.u[a.P]=a.b[a.O])}}h=Fc.prototype;h.reset=function(){for(var a=0;a=a.f.ka?8:16,c=65472<=a.fa&&a.fa<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[nc]&&a.b[nc][1]||(b=-b);ic(a,a.fa&~c|a.fa+b&c)}function ic(a,b){a.fa=b&a.D.I;if(a.B!==a.fa){a.B=a.fa;b=a.B;for(var c=0;22>c;c++)Dc(a,"A"+c,b&1<c;c++)Dc(a,"D"+c,b&1<b;b++)a.b["S"+b][1]=a.Wa&1<>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.yf=[Hc,Ic,Jc,Kc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Wc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b>>this.g;this.L=0;this.w=this.I;y(this)}p(Fc,u);function Zc(a,b){if(b!=a.L){for(var c=0;c>>a.g,a.u[a.P]=a.b[a.O])}}h=Fc.prototype;h.reset=function(){for(var a=0;a>>a.g;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.K)return l.Xb+=l.K-f,l.K=f,!0;if(f>=l.K+l.Xb){n=l.size-(f-m);n>g&&(n=g);l.Xb=f-l.K+n;f=m+a.j;g-=n;k++;continue}}return ad(bd,f,g)}f=new I(a,f,n,a.j,d,e);Wc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+cd[d]+" at "+E(b)),!0):ad(dd,b,c)}h.Jd=function(a){return this.u[(a&this.w)>>>this.g].Eb(a&this.i,a)}; -h.Bc=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Kb||b!=this.i?this.u[c].oa(b,a):this.u[c++].Eb(b,a)|this.u[c&this.S].Eb(0,a+1)<<8};h.Kd=function(a,b){this.u[(a&this.w)>>>this.g].Gb(a&this.i,b,a)};h.ac=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Kb||c!=this.i?this.u[d].Hb(c,b,a):(this.u[d++].Gb(c,b&255,a),this.u[d&this.S].Gb(0,b>>8&255,a+1))};function ed(a,b){return a.b[(b&a.I)>>>a.g]} +function Xc(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.g;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.K)return l.Xb+=l.K-f,l.K=f,!0;if(f>=l.K+l.Xb){n=l.size-(f-m);n>g&&(n=g);l.Xb=f-l.K+n;f=m+a.j;g-=n;k++;continue}}return ad(bd,f,g)}f=new I(a,f,n,a.j,d,e);Wc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+cd[d]+" at "+E(b)),!0):ad(dd,b,c)}h.Kd=function(a){return this.u[(a&this.w)>>>this.g].Db(a&this.i,a)}; +h.Bc=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Kb||b!=this.i?this.u[c].oa(b,a):this.u[c++].Db(b,a)|this.u[c&this.S].Db(0,a+1)<<8};h.Ld=function(a,b){this.u[(a&this.w)>>>this.g].Gb(a&this.i,b,a)};h.ac=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Kb||c!=this.i?this.u[d].Hb(c,b,a):(this.u[d++].Gb(c,b&255,a),this.u[d&this.S].Gb(0,b>>8&255,a+1))};function ed(a,b){return a.b[(b&a.I)>>>a.g]} function Bc(a,b){var c;a.C=!1;a.na++;var d=b&a.i,e=ed(a,b);Kb||d!=a.i?c=e.B(d,b):c=e.J(d,b)|ed(a,b+1).J(0,b+1)<<8;a.na--;return c}function fd(a,b,c){a.C=!1;a.na++;ed(a,b).F(b&a.i,c&255,b);a.na--}function zc(a,b,c){a.C=!1;a.na++;var d=b&a.i,e=ed(a,b);Kb||d!=a.i?e.C(d,c&65535,b):(e.F(d,c&255,b),ed(a,b+1).F(0,c>>8&255,b+1));a.na--} -function $c(a){for(var b=0,c=[],d=0;da.f.ka)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var q=g[4],t=g[5]||1,u=0;ua.f.ka)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var q=g[4],t=g[5]||1,r=0;r>8:e[2](f)&255):f&1&&(e=d.Pa[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.f&&z(this.f,16|e[5])&&C(this.f,e[4]+".readByte("+K(this.f,b)+"): "+K(this.f,c),!0,!d.na),c;d.Na(b,16,3);c=255;this.f&&z(this.f,16)&&C(this.f,"warning: unconverted read access to byte @"+K(this.f,b)+": "+K(this.f,c),!0,!d.na);return c} function Ic(a,b,c){var d=!1,e=this.controller,f=e.Pa[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.Pa[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.f&&z(this.f,16|f[5])&&C(this.f,f[4]+".writeByte("+K(this.f,c)+","+K(this.f,b)+")",!0,!e.na):(e.Na(c,16,5),this.f&&z(this.f,16)&&C(this.f,"warning: unconverted write access to byte @"+K(this.f,c)+": "+K(this.f, b),!0,!e.na))}function Jc(a,b){var c=-1,d=this.controller;a=d.Pa[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.f&&z(this.f,16|a[5])&&C(this.f,a[4]+".readWord("+K(this.f,b)+"): "+K(this.f,c),!0,!d.na),c;d.Na(b,16,2);c=65535;this.f&&z(this.f,16)&&C(this.f,"warning: unconverted read access to word @"+K(this.f,b)+": "+K(this.f,c),!0,!d.na);return c} -function Kc(a,b,c){var d=!1,e=this.controller;a=e.Pa[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.f&&z(this.f,16|a[5])&&C(this.f,a[4]+".writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0,!e.na):(e.Na(c,16,4),this.f&&z(this.f,16)&&C(this.f,"warning: unconverted write access to word @"+K(this.f,c)+": "+K(this.f,b),!0,!e.na))}function L(a){r.call(this,"Device",a,256);this.b={hb:128,Gd:-1}}p(L,r);h=L.prototype; -h.Aa=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.F=d;var e=this;this.b.Gd=ld(c,function(){e.b.hb|=128;e.b.hb&64&&md(e.f,e.b.Qa);e.J&&H(e.J,1);nd(e.f,e.b.Gd,1E3/60)});this.b.Qa=od(c,64,6,2097152);Xb(b,this,pd);ec(b,this.reset.bind(this));d&&qd(d,64,function(a){var b=e.f;rd(e,"KIPDR",b.B[0],0,a[0]);rd(e,"KDPDR",b.B[0],8,a[0]);rd(e,"KIPAR",b.M[0],0,a[0]);rd(e,"KDPAR",b.M[0],8,a[0],!0);rd(e,"SIPDR",b.B[1],0,a[0]);rd(e,"SDPDR",b.B[1],8,a[0]);rd(e,"SIPAR",b.M[1],0,a[0]);rd(e,"SDPAR",b.M[1],8,a[0], -!0);rd(e,"UIPDR",b.B[3],0,a[0]);rd(e,"UDPDR",b.B[3],8,a[0]);rd(e,"UIPAR",b.M[3],0,a[0]);rd(e,"UDPAR",b.M[3],8,a[0],!0);b.U&32&&rd(e,"UNIMAP",b.Ha,-1,a[0])});y(this)};function rd(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.mi=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Pg=function(a){return this.f.B[1][a>>1&7]};h.fi=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Ng=function(a){return this.f.B[1][(a>>1&7)+8]};h.di=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Og=function(a){return this.f.M[1][a>>1&7]}; +function Kc(a,b,c){var d=!1,e=this.controller;a=e.Pa[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.f&&z(this.f,16|a[5])&&C(this.f,a[4]+".writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0,!e.na):(e.Na(c,16,4),this.f&&z(this.f,16)&&C(this.f,"warning: unconverted write access to word @"+K(this.f,c)+": "+K(this.f,b),!0,!e.na))}function L(a){u.call(this,"Device",a,256);this.b={gb:128,Hd:-1}}p(L,u);h=L.prototype; +h.za=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.F=d;var e=this;this.b.Hd=ld(c,function(){e.b.gb|=128;e.b.gb&64&&md(e.f,e.b.Qa);e.J&&H(e.J,1);nd(e.f,e.b.Hd,1E3/60)});this.b.Qa=od(c,64,6,2097152);Xb(b,this,pd);ec(b,this.reset.bind(this));d&&qd(d,64,function(a){var b=e.f;rd(e,"KIPDR",b.B[0],0,a[0]);rd(e,"KDPDR",b.B[0],8,a[0]);rd(e,"KIPAR",b.M[0],0,a[0]);rd(e,"KDPAR",b.M[0],8,a[0],!0);rd(e,"SIPDR",b.B[1],0,a[0]);rd(e,"SDPDR",b.B[1],8,a[0]);rd(e,"SIPAR",b.M[1],0,a[0]);rd(e,"SDPAR",b.M[1],8,a[0], +!0);rd(e,"UIPDR",b.B[3],0,a[0]);rd(e,"UDPDR",b.B[3],8,a[0]);rd(e,"UIPAR",b.M[3],0,a[0]);rd(e,"UDPAR",b.M[3],8,a[0],!0);b.W&32&&rd(e,"UNIMAP",b.Ha,-1,a[0])});y(this)};function rd(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.mi=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Pg=function(a){return this.f.B[1][a>>1&7]};h.fi=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Ng=function(a){return this.f.B[1][(a>>1&7)+8]};h.di=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Og=function(a){return this.f.M[1][a>>1&7]}; h.ei=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Mg=function(a){return this.f.M[1][(a>>1&7)+8]};h.ci=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.eg=function(a){return this.f.B[0][a>>1&7]};h.xh=function(a,b){this.f.B[0][b>>1&7]=a&65295};h.cg=function(a){return this.f.B[0][(a>>1&7)+8]};h.vh=function(a,b){this.f.B[0][(b>>1&7)+8]=a&65295};h.dg=function(a){return this.f.M[0][a>>1&7]};h.wh=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.B[0][b]&=65295}; h.bg=function(a){return this.f.M[0][(a>>1&7)+8]};h.uh=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.B[0][b]&=65295};h.Vg=function(a){return this.f.B[3][a>>1&7]};h.li=function(a,b){this.f.B[3][b>>1&7]=a&65295};h.Tg=function(a){return this.f.B[3][(a>>1&7)+8]};h.ji=function(a,b){this.f.B[3][(b>>1&7)+8]=a&65295};h.Ug=function(a){return this.f.M[3][a>>1&7]};h.ki=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Sg=function(a){return this.f.M[3][(a>>1&7)+8]}; -h.ii=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a};h.rg=function(){return this.f.w&49152?this.f.W[0]:this.f.g[6]};h.Ih=function(a){this.f.w&49152?this.f.W[0]=a:this.f.g[6]=a};h.ug=function(){return this.f.g[7]};h.Lh=function(a){this.f.g[7]=a};h.Wb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]}; -h.$b=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.sg=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[1]};h.Jh=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[1]=a};h.tg=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[3]};h.Kh=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[3]=a};h.ag=function(a){return this.f.xc[a-65504>>1]};h.th=function(a,b){this.f.xc[b-65504>>1]=a};h.xe=function(a){return 65520==a?(gd(this.D)>>6)-1:0}; -h.Ce=function(){};h.Rg=function(){return 1};h.hi=function(){};h.$f=function(){return this.f.P};h.sh=function(){this.f.P=0};h.gg=function(){return this.f.uc};h.zh=function(a,b){b&1||(a&=255);this.f.uc=a};h.lg=function(a,b){return b?0:this.f.cb};h.Ch=function(a){yd(this.f,a)};h.Qg=function(a,b){return b?0:this.f.xa&65280};h.gi=function(a){this.f.xa=a|255};h.qg=function(){return zd(this.f)};h.Hh=function(a){Ad(this.f,a)};h.Be=function(a,b){z(this)&&C(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)}; +h.ii=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.ta[a]:this.f.g[a]};h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.ta[b]=a:this.f.g[b]=a};h.rg=function(){return this.f.w&49152?this.f.X[0]:this.f.g[6]};h.Ih=function(a){this.f.w&49152?this.f.X[0]=a:this.f.g[6]=a};h.ug=function(){return this.f.g[7]};h.Lh=function(a){this.f.g[7]=a};h.Wb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.ta[a]}; +h.$b=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.ta[b]=a};h.sg=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[1]};h.Jh=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[1]=a};h.tg=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[3]};h.Kh=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[3]=a};h.ag=function(a){return this.f.xc[a-65504>>1]};h.th=function(a,b){this.f.xc[b-65504>>1]=a};h.xe=function(a){return 65520==a?(gd(this.D)>>6)-1:0}; +h.Ce=function(){};h.Rg=function(){return 1};h.hi=function(){};h.$f=function(){return this.f.P};h.sh=function(){this.f.P=0};h.gg=function(){return this.f.uc};h.zh=function(a,b){b&1||(a&=255);this.f.uc=a};h.lg=function(a,b){return b?0:this.f.ob};h.Ch=function(a){yd(this.f,a)};h.Qg=function(a,b){return b?0:this.f.Ga&65280};h.gi=function(a){this.f.Ga=a|255};h.qg=function(){return zd(this.f)};h.Hh=function(a){Ad(this.f,a)};h.Be=function(a,b){z(this)&&C(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)}; var M={},pd=(M[61568]=[null,null,L.prototype.Wg,L.prototype.mi,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.Pg,L.prototype.fi,"SIPDR",8,1145,64],M[62608]=[null,null,L.prototype.Ng,L.prototype.di,"SDPDR",8,1145,64],M[62624]=[null,null,L.prototype.Og,L.prototype.ei,"SIPAR",8,1145,64],M[62640]=[null,null,L.prototype.Mg,L.prototype.ci,"SDPAR",8,1145,64],M[62656]=[null,null,L.prototype.eg,L.prototype.xh,"KIPDR",8,1140,64],M[62672]=[null,null,L.prototype.cg,L.prototype.vh,"KDPDR",8,1145,64],M[62688]= [null,null,L.prototype.dg,L.prototype.wh,"KIPAR",8,1140,64],M[62704]=[null,null,L.prototype.bg,L.prototype.uh,"KDPAR",8,1145,64],M[62798]=[null,null,L.prototype.kg,L.prototype.Bh,"MMR3",1,1145,64],M[65382]=[null,null,L.prototype.fg,L.prototype.yh,"LKS"],M[65402]=[null,null,L.prototype.hg,L.prototype.Ah,"MMR0",1,1140,64],M[65404]=[null,null,L.prototype.ig,L.prototype.Be,"MMR1",1,1145,64],M[65406]=[null,null,L.prototype.jg,L.prototype.Be,"MMR2",1,1140,64],M[65408]=[null,null,L.prototype.Vg,L.prototype.li, "UIPDR",8,1140,64],M[65424]=[null,null,L.prototype.Tg,L.prototype.ji,"UDPDR",8,1145,64],M[65440]=[null,null,L.prototype.Ug,L.prototype.ki,"UIPAR",8,1140,64],M[65456]=[null,null,L.prototype.Sg,L.prototype.ii,"UDPAR",8,1145,64],M[65472]=[null,null,L.prototype.Vb,L.prototype.Zb,"R0SET0"],M[65473]=[null,null,L.prototype.Vb,L.prototype.Zb,"R1SET0"],M[65474]=[null,null,L.prototype.Vb,L.prototype.Zb,"R2SET0"],M[65475]=[null,null,L.prototype.Vb,L.prototype.Zb,"R3SET0"],M[65476]=[null,null,L.prototype.Vb, L.prototype.Zb,"R4SET0"],M[65477]=[null,null,L.prototype.Vb,L.prototype.Zb,"R5SET0"],M[65478]=[null,null,L.prototype.rg,L.prototype.Ih,"R6KERNEL"],M[65479]=[null,null,L.prototype.ug,L.prototype.Lh,"R7KERNEL"],M[65480]=[null,null,L.prototype.Wb,L.prototype.$b,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Wb,L.prototype.$b,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Wb,L.prototype.$b,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Wb,L.prototype.$b,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Wb, L.prototype.$b,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Wb,L.prototype.$b,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.sg,L.prototype.Jh,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.tg,L.prototype.Kh,"R6USER",1,1145],M[65504]=[null,null,L.prototype.ag,L.prototype.th,"CTRL",8,1170],M[65520]=[null,null,L.prototype.xe,L.prototype.Ce,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.xe,L.prototype.Ce,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.Rg,L.prototype.hi,"SYSID",1,1170],M[65526]= [null,null,L.prototype.$f,L.prototype.sh,"ERR",1,1170],M[65528]=[null,null,L.prototype.gg,L.prototype.zh,"MBR",1,1170],M[65530]=[null,null,L.prototype.lg,L.prototype.Ch,"PIR"],M[65532]=[null,null,L.prototype.Qg,L.prototype.gi,"SLR"],M[65534]=[null,null,L.prototype.qg,L.prototype.Hh,"PSW"],M); -rb(function(){for(var a=x(document,w,"device"),b=0;b>1),this.b=new Int32Array(this.u,0,this.size>>2),Id(this,Jd?Kd:Ld);else{a=this.b=Array(this.size>>2);for(f=0;f>2),b=0;b>8,c)};h.Yf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.bh=function(a,b){Jb&&a&1&&this.D.Na(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}; -h.qh=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.gb=!0};h.Wf=function(a,b){this.f&&null!=this.K&&Sd(this.f,this.K+a);return this.J(a,b)};h.Yg=function(a,b){this.f&&null!=this.K&&Sd(this.f,this.K+a,2);return this.B(a,b)}; -h.oh=function(a,b,c){this.f&&null!=this.K&&Td(this.f,this.K+a);this.j?this.Yb(0,b,c):this.F(a,b,c)};h.oi=function(a,b,c){this.f&&null!=this.K&&Td(this.f,this.K+a,2);this.j?this.Yb(0,b,c):this.C(a,b,c)};h.Vf=function(a){return this.g[a]};h.Xf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&C(this.f,"Memory.readByte("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.Xg=function(a,b){Jb&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)}; -h.ah=function(a,b){Jb&&a&1&&this.D.Na(b,64,2);a=!Kb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&C(this.f,"Memory.readWord("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.nh=function(a,b){this.g[a]=b;this.gb=!0};h.ph=function(a,b,c){this.g[a]=b;this.gb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeByte("+K(this.f,c)+","+K(this.f,b)+")",!0)};h.ni=function(a,b,c){Jb&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.gb=!0}; -h.pi=function(a,b,c){Jb&&a&1&&this.D.Na(c,64,4);!Kb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.gb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0)};var Gd=0,hd=1,Hd=2,Yc=4,cd=["NONE","RAM","ROM","VID","H/W"],Ed=0,Nd=[],Md=[I.prototype.Yf,I.prototype.qh,I.prototype.bh,I.prototype.ri],Qd=[I.prototype.Wf,I.prototype.oh,I.prototype.Yg,I.prototype.oi]; -if(Fb)var Ld=[I.prototype.Vf,I.prototype.nh,I.prototype.Xg,I.prototype.ni],Kd=[I.prototype.Xf,I.prototype.ph,I.prototype.ah,I.prototype.pi];var Ud;if(Fb){var Vd=new ArrayBuffer(2);(new DataView(Vd)).setUint16(0,256,!0);Ud=256===(new Uint16Array(Vd))[0]}else Ud=!1;var Jd=Ud; -function Wd(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.$c=0;this.Xc=b;this.nb=c;this.ld=Math.round(this.Xc/1E4)/100;this.yb=this.ld*this.nb;this.md=this.qc=this.Bb=this.Yc=0;this.A.V=this.A.Sc=!1;this.A.ra=a.autoStart;"string"==typeof this.A.ra&&(this.A.ra="true"==this.A.ra);this.A.Nb=!1;this.oc=this.Qb=0;this.pc=+a.csStart;this.Ob=+a.csInterval;this.Rb=+a.csStop;this.ia=[];this.ae=this.hh.bind(this);this.ob=this.Ka=this.mb=this.b=this.la=this.Ja=this.nc=this.lb=this.Sb= -this.nd=this.xb=0;this.ta=null;y(this)}p(Wd,r);h=Wd.prototype;h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.F=d;this.ta=a.i;for(a=0;a=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=le(a)&&(a.Ob=a.Rb=-1,he(a),a.ca(),c=!0);c&&a.v(le(a)+" cycles: checksum="+F(a.oc))}} -h.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.H[b]=c,!0;case "run":return this.H[b]=c,c.onclick=function(){var a;if(a=d.J)if(a=d.J,a.A.aa)a=!0;else{var b=null,c,k=ta(a.id);for(c=0;ca.xb/a.yb?b=1:d=!0;a.nb=b;b=a.ld*a.nb;if(a.yb!=b){a.yb=b;b=a.yb.toFixed(2)+"Mhz";var e=a.H.setSpeed;e&&(e.textContent=b);a.v("target speed: "+b)}c&&a.J&&pe(a.J)}wc(a,a.Ka);a.Ka=0;a.Ja=qa();a.lb=0;ne(a);return d}function ld(a,b){var c=a.ia.length;a.ia.push([-1,b]);return c}function nd(a,b,c,d){0<=b&&ba.ia[b][0])&&(c=a.Xc*a.nb/1E3*c|0,a.A.V&&(c+=qe(a)),a.ia[b][0]=c)} -function re(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function se(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function qe(a,b){var c=a.mb-=a.b;a.b=a.la=0;b&&(a.mb=0);return c} -h.hh=function(){if(this.A.V){this.Yc>=this.Xc&&ne(this,!0);this.Sb=0;this.nc=qa();if(this.lb){var a=this.nc-this.lb;a>this.md&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=re(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=qe(this,!0);this.Sb+=b;this.Ka+=b;xc(this,b);vc(this,b);this.Bb-=b;if(0>=this.Bb){this.Bb+=this.qc;++this.nd>=te&&(this.J&&H(this.J,void 0),this.nd=0);break}}while(this.A.V)}catch(e){this.ca();this.J&&this.J.stop(qa(),le(this)); -Ea(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.ae;this.lb=qa();var c=this.md;this.Sb&&(c=Math.round(c*this.Sb/this.qc));var c=c-(this.lb-this.nc),d=this.lb-this.Ja;d&&(this.xb=Math.round(this.Ka/(10*d))/100,864E5<=d&&(this.ob=0,me(this)));if(0>c||this.xbc&&(this.Ja-=c),c=0;this.Yc+=this.Sb;this.lb+=c;a(b,c)}}}; -function tc(a,b){if(!Fa(a))if(a.A.V)a.v(a.toString()+" busy");else{me(a);a.A.V=!0;a.A.Sc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.J&&(b&&pe(a.J,!0),a.J.start(a.Ja,le(a)));a.F||a.status("Started");setTimeout(a.ae,0)}}h.Cc=function(){return 0};h.ca=function(a){var b=!1;if(this.A.V){qe(this);wc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.J&&this.J.stop(qa(),le(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var oe=30,te=15,Xd=["power","reset"]; -function ue(a){var b=+a.model||1170;Wd.call(this,a,6666667);this.ka=b;this.Ud=+a.addrReset||0;this.bb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.qa=this.W=[];this.M=this.B=this.Ha=this.xc=[];this.jb=this.O=this.Sd=this.zb=this.Ab=this.sb=this.kb=this.P=this.uc=this.cb=this.xa=this.S=this.vc=this.wc=this.U=this.i=0;this.Xd=[4,2,0,1];this.zc=0;this.Yd=255;1120>=this.ka?(this.Rd=ve.bind(this),this.Lb=this.Cf,this.zc=8,this.Yd=-1,this.ee=255,this.de=0):(this.Rd=we.bind(this),this.Lb=this.Df, -this.ee=~(1792|(1140>=this.ka?2048:0))&65535,this.de=1140e.Fb&&(e.Fb=c,c+=4)}return Wd.prototype.Da.call(this,a,b)}; -h.reset=function(){this.status("Model "+this.ka);this.A.V&&this.ca();this.C=65536;this.G=32768;this.L=65535;this.I=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Ud,-1,-2,-3,-4,-5,-6,-7,-8];this.qa=[0,0,0,0,0,0];this.W=[0,0,0,0];this.M=[[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]];this.B=[[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]];this.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];this.xc=[0,0,0,0,0,0,0,0];this.N=0;this.bb=-1;this.u=this.j=this.Wc=this.X=this.Y=this.i=this.uc=0;rc(this);ge(this);this.A.error=!1;Wd.prototype.reset.call(this)};function rc(a){a.S=0;a.vc=0;a.wc=0;a.U=0;a.P=0;a.cb=0;a.xa=255;a.zb=0;a.Ab=0;a.sb=0;a.kb=262143;a.jb=a.g[7];a.O=0;a.R=null;a.D&&(xe(a),a.Sd=gd(a.D))} -function xe(a){a.jc=a.ad;a.kc=a.cd;a.Tc=a.dd;a.lc=a.jd;a.sc&&(a.jc=a.oe,a.kc=a.te);a.tc&&(a.Tc=a.ze,a.lc=a.Ae);a.zb?(a.Ia=65536,a.vb=a.U&16?4186112:253952,a.Ga=a.se,a.oa=a.sc?a.$g:a.Dd,a.Hb=a.tc?a.ti:a.Hd,Zc(a.D,a.U&16?22:18)):(a.Ia=0,a.vb=57344,a.Ga=a.Gf,a.oa=a.sc?a.Zg:a.ye,a.Hb=a.tc?a.si:a.De,Zc(a.D,16))}function td(a){var b=a.S;b&57344||(b=b&-3199|a.Ab<<5|a.sb<<1);return b} -function ud(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.vc=a.O>>16&65535,a.wc=a.O&65535);a.S=b;a.Ab=(b&96)>>5;a.sb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.zb!=c&&(a.zb=c,xe(a))}}function vd(a){a.S&57344||(a.vc=a.O>>16&65535);a=a.vc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function wd(a){a.S&57344||(a.wc=a.O&65535);return a.wc}function xd(a,b){1170>a.ka&&(b&=-49);a.U!=b&&(a.U=b,a.kb=b&16?4194303:262143,xe(a))} -function ye(a,b,c,d){a.Ud=b;qc(a,b);Ad(a,0);a.D.reset();rc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.aa?a.A.V||tc(a):a.A.ra=!0}else a.F&&a.A.aa?a.ca()||a.J.A.reset||(ie(a.F),H(a.J,-1)):!1===c&&a.ca();!a.A.V&&a.ta&&a.ta.stop()}h.pe=function(){return 0}; -h.save=function(){var a=new G(this);a.set(0,[this.g,this.qa,this.W,this.M,this.B,this.Ha,this.xc,this.P,this.uc,this.cb,this.xa,this.Ab,this.sb,this.jb,this.i,this.O,this.bb,this.Ac,this.Dc]);a.set(1,[zd(this),td(this),vd(this),wd(this),this.U]);a.set(2,[this.ob,this.nb,this.A.ra]);a.set(3,ze(this));a.set(4,se(this));return a.data()}; -h.restore=function(a){var b=ia(a[0]);this.g=b.next().value;this.qa=b.next().value;this.W=b.next().value;this.M=b.next().value;this.B=b.next().value;this.Ha=b.next().value;this.xc=b.next().value;this.P=b.next().value;this.uc=b.next().value;this.cb=b.next().value;this.xa=b.next().value;this.Ab=b.next().value;this.sb=b.next().value;this.jb=b.next().value;this.i=b.next().value;this.O=b.next().value;this.bb=b.next().value;this.Ac=b.next().value;this.Dc=b.next().value;b=a[1];Ad(this,b[0]);ud(this,b[1]); -this.vc=b[2];this.wc=b[3];xd(this,b[4]);b=a[2];this.ob=b[0];me(this,b[1]);this.A.ra=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>1),this.b=new Int32Array(this.u,0,this.size>>2),Id(this,Jd?Kd:Td);else{a=this.b=Array(this.size>>2);for(f=0;f>2),b=0;b>8,c)};h.Yf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.bh=function(a,b){Jb&&a&1&&this.D.Na(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}; +h.qh=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.fb=!0};h.Wf=function(a,b){this.f&&null!=this.K&&$d(this.f,this.K+a);return this.J(a,b)};h.Yg=function(a,b){this.f&&null!=this.K&&$d(this.f,this.K+a,2);return this.B(a,b)}; +h.oh=function(a,b,c){this.f&&null!=this.K&&ae(this.f,this.K+a);this.j?this.Yb(0,b,c):this.F(a,b,c)};h.oi=function(a,b,c){this.f&&null!=this.K&&ae(this.f,this.K+a,2);this.j?this.Yb(0,b,c):this.C(a,b,c)};h.Vf=function(a){return this.g[a]};h.Xf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&C(this.f,"Memory.readByte("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.Xg=function(a,b){Jb&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)}; +h.ah=function(a,b){Jb&&a&1&&this.D.Na(b,64,2);a=!Kb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&C(this.f,"Memory.readWord("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.nh=function(a,b){this.g[a]=b;this.fb=!0};h.ph=function(a,b,c){this.g[a]=b;this.fb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeByte("+K(this.f,c)+","+K(this.f,b)+")",!0)};h.ni=function(a,b,c){Jb&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.fb=!0}; +h.pi=function(a,b,c){Jb&&a&1&&this.D.Na(c,64,4);!Kb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.fb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0)};var Gd=0,hd=1,Hd=2,Yc=4,cd=["NONE","RAM","ROM","VID","H/W"],Fd=0,Vd=[],Ud=[I.prototype.Yf,I.prototype.qh,I.prototype.bh,I.prototype.ri],Yd=[I.prototype.Wf,I.prototype.oh,I.prototype.Yg,I.prototype.oi]; +if(Fb)var Td=[I.prototype.Vf,I.prototype.nh,I.prototype.Xg,I.prototype.ni],Kd=[I.prototype.Xf,I.prototype.ph,I.prototype.ah,I.prototype.pi];var be;if(Fb){var ce=new ArrayBuffer(2);(new DataView(ce)).setUint16(0,256,!0);be=256===(new Uint16Array(ce))[0]}else be=!1;var Jd=be; +function de(a,b){u.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.$c=0;this.Xc=b;this.mb=c;this.ld=Math.round(this.Xc/1E4)/100;this.xb=this.ld*this.mb;this.md=this.qc=this.Ab=this.Yc=0;this.A.V=this.A.Sc=!1;this.A.qa=a.autoStart;"string"==typeof this.A.qa&&(this.A.qa="true"==this.A.qa);this.A.Nb=!1;this.oc=this.Qb=0;this.pc=+a.csStart;this.Ob=+a.csInterval;this.Rb=+a.csStop;this.ia=[];this.be=this.hh.bind(this);this.nb=this.Ka=this.lb=this.b=this.la=this.Ja=this.nc=this.kb=this.Sb= +this.nd=this.wb=0;this.sa=null;y(this)}p(de,u);h=de.prototype;h.za=function(a,b,c,d){this.J=a;this.D=b;this.F=d;this.sa=a.i;for(a=0;a=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=le(a)&&(a.Ob=a.Rb=-1,he(a),a.ba(),c=!0);c&&a.v(le(a)+" cycles: checksum="+F(a.oc))}} +h.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.H[b]=c,!0;case "run":return this.H[b]=c,c.onclick=function(){var a;if(a=d.J)if(a=d.J,a.A.aa)a=!0;else{var b=null,c,k=ta(a.id);for(c=0;ca.wb/a.xb?b=1:d=!0;a.mb=b;b=a.ld*a.mb;if(a.xb!=b){a.xb=b;b=a.xb.toFixed(2)+"Mhz";var e=a.H.setSpeed;e&&(e.textContent=b);a.v("target speed: "+b)}c&&a.J&&pe(a.J)}wc(a,a.Ka);a.Ka=0;a.Ja=qa();a.kb=0;ne(a);return d}function ld(a,b){var c=a.ia.length;a.ia.push([-1,b]);return c}function nd(a,b,c,d){0<=b&&ba.ia[b][0])&&(c=a.Xc*a.mb/1E3*c|0,a.A.V&&(c+=qe(a)),a.ia[b][0]=c)} +function re(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function se(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function qe(a,b){var c=a.lb-=a.b;a.b=a.la=0;b&&(a.lb=0);return c} +h.hh=function(){if(this.A.V){this.Yc>=this.Xc&&ne(this,!0);this.Sb=0;this.nc=qa();if(this.kb){var a=this.nc-this.kb;a>this.md&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=re(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=qe(this,!0);this.Sb+=b;this.Ka+=b;xc(this,b);vc(this,b);this.Ab-=b;if(0>=this.Ab){this.Ab+=this.qc;++this.nd>=te&&(this.J&&H(this.J,void 0),this.nd=0);break}}while(this.A.V)}catch(e){this.ba();this.J&&this.J.stop(qa(),le(this)); +Ea(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.be;this.kb=qa();var c=this.md;this.Sb&&(c=Math.round(c*this.Sb/this.qc));var c=c-(this.kb-this.nc),d=this.kb-this.Ja;d&&(this.wb=Math.round(this.Ka/(10*d))/100,864E5<=d&&(this.nb=0,me(this)));if(0>c||this.wbc&&(this.Ja-=c),c=0;this.Yc+=this.Sb;this.kb+=c;a(b,c)}}}; +function tc(a,b){if(!Fa(a))if(a.A.V)a.v(a.toString()+" busy");else{me(a);a.A.V=!0;a.A.Sc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.J&&(b&&pe(a.J,!0),a.J.start(a.Ja,le(a)));a.F||a.status("Started");setTimeout(a.be,0)}}h.Cc=function(){return 0};h.ba=function(a){var b=!1;if(this.A.V){qe(this);wc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.J&&this.J.stop(qa(),le(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var oe=30,te=15,ee=["power","reset"]; +function ue(a){var b=+a.model||1170;de.call(this,a,6666667);this.ka=b;this.Vd=+a.addrReset||0;this.bb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.ta=this.X=[];this.M=this.B=this.Ha=this.xc=[];this.ib=this.O=this.Td=this.yb=this.zb=this.rb=this.jb=this.P=this.uc=this.ob=this.Ga=this.S=this.vc=this.wc=this.W=this.i=0;this.Yd=[4,2,0,1];this.zc=0;this.Zd=255;1120>=this.ka?(this.Sd=ve.bind(this),this.Lb=this.Cf,this.zc=8,this.Zd=-1,this.fe=255,this.ee=0):(this.Sd=we.bind(this),this.Lb=this.Df, +this.fe=~(1792|(1140>=this.ka?2048:0))&65535,this.ee=1140e.Fb&&(e.Fb=c,c+=4)}return de.prototype.Ca.call(this,a,b)}; +h.reset=function(){this.status("Model "+this.ka);this.A.V&&this.ba();this.C=65536;this.G=32768;this.L=65535;this.I=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Vd,-1,-2,-3,-4,-5,-6,-7,-8];this.ta=[0,0,0,0,0,0];this.X=[0,0,0,0];this.M=[[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]];this.B=[[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]];this.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];this.xc=[0,0,0,0,0,0,0,0];this.N=0;this.bb=-1;this.u=this.j=this.Wc=this.U=this.Y=this.i=this.uc=0;rc(this);ge(this);this.A.error=!1;de.prototype.reset.call(this)};function rc(a){a.S=0;a.vc=0;a.wc=0;a.W=0;a.P=0;a.ob=0;a.Ga=255;a.yb=0;a.zb=0;a.rb=0;a.jb=262143;a.ib=a.g[7];a.O=0;a.R=null;a.D&&(xe(a),a.Td=gd(a.D))} +function xe(a){a.jc=a.ad;a.kc=a.cd;a.Tc=a.dd;a.lc=a.jd;a.sc&&(a.jc=a.pe,a.kc=a.te);a.tc&&(a.Tc=a.ze,a.lc=a.Ae);a.yb?(a.Ia=65536,a.ub=a.W&16?4186112:253952,a.Fa=a.se,a.oa=a.sc?a.$g:a.Ed,a.Hb=a.tc?a.ti:a.Id,Zc(a.D,a.W&16?22:18)):(a.Ia=0,a.ub=57344,a.Fa=a.Gf,a.oa=a.sc?a.Zg:a.ye,a.Hb=a.tc?a.si:a.De,Zc(a.D,16))}function td(a){var b=a.S;b&57344||(b=b&-3199|a.zb<<5|a.rb<<1);return b} +function ud(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.vc=a.O>>16&65535,a.wc=a.O&65535);a.S=b;a.zb=(b&96)>>5;a.rb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.yb!=c&&(a.yb=c,xe(a))}}function vd(a){a.S&57344||(a.vc=a.O>>16&65535);a=a.vc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function wd(a){a.S&57344||(a.wc=a.O&65535);return a.wc}function xd(a,b){1170>a.ka&&(b&=-49);a.W!=b&&(a.W=b,a.jb=b&16?4194303:262143,xe(a))} +function ye(a,b,c,d){a.Vd=b;qc(a,b);Ad(a,0);a.D.reset();rc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.aa?a.A.V||tc(a):a.A.qa=!0}else a.F&&a.A.aa?a.ba()||a.J.A.reset||(ie(a.F),H(a.J,-1)):!1===c&&a.ba();!a.A.V&&a.sa&&a.sa.stop()}h.qe=function(){return 0}; +h.save=function(){var a=new G(this);a.set(0,[this.g,this.ta,this.X,this.M,this.B,this.Ha,this.xc,this.P,this.uc,this.ob,this.Ga,this.zb,this.rb,this.ib,this.i,this.O,this.bb,this.Ac,this.Dc]);a.set(1,[zd(this),td(this),vd(this),wd(this),this.W]);a.set(2,[this.nb,this.mb,this.A.qa]);a.set(3,ze(this));a.set(4,se(this));return a.data()}; +h.restore=function(a){var b=ia(a[0]);this.g=b.next().value;this.ta=b.next().value;this.X=b.next().value;this.M=b.next().value;this.B=b.next().value;this.Ha=b.next().value;this.xc=b.next().value;this.P=b.next().value;this.uc=b.next().value;this.ob=b.next().value;this.Ga=b.next().value;this.zb=b.next().value;this.rb=b.next().value;this.ib=b.next().value;this.i=b.next().value;this.O=b.next().value;this.bb=b.next().value;this.Ac=b.next().value;this.Dc=b.next().value;b=a[1];Ad(this,b[0]);ud(this,b[1]); +this.vc=b[2];this.wc=b[3];xd(this,b[4]);b=a[2];this.nb=b[0];me(this,b[1]);this.A.qa=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>23)),a.b-=2);a.b-=3}function qc(a,b){a.g[7]=b&65535}function od(a,b,c,d){b={Fb:b,pb:c,message:d||0,name:Pb[b],next:null};a.mc.push(b);return b}function Ge(a,b){var c=a.R;if(c==b)a.R=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.R&&(a.i|=1)} function md(a,b){if(b){if(b!=a.R){var c=a.R;if(!c||c.pb<=b.pb)b.next=c,a.R=b;else{do{var d=c.next;if(!d||d.pb<=b.pb){b.next=d;c.next=b;break}c=d}while(c)}}a.i|=1;b.message&&z(a,b.message|8)&&C(a,"setIRQ(vector="+E(b.Fb)+",priority="+b.pb+")",!0,!0)}}function sd(a,b){b&&(Ge(a,b),b.message&&z(a,b.message|8)&&C(a,"clearIRQ(vector="+E(b.Fb)+",priority="+b.pb+")",!0,!0))}function ze(a){var b=[];for(a=a.R;a;)b.push(a.Fb),a=a.next;return b} -function He(a){return a.i&64?(a.sa(168,64,-6),!0):a.i&32?(a.sa(4,32,-5),!0):a.i&16?(a.sa(12,16,-7),!0):!1}function zd(a){return a.w=a.w&63728|De(a)|Ce(a)|Be(a)|Ae(a)}function Ad(a,b){b&=a.ee;a.I=b<<12;a.L=~b&4;a.G=b<<14;a.C=b<<16;if((b^a.w)&a.de)for(var c=a.qa.length;0<=--c;){var d=a.g[c];a.g[c]=a.qa[c];a.qa[c]=d}a.N=b>>14&3;c=a.w>>14&3;a.N!=c&&(a.W[c]=a.g[6],a.g[6]=a.W[a.N]);a.w=b;a.i&=-3;a.i|=a.R?2:1}function yd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.cb=b} -h.Ea=function(a){this.I=this.L=a;this.G=0};h.rb=function(a,b){this.I=this.L=this.C=a;this.G=b||0};function Ie(a,b){a.I=a.L=a.C=b;a.G=a.I^a.C>>1}function Je(a,b,c,d){a.I=a.L=a.C=b;a.G=(c^d)&(d^b)} -h.sa=function(a,b,c){if(!this.pa){0>this.bb?this.bb=zd(this):this.N||(c=-4);-4==c&&(this.i&256&&(c=-1),this.i|=256,this.P|=4,this.g[6]=a=4);if(-1!=c){this.O=a|4143316992;this.N=0;var d=this.oa(a|this.Ia),e=this.oa(a+2&65535|this.Ia);Ad(this,e&-12289|this.bb>>2&12288);Ke(this,this.bb);Ke(this,this.g[7]);qc(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.bb=-1;this.Ac=c;this.Dc=a;-1==c&&this.ca();if(-4<=c)throw a;}}; -function Le(a){var b=Me(a),c=Me(a);a.w&49152&&(c=c&-225|a.w&63712);qc(a,b);Ad(a,c);a.i&=-17}function Ne(a,b){var c=b>>13&31;31>c&&(b=a.U&32?a.Ha[c]+(b&8191)&4194303:b&-3932161);return b} -function Oe(a,b,c){var d=[];if(c){c=Ne(a,b);var e=b>>13&31;d.push(c);d.push(e);a.U&32&&(d.push(a.Ha[e]),d.push(b&8191))}else if(a.zb){var e=a.N<<1,f=b>>13;7>13;a.U&a.Xd[a.N]||(d&=7);e=a.B[a.N][d];f=(a.M[a.N][d]<<6)+(b&8191)&a.kb;3932160<=f&&(f=Ne(a,f));if(a.pa)return f;f>=a.Sd&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& -(g|=16384));a.B[a.N][d]=e;if(f!=(4194170&a.kb)||a.N)a.Ab=a.N,a.sb=d;g&&(g&57344&&(0<=a.bb&&(g|=128),a.S&57344||(g|=a.S&4096|a.Ab<<5|a.sb<<1,ud(a,a.S&-61695|g&61694)),a.sa(168,64,-2)),a.S&61440||!(f<(4191360&a.kb)||f>(4194239&a.kb))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function Me(a){var b=a.oa(a.g[6]|a.Ia);a.g[6]=a.g[6]+2&65535;return b}function Ke(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.O=a.O&65535|(a.O&-65536)<<8|16121856;a.i&256||a.Lb(4,-2,c);a.Hb(c,b)} -function Pe(a,b,c,d){var e,f,g=d&8?0:a.Ia;switch(b){case 0:return a.sa(4,0,-3),0;case 1:return 6==c&&a.Lb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Lb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Lb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.oa(e)|g;a.b-=8;break;case 6:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,6==c&&a.Lb(d, -0,e),a.b-=6,e|g;case 7:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,e=a.oa(e|a.Ia),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.O=a.O&65535|(a.O&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cf=function(a,b,c){!this.N&&0>=b&&c<=this.xa&&(this.i|=32)};h.Df=function(a,b,c){this.N||(65534<=c&&(c|=-65536),a&4&&c<=this.xa&&(c<=this.xa-32?this.sa(4,0,-4):(this.P|=8,this.i|=32)))};h.oe=function(a){this.F&&Sd(this.F,a,1);return this.ad(a)};h.te=function(a){this.F&&Sd(this.F,a,2);return this.cd(a)}; -h.ze=function(a,b){this.F&&Td(this.F,a,1);this.dd(a,b)};h.Ae=function(a,b){this.F&&Td(this.F,a,2);this.jd(a,b)};function Cc(a,b){a.pa++;b=a.D.Bc(Ac(a,b,2));a.pa--;return b}function Qe(a,b){(b?--a.tc:--a.sc)||xe(a)}h.Gf=function(a,b,c){return Pe(this,a,b,c)};h.se=function(a,b,c){return Ac(this,Pe(this,a,b,c),c)};h.ye=function(a){return this.D.Bc(this.jb=a)};h.Zg=function(a){this.F&&Sd(this.F,a,2);return this.ye(a)};h.Dd=function(a){return this.D.Bc(this.jb=Ac(this,a,2))}; -h.$g=function(a){this.F&&Sd(this.F,a,2);return this.Dd(a)};h.De=function(a,b){this.D.ac(this.jb=a,b)};h.si=function(a,b){this.F&&Td(this.F,a,2);this.De(a,b)};h.Hd=function(a,b){this.D.ac(this.jb=Ac(this,a,4),b)};h.ti=function(a,b){this.F&&Td(this.F,a,2);this.Hd(a,b)};function Re(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Pe(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.W[a.w>>12&3];return c} -function Se(a,b,c,d){a.O=a.O&65535|1441792;var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=Pe(a,b,e,4),c&65536||(e&=65535),a.N=a.w>>12&3,e=Ac(a,e|c&65536,4),a.N=a.w>>14&3,a.lc(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.W[a.w>>12&3]=d}function Te(a,b){b>>=6;var c=a.Y=b&7;return(b=a.X=(b&56)>>3)?a.jc(a.Ga(b,c,3)):a.g[c+a.zc]&a.Yd}function Ue(a,b){var c;b>>=6;var d=a.Y=b&7;(b=a.X=(b&56)>>3)?c=a.kc(a.Ga(b,d,2)):c=a.g[d+a.zc];return c}function Ve(a,b){var c=a.j=b&7;b=a.u=(b&56)>>3;return Pe(a,b,c,8)} -function We(a,b){var c=a.j=b&7;return(b=a.u=(b&56)>>3)?a.jc(a.Ga(b,c,3)):a.g[c]&255}function Xe(a,b){var c,d=a.j=b&7;(b=a.u=(b&56)>>3)?c=a.kc(a.Ga(b,d,2)):c=a.g[d];return c}function Ye(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Wc=a.Ga(b,e,7),c=0>c?a.g[-c-1]&255:c,a.Tc(e,d.call(a,c,a.jc(e))),e&1&&a.b--):(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 P(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,6),a.lc(e,d.call(a,0>c?a.g[-c-1]:c,a.kc(e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function Ze(a,b,c,d,e){var f=a.j=b&7;(b=a.u=(b&56)>>3)?(d=a.Ga(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.Tc(d,c),d&1&&a.b--):(c?(c=0>c?a.g[-c-1]&255:c,a.g[f]=a.g[f]&~d|c<<24>>24&d):a.g[f]&=~d,e.call(a,c<<8))} -function $e(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.lc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))} -h.Cc=function(a){this.A.complete=!0;var b=this.F?af(this.F)?1:this.A.Sc?-1:0:0,c=a?this.A.Sc?0:1:-1;this.A.Sc=!1;this.mb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(bf(this.F,this.g[7],c)){this.ca();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.cb&224)>>5,f=this.R&&this.R.pb>e?this.R:null;f&&(d=f.Fb,e=f.pb);e>(this.w&224)>>5?(this.i&8&&(Ee(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&Ge(this,f),a=!0);this.R||this.cb||(this.i&=-3)}else this.i& -1&&this.i++;if(a){if(this.i&4&&bf(this.F,this.g[7],c)){this.ca();break}if(0>c)break}if(this.i&112&&He(this)){if(this.i&4&&bf(this.F,this.g[7],c)){this.ca();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.oa(a);this.g[7]=a+2&65535;this.Rd(f)}while(0>1|b<<16;Ie(this,a);return a&65535}function Df(a,b){a=b&128|b>>1|b<<8;Ie(this,a<<8);return a&255}function Ef(a,b){a=b&~a;this.Ea(a);return a}function Ff(a,b){a=b&~a;this.Ea(a<<8);return a} -function Gf(a,b){a|=b;this.Ea(a);return a}function Hf(a,b){a|=b;this.Ea(a<<8);return a}function If(a,b){a=~b|65536;this.rb(a);return a&65535}function Jf(a,b){a=~b|256;this.rb(a<<8);return a&255}function Kf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Lf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.G=b&(b^c);return a&255}function Mf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Nf(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255} -function Of(a,b){a=-b;this.rb(a,a&b&32768);return a&65535}function Pf(a,b){a=-b;this.rb(a<<8,(a&b&128)<<8);return a&255}function Qf(a,b){a=b<<1|this.C>>16&1;Ie(this,a);return a&65535}function Rf(a,b){a=b<<1|this.C>>16&1;Ie(this,a<<8);return a&255}function Sf(a,b){a=(this.C&65536|b)>>1|b<<16;Ie(this,a);return a&65535}function Tf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Ie(this,a<<8);return a&255}function Uf(a,b){var c=b-a;Je(this,c,a,b);return c&65535} -function Vf(a,b){var c=b-a;Je(this,c<<8,a<<8,b<<8);return c&255}function Wf(a,b){this.I=this.L=b&65280;this.G=this.C=0;return(b<<8|b>>8)&65535}function Xf(a,b){a^=b;this.Ea(a);return a&65535}function Yf(a){P(this,a,Ue(this,a),yf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)} +function He(a){return a.i&64?(a.ra(168,64,-6),!0):a.i&32?(a.ra(4,32,-5),!0):a.i&16?(a.ra(12,16,-7),!0):!1}function zd(a){return a.w=a.w&63728|De(a)|Ce(a)|Be(a)|Ae(a)}function Ad(a,b){b&=a.fe;a.I=b<<12;a.L=~b&4;a.G=b<<14;a.C=b<<16;if((b^a.w)&a.ee)for(var c=a.ta.length;0<=--c;){var d=a.g[c];a.g[c]=a.ta[c];a.ta[c]=d}a.N=b>>14&3;c=a.w>>14&3;a.N!=c&&(a.X[c]=a.g[6],a.g[6]=a.X[a.N]);a.w=b;a.i&=-3;a.i|=a.R?2:1}function yd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.ob=b} +h.Da=function(a){this.I=this.L=a;this.G=0};h.qb=function(a,b){this.I=this.L=this.C=a;this.G=b||0};function Ie(a,b){a.I=a.L=a.C=b;a.G=a.I^a.C>>1}function Je(a,b,c,d){a.I=a.L=a.C=b;a.G=(c^d)&(d^b)} +h.ra=function(a,b,c){if(!this.pa){0>this.bb?this.bb=zd(this):this.N||(c=-4);-4==c&&(this.i&256&&(c=-1),this.i|=256,this.P|=4,this.g[6]=a=4);if(-1!=c){this.O=a|4143316992;this.N=0;var d=this.oa(a|this.Ia),e=this.oa(a+2&65535|this.Ia);Ad(this,e&-12289|this.bb>>2&12288);Ke(this,this.bb);Ke(this,this.g[7]);qc(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.bb=-1;this.Ac=c;this.Dc=a;-1==c&&this.ba();if(-4<=c)throw a;}}; +function Le(a){var b=Me(a),c=Me(a);a.w&49152&&(c=c&-225|a.w&63712);qc(a,b);Ad(a,c);a.i&=-17}function Ne(a,b){var c=b>>13&31;31>c&&(b=a.W&32?a.Ha[c]+(b&8191)&4194303:b&-3932161);return b} +function Oe(a,b,c){var d=[];if(c){c=Ne(a,b);var e=b>>13&31;d.push(c);d.push(e);a.W&32&&(d.push(a.Ha[e]),d.push(b&8191))}else if(a.yb){var e=a.N<<1,f=b>>13;7>13;a.W&a.Yd[a.N]||(d&=7);e=a.B[a.N][d];f=(a.M[a.N][d]<<6)+(b&8191)&a.jb;3932160<=f&&(f=Ne(a,f));if(a.pa)return f;f>=a.Td&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& +(g|=16384));a.B[a.N][d]=e;if(f!=(4194170&a.jb)||a.N)a.zb=a.N,a.rb=d;g&&(g&57344&&(0<=a.bb&&(g|=128),a.S&57344||(g|=a.S&4096|a.zb<<5|a.rb<<1,ud(a,a.S&-61695|g&61694)),a.ra(168,64,-2)),a.S&61440||!(f<(4191360&a.jb)||f>(4194239&a.jb))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function Me(a){var b=a.oa(a.g[6]|a.Ia);a.g[6]=a.g[6]+2&65535;return b}function Ke(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.O=a.O&65535|(a.O&-65536)<<8|16121856;a.i&256||a.Lb(4,-2,c);a.Hb(c,b)} +function Pe(a,b,c,d){var e,f,g=d&8?0:a.Ia;switch(b){case 0:return a.ra(4,0,-3),0;case 1:return 6==c&&a.Lb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Lb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Lb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.oa(e)|g;a.b-=8;break;case 6:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,6==c&&a.Lb(d, +0,e),a.b-=6,e|g;case 7:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,e=a.oa(e|a.Ia),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.O=a.O&65535|(a.O&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cf=function(a,b,c){!this.N&&0>=b&&c<=this.Ga&&(this.i|=32)};h.Df=function(a,b,c){this.N||(65534<=c&&(c|=-65536),a&4&&c<=this.Ga&&(c<=this.Ga-32?this.ra(4,0,-4):(this.P|=8,this.i|=32)))};h.pe=function(a){this.F&&$d(this.F,a,1);return this.ad(a)};h.te=function(a){this.F&&$d(this.F,a,2);return this.cd(a)}; +h.ze=function(a,b){this.F&&ae(this.F,a,1);this.dd(a,b)};h.Ae=function(a,b){this.F&&ae(this.F,a,2);this.jd(a,b)};function Cc(a,b){a.pa++;b=a.D.Bc(Ac(a,b,2));a.pa--;return b}function Qe(a,b){(b?--a.tc:--a.sc)||xe(a)}h.Gf=function(a,b,c){return Pe(this,a,b,c)};h.se=function(a,b,c){return Ac(this,Pe(this,a,b,c),c)};h.ye=function(a){return this.D.Bc(this.ib=a)};h.Zg=function(a){this.F&&$d(this.F,a,2);return this.ye(a)};h.Ed=function(a){return this.D.Bc(this.ib=Ac(this,a,2))}; +h.$g=function(a){this.F&&$d(this.F,a,2);return this.Ed(a)};h.De=function(a,b){this.D.ac(this.ib=a,b)};h.si=function(a,b){this.F&&ae(this.F,a,2);this.De(a,b)};h.Id=function(a,b){this.D.ac(this.ib=Ac(this,a,4),b)};h.ti=function(a,b){this.F&&ae(this.F,a,2);this.Id(a,b)};function Re(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Pe(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.X[a.w>>12&3];return c} +function Se(a,b,c,d){a.O=a.O&65535|1441792;var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=Pe(a,b,e,4),c&65536||(e&=65535),a.N=a.w>>12&3,e=Ac(a,e|c&65536,4),a.N=a.w>>14&3,a.lc(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.X[a.w>>12&3]=d}function Te(a,b){b>>=6;var c=a.Y=b&7;return(b=a.U=(b&56)>>3)?a.jc(a.Fa(b,c,3)):a.g[c+a.zc]&a.Zd}function Ue(a,b){var c;b>>=6;var d=a.Y=b&7;(b=a.U=(b&56)>>3)?c=a.kc(a.Fa(b,d,2)):c=a.g[d+a.zc];return c}function Ve(a,b){var c=a.j=b&7;b=a.u=(b&56)>>3;return Pe(a,b,c,8)} +function We(a,b){var c=a.j=b&7;return(b=a.u=(b&56)>>3)?a.jc(a.Fa(b,c,3)):a.g[c]&255}function Xe(a,b){var c,d=a.j=b&7;(b=a.u=(b&56)>>3)?c=a.kc(a.Fa(b,d,2)):c=a.g[d];return c}function Ye(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Wc=a.Fa(b,e,7),c=0>c?a.g[-c-1]&255:c,a.Tc(e,d.call(a,c,a.jc(e))),e&1&&a.b--):(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 P(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Fa(b,e,6),a.lc(e,d.call(a,0>c?a.g[-c-1]:c,a.kc(e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function Ze(a,b,c,d,e){var f=a.j=b&7;(b=a.u=(b&56)>>3)?(d=a.Fa(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.Tc(d,c),d&1&&a.b--):(c?(c=0>c?a.g[-c-1]&255:c,a.g[f]=a.g[f]&~d|c<<24>>24&d):a.g[f]&=~d,e.call(a,c<<8))} +function $e(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Fa(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.lc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))} +h.Cc=function(a){this.A.complete=!0;var b=this.F?af(this.F)?1:this.A.Sc?-1:0:0,c=a?this.A.Sc?0:1:-1;this.A.Sc=!1;this.lb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(bf(this.F,this.g[7],c)){this.ba();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.ob&224)>>5,f=this.R&&this.R.pb>e?this.R:null;f&&(d=f.Fb,e=f.pb);e>(this.w&224)>>5?(this.i&8&&(Ee(this,2),this.i&=-9),this.ra(d,0,-10),e=!0):e=!1;e&&(f&&Ge(this,f),a=!0);this.R||this.ob||(this.i&=-3)}else this.i& +1&&this.i++;if(a){if(this.i&4&&bf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}if(this.i&112&&He(this)){if(this.i&4&&bf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.oa(a);this.g[7]=a+2&65535;this.Sd(f)}while(0>1|b<<16;Ie(this,a);return a&65535}function Df(a,b){a=b&128|b>>1|b<<8;Ie(this,a<<8);return a&255}function Ef(a,b){a=b&~a;this.Da(a);return a}function Ff(a,b){a=b&~a;this.Da(a<<8);return a} +function Gf(a,b){a|=b;this.Da(a);return a}function Hf(a,b){a|=b;this.Da(a<<8);return a}function If(a,b){a=~b|65536;this.qb(a);return a&65535}function Jf(a,b){a=~b|256;this.qb(a<<8);return a&255}function Kf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Lf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.G=b&(b^c);return a&255}function Mf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Nf(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255} +function Of(a,b){a=-b;this.qb(a,a&b&32768);return a&65535}function Pf(a,b){a=-b;this.qb(a<<8,(a&b&128)<<8);return a&255}function Qf(a,b){a=b<<1|this.C>>16&1;Ie(this,a);return a&65535}function Rf(a,b){a=b<<1|this.C>>16&1;Ie(this,a<<8);return a&255}function Sf(a,b){a=(this.C&65536|b)>>1|b<<16;Ie(this,a);return a&65535}function Tf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Ie(this,a<<8);return a&255}function Uf(a,b){var c=b-a;Je(this,c,a,b);return c&65535} +function Vf(a,b){var c=b-a;Je(this,c<<8,a<<8,b<<8);return c&255}function Wf(a,b){this.I=this.L=b&65280;this.G=this.C=0;return(b<<8|b>>8)&65535}function Xf(a,b){a^=b;this.Da(a);return a&65535}function Yf(a){P(this,a,Ue(this,a),yf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)} function Zf(a){var b=Xe(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.C=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.g[a]=c&65535;this.I=this.L=c;this.b-=(this.u?6:7)+b} function $f(a){var b=Xe(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.C=this.G=0;b&=63;if(b&32){b=64-b;32>b-1;this.C=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.I=d>>16;this.L=d>>16|d;this.b-=(this.u?6:7)+b}function ag(a){Fe(this,a,!Ae(this))}function bg(a){Fe(this,a,Ae(this))} -function cg(a){P(this,a,Ue(this,a),Ef);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}function dg(a){Ye(this,a,Te(this,a),Ff);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}function eg(a){P(this,a,Ue(this,a),Gf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}function fg(a){Ye(this,a,Te(this,a),Hf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)} -function gg(a){var b=Ue(this,a);a=Xe(this,a);this.Ea((0>b?this.g[-b-1]:b)&a);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)}function hg(a){var b=Te(this,a);a=We(this,a);this.Ea(((0>b?this.g[-b-1]&255:b)&a)<<8);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)}function ig(a){Fe(this,a,Ce(this))}function jg(a){Fe(this,a,!De(this)==!Be(this))}function kg(a){Fe(this,a,!Ce(this)&&!De(this)==!Be(this))}function lg(a){Fe(this,a,!Ae(this)&&!Ce(this))} -function mg(a){Fe(this,a,Ce(this)||!De(this)!=!Be(this))}function ng(a){Fe(this,a,Ae(this)||Ce(this))}function og(a){Fe(this,a,!De(this)!=!Be(this))}function pg(a){Fe(this,a,De(this))}function qg(a){Fe(this,a,!Ce(this))}function rg(a){Fe(this,a,!De(this))}function sg(){this.sa(12,0,-9)}function tg(a){Fe(this,a,!0)}function ug(a){Fe(this,a,!Be(this))}function vg(a){Fe(this,a,Be(this))}function wg(a){a&1&&(this.C=0);a&2&&(this.G=0);a&4&&(this.L=1);a&8&&(this.I=0);this.b-=5} -function xg(a){var b=Ue(this,a);a=Xe(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)}function yg(a){var b=Te(this,a);a=We(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)} -function zg(a){var b=Xe(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.C=this.G=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.L=d>>16|d,this.I=d>>16):(this.G=32768,this.L=d>>15|d,this.I=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.b-=53}else this.L=this.I=0,this.G=32768,this.C=65536,this.b-=7}function Ag(){this.sa(24,0,-9);this.b-=20} -function Bg(){this.w&49152?(this.P|=128,this.sa(4,0,-8)):(this.ta&&1120==this.ka&&this.ta.setData(this.g[0],!0),this.F?Cg(this.F):this.ca());this.b-=7}function Dg(){this.sa(16,0,-9);this.b-=20}var Eg=[0,7,7,10,7,11,9,13];function Fg(a){this.la=this.b;qc(this,Ve(this,a));this.b=this.la-Eg[this.u]}var Gg=[0,14,14,17,14,18,16,20];function Hg(a){this.la=this.b;var b=Ve(this,a);a=a>>6&7;Ke(this,this.g[a]);this.g[a]=this.g[7];qc(this,b);this.b=this.la-Gg[this.u]} -var Ig=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Jg(a){var b=Ue(this,a);this.la=this.b;$e(this,a,b,this.Ea);this.b=this.la-Ig[(this.X?8:0)+this.u]+(7!=this.j||this.u?0:2)}function Kg(a){var b=Te(this,a);Ze(this,a,b,65535,this.Ea);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}var Lg=[7,13,13,17,14,18,17,21]; -function Mg(a){var b=Xe(this,a);a=a>>6&7;b=(b<<16>>16)*(this.g[a]<<16>>16);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;b|=0;this.I=b>>16;this.L=this.I|b;this.G=0;this.C=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)qc(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Tg(a){P(this,a,Ue(this,a),Uf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}function Ug(a){P(this,a,0,Wf);this.b-=this.u?9:3+(7==this.j?2:0)}function Vg(){this.sa(28,0,-9)} -function Wg(){this.ta&&(this.ta.Fd(this.g[7],!0),this.ta.setData(this.g[0],!0));this.i|=8;Ee(this,-2);this.b-=3}function Xg(a){P(this,a,this.g[(a>>6&7)+this.zc],Xf);this.b-=this.u?9:3+(7==this.j?2:0)}function Q(a){var b;if(b=this.F)b=this.F,z(b,1)?(C(b,"undefined opcode "+K(b,a),!0,!0),b=Cg(b)):b=!1;b||this.sa(8,0,-9)}function ve(a){Yg[a>>12].call(this,a)}function Zg(a){$g[a>>6&3].call(this,a)}function ah(a){bh[a>>6&3].call(this,a)}function ch(a){dh[a>>6&3].call(this,a)} +function cg(a){P(this,a,Ue(this,a),Ef);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}function dg(a){Ye(this,a,Te(this,a),Ff);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}function eg(a){P(this,a,Ue(this,a),Gf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}function fg(a){Ye(this,a,Te(this,a),Hf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)} +function gg(a){var b=Ue(this,a);a=Xe(this,a);this.Da((0>b?this.g[-b-1]:b)&a);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.U?4:3)+(7==this.j?2:0)}function hg(a){var b=Te(this,a);a=We(this,a);this.Da(((0>b?this.g[-b-1]&255:b)&a)<<8);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.U?4:3)+(7==this.j?2:0)}function ig(a){Fe(this,a,Ce(this))}function jg(a){Fe(this,a,!De(this)==!Be(this))}function kg(a){Fe(this,a,!Ce(this)&&!De(this)==!Be(this))}function lg(a){Fe(this,a,!Ae(this)&&!Ce(this))} +function mg(a){Fe(this,a,Ce(this)||!De(this)!=!Be(this))}function ng(a){Fe(this,a,Ae(this)||Ce(this))}function og(a){Fe(this,a,!De(this)!=!Be(this))}function pg(a){Fe(this,a,De(this))}function qg(a){Fe(this,a,!Ce(this))}function rg(a){Fe(this,a,!De(this))}function sg(){this.ra(12,0,-9)}function tg(a){Fe(this,a,!0)}function ug(a){Fe(this,a,!Be(this))}function vg(a){Fe(this,a,Be(this))}function wg(a){a&1&&(this.C=0);a&2&&(this.G=0);a&4&&(this.L=1);a&8&&(this.I=0);this.b-=5} +function xg(a){var b=Ue(this,a);a=Xe(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.U?4:3)+(7==this.j?2:0)}function yg(a){var b=Te(this,a);a=We(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.U?4:3)+(7==this.j?2:0)} +function zg(a){var b=Xe(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.C=this.G=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.L=d>>16|d,this.I=d>>16):(this.G=32768,this.L=d>>15|d,this.I=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.b-=53}else this.L=this.I=0,this.G=32768,this.C=65536,this.b-=7}function Ag(){this.ra(24,0,-9);this.b-=20} +function Bg(){this.w&49152?(this.P|=128,this.ra(4,0,-8)):(this.sa&&1120==this.ka&&this.sa.setData(this.g[0],!0),this.F?Cg(this.F):this.ba());this.b-=7}function Dg(){this.ra(16,0,-9);this.b-=20}var Eg=[0,7,7,10,7,11,9,13];function Fg(a){this.la=this.b;qc(this,Ve(this,a));this.b=this.la-Eg[this.u]}var Gg=[0,14,14,17,14,18,16,20];function Hg(a){this.la=this.b;var b=Ve(this,a);a=a>>6&7;Ke(this,this.g[a]);this.g[a]=this.g[7];qc(this,b);this.b=this.la-Gg[this.u]} +var Ig=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Jg(a){var b=Ue(this,a);this.la=this.b;$e(this,a,b,this.Da);this.b=this.la-Ig[(this.U?8:0)+this.u]+(7!=this.j||this.u?0:2)}function Kg(a){var b=Te(this,a);Ze(this,a,b,65535,this.Da);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}var Lg=[7,13,13,17,14,18,17,21]; +function Mg(a){var b=Xe(this,a);a=a>>6&7;b=(b<<16>>16)*(this.g[a]<<16>>16);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;b|=0;this.I=b>>16;this.L=this.I|b;this.G=0;this.C=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)qc(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Tg(a){P(this,a,Ue(this,a),Uf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}function Ug(a){P(this,a,0,Wf);this.b-=this.u?9:3+(7==this.j?2:0)}function Vg(){this.ra(28,0,-9)} +function Wg(){this.sa&&(this.sa.Gd(this.g[7],!0),this.sa.setData(this.g[0],!0));this.i|=8;Ee(this,-2);this.b-=3}function Xg(a){P(this,a,this.g[(a>>6&7)+this.zc],Xf);this.b-=this.u?9:3+(7==this.j?2:0)}function Q(a){var b;if(b=this.F)b=this.F,z(b,1)?(C(b,"undefined opcode "+K(b,a),!0,!0),b=Cg(b)):b=!1;b||this.ra(8,0,-9)}function ve(a){Yg[a>>12].call(this,a)}function Zg(a){$g[a>>6&3].call(this,a)}function ah(a){bh[a>>6&3].call(this,a)}function ch(a){dh[a>>6&3].call(this,a)} function eh(a){fh[a&15].call(this,a)}function gh(a){hh[a&15].call(this,a)}function ih(a){jh[a>>6&3].call(this,a)}function kh(a){lh[a>>6&3].call(this,a)}function mh(a){nh[a>>6&3].call(this,a)} -var Yg=[function(a){oh[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,Q,function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],oh=[function(a){qh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,Q,Q,Q],$g=[function(a){$e(this,a,0,this.rb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,If);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Kf);this.b-=this.u?9:3+(7==this.j?2:0)}],bh=[function(a){P(this,a,0,Of); -this.b-=this.u?11:6},function(a){P(this,a,Ae(this)?1:0,yf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Ae(this)?1:0,Uf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Xe(this,a);this.rb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],dh=[function(a){P(this,a,0,Sf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Qf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Cf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Af);this.b-=this.u?9:3+(7==this.j?2:0)}],qh= +var Yg=[function(a){oh[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,Q,function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],oh=[function(a){qh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,Q,Q,Q],$g=[function(a){$e(this,a,0,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,If);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Kf);this.b-=this.u?9:3+(7==this.j?2:0)}],bh=[function(a){P(this,a,0,Of); +this.b-=this.u?11:6},function(a){P(this,a,Ae(this)?1:0,yf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Ae(this)?1:0,Uf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Xe(this,a);this.qb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],dh=[function(a){P(this,a,0,Sf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Qf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Cf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Af);this.b-=this.u?9:3+(7==this.j?2:0)}],qh= [function(a){rh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,Q,eh,gh,Ug,Ug,Ug,Ug],rh=[Bg,Wg,Qg,sg,Dg,Og,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q],fh=[Ng,function(){this.C=0;this.b-=5},function(){this.G=0;this.b-=5},wg,function(){this.L=1;this.b-=5},wg,wg,wg,function(){this.I=0;this.b-=5},wg,wg,wg,wg,wg,wg,wg],hh=[Ng,function(){this.C=65536;this.b-=5},function(){this.G=32768;this.b-=5},Rg,function(){this.L=0;this.b-=5},Rg,Rg,Rg,function(){this.I=32768;this.b-=5},Rg,Rg,Rg,Rg,Rg,Rg,Rg],ph=[rg,pg,lg,ng,ug,vg,ag,bg,Ag,Vg,ih,kh, -mh,Q,Q,Q],jh=[function(a){Ze(this,a,0,255,this.rb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Jf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Nf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Lf);this.b-=this.u?9:3+(7==this.j?2:0)}],lh=[function(a){Ye(this,a,0,Pf);this.b-=this.u?11:6},function(a){Ye(this,a,Ae(this)?1:0,zf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,Ae(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=We(this, -a);this.rb(a<<8);this.b-=this.u?4:3+(7==this.j?2:0)}],nh=[function(a){Ye(this,a,0,Tf);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Df);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Bf);this.b-=this.u?9:3+(7==this.j?2:0)}];function we(a){sh[a>>12].call(this,a)} -var sh=[function(a){th[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,function(a){uh[a>>8&15].call(this,a)},function(a){vh[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],th=[function(a){wh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,function(a){xh[a>>6&3].call(this,a)},Q,Q],xh=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.oa(a|this.Ia);qc(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.b-=8},function(a){a=Re(this,a,0);this.Ea(a);Ke(this,a);this.b-=11},function(a){var b=Me(this); -this.la=this.b;this.Ea(b);Se(this,a,0,b);this.b=this.la-Lg[this.u]},function(a){$e(this,a,De(this)?65535:0,this.Ea);this.b-=this.u?9:3+(7==this.j?2:0)}],wh=[function(a){yh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,function(a){!(a&8)||1145>this.ka?Q.call(this,a):(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5)},eh,gh,Ug,Ug,Ug,Ug],yh=[Bg,Wg,function(){Le(this);this.i|=this.w&16;this.b-=13},sg,Dg,Og,Qg,function(a){Q.call(this,a)},Q,Q,Q,Q,Q,Q,Q,Q],uh=[Mg,Mg,zg,zg,Zf,Zf,$f,$f, -Xg,Xg,Q,Q,Q,Q,Sg,Sg],vh=[rg,pg,lg,ng,ug,vg,ag,bg,Ag,Vg,ih,kh,mh,function(a){1145>this.ka?Q.call(this,a):zh[a>>6&3].call(this,a)},Q,Q],zh=[function(a){Q.call(this,a)},function(a){a=Re(this,a,65536);this.Ea(a);Ke(this,a);this.b-=11},function(a){var b=Me(this);this.la=this.b;this.Ea(b);Se(this,a,65536,b);this.b=this.la-Lg[this.u]},function(a){Q.call(this,a)}]; -function Ah(a){r.call(this,"ROM",a,128);this.ga=this.g=null;this.u=+a.addr;this.b=+a.size;this.w=!1;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.j=a.file;this.B=Oa(this.j);if(this.j){a=this.j;var b=Pa(this.B);"json"!=b&&"hex"!=b&&(a=db()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;bb(a,null,!0,function(a,b,f){f?(c.T("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(na(c.wb,a,b),(a=cb(a,b))?(c.g=a.da,c.ga=a.ga):c.j=null);Bh(c)})}}p(Ah,r); -h=Ah.prototype;h.Aa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Bh(this)};h.Da=function(){this.ga&&(this.F&&Ch(this.F,this.id,this.u,this.b,this.ga),delete this.ga);return!0};h.Ca=function(){return!0}; +mh,Q,Q,Q],jh=[function(a){Ze(this,a,0,255,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Jf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Nf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Lf);this.b-=this.u?9:3+(7==this.j?2:0)}],lh=[function(a){Ye(this,a,0,Pf);this.b-=this.u?11:6},function(a){Ye(this,a,Ae(this)?1:0,zf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,Ae(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=We(this, +a);this.qb(a<<8);this.b-=this.u?4:3+(7==this.j?2:0)}],nh=[function(a){Ye(this,a,0,Tf);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Df);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Bf);this.b-=this.u?9:3+(7==this.j?2:0)}];function we(a){sh[a>>12].call(this,a)} +var sh=[function(a){th[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,function(a){uh[a>>8&15].call(this,a)},function(a){vh[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],th=[function(a){wh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,function(a){xh[a>>6&3].call(this,a)},Q,Q],xh=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.oa(a|this.Ia);qc(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.b-=8},function(a){a=Re(this,a,0);this.Da(a);Ke(this,a);this.b-=11},function(a){var b=Me(this); +this.la=this.b;this.Da(b);Se(this,a,0,b);this.b=this.la-Lg[this.u]},function(a){$e(this,a,De(this)?65535:0,this.Da);this.b-=this.u?9:3+(7==this.j?2:0)}],wh=[function(a){yh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,function(a){!(a&8)||1145>this.ka?Q.call(this,a):(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5)},eh,gh,Ug,Ug,Ug,Ug],yh=[Bg,Wg,function(){Le(this);this.i|=this.w&16;this.b-=13},sg,Dg,Og,Qg,function(a){Q.call(this,a)},Q,Q,Q,Q,Q,Q,Q,Q],uh=[Mg,Mg,zg,zg,Zf,Zf,$f,$f, +Xg,Xg,Q,Q,Q,Q,Sg,Sg],vh=[rg,pg,lg,ng,ug,vg,ag,bg,Ag,Vg,ih,kh,mh,function(a){1145>this.ka?Q.call(this,a):zh[a>>6&3].call(this,a)},Q,Q],zh=[function(a){Q.call(this,a)},function(a){a=Re(this,a,65536);this.Da(a);Ke(this,a);this.b-=11},function(a){var b=Me(this);this.la=this.b;this.Da(b);Se(this,a,65536,b);this.b=this.la-Lg[this.u]},function(a){Q.call(this,a)}]; +function Ah(a){u.call(this,"ROM",a,128);this.ga=this.g=null;this.u=+a.addr;this.b=+a.size;this.w=!1;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.j=a.file;this.B=Oa(this.j);if(this.j){a=this.j;var b=Pa(this.B);"json"!=b&&"hex"!=b&&(a=db()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;bb(a,null,!0,function(a,b,f){f?(c.T("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(na(c.vb,a,b),(a=cb(a,b))?(c.g=a.ca,c.ga=a.ga):c.j=null);Bh(c)})}}p(Ah,u); +h=Ah.prototype;h.za=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Bh(this)};h.Ca=function(){this.ga&&(this.F&&Ch(this.F,this.id,this.u,this.b,this.ga),delete this.ga);return!0};h.Ba=function(){return!0}; function Bh(a){if(!Ga(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)Ea(a,"ROM size ("+F(a.g.length,8,!0)+") does not match specified size ("+F(a.b,8,!0)+")");else{var b;a:{b=a.u;if(57344<=b&&b<57344+Gc){var c={},c=(c[b]=[Ah.prototype.Jg,Ah.prototype.$h,null,null,null,a.b>>1],c);if(Xb(a.D,a,c)){a.status("Added "+a.b+"-byte ROM at "+E(b));b=a.w=!0;break a}}else if(Xc(a.D,b,a.b,Hd)){for(c=0;c>>f.g;0>>=f.g;0>>a.g;0=b.length){C(a,"invalid block at offset "+Na(n),4096);break}for(var l=l+2,q=b[l++]&255|(b[l++]&255)<<8,t=b[l++]&255|(b[l++]&255)<<8,m=m+((q&255)+(q>>8)+(t&255)+(t>>8)),u=l,D=q-=6;0=b.length){C(a,"insufficient data for block at offset "+Na(n),4096); -break}m+=b[l++]&255;if(m&255){C(a,"invalid checksum ("+F(m,2,!0)+") for block at offset "+Na(n),4096);break}if(D)for(C(a,"loading "+Na(D)+" bytes at "+Na(t)+"-"+Na(t+D),4096);D--;)fd(a.D,t++,b[u++]&255);else t&1?g=!0:null==d&&(d=t),null!=d&&C(a,"starting address: "+Na(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e=la.Id&&c<=la.xf&&(b=c-(la.Id-la.Fe));b&&(a.preventDefault&&a.preventDefault(),d.Oc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.He&&(b=la.Ge);d.Oc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +function Dh(a){u.call(this,"RAM",a);this.ga=this.g=null;this.i=+a.addr;this.j=+a.size;this.ya=a.load;this.xa=a.exec;null!=this.ya&&(this.ya=+this.ya);null!=this.xa&&(this.xa=+this.xa);this.u=!1;this.b=a.file;this.w=Oa(this.b);if(this.b){a=this.b;var b=Pa(this.w);"json"!=b&&"hex"!=b&&(a=db()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;bb(a,null,!0,function(a,b,f){f?(c.T("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(na(c.vb,a,b),(a=cb(a,b))?(c.g=a.ca,c.ga=a.ga, +null==c.ya&&(c.ya=a.ya),null==c.xa&&(c.xa=a.xa)):c.b=null);Eh(c)})}}p(Dh,u);Dh.prototype.za=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Eh(this)};Dh.prototype.Ca=function(a,b){this.ga&&(this.F&&Ch(this.F,this.id,this.i,this.j,this.ga),delete this.ga);b||this.reset();return!0};Dh.prototype.Ba=function(){return!0}; +function Eh(a){if(a.D&&(!a.u&&a.j&&(Xc(a.D,a.i,a.j,hd)?a.u=!0:a.j=0),!Ga(a))){if(!a.u)v("No RAM allocated");else if(a.b){if(!a.g||!a.D)return;Fh(a,a.g,a.ya,a.xa,a.i)?a.status('Loaded image "'+a.w+'"'):a.T('Error loading image "'+a.w+'"')}y(a)}} +Dh.prototype.reset=function(){if(this.u){for(var a=this.D,b=this.i,c=this.j,d=b&a.i,b=b>>>a.g;0=b.length){C(a,"invalid block at offset "+Na(n),4096);break}for(var l=l+2,q=b[l++]&255|(b[l++]&255)<<8,t=b[l++]&255|(b[l++]&255)<<8,m=m+((q&255)+(q>>8)+(t&255)+(t>>8)),r=l,D=q-=6;0=b.length){C(a,"insufficient data for block at offset "+Na(n),4096); +break}m+=b[l++]&255;if(m&255){C(a,"invalid checksum ("+F(m,2,!0)+") for block at offset "+Na(n),4096);break}if(D)for(C(a,"loading "+Na(D)+" bytes at "+Na(t)+"-"+Na(t+D),4096);D--;)fd(a.D,t++,b[r++]&255);else t&1?g=!0:null==d&&(d=t),null!=d&&C(a,"starting address: "+Na(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e=la.Jd&&c<=la.xf&&(b=c-(la.Jd-la.Fe));b&&(a.preventDefault&&a.preventDefault(),d.Oc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.He&&(b=la.Ge);d.Oc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Oc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; -h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;var e=this;this.P=od(this.f,this.M?-1:48,4,1048576);this.R=ld(this.f,function(){var a;a=-1;e.i.length&&(a=e.i.shift()&255,C(e,"receiveByte("+F(a,2,!0)+")"),e.L&&97<=a&&122>a&&(a-=32),nd(e.f,e.R,1E3/Math.round(e.S/10)));0<=a&&(e.C=a,e.b&128?e.C|=49152:e.b|=128,e.b&64&&md(c,e.P))});this.N=od(this.f,this.M?-1:52,4,1048576);this.X=ld(this.f,function(){e.g|=128;e.g&64&&md(c,e.N)});Xb(b,this,Jh,this.M?64832+8*(this.M-1)-65392:0);ec(b,this.reset.bind(this)); -y(this)};h.ue=function(a){if(!this.j){var b=fe(this.J,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ya(c[0]);if(d!=this.Mb)return;c=Ya(c[1]);if(this.j=ua(c)){var e=this.j.exports;if(e){var f=e.connect;f&&f.call(this.j,this.I);if(this.G=e.receiveData){this.I=a;this.O=e.receiveStatus;this.status("Connected "+this.wb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; -h.Da=function(a,b){if(!b)if(this.ue(this.I),!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){Kh(this)};h.save=function(){var a=new G(this);a.set(0,[this.C,this.b,this.g,this.i]);return a.data()};h.restore=function(a){return Kh(this,a[0])};function Kh(a,b){b||(b=[0,8192,128,a.i]);b=ia(b);a.C=b.next().value;a.b=b.next().value;a.g=b.next().value;a.i=b.next().value;return!0} +h.za=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;var e=this;this.P=od(this.f,this.M?-1:48,4,1048576);this.R=ld(this.f,function(){var a;a=-1;e.i.length&&(a=e.i.shift()&255,C(e,"receiveByte("+F(a,2,!0)+")"),e.L&&97<=a&&122>a&&(a-=32),nd(e.f,e.R,1E3/Math.round(e.S/10)));0<=a&&(e.C=a,e.b&128?e.C|=49152:e.b|=128,e.b&64&&md(c,e.P))});this.N=od(this.f,this.M?-1:52,4,1048576);this.X=ld(this.f,function(){e.g|=128;e.g&64&&md(c,e.N)});Xb(b,this,Jh,this.M?64832+8*(this.M-1)-65392:0);ec(b,this.reset.bind(this)); +y(this)};h.ue=function(a){if(!this.j){var b=fe(this.J,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ya(c[0]);if(d!=this.Mb)return;c=Ya(c[1]);if(this.j=ua(c)){var e=this.j.exports;if(e){var f=e.connect;f&&f.call(this.j,this.I);if(this.G=e.receiveData){this.I=a;this.O=e.receiveStatus;this.status("Connected "+this.vb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; +h.Ca=function(a,b){if(!b)if(this.ue(this.I),!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ba=function(a){return a?this.save():!0};h.reset=function(){Kh(this)};h.save=function(){var a=new G(this);a.set(0,[this.C,this.b,this.g,this.i]);return a.data()};h.restore=function(a){return Kh(this,a[0])};function Kh(a,b){b||(b=[0,8192,128,a.i]);b=ia(b);a.C=b.next().value;a.b=b.next().value;a.g=b.next().value;a.i=b.next().value;return!0} h.Oc=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.W||8,c=a-this.B%a,this.W&&(b=Xa("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.u.value+=b;this.u.scrollTop=this.u.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==a||1024<=this.w.length)this.v(this.w), this.w="";10!=a&&(this.w+=String.fromCharCode(a))}nd(this.f,this.X,1E3/Math.round(this.Y/10));this.g&=-129};var Ih="buffer",Lh={},Jh=(Lh[65392]=[null,null,Hh.prototype.wg,Hh.prototype.Nh,"RCSR"],Lh[65394]=[null,null,Hh.prototype.vg,Hh.prototype.Mh,"RBUF"],Lh[65396]=[null,null,Hh.prototype.eh,Hh.prototype.vi,"XCSR"],Lh[65398]=[null,null,Hh.prototype.dh,Hh.prototype.ui,"XBUF"],Lh);rb(function(){for(var a=x(document,w,"serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.H[b]=c,!0;case "readTape":e=Ph;case "loadTape":return e||(e=Qh),this.H[b]=c,c.onclick= function(){var a=d.H.listTapes;a&&Rh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.H[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;Rh(d,Oa(b,!0),b,Qh,a)}return!1};return!0;case Sh:return this.H[b]=c,!0}return!1}; -h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;this.I=Th(a);var e=this;if(a=Mh(this,fe(this.J,"autoMount")))for(var f in a)"PTR"==f&&(this.N[f]=a[f]);this.G=od(this.f,56,4,4096);this.S=ld(this.f,function(){1!=(e.b&32769)||e.b&128||(e.ic.indexOf("/api/v1/dump")&&(e=Pa(c),f="json"==e||"gz"==e?encodeURI(c):db()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!bb(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.aa;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(na(a.wb,e,f),(e=cb(e,f))&&di(a,b,c,d, -e.da,e.za,e.ya));a.A.fb=!1;a.g&&(a.g--,a.g||y(a));ai(a)})}function Wh(a,b,c,d){if((a=a.H.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=Pa(c),f="json"==e||"gz"==e?encodeURI(c):db()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!bb(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.aa;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(na(a.vb,e,f),(e=cb(e,f))&&di(a,b,c,d, +e.ca,e.ya,e.xa));a.A.eb=!1;a.g&&(a.g--,a.g||y(a));ai(a)})}function Wh(a,b,c,d){if((a=a.H.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Z);for(d=0;dc.indexOf("/api/v1/dump")&&(b=Pa(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"):Qa(c,"/")&&(d="dir"),f=db()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.zd?"":e)+"&format=json"));return!!bb(f, +function gi(a,b,c){u.call(this,"Disk",{id:a.vb+".disk"+F(++hi,4)},8192);this.controller=a;this.J=a.J;this.F=a.F;this.u=b;this.Xa=b.name;this.Oa=this.Fd="";this.zd=b.zd;this.Z=this.ja=this.ea=this.ua=this.mode=0;this.b=[];this.i=null;this.j=!1;ii(this,c,b.Z,b.ja,b.ea,b.ua);this.g=this.w=null;y(this)}p(gi,u);h=gi.prototype;h.za=function(a,b,c,d){this.F=d}; +function ii(a,b,c,d,e,f){a.mode=b;a.Z=c;a.ja=d;a.ea=e;a.ua=f;a.b=[];if("preload"!=a.mode){b=Array(a.Z);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Z);for(d=0;dc.indexOf("/api/v1/dump")&&(b=Pa(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"):Qa(c,"/")&&(d="dir"),f=db()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.zd?"":e)+"&format=json"));return!!bb(f, null,!0,function(b,c,d){li(a,b,c,d)})} -function li(a,b,c,d){var e=null,f=0>d&&!!a.J&&!a.J.A.aa;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{na(a.controller.wb,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)v(k[0]);else{a.Z=k.length;a.ja=k[0].length;a.fa=k[0][0].length;var l=k[0][0][0];a.ua=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var q=l.data;if(void 0===q){var t=l.bytes;if(void 0!==t&&t.length){for(var u=m<<2,D=t.length;D>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.La?f=a.Wa+a.La&&(a.La+=f-(a.Wa+a.La)+1):(a.Wa=f,a.La=1);d[f]=d[f]&~(255<g)break;e|=g<d&&!!a.J&&!a.J.A.aa;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{na(a.controller.vb,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)v(k[0]);else{a.Z=k.length;a.ja=k[0].length;a.ea=k[0][0].length;var l=k[0][0][0];a.ua=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var q=l.data;if(void 0===q){var t=l.bytes;if(void 0!==t&&t.length){for(var r=m<<2,D=t.length;D>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.La?f=a.Va+a.La&&(a.La+=f-(a.Va+a.La)+1):(a.Va=f,a.La=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[k].length||m>=this.b[k][l].length){c="sector (CHS="+k+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.j){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.b[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.T("Unable to restore disk '"+this.Xa+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.j){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.b[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.T("Unable to restore disk '"+this.Xa+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=ni(this,a++);)pi(b);a=JSON.stringify(this.b,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 pi(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)}}var hi=0;function qi(a,b,c,d,e,f){r.call(this,a,b,c);this.N=ri(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Zc;this.g=Array(this.P);this.O=!ib("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={bootDisk:this.ke,loadDisk:this.Ad,selectDrive:this.ih,wait:this.mh}}p(qi,r); +function pi(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)}}var hi=0;function qi(a,b,c,d,e,f){u.call(this,a,b,c);this.N=ri(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Zc;this.g=Array(this.P);this.O=!ib("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={bootDisk:this.le,loadDisk:this.Bd,selectDrive:this.ih,wait:this.mh}}p(qi,u); function ri(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){v(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=qi.prototype; -h.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.H[b]=c,c.onchange=function(){si(d)},!0;case "descDisk":case "listDrives":return this.H[b]=c,c.onchange=function(){var a=Ka(c.value,10);null!=a&&ti(d,a)},!0;case "loadDisk":return this.H[b]=c,c.onclick=function(){d.Ad()},!0;case "bootDisk":return this.H[b]=c,c.onclick=function(){d.ke()},!0;case "saveDisk":if(!this.O){c.parentNode.removeChild(c);break}this.H[b]=c;c.onclick=function(){var a=d.H.listDrives;if(a&&a.options&&d.g)if(a= -d.g[Ka(a.value,10)||0])if(a=a.ea){var b;b="";for(var c=0,k;k=ni(a,c++);)for(var l=0,m=k.length;lg||9d||d>=this.g.length)return this.T("Unable to load the selected drive"),!1;if(!b)return Ti(this,d),!0;if(b==Qi)return this.T('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Ri){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=Oa(b);this.status("Attempting to load "+b+' as "'+ -a+'"')}Xi(this,d,a,b,!1,c);return!0};h.ke=function(){var a,b=this.H.listDrives,b=b&&Ka(b.value,10);if(null==b||0>b||b>=this.g.length||!(a=this.g[b]))return this.T("Unable to boot the selected drive"),!1;if(!a.ea)return this.T("Load a disk into the drive first"),!1;ye(this.f,0,!0,b);return(a=this.Ub(a,a.If,a.Jf,a.Kf,a.Bf,0,2))?(this.T("Unable to read the boot sector ("+a+")"),!1):!0}; -function Xi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Oa.toLowerCase()!=d.toLowerCase()&&(g++,Ti(a,b,!0),k.Mc?a.T(a.type+" busy"):(k.Mc=!0,e&&(k.yd=!0,a.M++,z(a)&&C(a,"auto-loading disk: "+c)),k.Pb=!!f,ki(new gi(a,k,"preload"),c,d,f,a.ne)&&g++));return g} -h.ne=function(a,b,c,d,e){a.Mc=!1;b&&(b.Z>a.Z||b.ja>a.ja)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Qc||"---")),b=null);b?(a.ea=b,a.Xa=c,a.Oa=d,this.we(a.Tb),Yi(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Qc||"---"),a.yd||e),this.J&&pe(this.J)):a.Pb=!1;a.yd&&(a.yd=!1,--this.M||y(this));ti(this,a.Tb);a.ic&&(a.ic(),a.ic=null)}; +h.Bd=function(a,b,c){if(!a&&!b){var d=this.H.listDisks;d&&d.options&&(a=d.options[d.selectedIndex].text,b=d.value)}d=(d=this.H.listDrives)&&Ka(d.value,10);if(void 0===d||0>d||d>=this.g.length)return this.T("Unable to load the selected drive"),!1;if(!b)return Ti(this,d),!0;if(b==Qi)return this.T('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Ri){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=Oa(b);this.status("Attempting to load "+b+' as "'+ +a+'"')}Xi(this,d,a,b,!1,c);return!0};h.le=function(){var a,b=this.H.listDrives,b=b&&Ka(b.value,10);if(null==b||0>b||b>=this.g.length||!(a=this.g[b]))return this.T("Unable to boot the selected drive"),!1;if(!a.da)return this.T("Load a disk into the drive first"),!1;ye(this.f,0,!0,b);return(a=this.Ub(a,a.If,a.Jf,a.Kf,a.Bf,0,2))?(this.T("Unable to read the boot sector ("+a+")"),!1):!0}; +function Xi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Oa.toLowerCase()!=d.toLowerCase()&&(g++,Ti(a,b,!0),k.Mc?a.T(a.type+" busy"):(k.Mc=!0,e&&(k.yd=!0,a.M++,z(a)&&C(a,"auto-loading disk: "+c)),k.Pb=!!f,ki(new gi(a,k,"preload"),c,d,f,a.oe)&&g++));return g} +h.oe=function(a,b,c,d,e){a.Mc=!1;b&&(b.Z>a.Z||b.ja>a.ja)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Qc||"---")),b=null);b?(a.da=b,a.Xa=c,a.Oa=d,this.we(a.Tb),Yi(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Qc||"---"),a.yd||e),this.J&&pe(this.J)):a.Pb=!1;a.yd&&(a.yd=!1,--this.M||y(this));ti(this,a.Tb);a.ic&&(a.ic(),a.ic=null)}; function Ni(a,b,c,d){if((a=a.H.listDisks)&&a.options){for(var e=0;e'+a+"");c.innerHTML=a}}h.mh=function(a){for(var b=0;b=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1);if(!n){m=S.be;break}q=0;++d>=a.fa&&(d=0,++c>=a.ja&&(c=0,++b))}var t,u;if(0>(t=a.read(n,q++))||0>(u=a.read(n,q++))){m=S.Fc;break}if(!k&&(zc(this.D,Ne(this.f,f),t|u<<8),kd(this.D))){m=S.ec;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; -h.Uc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.ea;var n=null,q;a||(m=S.Td,e=0);for(;e;){var t=Bc(this.D,Ne(this.f,f));if(kd(this.D)){m=S.ec;break}if(!n){if(b>=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.be;break}q=0;++d>=a.fa&&(d=0,++c>=a.ja&&(c=0,++b))}if(k){var u,D;if(0>(u=a.read(n,q++))||0>(D=a.read(n,q++))){m=S.Fc;break}if(t!=(u|D<<8)){m=S.fe;break}}else if(!a.write(n,q++,t&255)||!a.write(n,q++,t>>8)){m=S.Fc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; -h.Ze=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Jb|f>>16-R.ma.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~bj.rd|d&bj.rd;this.i|=a;cj(this);return!0};function cj(a){a.b&=~R.ib;a.i&&(a.i|=S.Je,a.b|=R.ib,a.i&S.ed&&(a.b|=R.ed),z(a)&&C(a,a.type+": ERROR: "+E(a.i)))}h.Bg=function(){return this.G};h.Sh=function(){};h.Cg=function(){return this.i};h.Th=function(){};h.yg=function(){return this.b&R.fc}; -h.Ph=function(a){this.b=this.b&~R.Ta|a&R.Ta;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&bj.tb)>>bj.ma.tb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.Za|R.sd);this.i&=~S.qf;switch(c=this.b&R.wa){case dj.Ee:z(this)&&C(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.Za;break;case dj.Ue:d="RCHK";case dj.ub:d||(d="READ"),b=this.Ub;case dj.vd:d||(d="WCHK");case dj.hc:d||(d="WRITE");b||(b=this.Uc);g=(this.j&bj.bc)>>bj.ma.bc;k=(this.j&bj.hd)>>bj.ma.hd;l=this.j&bj.rd;m=65536-this.w&65535;n=(this.b&R.Jb)<< -16-R.ma.Jb|this.u;q=this.b&R.Qe?0:2;z(this)&&C(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+E(n)+"--"+E(n+(m<<1)),!0,!0);if(g>=f.Z){this.i|=S.Ec;break}if(l>=f.fa){this.i|=S.Fc;break}a=b.call(this,f,g,k,l,m,n,q,c>=dj.vd,this.Ze.bind(this));break;case dj.Kc:g=(this.j&bj.bc)>>bj.ma.bc;z(this)&&C(this,this.type+": SEEK("+g+")",!0);g=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1);if(!n){m=S.ce;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}var t,r;if(0>(t=a.read(n,q++))||0>(r=a.read(n,q++))){m=S.Fc;break}if(!k&&(zc(this.D,Ne(this.f,f),t|r<<8),kd(this.D))){m=S.ec;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; +h.Uc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Ud,e=0);for(;e;){var t=Bc(this.D,Ne(this.f,f));if(kd(this.D)){m=S.ec;break}if(!n){if(b>=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.ce;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}if(k){var r,D;if(0>(r=a.read(n,q++))||0>(D=a.read(n,q++))){m=S.Fc;break}if(t!=(r|D<<8)){m=S.ge;break}}else if(!a.write(n,q++,t&255)||!a.write(n,q++,t>>8)){m=S.Fc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; +h.Ze=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Jb|f>>16-R.ma.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~bj.rd|d&bj.rd;this.i|=a;cj(this);return!0};function cj(a){a.b&=~R.hb;a.i&&(a.i|=S.Je,a.b|=R.hb,a.i&S.ed&&(a.b|=R.ed),z(a)&&C(a,a.type+": ERROR: "+E(a.i)))}h.Bg=function(){return this.G};h.Sh=function(){};h.Cg=function(){return this.i};h.Th=function(){};h.yg=function(){return this.b&R.fc}; +h.Ph=function(a){this.b=this.b&~R.Sa|a&R.Sa;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&bj.sb)>>bj.ma.sb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.Za|R.sd);this.i&=~S.qf;switch(c=this.b&R.wa){case dj.Ee:z(this)&&C(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.Za;break;case dj.Ue:d="RCHK";case dj.tb:d||(d="READ"),b=this.Ub;case dj.vd:d||(d="WCHK");case dj.hc:d||(d="WRITE");b||(b=this.Uc);g=(this.j&bj.bc)>>bj.ma.bc;k=(this.j&bj.hd)>>bj.ma.hd;l=this.j&bj.rd;m=65536-this.w&65535;n=(this.b&R.Jb)<< +16-R.ma.Jb|this.u;q=this.b&R.Qe?0:2;z(this)&&C(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+E(n)+"--"+E(n+(m<<1)),!0,!0);if(g>=f.Z){this.i|=S.Ec;break}if(l>=f.ea){this.i|=S.Fc;break}a=b.call(this,f,g,k,l,m,n,q,c>=dj.vd,this.Ze.bind(this));break;case dj.Kc:g=(this.j&bj.bc)>>bj.ma.bc;z(this)&&C(this,this.type+": SEEK("+g+")",!0);g(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=gj.$a;break}zc(this.D,Ne(this.f,f),n|q<<8);if(kd(this.D)){g=gj.ec;break}f+=2;e--;if(m>=a.ua&&(k=null,++d>=a.fa&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.$a;break}}return l?l(g,b,c,d,e,f):g}; -h.Uc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.ea;k=null;var m;a||(g=gj.$a,e=0);for(;e;){var n=Bc(this.D,Ne(this.f,f));if(kd(this.D)){g=gj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=gj.$a;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=gj.$a;break}if(m>=a.ua&&(k=null,++d>=a.fa&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.$a;break}}return l?l(g,b,c,d,e,f):g}; -h.df=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&~U.Ya|f>>16-U.ma.Ya&U.Ya;this.u=f>>16&hj.ab;this.j=this.i=b<>U.ma.Ya;if(!(this.b&U.Za)){a=!0;var b,c="",d=this.g[(this.b&U.tb)>>U.ma.tb],e=d.ea,f,g,k;this.b&=~U.Fa;switch(this.b&U.wa){case jj.uf:this.w&kj.Qd&&(this.b&=U.Fa|U.wa|U.Ya);this.w=d.status|this.j&ij.Jc|(e&&512==e.Z?kj.Ne:0);break;case jj.Kc:(this.i&ij.Me)==ij.rf&&(b=this.i&ij.gc,c=(this.i&ij.tf)<<2,this.j=this.i&ij.sf?this.j+b:this.j-b,this.i=this.j=this.j&ij.gc|c);break;case jj.Ye:this.w=this.j;break;case jj.Ve:c="READ",b=this.Ub; -case jj.wf:c||(c="WRITE"),b||(b=this.Uc),f=this.i>>ij.ma.gc,g=this.i&ij.Jc?1:0,k=this.i&ij.$d,!e||f>=e.Z||k>=e.fa?this.b=this.b|gj.$a|U.ib:(a=65536-this.w&65535,e=(this.u&hj.ab)<<16|this.C,z(this)&&C(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.df.bind(this)))}a&&(this.b=this.b|U.Fa|U.Za,this.b&U.Ib&&md(this.f,this.Qa))}};h.Eg=function(){return this.C};h.Vh=function(a){this.C=a&lj.Ta};h.Hg=function(){return this.i}; +function Dd(a){qi.call(this,"RL11",a,131072,Nb,Nb.cf,fj);this.b=this.C=this.i=this.j=this.w=this.u=0}p(Dd,qi);h=Dd.prototype;h.Cb=function(a){a||(a=[U.Ea|U.Za,0,0,0,0,0]);a=ia(a);this.b=a.next().value;this.C=a.next().value;this.i=a.next().value;this.j=a.next().value;this.w=a.next().value;this.u=a.next().value;return!0};h.Rc=function(){return[this.b,this.C,this.i,this.j,this.w,this.u]}; +h.Ub=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=gj.$a,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=gj.$a;break}m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=gj.$a;break}zc(this.D,Ne(this.f,f),n|q<<8);if(kd(this.D)){g=gj.ec;break}f+=2;e--;if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.$a;break}}return l?l(g,b,c,d,e,f):g}; +h.Uc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=gj.$a,e=0);for(;e;){var n=Bc(this.D,Ne(this.f,f));if(kd(this.D)){g=gj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=gj.$a;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=gj.$a;break}if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.$a;break}}return l?l(g,b,c,d,e,f):g}; +h.df=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&~U.Ya|f>>16-U.ma.Ya&U.Ya;this.u=f>>16&hj.ab;this.j=this.i=b<>U.ma.Ya;if(!(this.b&U.Za)){a=!0;var b,c="",d=this.g[(this.b&U.sb)>>U.ma.sb],e=d.da,f,g,k;this.b&=~U.Ea;switch(this.b&U.wa){case jj.uf:this.w&kj.Rd&&(this.b&=U.Ea|U.wa|U.Ya);this.w=d.status|this.j&ij.Jc|(e&&512==e.Z?kj.Ne:0);break;case jj.Kc:(this.i&ij.Me)==ij.rf&&(b=this.i&ij.gc,c=(this.i&ij.tf)<<2,this.j=this.i&ij.sf?this.j+b:this.j-b,this.i=this.j=this.j&ij.gc|c);break;case jj.Ye:this.w=this.j;break;case jj.Ve:c="READ",b=this.Ub; +case jj.wf:c||(c="WRITE"),b||(b=this.Uc),f=this.i>>ij.ma.gc,g=this.i&ij.Jc?1:0,k=this.i&ij.ae,!e||f>=e.Z||k>=e.ea?this.b=this.b|gj.$a|U.hb:(a=65536-this.w&65535,e=(this.u&hj.ab)<<16|this.C,z(this)&&C(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.df.bind(this)))}a&&(this.b=this.b|U.Ea|U.Za,this.b&U.Ib&&md(this.f,this.Qa))}};h.Eg=function(){return this.C};h.Vh=function(a){this.C=a&lj.Sa};h.Hg=function(){return this.i}; h.Yh=function(a){this.i=a};h.Ig=function(){return this.w};h.Zh=function(a){this.w=a};h.Fg=function(){return this.u};h.Wh=function(a){this.u=a&hj.ab;this.b=this.b&~U.Ya|(this.u&3)<=m.Z){k=qj.Se;break}n=m.seek(b,c,d+1);if(!n){k=qj.pd;break}q=0;++d>=m.fa&&(d=0,++c>=m.ja&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=qj.od;break}zc(this.D,Ne(this.f,f),a|t<<8);q>=m.ua&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; -function oj(a){var b=0,c=a.b&W.td?1:0,d=a.g[c],d=d&&d.ea,e=a.I&rj.ab,f=a.G&sj.ab;a.i&=~(tj.Ld|tj.Wd|tj.cc|tj.Fa);if(d)if(a.i|=tj.Fa,z(a)&&C(a,a.type+".readSector("+e+":0:"+f+")",!0,!0),c=d.seek(e,0,f,!0)){e=0;for(f=a.w.length;eg){b=qj.od;break}a.w[e++]=g}c.Ef&&(a.i|=tj.cc)}else b=qj.pd;else b=c?qj.gd:qj.fd;pj(a,b)} -h.Kg=function(a,b){a=this.b;if(!b)switch(a&=W.fc,this.j){case V.bd:case V.EMPTY:this.uthis.u&&(this.b|=W.eb)}return a}; -h.ai=function(a){this.b=this.b&~W.Ta|a&W.Ta;if(this.b&W.INIT)this.Db();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.wa,this.b&=~(W.dc|W.eb|W.DONE|W.ib),sd(this.f,this.Qa),z(this)&&C(this,this.type+".processCommand("+uj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.ub:case V.hc:case V.Lc:this.u=0;break;case V.Xe:a=this.g[this.b&W.td?1:0];this.i&=~tj.Fa;a&&a.ea&&(this.i|=tj.Fa);this.C=this.i;pj(this);break;case V.We:this.C=this.L,pj(this)}else this.b&W.Ib?this.b&W.DONE&&md(this.f, -this.Qa):sd(this.f,this.Qa)};h.Lg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.eb&&(this.b&=~W.eb,this.C=this.w[this.u]&255,z(this)&&C(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&pj(this))}return this.C}; -h.bi=function(a){switch(this.j){case V.bd:this.b&W.eb&&(this.b&=~W.eb,this.w[this.u]=a&255,z(this)&&C(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&pj(this));break;case V.ub:case V.hc:case V.Lc:if(this.b&W.eb)switch(this.b&=~W.eb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.ub)oj(this);else{var b=this.j==V.Lc,c=0,d=this.b&W.td?1:0,e=this.g[d],e=e&&e.ea,f=this.I&rj.ab,g=this.G&sj.ab;this.i&=~(tj.Ld|tj.Wd|tj.cc|tj.Fa);if(e)if(this.i|=tj.Fa,z(this)&& -C(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Ef=!0),b=0,f=this.w.length;b=m.Z){k=qj.Se;break}n=m.seek(b,c,d+1);if(!n){k=qj.pd;break}q=0;++d>=m.ea&&(d=0,++c>=m.ja&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=qj.od;break}zc(this.D,Ne(this.f,f),a|t<<8);q>=m.ua&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; +function oj(a){var b=0,c=a.b&W.td?1:0,d=a.g[c],d=d&&d.da,e=a.I&rj.ab,f=a.G&sj.ab;a.i&=~(tj.Md|tj.Xd|tj.cc|tj.Ea);if(d)if(a.i|=tj.Ea,z(a)&&C(a,a.type+".readSector("+e+":0:"+f+")",!0,!0),c=d.seek(e,0,f,!0)){e=0;for(f=a.w.length;eg){b=qj.od;break}a.w[e++]=g}c.Ef&&(a.i|=tj.cc)}else b=qj.pd;else b=c?qj.gd:qj.fd;pj(a,b)} +h.Kg=function(a,b){a=this.b;if(!b)switch(a&=W.fc,this.j){case V.bd:case V.EMPTY:this.uthis.u&&(this.b|=W.cb)}return a}; +h.ai=function(a){this.b=this.b&~W.Sa|a&W.Sa;if(this.b&W.INIT)this.Cb();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.wa,this.b&=~(W.dc|W.cb|W.DONE|W.hb),sd(this.f,this.Qa),z(this)&&C(this,this.type+".processCommand("+uj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.tb:case V.hc:case V.Lc:this.u=0;break;case V.Xe:a=this.g[this.b&W.td?1:0];this.i&=~tj.Ea;a&&a.da&&(this.i|=tj.Ea);this.C=this.i;pj(this);break;case V.We:this.C=this.L,pj(this)}else this.b&W.Ib?this.b&W.DONE&&md(this.f, +this.Qa):sd(this.f,this.Qa)};h.Lg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.cb&&(this.b&=~W.cb,this.C=this.w[this.u]&255,z(this)&&C(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&pj(this))}return this.C}; +h.bi=function(a){switch(this.j){case V.bd:this.b&W.cb&&(this.b&=~W.cb,this.w[this.u]=a&255,z(this)&&C(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&pj(this));break;case V.tb:case V.hc:case V.Lc:if(this.b&W.cb)switch(this.b&=~W.cb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.tb)oj(this);else{var b=this.j==V.Lc,c=0,d=this.b&W.td?1:0,e=this.g[d],e=e&&e.da,f=this.I&rj.ab,g=this.G&sj.ab;this.i&=~(tj.Md|tj.Xd|tj.cc|tj.Ea);if(e)if(this.i|=tj.Ea,z(this)&& +C(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Ef=!0),b=0,f=this.w.length;ba.u&&a.j.length&&(a.u=0);if(0>a.u||b!=a.j[a.u])a.j.splice(0,0,b),a.u=0;a.u--}else a.O?b="end":b=a.j[a.u+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 yj(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 zj(a,b,c){var d;if(b){b=Aj(a,b);for(var e=0,f=!1,g=b,k=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=8;d=F(c,0,!0)+" "+c+". "+E(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e} -function Ej(a,b){if(b)return Dj(a,b,a.S[b]);var c=0;for(b in a.S)Dj(a,b,a.S[b]),c++;return 0=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; -function Fj(a){wj.call(this,a);this.Ga=!1;this.ia=!0;this.G=X();this.xa=X();this.N=X();this.B=[];this.g=this.L=this.C=[];Gj(this);this.P=this.Y=0;this.i=[];this.pa=void 0;Hj(this);this.F=this;this.ka={};this.ha=this.je=0;this.R=null;this.M=[];Ij(this,a.messages);this.ta=a.commands;this.Ja=Jj;this.W=[];this.I=0;this.Ka=this.qa=null;this.w=this.Ia=this.Ha=this.X=this.la=0;this.b=this.U=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ke(b,a)}):void 0===global[w]&&(global[w]= -function(a){return ke(b,a)})}p(Fj,wj);function Kj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Ma:void 0===b?!1:b,Va:!1,Ba:c}}h=Fj.prototype;h.Fd=function(a,b){a.K=b;a.Va=!1;a.Ba=void 0;return a};function Lj(a){return[a.K,a.Ma,a.Ba,a.Va,a.Pc]}function Mj(a,b){var c=X(b[0],b[1],b[2]);c.Va=b[3];b[4]&&(c.ge=xj(a,c.Pc=b[4]));return c} -h.Aa=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.b=a.i;(a=fe(a,"messages"))&&Ij(this,a);1140>this.f.ka&&(this.W=this.W.concat(Nj));1145>this.f.ka&&(this.W=this.W.concat(Oj));qd(this,16,function(a){a:{var b=d.D.b,c=a[0],e=a=0,l=b.length;if(c){a=Kj(Pj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.D.g;l=1}d.v("blockid physical blockaddr used size type");d.v("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.v("..."): +function Bj(a,b,c,d){var e;null!=b?(e=a.re(b),0<=e?e=a.Ad(e):(e=a.S[b],null==e&&(e=Ka(b,a.Aa))),null!=e||d||a.v("invalid "+(c?c:"value")+": "+b)):d||a.v("missing "+(c||"value"));return e}function Dj(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=4,g="";if(!f||4>=8;d=F(c,0,!0)+" "+c+". "+E(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e} +function Ej(a,b){if(b)return Dj(a,b,a.S[b]);var c=0;for(b in a.S)Dj(a,b,a.S[b]),c++;return 0=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function Fj(a){wj.call(this,a);this.Ga=!1;this.ia=!0;this.G=X();this.Fa=X();this.N=X();this.B=[];this.b=this.L=this.C=[];Gj(this);this.P=this.Y=0;this.i=[];this.pa=void 0;Hj(this);this.F=this;this.ka={};this.ha=this.ke=0;this.R=null;this.M=[];Ij(this,a.messages);this.ta=a.commands;this.Ja=Jj;this.W=[];this.I=0;this.Ka=this.sa=null;this.w=this.Ia=this.Ha=this.X=this.la=0;this.g=this.U=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ke(b,a)}):void 0===global[w]&&(global[w]= +function(a){return ke(b,a)})}p(Fj,wj);function Kj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Ma:void 0===b?!1:b,Ua:!1,Aa:c}}h=Fj.prototype;h.Gd=function(a,b){a.K=b;a.Ua=!1;a.Aa=void 0;return a};function Lj(a){return[a.K,a.Ma,a.Aa,a.Ua,a.Pc]}function Mj(a,b){var c=X(b[0],b[1],b[2]);c.Ua=b[3];b[4]&&(c.he=xj(a,c.Pc=b[4]));return c} +h.za=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.g=a.i;(a=fe(a,"messages"))&&Ij(this,a);1140>this.f.ka&&(this.W=this.W.concat(Nj));1145>this.f.ka&&(this.W=this.W.concat(Oj));qd(this,16,function(a){a:{var b=d.D.b,c=a[0],e=a=0,l=b.length;if(c){a=Kj(Pj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.D.g;l=1}d.v("blockid physical blockaddr used size type");d.v("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.v("..."): (c=n.type,m=cd[c],n&&d.v(F(n.id,8)+" %"+F(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} -h.re=function(a){var b;if(0<=a)if(8>a)b=this.f.g[a];else if(16>a)b=this.f.qa[a-8];else if(20>a)b=this.f.W[a-16];else{var c=this.f,d=this.b;switch(a){case Vj:b=zd(this.f);break;case Wj:b=c.cb;break;case Xj:b=c.P;break;case Yj:b=c.xa&65280;break;case Zj:b=td(c);break;case ak:b=vd(c);break;case bk:b=wd(c);break;case ck:b=c.U;break;case dk:d&&(b=d.ba);break;case ek:d&&(b=d.qb);break;case fk:d&&(b=d.Ra)}}return b}; -h.message=function(a,b){b&&(a+=" @"+Sj(this,X(this.f.O&65535)));if(!this.R||a!=this.R)if(this.R=a,this.ha&1073741824)this.M.push(a);else{var c;if(this.ha&-2147483648&&this.f&&(c=this.f.A.V)||Ha(this,!0))this.ca(),c&&(a+=" (cpu halted)");this.v(a);this.f&&(a=this.f,qe(a),a.Bb=0,a.J&&H(a.J,void 0))}}; -function Hj(a){var b;if(!af(a))a.i&&a.i.length&&a.v("instruction history buffer freed"),a.P=0,a.i=[];else if(!a.i||!a.i.length){a.i=Array(gk);for(b=0;b>8;a.v("trapped to "+K(a,c&255,1)+" ("+(0>d?Lb[-d]:K(a,d))+")")}a.G=X(a.f.g[7]);b&&1!=a.I?kk(a):lk(a)}}function ik(a,b){var c;(c=!a.f||!Ga(a.f))||(c=a.f,c.A.aa?c=!0:(c.v(c.toString()+" not powered"),c=!1),c=!c);return c||a.f.A.V?(b||a.v("cpu busy or unavailable, command ignored"),!1):!Fa(a.f)}h.Da=function(a,b){return!b&&(this.reset(!0),a)?this.restore(a):!0}; -h.Ca=function(a,b){b&&this.v(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){Hj(this);this.X=0;this.R=null;this.w=0;this.G=X(this.f.g[7]);this.A.V=!1;mk(this);a||ie(this)};h.save=function(){var a=new G(this);a.set(0,Lj(this.G));a.set(1,Lj(this.N));a.set(2,[this.j,this.O,this.ha]);a.set(3,this.B);return a.data()}; +"";ke(d,a,!0);return!0}return!1}),!0;case "step":return this.H[b]=c,pb(c,function(a){var b=!1;Ha(d,!0)||(Ja(d,!0),b=uc(d,a?1:0,null),Ja(d,!1));return b}),!0}return!1};function je(a){if(a.U){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.U.focus();window&&window.scrollTo(b,c)}}h.Od=function(a,b){var c=255,d=Kj(a);-1!==d&&(a.Ma||65535d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a)b=this.f.g[a];else if(16>a)b=this.f.ta[a-8];else if(20>a)b=this.f.X[a-16];else{var c=this.f,d=this.g;switch(a){case Xj:b=zd(this.f);break;case Yj:b=c.ob;break;case Zj:b=c.P;break;case ak:b=c.Ga&65280;break;case bk:b=td(c);break;case ck:b=vd(c);break;case dk:b=wd(c);break;case ek:b=c.W;break;case Vj:d&&(b=d.fa);break;case fk:d&&(b=d.Eb);break;case gk:d&&(b=d.Wa)}}return b}; +h.message=function(a,b){b&&(a+=" @"+Sj(this,X(this.f.O&65535)));if(!this.R||a!=this.R)if(this.R=a,this.ha&1073741824)this.M.push(a);else{var c;if(this.ha&-2147483648&&this.f&&(c=this.f.A.V)||Ha(this,!0))this.ba(),c&&(a+=" (cpu halted)");this.v(a);this.f&&(a=this.f,qe(a),a.Ab=0,a.J&&H(a.J,void 0))}}; +function Hj(a){var b;if(!af(a))a.i&&a.i.length&&a.v("instruction history buffer freed"),a.P=0,a.i=[];else if(!a.i||!a.i.length){a.i=Array(hk);for(b=0;b>8;a.v("trapped to "+K(a,c&255,1)+" ("+(0>d?Lb[-d]:K(a,d))+")")}a.G=X(a.f.g[7]);b&&1!=a.I?lk(a):mk(a)}}function jk(a,b){var c;(c=!a.f||!Ga(a.f))||(c=a.f,c.A.aa?c=!0:(c.v(c.toString()+" not powered"),c=!1),c=!c);return c||a.f.A.V?(b||a.v("cpu busy or unavailable, command ignored"),!1):!Fa(a.f)}h.Ca=function(a,b){return!b&&(this.reset(!0),a)?this.restore(a):!0}; +h.Ba=function(a,b){b&&this.v(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){Hj(this);this.X=0;this.R=null;this.w=0;this.G=X(this.f.g[7]);this.A.V=!1;nk(this);a||ie(this)};h.save=function(){var a=new G(this);a.set(0,Lj(this.G));a.set(1,Lj(this.N));a.set(2,[this.j,this.O,this.ha]);a.set(3,this.B);return a.data()}; h.restore=function(a){var b=0;void 0!==a[2]&&(this.G=Mj(this,a[b++]),this.N=Mj(this,a[b++]),this.j=a[b][0],"string"==typeof this.j&&(this.j=[this.j]),this.O=a[b][1],this.ha|=a[b][2]);a[3]&&(this.B=a[3]);return!0};h.start=function(a,b){this.I||this.v("running");this.A.V=!0;this.Ha=a;this.Ia=b}; -h.stop=function(a,b){if(this.A.V){this.A.V=!1;this.w=b-this.Ia;if(!this.I){b="stopped";if(this.w){a-=this.Ha;var c=0d&&(d=Cc(a.f,b)),65535!=(d&65535)&&(a.Fd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Cg(a){var b=a.f;if(b.A.V)throw qc(b,a.f.O&65535),a.ca(),-1;return!1}function Sd(a,b,c){nk(a,b,c||1,a.L)&&a.ca(!1)}function Td(a,b,c){nk(a,b,c||1,a.C)&&a.ca(!1)} -function Gj(a){var b,c,d;a.g=["bp"];if(a.L)for(b=1;b>>c.g],!1)):Qe(a.f,!1);a.L=["br"];if(a.C)for(b=1;b>>c.g],!0)):Qe(a.f,!0);a.C=["bw"];a.la=0;a.Y=0} -h.Cb=function(a,b,c){var d=!0;c||ok(this,a,b,!1,!0);if(a!=this.g){var e=Kj(b);if(-1===e)this.v("invalid address: "+Sj(this,b)),d=!1;else{var f=a==this.C;65535>>g.g].Cb(e&g.i,f)}else e=this.f,(f?e.tc++:e.sc++)||xe(e)}}d&&(a.push(b),c?b.Va=!0:(pk(this,a,a.length-1,"set"),Hj(this)));return d}; -function ok(a,b,c,d,e){var f=!1;c=Kj(c);for(var g=1;g>>d.g],b)):Qe(a.f,b));k.Va||Hj(a);break}}return f}function qk(a,b){for(var c=1;c>23)&65535,A=K(u,t);else if(B==wk)t=t.K-((f&63)<<1)&65535,A=K(u,t);else if(B==xk)A=K(u,f&7,1);else if(B==yk)A=K(u,f&63,1);else if(B==zk)A=K(u,f&255,1);else if(B=f&D,D&Ak&&(B>>=6,D>>=6),D&Z){var D=null,J=B& -Bk;switch(B&Ck){case 0:A=Uj(J);break;case 8:A="@"+Uj(J);D=Dk(u,u.f.g[J]);break;case 16:7>J?A="("+Uj(J)+")+":(B=u.Sa(t,2),A="#"+K(u,B,0,!0));break;case 24:7>J?A="@("+Uj(J)+")+":(B=u.Sa(t,2),A="@#"+K(u,B,0,!0),D=Dk(u,B));break;case 32:A="-("+Uj(J)+")";break;case 40:A="@-("+Uj(J)+")";break;case 48:B=u.Sa(t,2);A=K(u,B,0,!0)+"("+Uj(J)+")";7==J&&(A=K(u,B=B+t.K&65535),D=Dk(u,B));break;case 56:B=u.Sa(t,2),A="@"+K(u,B)+"("+Uj(J)+")",7==J&&(A="@"+K(u,B=B+t.K&65535),D=Dk(u,Cc(u.f,B)))}D&&(A=[A,D])}u=A;if(!u|| -!u.length){k="INVALID";break}"string"!=typeof u&&(m=u[1],u=u[0]);0=a.f.vb&&b=c.B&&(b=c.Pa[b&jd])&&(a=b[4]);return a}function Ek(a,b){switch(b){case "N":a=De(a.f);break;case "Z":a=Ce(a.f);break;case "V":a=Be(a.f);break;case "C":a=Ae(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "} -function Fk(a,b){var c="",d=a.f;if(8>b)c=Uj(b),c+="="+K(a,d.g[b]);else if(13>b)c="A"+(b-8)+"="+K(a,d.qa[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+K(a,d.W[b-16]);else switch(b){case Vj:c="PS="+K(a,zd(d));break;case Wj:c="PI="+K(a,d.cb);break;case Xj:c="ER="+K(a,d.P);break;case Yj:c="SL="+K(a,d.xa&65280);break;case Zj:c="M0="+K(a,td(d));break;case ak:c="M1="+K(a,vd(d));break;case bk:c="M2="+K(a,wd(d));break;case ck:c="M3="+K(a,d.U);break;case dk:a.b&&(c="AR="+K(a,a.b.ba,3));break;case ek:a.b&&(c="DR="+ -K(a,a.b.qb));break;case fk:a.b&&(c="SR="+K(a,a.b.Ra,3))}c&&(c+=" ");return c}function Gk(a,b){var c,d="";for(c=0;6>c;c++)d+=Fk(a,c);d=d+"\n"+(Fk(a,6)+Fk(a,7));d+=Fk(a,Vj)+Fk(a,Wj)+Fk(a,Yj);d+=Ek(a,"T")+Ek(a,"N")+Ek(a,"Z")+Ek(a,"V")+Ek(a,"C");b&&(b=d,c=""+(Fk(a,Zj)+Fk(a,ak)),c+=Fk(a,bk)+Fk(a,ck)+Fk(a,Xj),c=c+"\n"+(Fk(a,fk)+Fk(a,dk)+Fk(a,ek)),d=b+("\n"+c));return d}h.le=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],q=$a(n,l,a.le);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({Gk:b,K:c,Lf:d,ga:e,he:f})}function Hk(a,b,c){var d=[],e=Kj(b)>>>0;for(b=0;b>>0,k=f.Lf;if(e>=g&&eb)){e.g[b]=g&65535;break}a.v("unknown register: "+ -f);return}H(a.J);a.v("updated registers:")}}a.v(Gk(a,d));c&&(a.G=X(e.g[7]),lk(a,Sj(a,a.G)))}}function Lk(a,b){b=Ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.v(m)}k[3]&&(g=k[3],f=null);f=sk(a,b,g,f);a.v(f);a.G=b;e-=b.K-l;c++}}} -function rk(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.v(jk+b):(a.O&&(a.v("ended assemble at "+Sj(a,a.N)),a.G=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.R=null;if(Ga(a)&&0n||"z"d&&(d=Cc(a.f,b)),65535!=(d&65535)&&(a.Gd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Cg(a){var b=a.f;if(b.A.V)throw qc(b,a.f.O&65535),a.ba(),-1;return!1}function $d(a,b,c){ok(a,b,c||1,a.L)&&a.ba(!1)}function ae(a,b,c){ok(a,b,c||1,a.C)&&a.ba(!1)} +function Gj(a){var b,c,d;a.b=["bp"];if(a.L)for(b=1;b>>c.g],!1)):Qe(a.f,!1);a.L=["br"];if(a.C)for(b=1;b>>c.g],!0)):Qe(a.f,!0);a.C=["bw"];a.la=0;a.Y=0} +h.Bb=function(a,b,c){var d=!0;c||pk(this,a,b,!1,!0);if(a!=this.b){var e=Kj(b);if(-1===e)this.v("invalid address: "+Sj(this,b)),d=!1;else{var f=a==this.C;65535>>g.g].Bb(e&g.i,f)}else e=this.f,(f?e.tc++:e.sc++)||xe(e)}}d&&(a.push(b),c?b.Ua=!0:(qk(this,a,a.length-1,"set"),Hj(this)));return d}; +function pk(a,b,c,d,e){var f=!1;c=Kj(c);for(var g=1;g>>d.g],b)):Qe(a.f,b));k.Ua||Hj(a);break}}return f}function rk(a,b){for(var c=1;c>23)&65535,A=K(r,t);else if(B==xk)t=t.K-((f&63)<<1)&65535,A=K(r,t);else if(B==yk)A=K(r,f&7,1);else if(B==zk)A=K(r,f&63,1);else if(B==Ak)A=K(r,f&255,1);else if(B=f&D,D&Bk&&(B>>=6,D>>=6),D&Z){var D=null,J=B& +Ck;switch(B&Dk){case 0:A=Uj(r,J);break;case 8:A="@"+Uj(r,J);D=Ek(r,r.f.g[J]);break;case 16:7>J?A="("+Uj(r,J)+")+":(B=r.Ra(t,2),A="#"+K(r,B,0,!0));break;case 24:7>J?A="@("+Uj(r,J)+")+":(B=r.Ra(t,2),A="@#"+K(r,B,0,!0),D=Ek(r,B));break;case 32:A="-("+Uj(r,J)+")";break;case 40:A="@-("+Uj(r,J)+")";break;case 48:B=r.Ra(t,2);A=K(r,B,0,!0)+"("+Uj(r,J)+")";7==J&&(A=K(r,B=B+t.K&65535),D=Ek(r,B));break;case 56:B=r.Ra(t,2),A="@"+K(r,B)+"("+Uj(r,J)+")",7==J&&(A="@"+K(r,B=B+t.K&65535),D=Ek(r,Cc(r.f,B)))}D&&(A= +[A,D])}r=A;if(!r||!r.length){k="INVALID";break}"string"!=typeof r&&(m=r[1],r=r[0]);0=a.f.ub&&b=c.B&&(b=c.Pa[b&jd])&&(a=b[4]);return a}function Fk(a,b){switch(b){case "N":a=De(a.f);break;case "Z":a=Ce(a.f);break;case "V":a=Be(a.f);break;case "C":a=Ae(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}function Gk(a,b){var c=Uj(a,b);c&&(c+="="+K(a,a.Ad(b))+" ");return c} +function Hk(a,b){var c,d="";for(c=0;6>c;c++)d+=Gk(a,c);d=d+"\n"+(Gk(a,6)+Gk(a,7));d+=Gk(a,Xj)+Gk(a,Yj)+Gk(a,ak);d+=Fk(a,"T")+Fk(a,"N")+Fk(a,"Z")+Fk(a,"V")+Fk(a,"C");b&&(b=d,c=""+(Gk(a,bk)+Gk(a,ck)),c+=Gk(a,dk)+Gk(a,ek)+Gk(a,Zj),c=c+"\n"+(Gk(a,gk)+Gk(a,Vj)+Gk(a,fk)),d=b+("\n"+c));return d}h.me=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],q=$a(n,l,a.me);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({Gk:b,K:c,Lf:d,ga:e,ie:f})}function Ik(a,b,c){var d=[],e=Kj(b)>>>0;for(b=0;b>>0,k=f.Lf;if(e>=g&&eb)){e.g[b]=g&65535;break}a.v("unknown register: "+ +f);return}H(a.J);a.v("updated registers:")}}a.v(Hk(a,d));c&&(a.G=X(e.g[7]),mk(a,Sj(a,a.G)))}}function Mk(a,b){b=Ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.v(m)}k[3]&&(g=k[3],f=null);f=tk(a,b,g,f);a.v(f);a.G=b;e-=b.K-l;c++}}} +function sk(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.v(kk+b):(a.O&&(a.v("ended assemble at "+Sj(a,a.N)),a.G=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.R=null;if(Ga(a)&&0n||"z"Ua.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ia-=Ca;0>Ia&&(null==Ua[Ua.length-1].K?(Ca=Ia+Ca,Ia=0):Ia+=Ua.length);var ff=[];"call"==yi&&(Lc=1E5,ff=["CALL"]);for(void 0!==xi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ia=0);a.pa=Ca;Ai++;Lc--}}Ai||(a.v("no "+zi+"history available"),a.pa=void 0)}else{var oa=Pj(a,Ta);if(oa)if("da"==jb){var gf=oa.Ma||65535O.length?(2xb&&(xb=0);65536lf?String.fromCharCode(lf):"."),$d=$d>>8}zb&&(zb+="\n");zb=hf?zb+(Ab+","):zb+(Ta+": "+Ab+(Zd?"":" "+kf))}zb&&a.v(zb);a.xa=oa;a.Ba=nl}}}}break;case "e":if("else"== -g[0])break;var bc,mf,nf,of,pf=g[0],qf=g[1];"eb"==pf?(bc=1,mf=255,nf=a.Nd,of=a.Od):"e"==pf||"ew"==pf?(bc=2,mf=65535,nf=a.Sa,of=a.Le):qf=null;if(null==qf)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var ae=Pj(a,qf);if(ae)for(var be=2;betf;){for(var Bb=null,rl=256;65536>Rc.K>>>0;){uf.K=a.Sa(Rc,2);if(null==Rc.K||!rl--)break;if(!(uf.K&1)){for(var sl=a,ce=uf,Fi=null,Sc=ce.K,Gi=Sc,vf=1;6>=vf&⪼vf++){if(2> ";rb(function(){for(var a=x(document,w,"debugger"),b=0;b\nLicense: GPL version 3 or later ");this.v("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;bTk){if(Uk(d,this.G)){this.u=new G(this,"1.34.0",bl);Uk(this.u)&&(cl(this,d),a=dl,el(this.u));this.u.set(Zk,ab());fl(this.u);var e=this.b&&!this.C;if(a==$k||ra("Click OK to restore the previous "+Gb+" machine state, or CANCEL to reset the machine.")){if(c=Yk(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uk(d,g):("error"==f&&"no machine state"!= -g?(this.T("Error: "+g),"unable to verify user"==g&&(hb(gl,""),this.g=null)):this.v(f+": "+g),el(d),Uk(d)?(c=Yk(d),e=!0):c=!1))}e&&Wk(this,c?d:null)}else a==dl&&d.clear()}else Wk(this);delete this.G;delete this.B}e=ta(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.A.aa=!0;var d=this.H.power;d&&(d.textContent="Shutdown");this.f&&(hl(this,this.f,b,c,a),H(this,-2),this.f.ra());this.N&&(cl(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0}; -function cl(a,b){if(ra("There may be a problem with your "+Gb+" machine.\n\nTo help us diagnose it, click OK to send this "+Gb+" machine state to http://www.pcjs.org.")){var c=a.U;a=a.g||"";b=b.toString();var d={};d.app=Gb;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;bb("http://www.pcjs.org/api/v1/report",d,!0)}} -function Nk(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new G(a,"1.34.0"),g=new G(a,"1.34.0",Xk),k=ab();g.set(Zk,k);f.set(Zk,k);f.set(il,"1.34.0");f.set(jl,window?window.location.href:null);f.set(ml,window?window.navigator.userAgent:"");a.f&&a.f.Ca&&(c&&(b&&(a.f.A.ra=a.f.A.V),a.f.ca()),d=a.f.Ca(b,c),"object"===typeof d&&f.set(a.f.id,d),c&&(a.f.A.aa=!1,!1===d&&(e=null)));for(var k=ta(a.id),l=0;l=Ua.length&&(Ia=0);a.pa=Ca;Ai++;Lc--}}Ai||(a.v("no "+zi+"history available"),a.pa=void 0)}else{var oa=Pj(a,Ta);if(oa)if("da"==jb){var gf=oa.Ma||65535O.length?(2xb&&(xb=0);65536lf?String.fromCharCode(lf):"."),Nd=Nd>>8}zb&&(zb+="\n");zb=hf?zb+(Ab+","):zb+(Ta+": "+Ab+(Md?"":" "+kf))}zb&&a.v(zb);a.Fa=oa;a.Aa=pl}}}}break;case "e":if("else"== +g[0])break;var bc,mf,nf,of,pf=g[0],qf=g[1];"eb"==pf?(bc=1,mf=255,nf=a.Od,of=a.Pd):"e"==pf||"ew"==pf?(bc=2,mf=65535,nf=a.Ra,of=a.Le):qf=null;if(null==qf)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Od=Pj(a,qf);if(Od)for(var Pd=2;Pdtf;){for(var Bb=null,tl=256;65536>Rc.K>>>0;){uf.K=a.Ra(Rc,2);if(null==Rc.K||!tl--)break;if(!(uf.K&1)){for(var ul=a,Qd=uf,Fi=null,Sc=Qd.K,Gi=Sc,vf=1;6>=vf&⪼vf++){if(2> ";rb(function(){for(var a=x(document,w,"debugger"),b=0;b\nLicense: GPL version 3 or later ");this.v("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;bUk){if(Vk(d,this.G)){this.u=new G(this,"1.34.0",cl);Vk(this.u)&&(dl(this,d),a=el,fl(this.u));this.u.set($k,ab());gl(this.u);var e=this.b&&!this.C;if(a==al||ra("Click OK to restore the previous "+Gb+" machine state, or CANCEL to reset the machine.")){if(c=Zk(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Vk(d,g):("error"==f&&"no machine state"!= +g?(this.T("Error: "+g),"unable to verify user"==g&&(hb(hl,""),this.g=null)):this.v(f+": "+g),fl(d),Vk(d)?(c=Zk(d),e=!0):c=!1))}e&&Xk(this,c?d:null)}else a==el&&d.clear()}else Xk(this);delete this.G;delete this.B}e=ta(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.A.aa=!0;var d=this.H.power;d&&(d.textContent="Shutdown");this.f&&(il(this,this.f,b,c,a),H(this,-2),this.f.qa());this.N&&(dl(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0}; +function dl(a,b){if(ra("There may be a problem with your "+Gb+" machine.\n\nTo help us diagnose it, click OK to send this "+Gb+" machine state to http://www.pcjs.org.")){var c=a.U;a=a.g||"";b=b.toString();var d={};d.app=Gb;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;bb("http://www.pcjs.org/api/v1/report",d,!0)}} +function Ok(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new G(a,"1.34.0"),g=new G(a,"1.34.0",Yk),k=ab();g.set($k,k);f.set($k,k);f.set(jl,"1.34.0");f.set(kl,window?window.location.href:null);f.set(ll,window?window.navigator.userAgent:"");a.f&&a.f.Ba&&(c&&(b&&(a.f.A.qa=a.f.A.V),a.f.ba()),d=a.f.Ba(b,c),"object"===typeof d&&f.set(a.f.id,d),c&&(a.f.A.aa=!1,!1===d&&(e=null)));for(var k=ta(a.id),l=0;l=d||30<=(c.$c+=d))&&(e.textContent=c.A.V?c.xb.toFixed(2)+"Mhz":"Stopped",c.$c=0)}if(a.i&&(a=a.i,b=b||0,a.u)){c=a.f.A.V;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;eb?a.ba=a.f.g[7]:0=d||30<=(c.$c+=d))&&(e.textContent=c.A.V?c.wb.toFixed(2)+"Mhz":"Stopped",c.$c=0)}if(a.i&&(a=a.i,b=b||0,a.u)){c=a.f.A.V;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;eb?a.fa=a.f.g[7]:0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");bb(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Dl(a,b,c)}})}else c(a,null)} -function El(a,b,c,d){function e(a){if(void 0===k){var b=g&&x(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=Ra(a))}function f(a){e("Error: "+a);l&&(--Al||wb(!0));l=!1}var g,k,l=!0;Al++;pa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=m:q.appendChild(document.createTextNode(m));n.appendChild(q)}c|| -(c="/versions/pdpjs/1.34.0/components.xsl");m=function(d,k){k?Bl(c,null,null,!1,e,function(d,l){l?(na(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Al||wb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Al||wb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Bl(b,a,d,!0,e,m):Cl(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){wb(!1);return El(a,b,c,d)};window.findMachineComponent=function(a,b){return va(b,a+".machine")}; +h.va=function(a,b,c){var d=this;switch(b){case "power":return this.H[b]=c,c.onclick=function(){d.j||(d.A.aa?Ok(d,!1,!0):d.yc(d.rc))},!0;case "reset":return this.H[b]=c,c.onclick=function(){if(d.A.aa&&!d.j)if(d.b&&!d.w){var a=ra("Click OK to save changes to this "+Gb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Ok(d,a,!0);!a&&d.I?window&&window.location.reload():(a||(d.M=!0),d.rc(Uk),d.M=!1)}else d.reset(),d.f&&!d.F&&d.f.qa()},!0;case "save":if(Qa(db(),"pcjs.org"))c.parentNode.removeChild(c); +else return this.H[b]=c,c.onclick=function(){var a=Tk(d,!0);if(a){var b=!!(d.b&&!d.w||d.I),c=Ok(d,b);b?ol(d,a,c):d.T("Resume disabled, machine state not saved")}},!0}return!1}; +function Tk(a,b){var c=a.g;c||((c=gb(hl),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=zl(a,c))||a.T("The user ID is invalid.")):b&&a.T("Browser local storage is not available"));return c} +function zl(a,b){a.g=null;b=bb(db()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(hb(hl,b.data),a.g=b.data)}catch(d){v(d.message+" ("+c+")")}return a.g}function Wk(a){var b=null;a.g&&(b=db()+"/api/v1/user?req=load&user="+a.g+"&state="+Al(a,"1.34.0"));return b} +function ol(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Al(a,"1.34.0");d.data=c;b=bb(db()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");bb(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);El(a,b,c)}})}else c(a,null)} +function Fl(a,b,c,d,e){function f(a){if(void 0===l){var b=k&&x(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=Ra(a))}function g(a){f("Error: "+a);m&&(--Bl||wb(!0));m=!1}var k,l,m=!0;Bl++;pa[b]={};try{if(k=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));q.appendChild(t)}d|| +(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.0/components.xsl");n=function(e,l){l?Cl(d,null,a,null,!1,f,function(a,e){e?(na(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(k.outerHTML=e,--Bl||wb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(e,k),--Bl|| +wb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Cl(c,b,a,e,!0,f,n):Dl(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(r){g(r.message)}return m}window.embedPDP10=function(a,b,c,d){wb(!1);return Fl("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){wb(!1);return Fl("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return va(b,a+".machine")}; window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!za[a]){for(var c=!0,d=za,e=a,f=b.length,g=[],k=[],l="",m=null,n=0;n":62,"?":63,"@":64,hd:65,Lh:66,Rh:67,si:68,E:69,yi:70,Bi:71,Ni:72,Pi:73,Qi:74,Ri:75,Si:76,Vi:77,Xi:78,cj:79,fj:80,Q:81,hj:82,kj:83,tj:84,vj:85,xj:86,yj:87,Cj:88,Dj:89,Ke:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ej:97,Fj:98,Ij:99,d:100,e:101,Jj:102,Kj:103,Lj:104,Mj:105,Qj:106,k:107,Rj:108,Sj:109,n:110,Tj:111,p:112,q:113,r:114,Uj:115,t:116,Wj:117,Xj:118,Yj:119,x:120, y:121,z:122,"{":123,"|":124,"}":125,"~":126,Cb:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.sd=b.comment;this.Ie=b;this.exports={};this.o=this.bindings={};a=this.id.indexOf(".");0>a?this.ib=this.id:(this.Ua=this.id.substr(0,a),this.ib=this.id.substr(a+1));this.j={ready:!1,Ra:!1,Wc:!1,R:!1,error:!1};this.ic=null;this.j.error=!1;this.qd=c||0;this.D=this.c=this.u=this.A=this.ob=null;t.push(this)}function na(a,b,c){oa[a]&&b&&(oa[a][b]=c)} function pa(){return Date.now()||+new Date}function u(a){window&&window.alert(a)}function qa(a){var b=!1;window&&(b=window.confirm(a));return b}function ra(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ea=g.load;d.da=g.exec;if(e=g.bytes)d.N=e;else if(e=g.words)for(d.N=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.N=Array(4*e.length),f=c=0;c>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=g;d.ia=g.symbols;d.N.length?1==d.N.length&&(u(d.N[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca;a++)this.a["S"+a]=[0,0,!1,!1,this.ff,a];this.D=this.c=this.u=this.A=null;this.exports={hold:this.We,toggle:this.Bg,reset:this.ug, set:this.zg};B(this)}n(lb,r);h=lb.prototype;h.reset=function(a){this.stop();a&&nb(this,this.b=0)}; h.ma=function(a,b,c,d){if(this.A&&this.A.ma(a,b,c,d)||this.c&&this.c.ma(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.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.h[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[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(){ob(a, @@ -81,7 +81,7 @@ h.gf=function(a){a||this.c.j.M||(F(this.c,this.U),a=this.c,a.u.reset(),Eb(a),thi h.$e=function(a){if(!a&&!this.c.j.M)if(this.a[Fb]&&this.a[Fb][1])Gb(this.c);else{a=this.D;var b;if(b=a)a.j.Ra&&(a.j.Wc=!0),b=!a.j.Ra;if(b)Aa(a,!0),a.f(0,null),Aa(a,!1);else try{var c=this.c.zc(1);0=a.c.sa?8:16,c=65472<=a.U&&a.U<65472+b,b=c?1:2,c=c?15:a.u.v;a.a[Bb]&&a.a[Bb][1]||(b=-b);wb(a,a.U&~c|a.U+b&c)}function wb(a,b){a.U=b&a.u.v;if(a.s!==a.U){a.s=a.U;b=a.s;for(var c=0;22>c;c++)Pb(a,"A"+c,b&1<c;c++)Pb(a,"D"+c,b&1<b;b++)a.a["S"+b][1]=a.f&1<b;b++)a.a["S"+b][1]=a.f&1<>2;this.f=this.g-1;this.s=this.C/this.g|0;this.K=this.s-1;this.Qa=[];this.m=0;this.l=!1;this.F=[];this.Le=[Tb,Ub,Vb,Wb];this.a=this.b=[];this.B=this.w=this.i=this.H=this.I=0;a=new H(this);Xb(a);this.a=Array(this.s);this.b=Array(this.s);for(b=0;b>>this.h;this.w=0;this.i=this.v;B(this)}n(Rb,r);function $b(a,b){if(b!=a.w){for(var c=0;c>>a.h,a.b[a.I]=a.a[a.H])}}h=Rb.prototype;h.reset=function(){for(var a=0;a>>this.h;return ib||b!=this.f?this. function Ob(a,b){var c;a.l=!1;a.m++;var d=b&a.f,e=fc(a,b);ib||d!=a.f?c=e.D(d,b):c=e.i(d,b)|fc(a,b+1).i(0,b+1)<<8;a.m--;return c}function gc(a,b,c){a.l=!1;a.m++;fc(a,b).o(b&a.f,c&255,b);a.m--}function Mb(a,b,c){a.l=!1;a.m++;var d=b&a.f,e=fc(a,b);ib||d!=a.f?e.m(d,c&65535,b):(e.o(d,c&255,b),fc(a,b+1).o(0,c>>8&255,b+1));a.m--} function ac(a){for(var b=0,c=[],d=0;da.c.sa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var q=g[4],x=g[5]||1,A=0;Aa.c.sa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var q=g[4],v=g[5]||1,y=0;y>8:e[2](f)&255):f&1&&(e=d.Qa[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255} function Ub(a,b,c){var d=!1,e=this.controller,f=e.Qa[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.Qa[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||I(e,c,16)}function Vb(a,b){var c=-1,d=this.controller;a=d.Qa[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;I(d,b,16);return 65535} function Wb(a,b,c){var d=!1,e=this.controller;a=e.Qa[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||I(e,c,16)}function K(a){r.call(this,"Device",a,256);this.a={Ia:128,dd:-1}}n(K,r);h=K.prototype;h.ja=function(a,b,c,d){this.u=b;this.A=a;this.c=c;this.D=d;var e=this;this.a.dd=mc(c,function(){e.a.Ia|=128;e.a.Ia&64&&nc(e.c,e.a.qa);e.A&&Kb(e.A,1);oc(e.c,e.a.dd,1E3/60)});this.a.qa=pc(c,64,6,2097152);qb(b,this,qc);sb(b,this.reset.bind(this));B(this)}; @@ -108,7 +108,7 @@ var L={},qc=(L[61568]=[null,null,K.prototype.lg,K.prototype.Dh,"UNIMAP",64,1170] K.prototype.yb,"R4SET0"],L[65477]=[null,null,K.prototype.vb,K.prototype.yb,"R5SET0"],L[65478]=[null,null,K.prototype.Hf,K.prototype.Yg,"R6KERNEL"],L[65479]=[null,null,K.prototype.Kf,K.prototype.ah,"R7KERNEL"],L[65480]=[null,null,K.prototype.wb,K.prototype.zb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.wb,K.prototype.zb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.wb,K.prototype.zb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.wb,K.prototype.zb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.wb, K.prototype.zb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.wb,K.prototype.zb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.If,K.prototype.Zg,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Jf,K.prototype.$g,"R6USER",1,1145],L[65504]=[null,null,K.prototype.qf,K.prototype.Jg,"CTRL",8,1170],L[65520]=[null,null,K.prototype.Md,K.prototype.Pd,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.Md,K.prototype.Pd,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.gg,K.prototype.yh,"SYSID",1,1170],L[65526]= [null,null,K.prototype.pf,K.prototype.Ig,"ERR",1,1170],L[65528]=[null,null,K.prototype.wf,K.prototype.Pg,"MBR",1,1170],L[65530]=[null,null,K.prototype.Bf,K.prototype.Sg,"PIR"],L[65532]=[null,null,K.prototype.fg,K.prototype.xh,"SLR"],L[65534]=[null,null,K.prototype.Gf,K.prototype.Xg,"PSW"],L); -Ya(function(){for(var a=z(document,y,"device"),b=0;b>1),this.c=new Int32Array(this.f,0,this.size>>2),Fc(this,Gc?Hc:Ic);else{a=this.c=Array(this.size>>2);for(f=0;f>2),b=0;b>=6;var c=a.S=b&7;return(b=a.K=(b&56)>>3)?a.kc(a.ra(b,c,3)):a function P(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.qc=a.ra(b,e,7),c=0>c?a.b[-c-1]&255:c,a.yc(e,d.call(a,c,a.kc(e))),e&1&&a.a--):(b=a.b[e],c=0>c?a.b[-c-1]&255:c,a.b[e]=b&65280|d.call(a,c,b&255))}function Q(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.ra(b,e,6),a.mc(e,d.call(a,0>c?a.b[-c-1]:c,a.lc(e)))):a.b[e]=d.call(a,0>c?a.b[-c-1]:c,a.b[e])} function Bd(a,b,c,d,e){var f=a.f=b&7;(b=a.h=(b&56)>>3)?(d=a.ra(b,f,5),e.call(a,(c=0>c?a.b[-c-1]&255:c)<<8),a.yc(d,c),d&1&&a.a--):(c?(c=0>c?a.b[-c-1]&255:c,a.b[f]=a.b[f]&~d|c<<24>>24&d):a.b[f]&=~d,e.call(a,c<<8))}function Cd(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.ra(b,e,4),d.call(a,c=0>c?a.b[-c-1]:c),a.mc(e,c)):(a.b[e]=c=0>c?a.b[-c-1]:c,d.call(a,c))} h.zc=function(a){this.j.complete=!0;var b=a?this.j.cd?0:1:-1;this.j.cd=!1;this.Ma=this.a=a;this.g=this.g&-5|0;do{if(this.g){if(a=this.g&11)if(a=!1,this.g&2){var c=160,d=(this.$a&224)>>5,e=this.I&&this.I.sb>d?this.I:null;e&&(c=e.Ub,d=e.sb);d>(this.i&224)>>5?(this.g&8&&(ld(this,2),this.g&=-9),J(this,c,0,-10),d=!0):d=!1;d&&(e&&rc(this,e),a=!0);this.I||this.$a||(this.g&=-3)}else this.g&1&&this.g++;if(a){if(this.g&4&&this.D.b(this.b[7],b)){G(this);break}if(0>b)break}if(this.g&112&&md(this)){if(this.g& -4&&this.D.b(this.b[7],b)){G(this);break}if(0>b)break}}this.g=this.g&15|this.i&16;a=this.C=this.b[7];e=this.W(a);this.b[7]=a+2&65535;this.nd(e)}while(0b)break}}this.g=this.g&15|this.i&16;a=this.C=this.b[7];e=this.W(a);this.b[7]=a+2&65535;this.nd(e)}while(0>1|b<<16;nd(this,a);return a&65535}function Id(a,b){a=b&128|b>>1|b<<8;nd(this,a<<8);return a&255}function Jd(a,b){a=b&~a;this.fa(a);return a}function Kd(a,b){a=b&~a;this.fa(a<<8);return a}function Ld(a,b){a|=b;this.fa(a);return a}function Md(a,b){a|=b;this.fa(a<<8);return a} function Nd(a,b){a=~b|65536;this.Sa(a);return a&65535}function Od(a,b){a=~b|256;this.Sa(a<<8);return a&255}function Pd(a,b){this.w=this.l=a=b-a;this.m=b&(b^a);return a&65535}function Qd(a,b){a=b-a;var c=a<<8;b<<=8;this.w=this.l=c;this.m=b&(b^c);return a&255}function Rd(a,b){this.w=this.l=a=b+a;this.m=a&(b^a);return a&65535}function Sd(a,b){a=b+a;var c=a<<8;this.w=this.l=c;this.m=c&(b<<8^c);return a&255}function Td(a,b){a=-b;this.Sa(a,a&b&32768);return a&65535} function Ud(a,b){a=-b;this.Sa(a<<8,(a&b&128)<<8);return a&255}function Vd(a,b){a=b<<1|this.v>>16&1;nd(this,a);return a&65535}function Wd(a,b){a=b<<1|this.v>>16&1;nd(this,a<<8);return a&255}function Xd(a,b){a=(this.v&65536|b)>>1|b<<16;nd(this,a);return a&65535}function Yd(a,b){a=((this.v&65536)>>8|b)>>1|b<<8;nd(this,a<<8);return a&255}function Zd(a,b){var c=b-a;od(this,c,a,b);return c&65535}function $d(a,b){var c=b-a;od(this,c<<8,a<<8,b<<8);return c&255} @@ -181,13 +181,13 @@ R,R,R,We,We],Af=[we,ue,qe,se,ze,Ae,fe,ge,Fe,Ze,nf,pf,rf,function(a){1145>this.sa function Ff(a){r.call(this,"ROM",a,128);this.ia=this.b=null;this.h=+a.addr;this.a=+a.size;this.i=!1;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.g=a.file;this.m=Ea(this.g);if(this.g){a=this.g;var b=Fa(this.m);"json"!=b&&"hex"!=b&&(a=Oa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Ma(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(na(c.Ua,a,b),(a=Na(a,b))?(c.b=a.N,c.ia=a.ia):c.g=null);Gf(c)})}}n(Ff,r); h=Ff.prototype;h.ja=function(a,b,c,d){this.u=b;this.c=c;this.D=d;Gf(this)};h.la=function(){this.ia&&(this.D&&this.D.a(this.id,this.h,this.a,this.ia),delete this.ia);return!0};h.ka=function(){return!0}; function Gf(a){if(!za(a)){if(a.g){if(!a.b||!a.u)return;a.a||(a.a=a.b.length);if(a.b.length!=a.a){var b="ROM size ("+Da(a.b.length,8,!0)+") does not match specified size ("+Da(a.a,8,!0)+")";a.j.error=!0;a.G(b)}else{a:{b=a.h;if(57344<=b&&b<57344+Sb){var c={},c=(c[b]=[Ff.prototype.Zf,Ff.prototype.qh,null,null,null,a.a>>1],c);if(qb(a.u,a,c)){a.status("Added "+a.a+"-byte ROM at "+Ca(b));b=a.i=!0;break a}}else if(Yb(a.u,b,a.a,Ec)){for(c=0;c>>f.h;0>>=f.h;0>>f.h;0>>=f.h;0>>a.h;0=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,q=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),x=l,A=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(A)for(;A--;)gc(a.u,q++,b[x++]&255);else q&1?g=!0:null==d&&(d=q);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e< -b.length;e++)gc(a.u,c+e,b[e]);k=!0}if(k){if(null==d||g)G(a.c),f=!1;null!=d&&hd(a.c,d,f)}return k}Ya(function(){for(var a=z(document,y,"ram"),b=0;b=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,q=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),v=l,y=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(y)for(;y--;)gc(a.u,q++,b[v++]&255);else q&1?g=!0:null==d&&(d=q);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e< +b.length;e++)gc(a.u,c+e,b[e]);k=!0}if(k){if(null==d||g)G(a.c),f=!1;null!=d&&hd(a.c,d,f)}return k}Ya(function(){for(var a=A(document,z,"ram"),b=0;b=la.hd&&c<=la.Ke&&(b=c-(la.hd-la.Ud));b&&(a.preventDefault&&a.preventDefault(),d.nc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.Wd&&(b=la.Vd);d.nc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); @@ -199,7 +199,7 @@ h.nc=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a h.Mf=function(){var a=this.a&65534;this.a&=-32769;return a};h.dh=function(a){var b=a^this.a;this.a=this.a&-112|a&111;this.F&&b&6&&(b=0,b=this.v?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.F.call(this.g,b))};h.Lf=function(){this.a&=-129;return this.l};h.bh=function(){};h.sg=function(){return this.b};h.Kh=function(a){if(this.b&128)if(a&64)nc(this.c,this.C);else{var b=this.C;b&&rc(this.c,b)}this.b=this.b&-70|a&69};h.rg=function(){return 0}; h.Jh=function(a){a&=255;this.s&&this.s.call(this.g,a);a&=127;if(this.h)if(13==a)this.m=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.m%a,this.S&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!= this.i){if(10==a||1024<=this.i.length)this.aa(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}oc(this.c,this.X,1E3/Math.round(this.ba/10));this.b&=-129};var Mf="buffer",Pf={},Nf=(Pf[65392]=[null,null,Lf.prototype.Mf,Lf.prototype.dh,"RCSR"],Pf[65394]=[null,null,Lf.prototype.Lf,Lf.prototype.bh,"RBUF"],Pf[65396]=[null,null,Lf.prototype.sg,Lf.prototype.Kh,"XCSR"],Pf[65398]=[null,null,Lf.prototype.rg,Lf.prototype.Jh,"XBUF"],Pf); -Ya(function(){for(var a=z(document,y,"serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "readTape":e=Tf;case "loadTape":return e||(e=Uf),this.o[b]=c,c.onclick= function(){var a=d.o.listTapes;a&&Vf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){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;Vf(d,Ea(b,!0),b,Uf,a)}return!1};return!0;case Wf:return this.o[b]=c,!0}return!1}; @@ -208,18 +208,18 @@ h.la=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;re function Vf(a,b,c,d,e){if(c)if(c==ag)a.G('Use "Choose File" and "Mount" to select and load a local tape.');else{if(c==bg){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=Ea(c);a.status("Attempting to load "+c+' as "'+b+'"');a.i=bg}else a.i=c;dg(a,b,c,d,!1,e)}else fg(a,!1)}function dg(a,b,c,d,e,f){var g=-1;if(a.g.toLowerCase()!=c.toLowerCase()||a.f!=d)g++,fg(a,!0),a.j.Ra?a.G("PC11 busy"):(e&&a.b++,gg(a,b,c,d,f)?g++:a.j.Ra=!0);g&&hg(a,a.B,a.g,a.f,a.N,a.ea,a.da)} function gg(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),hg(a,b,c,d,e),a.i=ag);a.j.Ra=!1;eg(a)};g.readAsArrayBuffer(e);return!1}0>c.indexOf("/api/v1/dump")&&(e=Fa(c),f="json"==e||"gz"==e?encodeURI(c):Oa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ma(f,null,!0,function(e,f,g){var k=0>g&&!!a.A&&!a.A.j.R;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(na(a.Ua,e,f),(e=Na(e,f))&&hg(a,b,c,d, e.N,e.ea,e.da));a.j.Ra=!1;a.b&&(a.b--,a.b||B(a));eg(a)})}function $f(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.L);for(d=0;dc.indexOf("/api/v1/dump")&&(b=Fa(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"):Ga(c,"/")&&(d="dir"),f=Oa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Yc?"":e)+"&format=json"));return!!Ma(f, +function og(a,b,c,d,e){var f=c;if(a.b)return!0;a.xa=b;a.oa=c;a.bd=Ea(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.L=e[0];a.T=e[1];a.P=e[2];a.Z=e[3]||512;c=a.Z>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.L);for(d=0;dc.indexOf("/api/v1/dump")&&(b=Fa(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"):Ga(c,"/")&&(d="dir"),f=Oa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Yc?"":e)+"&format=json"));return!!Ma(f, null,!0,function(b,c,d){pg(a,b,c,d)})} function pg(a,b,c,d){var e=null,f=0>d&&!!a.A&&!a.A.j.R;a.g=!1;if(d)a.controller.G('Unable to load disk "'+a.xa+'" (error '+d+": "+b+")",f);else{na(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(k.length)if(1==k.length)u(k[0]);else{a.L=k.length;a.T=k[0].length;a.P=k[0][0].length;var l=k[0][0][0];a.Z=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var q=l.data;if(void 0===q){var x=l.bytes;if(void 0!==x&&x.length){for(var A=m<<2,ma=x.length;ma>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var q=l.data;if(void 0===q){var v=l.bytes;if(void 0!==v&&v.length){for(var y=m<<2,ma=v.length;ma>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.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.na?f=a.wa+a.na&&(a.na+=f-(a.wa+a.na)+1):(a.wa=f,a.na=1);d[f]=d[f]&~(255<g)break;e|=g<'+a+"");c.innerHTML=a}}h.Cg=function(a){for(var b=0;b=a.L){m=T.Zb;break}p=a.seek(b,c,d+1);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}var x,A;if(0>(x=a.read(p,q++))||0>(A=a.read(p,q++))){m=T.$b;break}if(!k&&(Mb(this.u,sd(this.c,f),x|A<<8),lc(this.u))){m=T.Eb;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; -h.vc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.O;var p=null,q;a||(m=T.rd,e=0);for(;e;){var x=Ob(this.u,sd(this.c,f));if(lc(this.u)){m=T.Eb;break}if(!p){if(b>=a.L){m=T.Zb;break}p=a.seek(b,c,d+1,!0);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}if(k){var A,ma;if(0>(A=a.read(p,q++))||0>(ma=a.read(p,q++))){m=T.$b;break}if(x!=(A|ma<<8)){m=T.Cd;break}}else if(!a.write(p,q++,x&255)||!a.write(p,q++,x>>8)){m=T.$b;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; +h.ub=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.O;var p=null,q;a||(m=T.rd,e=0);for(;e;){if(!p){if(b>=a.L){m=T.Zb;break}p=a.seek(b,c,d+1);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}var v,y;if(0>(v=a.read(p,q++))||0>(y=a.read(p,q++))){m=T.$b;break}if(!k&&(Mb(this.u,sd(this.c,f),v|y<<8),lc(this.u))){m=T.Eb;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; +h.vc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.O;var p=null,q;a||(m=T.rd,e=0);for(;e;){var v=Ob(this.u,sd(this.c,f));if(lc(this.u)){m=T.Eb;break}if(!p){if(b>=a.L){m=T.Zb;break}p=a.seek(b,c,d+1,!0);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}if(k){var y,ma;if(0>(y=a.read(p,q++))||0>(ma=a.read(p,q++))){m=T.$b;break}if(v!=(y|ma<<8)){m=T.Cd;break}}else if(!a.write(p,q++,v&255)||!a.write(p,q++,v>>8)){m=T.$b;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; h.me=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&~S.fb|f>>16-S.V.fb&S.fb;this.i=65536-e&65535;this.g=this.g&~Mg.Rc|d&Mg.Rc;this.f|=a;Ng(this);return!0};function Ng(a){a.a&=~S.Ja;a.f&&(a.f|=T.Yd,a.a|=S.Ja,a.f&T.Hc&&(a.a|=S.Hc))}h.Rf=function(){return this.s};h.ih=function(){};h.Sf=function(){return this.f};h.jh=function(){};h.Of=function(){return this.a&S.Fb}; h.fh=function(a){this.a=this.a&~S.va|a&S.va;if(this.a&S.Db){a=!0;var b,c,d=(this.g&Mg.Ta)>>Mg.V.Ta,e=this.b[d],f,g,k,l,m,p;this.a&=~(S.za|S.Sc);this.f&=~T.Ce;switch(c=this.a&S.ca){case Og.Td:this.f=this.g=0;this.a=S.za;break;case Og.he:case Og.Va:b=this.ub;case Og.Vc:case Og.Hb:b||(b=this.vc);f=(this.g&Mg.Bb)>>Mg.V.Bb;g=(this.g&Mg.Kc)>>Mg.V.Kc;k=this.g&Mg.Rc;l=65536-this.i&65535;m=(this.a&S.fb)<<16-S.V.fb|this.h;p=this.a&S.de?0:2;if(f>=e.L){this.f|=T.Zb;break}if(k>=e.P){this.f|=T.$b;break}a=b.call(this, e,f,g,k,l,m,p,c>=Og.Vc,this.me.bind(this));break;case Og.ec:f=(this.g&Mg.Bb)>>Mg.V.Bb;f>V.V.Gb,f=this.f&V.dc?1:0,g=this.f&V.yd,!d||e>=d.L||g>=d.P?this.a=this. h.mh=function(a){this.h=a&Sg.Fa;this.a=this.a&~U.ya|(this.h&3)<=m.L){k=Y.fe;break}p=m.seek(b,c,d+1);if(!p){k=Y.Pc;break}q=0;++d>=m.P&&(d=0,++c>=m.T&&(c=0,++b))}var x;if(0>(a=m.read(p,q++))||0>(x=m.read(p,q++))){k=Y.Oc;break}Mb(this.u,sd(this.c,f),a|x<<8);q>=m.Z&&(p=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; +function Zg(a,b){b&&(a.w=b,a.l=a.f,a.a|=X.Ja);a.g=W.gb;a.a|=X.DONE;a.a&X.eb&&nc(a.c,a.qa)}h.ub=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.O,p=null,q;m||(k=a.rb?Y.Jc:Y.Ic,e=0);for(;e;){if(!p){if(b>=m.L){k=Y.fe;break}p=m.seek(b,c,d+1);if(!p){k=Y.Pc;break}q=0;++d>=m.P&&(d=0,++c>=m.T&&(c=0,++b))}var v;if(0>(a=m.read(p,q++))||0>(v=m.read(p,q++))){k=Y.Oc;break}Mb(this.u,sd(this.c,f),a|v<<8);q>=m.Z&&(p=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; function Yg(a){var b=0,c=a.a&X.Tc?1:0,d=a.b[c],d=d&&d.O,e=a.v&$g.Fa,f=a.s&ah.Fa;a.f&=~(Z.jd|Z.ud|Z.Cb|Z.ha);if(d)if(a.f|=Z.ha,c=d.seek(e,0,f,!0)){e=0;for(f=a.h.length;eg){b=Y.Oc;break}a.h[e++]=g}c.Re&&(a.f|=Z.Cb)}else b=Y.Pc;else b=c?Y.Jc:Y.Ic;Zg(a,b)}h.$f=function(a,b){a=this.a;if(!b)switch(a&=X.Fb,this.g){case W.Ec:case W.EMPTY:this.ithis.i&&(this.a|=X.Ga)}return a}; h.rh=function(a){this.a=this.a&~X.va|a&X.va;if(this.a&X.INIT)this.bb();else if(this.a&X.Db&&this.g==W.gb)switch(this.g=this.a&X.ca,this.a&=~(X.Db|X.Ga|X.DONE|X.Ja),(a=this.qa)&&rc(this.c,a),this.g){case W.Ec:case W.EMPTY:case W.Va:case W.Hb:case W.fc:this.i=0;break;case W.ke:a=this.b[this.a&X.Tc?1:0];this.f&=~Z.ha;a&&a.O&&(this.f|=Z.ha);this.l=this.f;Zg(this);break;case W.je:this.l=this.w,Zg(this)}else this.a&X.eb?this.a&X.DONE&&nc(this.c,this.qa):(a=this.qa)&&rc(this.c,a)}; h.ag=function(a,b){if(!b)switch(this.g){case W.EMPTY:this.a&X.Ga&&(this.a&=~X.Ga,this.l=this.h[this.i]&255,++this.i>=this.h.length&&Zg(this))}return this.l}; @@ -273,8 +273,8 @@ function ch(a,b,c){r.call(this,"Computer",a,33554432);this.j.R=!1;this.F=null;dh "state")||(f=!0,a.state))this.v=b=a,f||(this.l=!0,this.a=fh),this.a&&(this.m=new E(this,"1.34.0"),gh(this.m)?b=null:delete this.m);!b&&this.a&&(b=hh(this))&&(this.l=!0);if(b){var g=this;Ma(b,null,!0,function(a,b,c){c?(g.i=null,g.l=!1,g.G("Unable to load machine state from server (error "+c+(b?": "+Ja(b):"")+")")):(g.s=b,g.I=!0);B(g)})}else B(this);this.o.power||(this.w=!0);!c&&this.w&&this.Vb(this.Sb)}else u("Unable to find CPU component")}n(ch,r); function dh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){u(d.message+" ("+c+")")}}a.F=b}function Tc(a,b,c,d){var e=b.toLowerCase(),e=Va(b)||Va(e);void 0===e&&a.F&&(e=a.F[b]);void 0===e&&c&&(e=c[b]);void 0===e&&"object"==typeof resources&&resources[b]&&(e=b);void 0===e&&(e=void 0);if("string"==typeof e&&d)switch(d){case 4:e=+e;isNaN(e)&&(e=0);break;case 6:e="true"==e}return e}h=ch.prototype; h.Vb=function(a,b){for(var c=this,d=ra(this.id),e=0;e<=d.length;e++){var f=efh){if(gh(d,this.s)){this.h=new E(this,"1.34.0",qh);gh(this.h)&&(rh(this,d),a=sh,th(this.h));this.h.set(lh,La());uh(this.h);var e=this.a&&!this.l;if(a==mh||qa("Click OK to restore the previous "+gb+" machine state, or CANCEL to reset the machine.")){if(c=kh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gh(d,g):("error"==f&&"no machine state"!= -g?(this.G("Error: "+g),"unable to verify user"==g&&(Ta(vh,""),this.b=null)):this.aa(f+": "+g),th(d),gh(d)?(c=kh(d),e=!0):c=!1))}e&&ih(this,c?d:null)}else a==sh&&d.clear()}else ih(this);delete this.s;delete this.m}e=ra(this.id);for(f=0;ffh){if(gh(d,this.s)){this.h=new E(this,"1.34.0",qh);gh(this.h)&&(rh(this,d),a=sh,th(this.h));this.h.set(lh,La());uh(this.h);var e=this.a&&!this.l;if(a==mh||qa("Click OK to restore the previous "+gb+" machine state, or CANCEL to reset the machine.")){if(c=kh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gh(d,g):("error"==f&&"no machine state"!= +g?(this.G("Error: "+g),"unable to verify user"==g&&(Sa(vh,""),this.b=null)):this.aa(f+": "+g),th(d),gh(d)?(c=kh(d),e=!0):c=!1))}e&&ih(this,c?d:null)}else a==sh&&d.clear()}else ih(this);delete this.s;delete this.m}e=ra(this.id);for(f=0;fa[1];a=a[2];this.H=!0;this.j.R=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.c&&(wh(this,this.c,b,c,a),Kb(this,-2),this.c.Y());this.C&&(rh(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0}; function rh(a,b){if(qa("There may be a problem with your "+gb+" machine.\n\nTo help us diagnose it, click OK to send this "+gb+" machine state to http://www.pcjs.org.")){var c=a.K;a=a.b||"";b=b.toString();var d={};d.app=gb;d.ver="1.34.0";d.url=c;d.user=a;d.type="bug";d.data=b;Ma("http://www.pcjs.org/api/v1/report",d,!0)}} @@ -285,19 +285,19 @@ function Kb(a,b){if(a.c){var c=a.c,d=b||0,e=c.o.speed;e&&(0>=d||30<=(c.fd+=d))&& "B16",b&4)}} h.ma=function(a,b,c){var d=this;switch(b){case "power":return this.o[b]=c,c.onclick=function(){d.g||(d.j.R?xh(d,!1,!0):d.Vb(d.Sb))},!0;case "reset":return this.o[b]=c,c.onclick=function(){if(d.j.R&&!d.g)if(d.a&&!d.i){var a=qa("Click OK to save changes to this "+gb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");xh(d,a,!0);!a&&d.v?window&&window.location.reload():(a||(d.B=!0),d.Sb(fh),d.B=!1)}else d.reset(),d.c&&!d.D&&d.c.Y()},!0;case "save":if(Ga(Oa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.o[b]= c,c.onclick=function(){var a=eh(d,!0);if(a){var b=!!(d.a&&!d.i||d.v),c=xh(d,b);b?Bh(d,a,c):d.G("Resume disabled, machine state not saved")}},!0}return!1};function eh(a,b){var c=a.b;c||((c=Ra(vh),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Dh(a,c))||a.G("The user ID is invalid.")):b&&a.G("Browser local storage is not available"));return c} -function Dh(a,b){a.b=null;b=Ma(Oa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ta(vh,b.data),a.b=b.data)}catch(d){u(d.message+" ("+c+")")}return a.b}function hh(a){var b=null;a.b&&(b=Oa()+"/api/v1/user?req=load&user="+a.b+"&state="+Eh(a,"1.34.0"));return b} -function Bh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Eh(a,"1.34.0");d.data=c;b=Ma(Oa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ma(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Ih(a,b,c)}})}else c(a,null)} -function Jh(a,b,c,d){function e(a){if(void 0===k){var b=g&&z(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=Ha(a))}function f(a){e("Error: "+a);l&&(--Fh||bb(!0));l=!1}var g,k,l=!0;Fh++;oa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=m:q.appendChild(document.createTextNode(m));p.appendChild(q)}c|| -(c="/versions/pdpjs/1.34.0/components.xsl");m=function(d,k){k?Gh(c,null,null,!1,e,function(d,l){l?(na(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Fh||bb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Fh||bb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Gh(b,a,d,!0,e,m):Hh(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(x){f(x.message)}return l}window.embedPDP11=function(a,b,c,d){bb(!1);return Jh(a,b,c,d)};window.findMachineComponent=function(a,b){return ta(b,a+".machine")}; +function Jh(a,b,c,d,e){function f(a){if(void 0===l){var b=k&&A(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=Ha(a))}function g(a){f("Error: "+a);m&&(--Fh||bb(!0));m=!1}var k,l,m=!0;Fh++;oa[b]={};try{if(k=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}d|| +(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.0/components.xsl");p=function(e,l){l?Gh(d,null,a,null,!1,f,function(a,e){e?(na(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(k.outerHTML=e,--Fh||bb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(e,k),--Fh|| +bb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Gh(c,b,a,e,!0,f,p):Hh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(y){g(y.message)}return m}window.embedPDP10=function(a,b,c,d){bb(!1);return Jh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){bb(!1);return Jh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return ta(b,a+".machine")}; window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!va[a]){for(var c=!0,d=va,e=a,f=b.length,g=[],k=[],l="",m=null,p=0;p