From abd17be706e092a5199924ce3ca7dddd28907cd2 Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 17 Mar 2017 11:20:26 -0700 Subject: [PATCH 01/13] Allow the debugger to switch to base 2 --- apps/pdp10/diags/klad/dakaa/README.md | 2 +- apps/pdp10/diags/klad/dakad/README.md | 2 +- docs/pcx86/examples/pcx86-dbg.js | 96 ++--- modules/pdp10/lib/debugger.js | 2 +- modules/pdp10/lib/macro10.js | 25 +- modules/shared/lib/debugger.js | 9 +- versions/pc8080/1.34.2/pc8080-dbg.js | 497 +++++++++++++------------- versions/pcx86/1.34.2/pcx86-dbg.js | 96 ++--- versions/pdpjs/1.34.2/pdp10-dbg.js | 469 ++++++++++++------------ versions/pdpjs/1.34.2/pdp11-dbg.js | 133 +++---- 10 files changed, 677 insertions(+), 654 deletions(-) diff --git a/apps/pdp10/diags/klad/dakaa/README.md b/apps/pdp10/diags/klad/dakaa/README.md index adb5c420b..b41c73778 100644 --- a/apps/pdp10/diags/klad/dakaa/README.md +++ b/apps/pdp10/diags/klad/dakaa/README.md @@ -28,7 +28,7 @@ Resources for this test include: {% include machine.html id="testka10" %} The Debugger's assemble ("a") command can be used to test the new built-in -[MACRO-10 mini-assembler](/modules/pdp10/lib/macro10.js), which supports a subset +[MACRO-10 Mini-Assembler](/modules/pdp10/lib/macro10.js), which supports a subset of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command: diff --git a/apps/pdp10/diags/klad/dakad/README.md b/apps/pdp10/diags/klad/dakad/README.md index 45d0463eb..c6e73704b 100644 --- a/apps/pdp10/diags/klad/dakad/README.md +++ b/apps/pdp10/diags/klad/dakad/README.md @@ -28,7 +28,7 @@ Resources for this test include: {% include machine.html id="testka10" %} The Debugger's assemble ("a") command can be used to test the new built-in -[MACRO-10 mini-assembler](/modules/pdp10/lib/macro10.js), which supports a subset +[MACRO-10 Mini-Assembler](/modules/pdp10/lib/macro10.js), which supports a subset of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command: diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 8a1e90977..b06c081a9 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -176,7 +176,7 @@ function ge(a,b,c){var d=z(a);-1!==a.Y.load(b)&&(he(a,d),a.Y.Oc?(a.cg=a.Y.ua+a.Y function ag(a,b){b=(a.da>>>0)+b;b>a.Pg&&(8088>=a.ca||a.Z.Ka==a.Z.wa?b=a.Z.ua+(b-a.Pg&a.R):y.call(a,13,0));return b|0}function bg(a){a.da=a.Bd}function z(a){return a.Hc&~a.Y.wa|a.Aa-a.Y.ua}function he(a,b){a.Hc=b;a.Aa=a.Y.ua+(b&a.Y.wa)|0}function cg(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&dg(a),g&2&&eg(a),g&4&&fg(a),g&8&&gg(a),g&16&&hg(a),g&32&&ig(a))}f?(a.ze=d,a.ye=b):(a.ze=b,a.ye=d);a.hf=c;a.Ae=d;a.resultType=e} function jg(a,b,c,d,e){a.resultType=c|26;a.Ae=b;d?kg(a):lg(a);e?mg(a):ng(a);return b}function og(a,b,c,d){c&d?kg(a):lg(a);(b^c)&d?mg(a):ng(a)}function pg(a){return dg(a)?1:0}function dg(a){a.resultType&1&&(a.O&=-2,(a.ze^(a.ze^a.hf)&(a.hf^a.ye))&a.resultType&-2147450752&&(a.O|=1),a.resultType&=-2);return a.O&1}function eg(a){a.resultType&2&&(a.O&=-5,38505>>((a.Ae^a.Ae>>4)&15)&1&&(a.O|=4),a.resultType&=-3);return a.O&4} function fg(a){a.resultType&4&&(a.O&=-17,(a.ye^a.ze^a.hf)&16&&(a.O|=16),a.resultType&=-5);return a.O&16}function gg(a){a.resultType&8&&(a.O&=-65,a.Ae&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.O|=64),a.resultType&=-9);return a.O&64}function hg(a){a.resultType&16&&(a.O&=-129,a.Ae&a.resultType&-2147450752&&(a.O|=128),a.resultType&=-17);return a.O&128} -function ig(a){a.resultType&32&&(a.O&=-2049,(a.ze^a.ye)&(a.hf^a.ye)&a.resultType&-2147450752&&(a.O|=2048),a.resultType&=-33);return a.O&2048}function lg(a){a.resultType&=-2;a.O&=-2}function qg(a){a.resultType&=-5;a.O&=-17}function rg(a){a.resultType&=-9;a.O&=-65}function ng(a){a.resultType&=-33;a.O&=-2049}function kg(a){a.resultType&=-2;a.O|=1}function ug(a){a.resultType&=-5;a.O|=16}function vg(a){a.resultType&=-9;a.O|=64}function mg(a){a.resultType&=-33;a.O|=2048} +function ig(a){a.resultType&32&&(a.O&=-2049,(a.ze^a.ye)&(a.hf^a.ye)&a.resultType&-2147450752&&(a.O|=2048),a.resultType&=-33);return a.O&2048}function lg(a){a.resultType&=-2;a.O&=-2}function qg(a){a.resultType&=-5;a.O&=-17}function rg(a){a.resultType&=-9;a.O&=-65}function ng(a){a.resultType&=-33;a.O&=-2049}function kg(a){a.resultType&=-2;a.O|=1}function sg(a){a.resultType&=-5;a.O|=16}function vg(a){a.resultType&=-9;a.O|=64}function mg(a){a.resultType&=-33;a.O|=2048} function re(a){return a.O&-2262|dg(a)|eg(a)|fg(a)|gg(a)|hg(a)|ig(a)}function wg(a,b){b|=a.qa&1|65520;a.qa=a.qa&-65536|b&65535;a.qa&1&&je(a,!0)}function se(a,b,c){a.qa&1||(b&=~a.si);void 0===c&&(c=a.Ma);c?b=b&-12289|a.O&12288:a.lc=(b&12288)>>12;c>a.lc&&(b=b&-513|a.O&512);a.resultType=128;a.O=a.O&~(a.Qd|2261)|b&(a.Qd|2261)|a.Ri;a.O&256&&(a.Xa|=2,a.N|=4)} function xg(a,b,c,d){var e=0;if(a.qa&1&&(a.Ma>a.lc||a.O&131072)&&a.la.Si)for(var f=a.la.Si+(b>>>3),e=(1<>>=8,f++;return e?(t(a,256)&&Mb(a,"checkIOPM("+ta(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),y.call(a,13,0),!1):!0} l.Cb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.na[b]=c;this.tj++;a=!0;break;default:a=xd.prototype.Cb.call(this,a,b,c)}return a}; @@ -191,7 +191,7 @@ function Ig(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ca)2this.ca?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Xa&1&&this.O&512){var f=Kg(this.V);if(-1<=f&&(this.Xa&=-2,0<=f)){this.Xa&=-5; Lg.call(this,f);d=!0;break a}}break;case 1:if(this.Xa&2){this.Xa&=-3;80386<=this.ca&&(this.Qb[6]|=16384);Lg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.P("interrupt dispatched");this.N=0;break}if(this.Xa&4){this.N=this.A=0;break}}if(b){if(Mg(this.ba,this.da,c)){this.Jb();break}c=1}this.N=0;this.va[this.ra()].call(this)}while(0>11;ch(this);dh(this,a[b++]);for(c=0;c=eh&&fh(a,gh))}function ch(a){a.fa&=-129;a.fa&~a.Zb&63&&(a.fa|=128);if(a.fa&128&&!(a.Zb&128))return a=a.V,a.ca>=eh?hh(a,gh):a.da&ih||Lg.call(a.H,2),!0;a=a.V;a.ca>=eh&&fh(a,gh);return!1}function jh(a,b){80387<=a.ca||(b&=-65);a.fa|=b;return ch(a)} function ah(a){return a.fa|a.B<<11}function kh(a,b){return isFinite(b)?!0:!jh(a,Infinity===b?8:16)}function lh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,kh(a,d)||(d=null));return d}function mh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,kh(a,d)||(d=null));return d}function nh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,kh(a,d)||(d=null));return d}function oh(a,b,c){var d=null;null==b||null==c||!c&&jh(a,2)||(d=b/c,kh(a,d)||(d=null));return d} @@ -216,7 +216,7 @@ mh(this,zh(this),M(this,0)))},6:function(){N(this,0,oh(this,M(this,0),zh(this))) this.A,oh(this,M(this,this.A),M(this,0)))}},221:{0:function(){Gh(this,zh(this))},2:function(){th(this)&&this.da()},3:function(){th(this)&&(this.da(),Fh(this))},4:Sh,6:Th,7:Yh,48:Oh,49:ai,50:function(){N(this,this.A,M(this,0))},51:Vh},222:{0:function(){N(this,0,lh(this,M(this,0),wh(this)))},1:function(){N(this,0,nh(this,M(this,0),wh(this)))},2:function(){ph(this,M(this,0),wh(this))},3:function(){ph(this,M(this,0),wh(this))&&Fh(this)},4:function(){N(this,0,mh(this,M(this,0),wh(this)))},5:function(){N(this, 0,mh(this,wh(this),M(this,0)))},6:function(){N(this,0,oh(this,M(this,0),wh(this)))},7:function(){N(this,0,oh(this,wh(this),M(this,0)))},48:function(){N(this,this.A,lh(this,M(this,this.A),M(this,0)))&&Fh(this)},49:function(){N(this,this.A,nh(this,M(this,this.A),M(this,0)))&&Fh(this)},50:Mh,51:function(){ph(this,M(this,0),M(this,1))&&null!=Fh(this)&&Fh(this)},52:function(){N(this,this.A,mh(this,M(this,0),M(this,this.A)))&&Fh(this)},53:function(){N(this,this.A,mh(this,M(this,this.A),M(this,0)))&&Fh(this)}, 54:function(){N(this,this.A,oh(this,M(this,0),M(this,this.A)))&&Fh(this)},55:function(){N(this,this.A,oh(this,M(this,this.A),M(this,0)))&&Fh(this)}},223:{0:function(){Gh(this,wh(this))},2:function(){null!=qh(this,M(this,0),32768)&&this.H.fb(this.H.C,this.G[0])},3:function(){null!=qh(this,M(this,0),32768)&&(this.H.fb(this.H.C,this.G[0]),Fh(this))},4:function(){var a=Ah(this),b=Dh(a[0],8)+1E8*Dh(a[1],8)+1E16*Dh(a[2],2);a[2]&32768&&(b=-b);Gh(this,b)},5:function(){var a;a=this.H.ia(this.H.C);a=4294967296* -this.H.ia(this.H.C+4)+(a>>>0);Gh(this,a)},6:function(){var a=qh(this,Fh(this));null!=a&&(this.D[0]=Eh(a,8),this.D[1]=Eh(a/1E8,8),this.D[2]=Eh(a/1E16,2),0>a&&(this.D[2]|=32768),Bh(this))},7:function(){null!=qh(this,M(this,0),gi)&&(this.bl(),Fh(this))},48:function(){Oh.call(this);Fh(this)},49:ai,50:Wh,51:Wh,52:Zh}},ii=[Jh,Ph,Qh,Rh,Sh,Th,Xh,Uh,Yh,Zh];ab(function(){for(var a=Ab(document,"pcx86","fpu"),b=0;b>>0);Gh(this,a)},6:function(){var a=qh(this,Fh(this));null!=a&&(this.D[0]=Eh(a,8),this.D[1]=Eh(a/1E8,8),this.D[2]=Eh(a/1E16,2),0>a&&(this.D[2]|=32768),Bh(this))},7:function(){null!=qh(this,M(this,0),gi)&&(this.bl(),Fh(this))},48:function(){Oh.call(this);Fh(this)},49:ai,50:Wh,51:Wh,52:Zh}},ii=[Jh,Ph,Qh,Rh,Sh,Th,Xh,Uh,Yh,Zh];ab(function(){for(var a=Ab(document,"pcx86","fpu"),b=0;b>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ij;(bd)&&y.call(this,5);this.N|=2;return a}function ri(a,b){var c=0;if(b){rg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else vg(this);this.A-=11+3*c;return a}function si(a,b){var c=0;if(b){rg(this);for(var d=2==this.W?15:31,e=1<>>=1;c++;d--}}else vg(this);this.A-=11+3*c;return a} @@ -228,7 +228,7 @@ function Di(a){if(this.Tc){var b=this.Tc,c=this.sj,d=this.ga,e=d>>3&7;b.A=d&7;va function Fi(a){Ye.call(this);return a}function Gi(a,b){a=Hi.call(this,this.S(),b);80386>this.ca&&(this.A-=12);return a}function Ii(a,b){a=this.Ea();a=2==this.W?Hi.call(this,a,b):Ji.call(this,a,b);80386>this.ca&&(this.A-=12);return a}function Ki(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Li.call(this,a,b);c&&(this.Ba=~this.Ba+1|0,this.Ya=~this.Ya+(this.Ba?0:1)|0)} function Hi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return a&65535}function Ji(a,b){Ki.call(this,a,b);this.Ya!=this.Ba>>31?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return this.Ba}function Mi(a,b){this.A-=14+(-1===this.C?0:2);rg(this);-1!==this.xb.load(b)&&this.xb.qc>=this.Ma&&this.xb.qc>=(b&3)&&(vg(this),a=this.xb.mb&-256,2=this.Ma)&&this.xb.qc>=(b&3))return vg(this),this.xb.Ka;rg(this);return a}function cj(a,b){if(-1===this.C)return Ye.call(this),a;ge(this,this.ja(this.C+this.W));this.A-=this.B.Xe;return b} +function Ri(a,b){if(-1===this.C)return Ye.call(this),a;a=this.ja(this.C+this.W);this.Ha.load(a);this.A-=this.B.Xe;return b}function Si(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.xb.load(b)&&(7168==(this.xb.mb&7168)||this.xb.qc>=this.Ma)&&this.xb.qc>=(b&3))return vg(this),this.xb.Ka;rg(this);return a}function Ti(a,b){if(-1===this.C)return Ye.call(this),a;ge(this,this.ja(this.C+this.W));this.A-=this.B.Xe;return b} function dj(a,b){this.A-=-1===this.F?-1===this.C?this.B.sk:this.B.rk:this.B.pk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function fj(a,b){return b} function gj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)y.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=z(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return dj.call(this,0,b)} function hj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.Y.U;break;case 3:b=this.Ca.U;break;case 4:if(80386<=this.ca){b=this.Ga.U;break}y.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.Ha.U;break}default:y.call(this,6),b=a}-1!==this.F&&ke(this,2);return dj.call(this,0,b)} @@ -352,10 +352,10 @@ var Ae=[function(){this.tc.call(this,li)},function(){this.za.call(this,mi)},func function(){this.kc.call(this,ij)},function(){this.ma.call(this,jj)},function(){this.D=this.D&-256|ij.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|jj.call(this,this.D&this.R,this.Ea());this.A--},function(){me(this,this.Z.U,this.W,2);this.A-=this.B.re},function(){Zf(this,fe(this));this.A-=this.B.nc},function(){this.tc.call(this,ji)},function(){this.za.call(this,ki)},function(){this.kc.call(this,ji)},function(){this.ma.call(this,ki)},function(){this.D=this.D&-256|ji.call(this, this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|ki.call(this,this.D&this.R,this.Ea());this.A--},function(){me(this,this.Y.U,this.W,2);this.A-=this.B.re},function(){this.ta=this.Aa;ge(this,fe(this));this.A-=this.B.nc;this.ta=-1},function(){this.tc.call(this,kj)},function(){this.za.call(this,lj)},function(){this.kc.call(this,kj)},function(){this.ma.call(this,lj)},function(){this.D=this.D&-256|kj.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|lj.call(this, this.D&this.R,this.Ea());this.A--},function(){me(this,this.Ca.U,this.W,2);this.A-=this.B.re},function(){this.ta=this.Aa;ne(this,fe(this));this.A-=this.B.nc;this.ta=-1},function(){this.tc.call(this,ni)},function(){this.za.call(this,oi)},function(){this.kc.call(this,ni)},function(){this.ma.call(this,oi)},function(){this.D=this.D&-256|ni.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|oi.call(this,this.D&this.R,this.Ea());this.A--},function(){this.N|=20;this.Da=this.Rb=this.oa; -this.A-=this.B.bd},function(){var a=this.D&255,b=fg(this),c=dg(this);9<(a&15)||b?(a+=6,b=16):b=0;159>8&255;9<(c&15)||fg(this)?(c+=6,80286<=this.ca&&255>8&255;9<(c&15)||fg(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?kg(this):lg(this);b?ug(this):qg(this);this.A-=this.B.qe},function(){this.D=ak.call(this,this.D)},function(){this.I=ak.call(this,this.I)},function(){this.L=ak.call(this,this.L)},function(){this.G=ak.call(this,this.G)},function(){he(this, +this.A-=this.B.bd},function(){var a=this.D&255,b=fg(this),c=dg(this);9<(a&15)||b?(a+=6,b=16):b=0;159>8&255;9<(c&15)||fg(this)?(c+=6,80286<=this.ca&&255>8&255;9<(c&15)||fg(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?kg(this):lg(this);b?sg(this):qg(this);this.A-=this.B.qe},function(){this.D=ak.call(this,this.D)},function(){this.I=ak.call(this,this.I)},function(){this.L=ak.call(this,this.L)},function(){this.G=ak.call(this,this.G)},function(){he(this, ak.call(this,z(this)))},function(){this.M=ak.call(this,this.M)},function(){this.K=ak.call(this,this.K)},function(){this.J=ak.call(this,this.J)},function(){this.D=Yj.call(this,this.D)},function(){this.I=Yj.call(this,this.I)},function(){this.L=Yj.call(this,this.L)},function(){this.G=Yj.call(this,this.G)},function(){he(this,Yj.call(this,z(this)))},function(){this.M=Yj.call(this,this.M)},function(){this.K=Yj.call(this,this.K)},function(){this.J=Yj.call(this,this.J)},function(){pe(this,this.D&this.R); this.A-=this.B.Ic},function(){pe(this,this.I&this.R);this.A-=this.B.Ic},function(){pe(this,this.L&this.R);this.A-=this.B.Ic},function(){pe(this,this.G&this.R);this.A-=this.B.Ic},function(){pe(this,z(this)-2&65535);this.A-=this.B.Ic},function(){pe(this,this.M&this.R);this.A-=this.B.Ic},function(){pe(this,this.K&this.R);this.A-=this.B.Ic},function(){pe(this,this.J&this.R);this.A-=this.B.Ic},function(){this.D=this.D&~this.R|fe(this);this.A-=this.B.nc},function(){this.I=this.I&~this.R|fe(this);this.A-= this.B.nc},function(){this.L=this.L&~this.R|fe(this);this.A-=this.B.nc},function(){this.G=this.G&~this.R|fe(this);this.A-=this.B.nc},function(){he(this,z(this)&~this.R|fe(this));this.A-=this.B.nc},function(){this.M=this.M&~this.R|fe(this);this.A-=this.B.nc},function(){this.K=this.K&~this.R|fe(this);this.A-=this.B.nc},function(){this.J=this.J&~this.R|fe(this);this.A-=this.B.nc},ok,pk,qk,rk,sk,tk,uk,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,ok,pk,qk,rk,sk,tk,uk,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,Ek,function(){this.ib.call(this, @@ -363,7 +363,7 @@ Tk,this.Ea);this.A-=-1===this.F?1:this.B.yg},Ek,function(){this.ib.call(this,Tk, this.I=this.xa;Zf(this,a);break;case 2:a=this.L;this.L=this.xa;ge(this,a);break;case 3:a=this.G;this.G=this.xa;ne(this,a);break;case 4:a=z(this);he(this,this.xa);80386<=this.ca?this.Ga.load(a):oe(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.ca?this.Ha.load(a):Zf(this,a);break;case 6:a=this.K;this.K=this.xa;ge(this,a);break;case 7:a=this.J,this.J=this.xa,ne(this,a)}},function(){this.N|=1;this.ta=this.Aa;this.xa=fe(this);this.ib.call(this,Uk,hk);this.ta=-1},function(){this.A-=3},function(){var a= this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.G&this.R;this.G=this.G&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=z(this);this.D=this.D&~this.R|b&this.R;he(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a= this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.W?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.W?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Kj},function(){ik.call(this,this.Ea(),Hg(this));this.A-=this.B.Nj},function(){this.A-=3},function(){var a=re(this);a&131072&& -3>this.lc?y.call(this,13,0):(pe(this,a&-196609),this.A-=this.B.Ic)},function(){if(this.O&131072&&3>this.lc)y.call(this,13,0);else{var a=fe(this),a=a&65535|this.O&-65536;se(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?kg(this):lg(this);a&4?(this.resultType&=-3,this.O|=4):(this.resultType&=-3,this.O&=-5);a&16?ug(this):qg(this);a&64?vg(this):rg(this);a&128?(this.resultType&=-17,this.O|=128):(this.resultType&=-17,this.O&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(re(this)& +3>this.lc?y.call(this,13,0):(pe(this,a&-196609),this.A-=this.B.Ic)},function(){if(this.O&131072&&3>this.lc)y.call(this,13,0);else{var a=fe(this),a=a&65535|this.O&-65536;se(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?kg(this):lg(this);a&4?(this.resultType&=-3,this.O|=4):(this.resultType&=-3,this.O&=-5);a&16?sg(this):qg(this);a&64?vg(this):rg(this);a&128?(this.resultType&=-17,this.O|=128):(this.resultType&=-17,this.O&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(re(this)& 213)<<8;this.A-=this.B.Vb},function(){var a=this.D&-256,b;b=J(this);b=this.Ia(this.Da.bc(b,1));this.D=a|b;this.A-=this.B.Kh},function(){this.D=this.D&~this.R|le(this,this.Da,J(this));this.A-=this.B.Kh},function(){var a=J(this),b=this.D;this.fc(this.Da.cc(a,1),b);this.A-=this.B.Lh},function(){var a=J(this),b=this.D;this.yb(this.Da.cc(a,this.W),b);this.A-=this.B.Lh},function(){var a=1,b=0,c=this.wa,d=this.B.Mh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Oh,this.ha&256||(this.A-=this.B.Nh));if(a--){var e= this.Ia(this.Da.bc(this.K&c,1));this.fc(this.oa.cc(this.J&c,1),e);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Mh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Oh,this.ha&256||(this.A-=this.B.Nh));if(a--){var e=le(this,this.Da,this.K&c);this.yb(this.oa.cc(this.J&c,this.W),e);e=this.O&1024?-this.W:this.W;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d; this.I=this.I&~c|this.I-b&c;a&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.xh;this.ha&192&&(a=this.I&c,b=1,d=this.B.zh,this.ha&256||(this.A-=this.B.yh));if(a--){var e=zg(this,this.Da,this.K),f=zg(this,this.oa,this.J);this.F=this.C;Bi.call(this,e,f);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Ib;a&&gg(this)==(this.ha&64)&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.xh;this.ha&192&& @@ -409,7 +409,7 @@ B[135]=function(){var a=this.Ea();dg(this)||gg(this)?this.A-=this.B.Ra:(C(this,A B[140]=function(){var a=this.Ea();!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[141]=function(){var a=this.Ea();!hg(this)==!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[142]=function(){var a=this.Ea();gg(this)||!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[143]=function(){var a=this.Ea();gg(this)||!hg(this)!=!ig(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)};B[144]=function(){ck.call(this,mj)}; B[145]=function(){ck.call(this,mj)};B[146]=function(){ck.call(this,nj)};B[147]=function(){ck.call(this,oj)};B[148]=function(){ck.call(this,pj)};B[149]=function(){ck.call(this,qj)};B[150]=function(){ck.call(this,rj)};B[151]=function(){ck.call(this,sj)};B[152]=function(){ck.call(this,tj)};B[153]=function(){ck.call(this,uj)};B[154]=function(){ck.call(this,vj)};B[155]=function(){ck.call(this,wj)};B[156]=function(){ck.call(this,xj)};B[157]=function(){ck.call(this,yj)};B[158]=function(){ck.call(this,zj)}; B[159]=function(){ck.call(this,Aj)};B[160]=function(){me(this,this.Ga.U,this.W,2);this.A-=this.B.re};B[161]=function(){this.ta=this.Aa;var a=fe(this);this.Ga.load(a);this.A-=this.B.nc;this.ta=-1};B[163]=function(){this.za.call(this,xi);-1!==this.C&&(this.A-=6)};B[164]=function(){this.za.call(this,2==this.W?Bj:Dj);this.A-=-1===this.C?3:7};B[165]=function(){this.za.call(this,2==this.W?Fj:Gj);this.A-=-1===this.C?3:7};B[168]=function(){me(this,this.Ha.U,this.W,2);this.A-=this.B.re}; -B[169]=function(){this.ta=this.Aa;var a=fe(this);this.Ha.load(a);this.A-=this.B.nc;this.ta=-1};B[171]=function(){this.za.call(this,Ai);-1!==this.C&&(this.A-=5)};B[172]=function(){this.za.call(this,2==this.W?Hj:Jj);this.A-=-1===this.C?3:7};B[173]=function(){this.za.call(this,2==this.W?Lj:Mj);this.A-=-1===this.C?3:7};B[175]=function(){this.ma.call(this,2==this.W?Hi:Ji)};B[178]=function(){this.ma.call(this,cj)};B[179]=function(){this.za.call(this,zi);-1!==this.C&&(this.A-=5)}; +B[169]=function(){this.ta=this.Aa;var a=fe(this);this.Ha.load(a);this.A-=this.B.nc;this.ta=-1};B[171]=function(){this.za.call(this,Ai);-1!==this.C&&(this.A-=5)};B[172]=function(){this.za.call(this,2==this.W?Hj:Jj);this.A-=-1===this.C?3:7};B[173]=function(){this.za.call(this,2==this.W?Lj:Mj);this.A-=-1===this.C?3:7};B[175]=function(){this.ma.call(this,2==this.W?Hi:Ji)};B[178]=function(){this.ma.call(this,Ti)};B[179]=function(){this.za.call(this,zi);-1!==this.C&&(this.A-=5)}; B[180]=function(){this.ma.call(this,Qi)};B[181]=function(){this.ma.call(this,Ri)}; B[182]=function(){this.kc.call(this,ej);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|this.D&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.L=this.L&~this.R|this.L&255;break;case 3:this.G=this.G&~this.R|this.G&255;break;case 4:this.Hc=this.Hc&~this.R|this.D>>8&255;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I>>8&255;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L>>8&255;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G>>8&255,this.G=this.xa}this.A-= -1===this.C?3:6};B[183]=function(){ke(this,2);this.ma.call(this,fj);switch(this.ga>>3&7){case 0:this.D=this.D&65535;break;case 1:this.I=this.I&65535;break;case 2:this.L=this.L&65535;break;case 3:this.G=this.G&65535;break;case 4:this.Hc=this.Hc&65535;break;case 5:this.M=this.M&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.C?3:6};B[186]=function(){this.ib.call(this,$k,this.ra)};B[187]=function(){this.za.call(this,yi);-1!==this.C&&(this.A-=5)}; @@ -561,7 +561,7 @@ function Qs(a,b){if(1==b)return a.ha[0]=Rs[Ls],a.ha[1]=Rs[Js],a.ha;if(2==b){var (c.Cc[20]&12)<<4,c.Cc[16]&128&&(f&=-49,f|=(c.Cc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ha[e]=[g,h,f,255]}a.Ga=!0}return a.ha}function cq(a,b,c,d){a.lb=b;a.Ta=c;a.Da=d} function Gs(a,b){var c=!1;if(window&&a.lb&&(!b||a.I)){b=0;var d=a.Da?a.Da:8,e=Qs(a);null!=a.Ta[0]&&Vs(a,Ws,a.Ta[0],b,d,8,a.lb,e)&&(c=!0);b=a.Da?0:2048;d=a.Da?a.Da:9;null!=a.Ta[1]&&(Vs(a,Xs,a.Ta[1],b,d,14,a.lb,Ys,Zs)&&(c=!0),a.Da&&Vs(a,a.La,a.Ta[1],0,a.Da,14,a.lb,e)&&(c=!0))}return c}function Vs(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&($s(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Cd&&$s(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} function $s(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.va[b],u=16>h.length?h.length:16;v||(v={Fc:e<ua||!T?ua:8,ib=cb.createImageData(m.Fc,m.Gc);for(Sa=0;256>Sa;Sa++){for(db=0;db=ua-2,Ld=ca[db>(8<=rb&&192<=Sa&&223>=Sa?7:rb)?E:xb;at(ib,sg,ef,tg);H&&at(ib,sg+1,ef,tg)}cb.putImageData(ib,(Sa&15)*m.Fc,(Sa>>4)*m.Gc)}m.Be[K]="#"+q(E[0],2)+q(E[1],2)+q(E[2],2);m.Qi[K]=E;m.Sg[K]=za;m=!0}}a.va[b]=v;return m}function bt(a){0a.Aa&&(a.Aa=0):a.Aa=-1} +m.jf&&K&1&&db>=ua-2,Ld=ca[db>(8<=rb&&192<=Sa&&223>=Sa?7:rb)?E:xb;at(ib,tg,ef,ug);H&&at(ib,tg+1,ef,ug)}cb.putImageData(ib,(Sa&15)*m.Fc,(Sa>>4)*m.Gc)}m.Be[K]="#"+q(E[0],2)+q(E[1],2)+q(E[2],2);m.Qi[K]=E;m.Sg[K]=za;m=!0}}a.va[b]=v;return m}function bt(a){0a.Aa&&(a.Aa=0):a.Aa=-1} function Ps(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.C.Wa[b])return;var c=a.C.Wa[10],b=c&31,d=a.C.Wa[11]&31,e=a.C.Wa[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)ct(a);else{c=a.C.Wa[15]+((a.C.Wa[14]&63)<<8);a.aa!=c&&(ct(a),a.aa=c);d=d-b+1;if(a.md!=b||a.Hc!=d)a.md=b,a.Hc=d;a.za=e+1;bt(a)}}} function ct(a){if(0<=a.aa){if(void 0!==a.M){var b=dt<<8,c=a.M[a.aa];if(c&b){var c=c&~b,b=a.aa%a.F,d=a.aa/a.F|0;a.I&&a.va[a.I]&&(a.Ca&&et(a,b,d,c,a.Ca),et(a,b,d,c));a.M[a.aa]=c}}a.aa=-1}} function ft(a){var b,c=a.C;a.Pc=!1;var d=c.xd[5];if(null!=d){b=ur;var e=wr,f=c.xd[3]&31;switch(d&3){case 0:if(f){e=wr|32;switch(f&24){case 8:e=wr|96;break;case 16:e=wr|160;break;case 24:e=wr|224}c.Qc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.La==dq&&(e=3,c.Qc=f&7)}d&8&&(b=1280);c=c.$d[4];null!=c&&(c&4||(b|=vr,e|=xr),d&64&&(c&8&&(b|=16384,e|=4),a.Pc=!0));b|=e}return b} @@ -714,30 +714,30 @@ function lx(a,b){if(a.errorCode)return-1;do{if(a.eb&&a.sa.write(a.eb,a.Sa++,b))b var Tw="Hard Drive",Ww=["XTC","ATC","COMPAQ"],Uw=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966, 6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Mw=496,px=1,sx=0,jx=16,rx=3,qx=15,mx=16,ix=1,hx=8,gx=16,Qw=64,ex=128,vx=16,wx=32,xx=48,yx=64,zx= 112,tx=144,Ax=145,ux=240,Bx=2,ox=4,Hx=0,Ix=2,Lx=0,Mx=1,Dx=3,Nx=5,Ox=8,Qx=10,ax=12,Sx=15,Jx=224,Kx=228,Sw=0,Fx=4,Ux=20,Rw=0,bx=1,Yw=2,Zw=4,$w=8,Xw=32,Jw={800:Hw.prototype.Tm,801:Hw.prototype.Um,802:Hw.prototype.Sm},Iw={496:Hw.prototype.nl,497:Hw.prototype.$l,498:Hw.prototype.bm,499:Hw.prototype.cm,500:Hw.prototype.Yl,501:Hw.prototype.Xl,502:Hw.prototype.Zl,503:Hw.prototype.dm},Lw={800:Hw.prototype.ro,801:Hw.prototype.uo,802:Hw.prototype.to,803:Hw.prototype.so,807:Hw.prototype.hi,811:Hw.prototype.hi, -815:Hw.prototype.hi},Kw={496:Hw.prototype.An,497:Hw.prototype.Fn,498:Hw.prototype.Dn,499:Hw.prototype.En,500:Hw.prototype.zn,501:Hw.prototype.yn,502:Hw.prototype.Bn,503:Hw.prototype.xn,1014:Hw.prototype.Cn};ab(function(){for(var a=Ab(document,"pcx86","hdc"),b=0;bthis.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.da?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.V=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.V,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Zx(a,b,c,d,e,f){var g,h,k,m=!1,p=!1,v=[],u=[],E=a.L;for(a.L=e;c<"==k?10:e;p=!1}Yx(v, +u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.V),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} +function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; -function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.M=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; +function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ " dpl="+r(a.qc))}}else d.P("no selector")});Al(this,134217728,function(a){var b;(a=a[0])&&(b=$x(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ta(b)+")");b;){a=hy(d,0,b);var c=d.Ia(a,1),e=d.Yc(a,2),k=d.Yc(a,5);if(77!=c&&90!=c)break;d.P(uy(0,b)+": '"+String.fromCharCode(c)+"' PID="+ta(e)+" LEN="+ta(k)+' "'+vy(d,a,8)+'"');b+=1+k}});Al(this,128,function(a){py(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Al(this,8,function(a){a:{if(a=a[0]){var b=$x(d,a);if(void 0===b){d.P("invalid task selector: "+ a);break a}a=qy(d,b,ry)}else a=d.H.la;d.P("dumpTSS("+ta(a?a.U:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?wy:xy,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=yg(d.H,p,2),2304==c&&(v|=yg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ta(m)+" "+Ba(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;mu;)p=a.ua+m,v=yg(d.H,p,2),b+="\n"+ta(m)+" ports "+ta(u)+"-"+ta(u+15)+": "+ra(v,2),u+=16,m+=2;d.P(b)}}});this.F=null;this.Ma=0;this.Ca=!1;Sf(this.H,48,this.Ym.bind(this));Sf(this.H,65, -this.Zm.bind(this));this.O=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function yy(a,b,c,d,e,f){b=vy(a,b);var g=qy(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=zy(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} +this.Zm.bind(this));this.V=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function yy(a,b,c,d,e,f){b=vy(a,b);var g=qy(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=zy(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} function Ay(a,b,c,d){var e=a.Yc(b,2),f=a.Yc(b,2),g=By(a,b,4),h=By(a,b,4),k=hy(a,By(a,b,4),a.Yc(b,2));b=hy(a,By(a,b,4),a.Yc(b,2));b=vy(a,b).toUpperCase();var k=vy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&t(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=zy(a,k,e);c[k+m]=g;aq(a,k,e,f,g,null,h,c)}function Cy(a,b,c){c=vy(a,c).toUpperCase();Dy(a,c,b)} l.Ym=function(){var a=this.H;if(null!=this.F&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=hy(this,z(a)+12,a.Y.U);switch(By(this,d)){case 336:Ay(this,hy(this,a.G,b),!c,!!this.F)}}return!0}; l.Zm=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.F)return 79==c&&Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x41 handling enabled",128),a.F=!0):(Mb(a,"INT 0x41 monitoring enabled",128),a.F=!1)}}(this)),!0;switch(c){case 79:this.F&&(b.D=b.D&-65536|62342,Mb(this,"INT 0x41 handling enabled",128));break;case 80:yy(this,hy(this,h,k),d+1,e,!(g&1),!!this.F);break;case 82:Dy(this,null, d);break;case 127:this.F&&(b.D=b.D&-65536|(this.Ca?0:1));break;case 131:this.F&&(a=hy(this,b.L,e),this.Ma++?(this.P("TRAPFAULT failed"),Ey(this,this.B,a,!0,!0),this.Ma=0,this.Jb()):(this.P("INT 0x41 TRAPFAULT: fault="+ta(d)+" error="+q(b.K,8,!0)+" addr="+Fy(a)),this.Gd(this.B,a,!0),jy(this,!0)));break;case 141:this.F&&(b.D=b.D&-65536|1);break;case 336:Ay(this,hy(this,b.G,f),!g,!!this.F);break;case 338:Cy(this,d,hy(this,b.J,f))}this.Ca=!1;return!this.F}; -l.$m=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.O){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x68 handling enabled",128),a.F=a.O=!0):(Mb(a,"INT 0x68 monitoring enabled",128),a.O=!1)}}(this))}return!0}switch(d){case 67:this.O&&(b.D=b.D&-65536|62342);break;case 68:this.O&&(a=Xd(b.Z,this.yl.bind(this)))&& -(b.J=a[0],oe(b,a[1]));break;case 72:Dy(this,null,e);break;case 80:32==c?yy(this,hy(this,h,k),0,f,!0,!!this.O):128>c?yy(this,hy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.O):Ay(this,hy(this,h,k),!(c&1),!!this.O),this.O&&(b.D=b.D&-256|1)}return!this.O};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; +l.$m=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.V){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x68 handling enabled",128),a.F=a.V=!0):(Mb(a,"INT 0x68 monitoring enabled",128),a.V=!1)}}(this))}return!0}switch(d){case 67:this.V&&(b.D=b.D&-65536|62342);break;case 68:this.V&&(a=Xd(b.Z,this.yl.bind(this)))&& +(b.J=a[0],oe(b,a[1]));break;case 72:Dy(this,null,e);break;case 80:32==c?yy(this,hy(this,h,k),0,f,!0,!!this.V):128>c?yy(this,hy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.V):Ay(this,hy(this,h,k),!(c&1),!!this.V),this.V&&(b.D=b.D&-256|1)}return!this.V};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; l.Cb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",ly(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.AJz.indexOf(b),!d)){var g=Kz[b];g&&(d=t(a,g)?!0:524288==g&&t(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Rb[b])&&g[e]||"")&&(g=" "+Iz(a,g)),a.message("INT "+r(b)+": AH="+r(e)+" at "+uy(c-2-a.H.Z.ua,a.H.Z.U)+g));return d} function Nb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ua),a.message(b.be+"."+(null!=d?"outPort":"inPort")+"("+ta(c)+","+(f?f:"unknown")+(null!=d?","+r(d):"")+")"+(null!=g?": "+r(g):"")+(null!=e?" at "+uy(e,h):""))}l.ih=function(){this.P("Type ? for help with PCx86 Debugger commands");Lz(this);if(this.Ga){var a=this.Ga;this.Ga=null;ly(this,a)}}; -function jy(a,b){var c;if(Jg(a)){if(!a.N||!a.N.length){a.N=Array(Mz);for(c=0;c>>f.hb].Gd(e&f.Db,a==this.M);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Tz(this,a,a.length-1,"set"),jy(this)));return d}; -function Ey(a,b,c,d,e){for(var f=!1,g=Uz(a,a.Sb(c)),h=1;h>>f.hb].Gd(e&f.Db,a==this.N);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Tz(this,a,a.length-1,"set"),jy(this)));return d}; +function Ey(a,b,c,d,e){for(var f=!1,g=Uz(a,a.Sb(c)),h=1;h>3&7,E=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=E&&(E=u<<4|g&7);(u=bA[f])&&(v=u[E]);v&&(p=cA,k=v,m=k[0])}m>=p.length&&(g=a.Ia(b,1),k=dA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==eA? @@ -793,33 +793,33 @@ function Pz(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump a.P("ST"+f+": "+Ba(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+eB[e[1]]+"]")}a.P(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.P("SW: "+qa(d,16)+" ("+ta(d)+") CW: "+qa(b,16)+" ("+ta(b)+")");return}if("p"==e)d=80286<=a.H.ca;else{f=e.indexOf("=");if(0=a.ta&&(h=null);switch(h){case "AL":a.H.D= a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":he(a.H, z(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ne(a.H,g);break;case "ES":oe(a.H,g);break;case "SS":ge(a.H,g);break;case "CS":Zf(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "IP":case "EIP":C(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "PC":case "PS":se(a.H,g);break;case "C":g?kg(a.H):lg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g? -ug(a.H):qg(a.H);break;case "Z":g?vg(a.H):rg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?mg(a.H):ng(a.H);break;default:var k=!0;if(80286<=a.H.ca)switch(k=!1,h){case "MS":wg(a.H,g);break;case "TR":-1===a.H.la.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.ca)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I= +sg(a.H):qg(a.H);break;case "Z":g?vg(a.H):rg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?mg(a.H):ng(a.H);break;default:var k=!0;if(80286<=a.H.ca)switch(k=!1,h){case "MS":wg(a.H,g);break;case "TR":-1===a.H.la.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.ca)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I= g;break;case "EDX":a.H.L=g;break;case "ESP":he(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ha.load(g);break;case "CR0":a.H.qa=g;bk.call(a.H,g);break;case "CR2":a.H.Cd=g;break;case "CR3":a.H.Wc=g;ue.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Cd(a.H);a.P("updated registers:")}}a.P(YA(a,d));c&&(a.K=hy(a,A(a.H),a.H.Z.U),Qz(a,Fy(a.K)))}} function fB(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(Iz(a,c[2])):by(a,b,!1)}function gB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Xz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} +function Qz(a,b,c,d){if(b=Py(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Py(a,c,!0);if(!d||d.Jah[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Xz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} l.Cg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; function Wz(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.da&&(a.P("ended assemble at "+Fy(a.aa)),a.K=a.aa,a.da=!1),b="";else if(!c){var e=">> ";a.H.qa&1&&(e=a.H.O&131072?"-- ":"## ");a.P(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.za=null;if(Ib(a)&&0p||"z">>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Ng&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Ng&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Ng),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= -ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.N;if(jd.length){var uc=+wt||a.Ya,Og=+xt||10;isNaN(uc)?uc=Og:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Og=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Og--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Qg=$x(a,rm);if(void 0===Qg||0>Qg||255>>0,65536>4||1;aC--&&0Wi?String.fromCharCode(Wi):".";Vi--}Rg&&(Rg+="\n");Rg+=cb+" "+tm+(Tg?"":" "+Ft)}Rg&&a.P(Rg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Xi= -1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Xi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Xi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Yi=Py(a,Kt);if(Yi)for(var Zi=2;Zizm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Wg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Wg.U=Mt;if(kd=gB(a,Wg))break;Wg.U=a.jb(Sd);if(kd=gB(a,Wg,!0)){Mt=a.jb(Sd,!0);0>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= +ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0Jeff Parsons * @copyright © Jeff Parsons 2012-2017 * @@ -119,10 +119,7 @@ class Macro10 { this.dbg = dbg; this.done = done; - /* - * Set up shortcuts to frequently used helper services that the caller must provide. - */ - this.println = dbg.println; + this.println("starting PCjs MACRO-10 Mini-Assembler..."); /* * Initialize all the tables that MACRO-10 uses. @@ -200,6 +197,7 @@ class Macro10 { this.sText = ""; this.iURL = 0; this.asURLs = sURL.split(';'); + this.loadNextResource(); } @@ -218,6 +216,8 @@ class Macro10 { var macro10 = this; var sURL = this.asURLs[this.iURL++]; + this.println("loading " + Str.getBaseName(sURL)); + /* * We know that local resources ending with ".MAC" are actually stored with a ".txt" extension. */ @@ -1090,6 +1090,21 @@ class Macro10 { } return w; } + + /** + * println(s) + * + * @this {Macro10} + * @param {string} s + */ + println(s) + { + if (!this.dbg) { + console.log(s); + } else { + this.dbg.println(s); + } + } } Macro10.PSEUDO_OP = { diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 773770c70..4c00cc127 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -926,7 +926,11 @@ class Debugger extends Component var fDefined = false; if (value !== undefined) { fDefined = true; - sValue = Str.toHex(value, 0, true) + " " + value + ". " + Str.toOct(value, 0, true) + " " + Str.toBinBytes(value, 4, true); + if (this.nBase == 8) { + sValue = value + ". " + Str.toOct(value, 0, true); + } else { + sValue = Str.toHex(value, 0, true) + " " + value + ". " + Str.toOct(value, 0, true) + " " + Str.toBinBytes(value, 4, true); + } if (value >= 0x20 && value < 0x7F) { sValue += " '" + String.fromCharCode(value) + "'"; } @@ -1029,6 +1033,9 @@ class Debugger extends Component { var s; switch(this.nBase) { + case 2: + s = Str.toBin(n, nBits > 0? nBits : 0); + break; case 8: s = Str.toOct(n, nBits > 0? ((nBits + 2)/3)|0 : 0); break; diff --git a/versions/pc8080/1.34.2/pc8080-dbg.js b/versions/pc8080/1.34.2/pc8080-dbg.js index 09a548eb4..e0e3451a6 100644 --- a/versions/pc8080/1.34.2/pc8080-dbg.js +++ b/versions/pc8080/1.34.2/pc8080-dbg.js @@ -36,270 +36,269 @@ var m={Be:0,Ee:1,Fe:2,Ge:3,He:4,Ie:5,Je:6,Ke:7,Le:8,Me:9,Ne:10,Oe:11,Pe:12,Qe:13 wc:88,xc:89,wb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,yc:97,ud:98,xd:99,d:100,e:101,Bd:102,Dd:103,Ed:104,Fd:105,Od:106,k:107,Pd:108,Rd:109,n:110,Sd:111,p:112,q:113,r:114,oe:115,t:116,pe:117,qe:118,re:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,df:127},la={59:186,61:187,173:189,224:91}; function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0f&&(f+=Math.pow(2,36)),f=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b,c){b?12"']/g,function(a){return xa[a]})}function ya(a,b){return(a+" ").slice(0,b)} -function Aa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var xa={"&":"&","<":"<",">":">",'"':""","'":"'"},Ca={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Da(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 Fa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Qa=g.load;d.Ja=g.exec;if(e=g.bytes)d.la=e;else if(e=g.words)for(d.la=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.la=Array(4*e.length),f=c=0;ca&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b){var c,d="";b?32>=1,f--;return d} +function qa(a,b,c){b?12"']/g,function(a){return ya[a]})}function Aa(a,b){return(a+" ").slice(0,b)}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ya={"&":"&","<":"<",">":">",'"':""","'":"'"},Da={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function Ea(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 Ga(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Qa=g.load;d.Ja=g.exec;if(e=g.bytes)d.la=e;else if(e=g.words)for(d.la=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.la=Array(4*e.length),f=c=0;c>8&255,d.la[f++]=e[c]>>16&255,d.la[f++]=e[c]>>24&255;else(e=g.data)?d.Mf=e:d.la=g;d.la&&(d.la.length?1==d.la.length&&(r(d.la[0]),d=null):(r("Empty resource: "+a),d=null));d.ra=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.cb=this.id:(this.eb=this.id.substr(0,a),this.cb=this.id.substr(a+1));this.G={ready:!1,mb:!1,Ib:!1,ja:!1,error:!1};this.zb=null;this.G.error=!1;this.ha=c||0;this.K=this.u=this.H=this.R=this.ua=null;gb.push(this)} -function hb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function jb(){return Date.now()||+new Date}function bb(a,b,c){b||r((c?c+": ":"")+a)}function r(a){window&&window.alert(a)}function kb(a){var b=!1;window&&(b=window.confirm(a));return b}function lb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba?this.cb=this.id:(this.eb=this.id.substr(0,a),this.cb=this.id.substr(a+1));this.G={ready:!1,mb:!1,Ib:!1,ja:!1,error:!1};this.zb=null;this.G.error=!1;this.ha=c||0;this.K=this.u=this.H=this.R=this.ua=null;hb.push(this)} +function ib(a,b,c){jb[a]&&b&&(jb[a][b]=c)}function kb(){return Date.now()||+new Date}function cb(a,b,c){b||r((c?c+": ":"")+a)}function r(a){window&&window.alert(a)}function lb(a){var b=!1;window&&(b=window.confirm(a));return b}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.g&&(this.g=10);15>2;this.j=this.w-1;this.L=this.N/this.w|0;this.I=this.L-1;this.A=[];this.B=[];this.D=this.F=!1;this.S=[];this.T=[];a=new z;Pb(a,this.K);this.b=Array(this.L);for(b=0;b>>a.g;0f&&(p=f);if(h&&h.size){if(h.type==d){if(e+f<=h.J)return h.pb+=h.J-e,h.J=e,!0;if(e>=h.J+h.pb){p=h.size-(e-k);p>f&&(p=f);h.pb=e-h.J+p;e=k+a.w;f-=p;g++;continue}}return Rb(Sb,e,f)}e=new z(e,p,a.w,d);Pb(e,a.K,h);a.b[g++]=e;e=k+a.w;f-=p}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Tb[d]+" at "+q(b)),!0):Rb(Ub,b,c)} -function Vb(a,b){return a.b[(b&a.C)>>>a.g].ob(b&a.j,b)}function Wb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Hc(c,b):a.b[d++].Ya(c,b)|a.b[d&a.I].Ya(0,b+1)<<8}function Xb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Nb(c,b):a.b[d++].ob(c,b)|a.b[d&a.I].ob(0,b+1)<<8}function Yb(a,b,c){a.b[(b&a.C)>>>a.g].qb(b&a.j,c&255,b)}function Zb(a,b,c){var d=b&a.j,e=(b&a.C)>>>a.g;d!=a.j?a.b[e].Kc(d,c&65535,b):(a.b[e++].$a(d,c&255,b),a.b[e&a.I].$a(0,c>>8&255,b+1))} -function $b(a){for(var b=0,c=[],d=0;d>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,d);a.K&&a.F!=g[1]&&ic(a.K,b,k)}else a.K&&(Fb(a.K,a,b,k,d),a.F&&ic(a.K,b,k));f+=h<<3;b+=h;e-=h}}function Rb(a,b,c){r("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var Sb=1,Ub=2,jc;if(Gb){var tc=new ArrayBuffer(2);(new DataView(tc)).setUint16(0,256,!0);jc=256===(new Uint16Array(tc))[0]}else jc=!1;var uc=jc; -function z(a,b,c,d){this.id=vc+=2;this.b=null;this.J=a;this.pb=b;this.size=c||0;this.type=d||wc;this.u=d==xc;Pb(this);this.Ea=this.Dc=!1;if(c)if(Gb)this.j=new ArrayBuffer(c),this.R=new DataView(this.j,0,c),this.g=new Uint8Array(this.j,0,c),this.w=new Uint16Array(this.j,0,c>>1),this.b=new Int32Array(this.j,0,c>>2),yc(this,uc?zc:Ac);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)};l.ie=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};l.me=function(a){var 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};l.ve=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.Ea=!0};l.ge=function(a,b){if(this.K&&null!=this.J){var c=this.K;Hc(c,this.J+a,1,c.I)&&c.ea(!0)}return this.ob(a,b)};l.ke=function(a,b){if(this.K&&null!=this.J){var c=this.K;Hc(c,this.J+a,2,c.I)&&c.ea(!0)}return this.Nb(a,b)}; -l.te=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Hc(d,this.J+a,1,d.w)&&d.ea(!0)}this.u?this.rb(0,b):this.qb(a,b,c)};l.xe=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Hc(d,this.J+a,2,d.w)&&d.ea(!0)}this.u?this.rb(0,b):this.Sb(a,b,c)};l.fe=function(a){return this.g[a]};l.he=function(a){return this.g[a]};l.je=function(a){return this.R.getUint16(a,!0)};l.le=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.w[a>>1]};l.se=function(a,b){this.g[a]=b;this.Ea=!0}; -l.ue=function(a,b){this.g[a]=b;this.Ea=!0};l.we=function(a,b){this.R.setUint16(a,b,!0);this.Ea=!0};l.ye=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.w[a>>1]=b;this.Ea=!0};var wc=0,xc=2,Tb=["NONE","RAM","ROM","VID","H/W"],vc=0,Cc=[],Bc=[z.prototype.ie,z.prototype.ve,z.prototype.me,z.prototype.ze],Fc=[z.prototype.ge,z.prototype.te,z.prototype.ke,z.prototype.xe];if(Gb)var Ac=[z.prototype.fe,z.prototype.se,z.prototype.je,z.prototype.we],zc=[z.prototype.he,z.prototype.ue,z.prototype.le,z.prototype.ye]; -function Ic(a,b){t.call(this,"CPU",a,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.U=c;this.Ta=Math.round(this.Aa/1E4)/100;this.Z=this.Ta*this.U;this.G.ma=!1;this.G.Qb=!1;this.G.lb=a.autoStart;this.G.Bc=!1;this.G.Wa=!1;this.xa=this.oa=0;this.ya=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.Db=this.tb.bind(this);Ab(this)}aa(Ic,t);l=Ic.prototype; -l.Ga=function(a,b,c,d){this.R=a;this.H=b;this.K=d;for(b=0;b=a.oa&&(a.oa+=a.na,c=!0);0<=a.sa&&a.sa<=Rc(a)&&(a.na=a.sa=-1,Mc(a),a.ea(),c=!0);c&&a.i(Rc(a)+" cycles: checksum="+n(a.xa))}} -l.da=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.P[b]=c;a=!0;break;case "run":this.P[b]=c;c.onclick=function(){var a;if(a=d.R)if(a=d.R,a.G.ja)a=!0;else{var b=null,c,h=lb(a.id);for(c=0;ca.Y/a.Z?b=1:d=!0;a.U=b;b=a.Ta*a.U;if(a.Z!=b){a.Z=b;b=a.Z.toFixed(2)+"Mhz";var e=a.P.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.R&&a.R.Za()}Tc(a,a.X);a.X=0;a.V=jb();a.ba=0;Uc(a);return d}function Wc(a,b){var c=a.T.length;a.T.push([-1,b]);return c}function Xc(a,b,c){0<=b&&ba.T[b][0]&&(c*=a.Aa*a.U/1E3,a.T[b][0]=c+Yc(a))}function Yc(a,b){var c=a.fa-=a.b;a.b=0;b&&(a.fa=0);return c} -l.tb=function(a){if(Cb(this,!0)){if(!this.G.ma){Sc(this);this.R&&this.R.start(this.V,Rc(this));this.G.ma=!0;this.G.Qb=!0;this.W&&this.W.start();var b=this.P.run;b&&(b.textContent="Halt");this.R&&(Zc(this.R,!0),a&&this.R.Za(!0))}this.Va>=this.Aa&&Uc(this,!0);this.Da=0;this.Ma=jb();this.ba&&(a=this.Ma-this.ba,a>this.jb&&(this.V+=a,this.V>this.Ma&&(this.V=this.Ma)));try{do{for(var c,d=this.G.Wa?1:this.Na,e=this.T.length-1;0<=e;e--){var f=this.T[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.Eb(c);c=Yc(this,!0); -this.Da+=c;this.X+=c;Qc(this,c);a=c;for(var g=this.T.length-1;0<=g;g--){var h=this.T[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ta-=c;if(0>=this.ta){this.ta+=this.Na;++this.kb>=ld&&(this.R&&Zc(this.R),this.kb=0);break}}while(this.G.ma)}catch(k){this.ea();Pc(this);this.R&&this.R.stop(jb(),Rc(this));Cb(this,!1);yb(this,k.stack||k.message);return}c=setTimeout;d=this.Db;this.ba=jb();e=this.jb;this.Da&&(e=Math.round(e*this.Da/this.Na));e-=this.ba-this.Ma;if(f=this.ba-this.V)this.Y=Math.round(this.X/ -(10*f))/100,864E5<=f&&(this.ka=0,Sc(this));if(0>e||this.Ye&&(this.V-=e),e=0;this.Va+=this.Da;this.ba+=e;c(d,e)}else Pc(this),this.R&&this.R.stop(jb(),Rc(this))};l.Eb=function(){return 0};l.ea=function(a){Bb(this,!0);Yc(this);Tc(this,this.X);this.X=0;if(this.G.ma){this.G.ma=!1;this.W&&this.W.stop();var b=this.P.run;b&&(b.textContent="Run")}this.G.complete=a};function Pc(a,b){if(a.R){for(var c=a.R,d=0;d>8&255;a.A=b&255}function xd(a){return a.B<<8|a.C}function yd(a,b){a.B=b>>8&255;a.C=b&255}function D(a){return a.D<<8|a.F} -function zd(a,b){a.D=b>>8&255;a.F=b&255}function A(a,b){a.j=b&65535}function Ad(a){return a.I&256?1:0}function Bd(a,b){a.I=a.I&255|b}function Cd(a){return Hb[a.L&255]?4:0}function Dd(a){return(a.L^a.O)&16?16:0}function Ed(a){return a.I&255?0:64}function Fd(a){return a.L&128?128:0}function td(a){return a.N&-214|Fd(a)|Ed(a)|Dd(a)|Cd(a)|Ad(a)}function rd(a,b){a.I=a.L=a.O=0;b&1&&(a.I|=256);b&4||(a.L|=1);b&16&&(a.O|=16);b&64||(a.I|=255);b&128&&(a.L^=192);a.N=a.N&-726|b&512|2} -function Gd(a,b){a.O=a.g^b;return a.L=(a.I=a.g+b)&255}function Hd(a,b){a.O=a.g^b;return a.L=(a.I=a.g+b+(a.I&256?1:0))&255}function Id(a,b){a.I=a.L=a.O=a.g&b;(a.g|b)&8&&(a.O^=16);return a.I}function Jd(a,b){a.O=b^255;b=a.L=b+255&255;a.I=a.I&-256|b;return b}function Kd(a,b){a.O=b;b=a.L=b+1&255;a.I=a.I&-256|b;return b}function Ld(a,b){return a.L=a.I=a.O=a.g|b}function Md(a,b){b^=255;a.O=a.g^b;return a.L=(a.I=a.g+b+1^256)&255} -function Nd(a,b){b^=255;a.O=a.g^b;return a.L=(a.I=a.g+b+(a.I&256?0:1)^256)&255}function Od(a,b){return a.L=a.I=a.O=a.g^b}function E(a,b){a=a.H;return a.b[(b&a.C)>>>a.g].Ya(b&a.j,b)}function Pd(a,b,c){a=a.H;a.b[(b&a.C)>>>a.g].$a(b&a.j,c&255,b)}function F(a){var b=E(a,a.j);A(a,a.j+1);return b}function G(a){var b=Wb(a.H,a.j);A(a,a.j+2);return b}function Qd(a){var b=Wb(a.H,a.M);a.M=a.M+2&65535;return b}function H(a,b){a.M=a.M-2&65535;Zb(a.H,a.M,b)} -function Rd(a){if(a.b&&a.S&255&&a.N&512){for(var b=0;8>b&&!(a.S&1<b?255:1<>8;Bd(this,a&256);this.b-=4},Vd,function(){var a;zd(this,a=D(this)+vd(this));Bd(this,a>>8&256);this.b-=10},function(){this.g=E(this,vd(this));this.b-=7},function(){wd(this,vd(this)-1);this.b-= -5},function(){this.A=Kd(this,this.A);this.b-=5},function(){this.A=Jd(this,this.A);this.b-=5},function(){this.A=F(this);this.b-=7},function(){var a=this.g<<8&256;this.g=(a|this.g)>>1;Bd(this,a);this.b-=4},Vd,function(){yd(this,G(this));this.b-=10},function(){Pd(this,xd(this),this.g);this.b-=7},function(){yd(this,xd(this)+1);this.b-=5},function(){this.B=Kd(this,this.B);this.b-=5},function(){this.B=Jd(this,this.B);this.b-=5},function(){this.B=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255| -Ad(this);Bd(this,a&256);this.b-=4},Vd,function(){var a;zd(this,a=D(this)+xd(this));Bd(this,a>>8&256);this.b-=10},function(){this.g=E(this,xd(this));this.b-=7},function(){yd(this,xd(this)-1);this.b-=5},function(){this.C=Kd(this,this.C);this.b-=5},function(){this.C=Jd(this,this.C);this.b-=5},function(){this.C=F(this);this.b-=7},function(){var a=this.g<<8;this.g=(Ad(this)<<8|this.g)>>1;Bd(this,a&256);this.b-=4},Vd,function(){zd(this,G(this));this.b-=10},function(){var a=G(this);Zb(this.H,a,D(this)); -this.b-=16},function(){zd(this,D(this)+1);this.b-=5},function(){this.D=Kd(this,this.D);this.b-=5},function(){this.D=Jd(this,this.D);this.b-=5},function(){this.D=F(this);this.b-=7},function(){var a=0,b=Ad(this);if(Dd(this)||9<(this.g&15))a|=6;if(b||154<=this.g)a|=96,b=1;this.g=Gd(this,a);Bd(this,b?256:0);this.b-=4},Vd,function(){var a;zd(this,a=D(this)+D(this));Bd(this,a>>8&256);this.b-=10},function(){var a;a=G(this);a=Wb(this.H,a);zd(this,a);this.b-=16},function(){zd(this,D(this)-1);this.b-=5},function(){this.F= -Kd(this,this.F);this.b-=5},function(){this.F=Jd(this,this.F);this.b-=5},function(){this.F=F(this);this.b-=7},function(){this.g=~this.g&255;this.b-=4},Vd,function(){this.M=G(this)&65535;this.b-=10},function(){Pd(this,G(this),this.g);this.b-=13},function(){this.M=this.M+1&65535;this.b-=5},function(){var a=D(this);Pd(this,a,Kd(this,E(this,a)));this.b-=10},function(){var a=D(this);Pd(this,a,Jd(this,E(this,a)));this.b-=10},function(){Pd(this,D(this),F(this));this.b-=10},function(){this.I|=256;this.b-= -4},Vd,function(){var a;zd(this,a=D(this)+this.M);Bd(this,a>>8&256);this.b-=10},function(){this.g=E(this,G(this));this.b-=13},function(){this.M=this.M-1&65535;this.b-=5},function(){this.g=Kd(this,this.g);this.b-=5},function(){this.g=Jd(this,this.g);this.b-=5},function(){this.g=F(this);this.b-=7},function(){Bd(this,Ad(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.w=this.A;this.b-=5},function(){this.w=this.B;this.b-=5},function(){this.w=this.C;this.b-=5},function(){this.w=this.D;this.b-= +var Hb="undefined"!==typeof ArrayBuffer,Ib=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1, +0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1],Jb={cpu:1,bus:64,mem:128,port:256,nvr:16384,chipset:32768,keyboard:65536,key:131072,video:262144,fdc:524288,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function Kb(a){t.call(this,"Panel",a)}aa(Kb,t); +Kb.prototype.da=function(a,b,c,d){return this.R&&this.R.da(a,b,c,d)||this.u&&this.u.da(a,b,c,d)||this.B&&this.B.da(a,b,c,d)||this.K&&this.K.da(a,b,c,d)?!0:t.prototype.da.call(this,a,b,c,d)};Kb.prototype.Ga=function(a,b,c,d){this.R=a;this.H=b;this.u=c;this.K=d;this.B=Lb(a,"Keyboard")};Kb.prototype.wa=function(a,b){b||Mb();return!0};Kb.prototype.va=function(){return!0}; +function Mb(){for(var a=!1,b=sb(document,"pc8080","panel"),c=0;c>1)+2;10>this.g&&(this.g=10);15>2;this.j=this.w-1;this.L=this.N/this.w|0;this.I=this.L-1;this.A=[];this.B=[];this.D=this.F=!1;this.S=[];this.T=[];a=new z;Qb(a,this.K);this.b=Array(this.L);for(b=0;b>>a.g;0f&&(q=f);if(h&&h.size){if(h.type==d){if(e+f<=h.J)return h.pb+=h.J-e,h.J=e,!0;if(e>=h.J+h.pb){q=h.size-(e-k);q>f&&(q=f);h.pb=e-h.J+q;e=k+a.w;f-=q;g++;continue}}return Sb(Tb,e,f)}e=new z(e,q,a.w,d);Qb(e,a.K,h);a.b[g++]=e;e=k+a.w;f-=q}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Ub[d]+" at "+p(b)),!0):Sb(Vb,b,c)} +function Wb(a,b){return a.b[(b&a.C)>>>a.g].ob(b&a.j,b)}function Xb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Hc(c,b):a.b[d++].Ya(c,b)|a.b[d&a.I].Ya(0,b+1)<<8}function Yb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Nb(c,b):a.b[d++].ob(c,b)|a.b[d&a.I].ob(0,b+1)<<8}function Zb(a,b,c){a.b[(b&a.C)>>>a.g].qb(b&a.j,c&255,b)}function $b(a,b,c){var d=b&a.j,e=(b&a.C)>>>a.g;d!=a.j?a.b[e].Kc(d,c&65535,b):(a.b[e++].$a(d,c&255,b),a.b[e&a.I].$a(0,c>>8&255,b+1))} +function ac(a){for(var b=0,c=[],d=0;d>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,d);a.K&&a.F!=g[1]&&jc(a.K,b,k)}else a.K&&(Gb(a.K,a,b,k,d),a.F&&jc(a.K,b,k));f+=h<<3;b+=h;e-=h}}function Sb(a,b,c){r("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var Tb=1,Vb=2,tc;if(Hb){var uc=new ArrayBuffer(2);(new DataView(uc)).setUint16(0,256,!0);tc=256===(new Uint16Array(uc))[0]}else tc=!1;var vc=tc; +function z(a,b,c,d){this.id=wc+=2;this.b=null;this.J=a;this.pb=b;this.size=c||0;this.type=d||xc;this.u=d==yc;Qb(this);this.Ea=this.Dc=!1;if(c)if(Hb)this.j=new ArrayBuffer(c),this.R=new DataView(this.j,0,c),this.g=new Uint8Array(this.j,0,c),this.w=new Uint16Array(this.j,0,c>>1),this.b=new Int32Array(this.j,0,c>>2),zc(this,vc?Ac:Bc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)};l.ie=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};l.me=function(a){var 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};l.ve=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.Ea=!0};l.ge=function(a,b){if(this.K&&null!=this.J){var c=this.K;Ic(c,this.J+a,1,c.I)&&c.ea(!0)}return this.ob(a,b)};l.ke=function(a,b){if(this.K&&null!=this.J){var c=this.K;Ic(c,this.J+a,2,c.I)&&c.ea(!0)}return this.Nb(a,b)}; +l.te=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Ic(d,this.J+a,1,d.w)&&d.ea(!0)}this.u?this.rb(0,b):this.qb(a,b,c)};l.xe=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Ic(d,this.J+a,2,d.w)&&d.ea(!0)}this.u?this.rb(0,b):this.Sb(a,b,c)};l.fe=function(a){return this.g[a]};l.he=function(a){return this.g[a]};l.je=function(a){return this.R.getUint16(a,!0)};l.le=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.w[a>>1]};l.se=function(a,b){this.g[a]=b;this.Ea=!0}; +l.ue=function(a,b){this.g[a]=b;this.Ea=!0};l.we=function(a,b){this.R.setUint16(a,b,!0);this.Ea=!0};l.ye=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.w[a>>1]=b;this.Ea=!0};var xc=0,yc=2,Ub=["NONE","RAM","ROM","VID","H/W"],wc=0,Dc=[],Cc=[z.prototype.ie,z.prototype.ve,z.prototype.me,z.prototype.ze],Gc=[z.prototype.ge,z.prototype.te,z.prototype.ke,z.prototype.xe];if(Hb)var Bc=[z.prototype.fe,z.prototype.se,z.prototype.je,z.prototype.we],Ac=[z.prototype.he,z.prototype.ue,z.prototype.le,z.prototype.ye]; +function Jc(a,b){t.call(this,"CPU",a,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.U=c;this.Ta=Math.round(this.Aa/1E4)/100;this.Z=this.Ta*this.U;this.G.ma=!1;this.G.Qb=!1;this.G.lb=a.autoStart;this.G.Bc=!1;this.G.Wa=!1;this.xa=this.oa=0;this.ya=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.Db=this.tb.bind(this);Bb(this)}aa(Jc,t);l=Jc.prototype; +l.Ga=function(a,b,c,d){this.R=a;this.H=b;this.K=d;for(b=0;b=a.oa&&(a.oa+=a.na,c=!0);0<=a.sa&&a.sa<=Sc(a)&&(a.na=a.sa=-1,Nc(a),a.ea(),c=!0);c&&a.i(Sc(a)+" cycles: checksum="+n(a.xa))}} +l.da=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.P[b]=c;a=!0;break;case "run":this.P[b]=c;c.onclick=function(){var a;if(a=d.R)if(a=d.R,a.G.ja)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Y/a.Z?b=1:d=!0;a.U=b;b=a.Ta*a.U;if(a.Z!=b){a.Z=b;b=a.Z.toFixed(2)+"Mhz";var e=a.P.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.R&&a.R.Za()}Uc(a,a.X);a.X=0;a.V=kb();a.ba=0;Vc(a);return d}function Xc(a,b){var c=a.T.length;a.T.push([-1,b]);return c}function Yc(a,b,c){0<=b&&ba.T[b][0]&&(c*=a.Aa*a.U/1E3,a.T[b][0]=c+Zc(a))}function Zc(a,b){var c=a.fa-=a.b;a.b=0;b&&(a.fa=0);return c} +l.tb=function(a){if(Db(this,!0)){if(!this.G.ma){Tc(this);this.R&&this.R.start(this.V,Sc(this));this.G.ma=!0;this.G.Qb=!0;this.W&&this.W.start();var b=this.P.run;b&&(b.textContent="Halt");this.R&&(ld(this.R,!0),a&&this.R.Za(!0))}this.Va>=this.Aa&&Vc(this,!0);this.Da=0;this.Ma=kb();this.ba&&(a=this.Ma-this.ba,a>this.jb&&(this.V+=a,this.V>this.Ma&&(this.V=this.Ma)));try{do{for(var c,d=this.G.Wa?1:this.Na,e=this.T.length-1;0<=e;e--){var f=this.T[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.Eb(c);c=Zc(this,!0); +this.Da+=c;this.X+=c;Rc(this,c);a=c;for(var g=this.T.length-1;0<=g;g--){var h=this.T[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ta-=c;if(0>=this.ta){this.ta+=this.Na;++this.kb>=md&&(this.R&&ld(this.R),this.kb=0);break}}while(this.G.ma)}catch(k){this.ea();Qc(this);this.R&&this.R.stop(kb(),Sc(this));Db(this,!1);zb(this,k.stack||k.message);return}c=setTimeout;d=this.Db;this.ba=kb();e=this.jb;this.Da&&(e=Math.round(e*this.Da/this.Na));e-=this.ba-this.Ma;if(f=this.ba-this.V)this.Y=Math.round(this.X/ +(10*f))/100,864E5<=f&&(this.ka=0,Tc(this));if(0>e||this.Ye&&(this.V-=e),e=0;this.Va+=this.Da;this.ba+=e;c(d,e)}else Qc(this),this.R&&this.R.stop(kb(),Sc(this))};l.Eb=function(){return 0};l.ea=function(a){Cb(this,!0);Zc(this);Uc(this,this.X);this.X=0;if(this.G.ma){this.G.ma=!1;this.W&&this.W.stop();var b=this.P.run;b&&(b.textContent="Run")}this.G.complete=a};function Qc(a,b){if(a.R){for(var c=a.R,d=0;d>8&255;a.A=b&255}function yd(a){return a.B<<8|a.C}function zd(a,b){a.B=b>>8&255;a.C=b&255}function D(a){return a.D<<8|a.F} +function Ad(a,b){a.D=b>>8&255;a.F=b&255}function A(a,b){a.j=b&65535}function Bd(a){return a.I&256?1:0}function Cd(a,b){a.I=a.I&255|b}function Dd(a){return Ib[a.L&255]?4:0}function Ed(a){return(a.L^a.O)&16?16:0}function Fd(a){return a.I&255?0:64}function Gd(a){return a.L&128?128:0}function ud(a){return a.N&-214|Gd(a)|Fd(a)|Ed(a)|Dd(a)|Bd(a)}function sd(a,b){a.I=a.L=a.O=0;b&1&&(a.I|=256);b&4||(a.L|=1);b&16&&(a.O|=16);b&64||(a.I|=255);b&128&&(a.L^=192);a.N=a.N&-726|b&512|2} +function Hd(a,b){a.O=a.g^b;return a.L=(a.I=a.g+b)&255}function Id(a,b){a.O=a.g^b;return a.L=(a.I=a.g+b+(a.I&256?1:0))&255}function Jd(a,b){a.I=a.L=a.O=a.g&b;(a.g|b)&8&&(a.O^=16);return a.I}function Kd(a,b){a.O=b^255;b=a.L=b+255&255;a.I=a.I&-256|b;return b}function Ld(a,b){a.O=b;b=a.L=b+1&255;a.I=a.I&-256|b;return b}function Md(a,b){return a.L=a.I=a.O=a.g|b}function Nd(a,b){b^=255;a.O=a.g^b;return a.L=(a.I=a.g+b+1^256)&255} +function Od(a,b){b^=255;a.O=a.g^b;return a.L=(a.I=a.g+b+(a.I&256?0:1)^256)&255}function Pd(a,b){return a.L=a.I=a.O=a.g^b}function E(a,b){a=a.H;return a.b[(b&a.C)>>>a.g].Ya(b&a.j,b)}function Qd(a,b,c){a=a.H;a.b[(b&a.C)>>>a.g].$a(b&a.j,c&255,b)}function F(a){var b=E(a,a.j);A(a,a.j+1);return b}function G(a){var b=Xb(a.H,a.j);A(a,a.j+2);return b}function Rd(a){var b=Xb(a.H,a.M);a.M=a.M+2&65535;return b}function H(a,b){a.M=a.M-2&65535;$b(a.H,a.M,b)} +function Sd(a){if(a.b&&a.S&255&&a.N&512){for(var b=0;8>b&&!(a.S&1<b?255:1<>8;Cd(this,a&256);this.b-=4},Wd,function(){var a;Ad(this,a=D(this)+wd(this));Cd(this,a>>8&256);this.b-=10},function(){this.g=E(this,wd(this));this.b-=7},function(){xd(this,wd(this)-1);this.b-= +5},function(){this.A=Ld(this,this.A);this.b-=5},function(){this.A=Kd(this,this.A);this.b-=5},function(){this.A=F(this);this.b-=7},function(){var a=this.g<<8&256;this.g=(a|this.g)>>1;Cd(this,a);this.b-=4},Wd,function(){zd(this,G(this));this.b-=10},function(){Qd(this,yd(this),this.g);this.b-=7},function(){zd(this,yd(this)+1);this.b-=5},function(){this.B=Ld(this,this.B);this.b-=5},function(){this.B=Kd(this,this.B);this.b-=5},function(){this.B=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255| +Bd(this);Cd(this,a&256);this.b-=4},Wd,function(){var a;Ad(this,a=D(this)+yd(this));Cd(this,a>>8&256);this.b-=10},function(){this.g=E(this,yd(this));this.b-=7},function(){zd(this,yd(this)-1);this.b-=5},function(){this.C=Ld(this,this.C);this.b-=5},function(){this.C=Kd(this,this.C);this.b-=5},function(){this.C=F(this);this.b-=7},function(){var a=this.g<<8;this.g=(Bd(this)<<8|this.g)>>1;Cd(this,a&256);this.b-=4},Wd,function(){Ad(this,G(this));this.b-=10},function(){var a=G(this);$b(this.H,a,D(this)); +this.b-=16},function(){Ad(this,D(this)+1);this.b-=5},function(){this.D=Ld(this,this.D);this.b-=5},function(){this.D=Kd(this,this.D);this.b-=5},function(){this.D=F(this);this.b-=7},function(){var a=0,b=Bd(this);if(Ed(this)||9<(this.g&15))a|=6;if(b||154<=this.g)a|=96,b=1;this.g=Hd(this,a);Cd(this,b?256:0);this.b-=4},Wd,function(){var a;Ad(this,a=D(this)+D(this));Cd(this,a>>8&256);this.b-=10},function(){var a;a=G(this);a=Xb(this.H,a);Ad(this,a);this.b-=16},function(){Ad(this,D(this)-1);this.b-=5},function(){this.F= +Ld(this,this.F);this.b-=5},function(){this.F=Kd(this,this.F);this.b-=5},function(){this.F=F(this);this.b-=7},function(){this.g=~this.g&255;this.b-=4},Wd,function(){this.M=G(this)&65535;this.b-=10},function(){Qd(this,G(this),this.g);this.b-=13},function(){this.M=this.M+1&65535;this.b-=5},function(){var a=D(this);Qd(this,a,Ld(this,E(this,a)));this.b-=10},function(){var a=D(this);Qd(this,a,Kd(this,E(this,a)));this.b-=10},function(){Qd(this,D(this),F(this));this.b-=10},function(){this.I|=256;this.b-= +4},Wd,function(){var a;Ad(this,a=D(this)+this.M);Cd(this,a>>8&256);this.b-=10},function(){this.g=E(this,G(this));this.b-=13},function(){this.M=this.M-1&65535;this.b-=5},function(){this.g=Ld(this,this.g);this.b-=5},function(){this.g=Kd(this,this.g);this.b-=5},function(){this.g=F(this);this.b-=7},function(){Cd(this,Bd(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.w=this.A;this.b-=5},function(){this.w=this.B;this.b-=5},function(){this.w=this.C;this.b-=5},function(){this.w=this.D;this.b-= 5},function(){this.w=this.F;this.b-=5},function(){this.w=E(this,D(this));this.b-=7},function(){this.w=this.g;this.b-=5},function(){this.A=this.w;this.b-=5},function(){this.b-=5},function(){this.A=this.B;this.b-=5},function(){this.A=this.C;this.b-=5},function(){this.A=this.D;this.b-=5},function(){this.A=this.F;this.b-=5},function(){this.A=E(this,D(this));this.b-=7},function(){this.A=this.g;this.b-=5},function(){this.B=this.w;this.b-=5},function(){this.B=this.A;this.b-=5},function(){this.b-=5},function(){this.B= this.C;this.b-=5},function(){this.B=this.D;this.b-=5},function(){this.B=this.F;this.b-=5},function(){this.B=E(this,D(this));this.b-=7},function(){this.B=this.g;this.b-=5},function(){this.C=this.w;this.b-=5},function(){this.C=this.A;this.b-=5},function(){this.C=this.B;this.b-=5},function(){this.b-=5},function(){this.C=this.D;this.b-=5},function(){this.C=this.F;this.b-=5},function(){this.C=E(this,D(this));this.b-=7},function(){this.C=this.g;this.b-=5},function(){this.D=this.w;this.b-=5},function(){this.D= this.A;this.b-=5},function(){this.D=this.B;this.b-=5},function(){this.D=this.C;this.b-=5},function(){this.b-=5},function(){this.D=this.F;this.b-=5},function(){this.D=E(this,D(this));this.b-=7},function(){this.D=this.g;this.b-=5},function(){this.F=this.w;this.b-=5},function(){this.F=this.A;this.b-=5},function(){this.F=this.B;this.b-=5},function(){this.F=this.C;this.b-=5},function(){this.F=this.D;this.b-=5},function(){this.b-=5},function(){this.F=E(this,D(this));this.b-=7},function(){this.F=this.g; -this.b-=5},function(){Pd(this,D(this),this.w);this.b-=7},function(){Pd(this,D(this),this.A);this.b-=7},function(){Pd(this,D(this),this.B);this.b-=7},function(){Pd(this,D(this),this.C);this.b-=7},function(){Pd(this,D(this),this.D);this.b-=7},function(){Pd(this,D(this),this.F);this.b-=7},function(){var a=this.j-1;if(this.Ha.length)for(var b=0;b>8;this.b-=10},function(){var a=G(this);Fd(this)||A(this,a);this.b-=10},function(){this.N&=-513;this.b-=4},function(){var a=G(this);Fd(this)||(H(this,this.j),A(this,a),this.b-=6);this.b-=11},function(){H(this,td(this)&255|this.g<<8);this.b-=11},function(){this.g=Ld(this,F(this));this.b-=7},function(){H(this,this.j);A(this,48);this.b-=11},function(){Fd(this)&& -(A(this,Qd(this)),this.b-=6);this.b-=5},function(){this.M=D(this)&65535;this.b-=5},function(){var a=G(this);Fd(this)&&A(this,a);this.b-=10},function(){this.N|=512;this.b-=4;Rd(this)},function(){var a=G(this);Fd(this)&&(H(this,this.j),A(this,a),this.b-=6);this.b-=11},Yd,function(){Md(this,F(this));this.b-=7},function(){H(this,this.j);A(this,56);this.b-=11}]; -function Zd(a){t.call(this,"ChipSet",a,32768);var b=a.model;b&&!$d[b]&&bb("Unrecognized ChipSet model: "+b);this.g=$d[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);Ab(this)}aa(Zd,t);l=Zd.prototype;l.da=function(){return!1}; -l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.K=d;this.R=a;this.B=Kb(a,"Keyboard");this.C=Kb(a,"SerialPort");this.video=Kb(a,"Video");bc(b,this,this.g.Bb);gc(b,this,this.g.Cb);if(d){var e=this;ae(d,16384,function(){for(var a="",b=0;b>8-this.T&255;y(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.Wd=function(a,b,c){y(this,a,b,c,"SHIFT.COUNT",null,!0);this.T=b};l.Yd=function(a,b,c){y(this,a,b,c,"SOUND1",null,!0);this.Y=b};l.Xd=function(a,b,c){y(this,a,b,c,"SHIFT.DATA",null,!0);this.N=b<<8|this.N>>8}; -l.Zd=function(a,b,c){y(this,a,b,c,"SOUND2",null,!0);this.Z=b};l.$d=function(a,b,c){y(this,a,b,c,"WATCHDOG",null,!0)};function ce(a){var b=0,c=0,d=~a.M;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} -l.Md=function(a,b){var c=this.D,c=c&~J.za.jc;if((Rc(this.u)&64)<<1&&(c|=J.za.jc,c!=this.D)){var d,e;d=this.L&1;e=this.L>>1&7;switch(e){case J.Ba.Ka.nd:break;case J.Ba.Ka.Lc:this.M=this.M<<1|d;break;case J.Ba.Ka.Rc:d=ce(this);this.j[d]=J.Ba.vb;Eb(this,"doNVRCommand(): erase data at addr "+q(d));break;case J.Ba.Ka.Mc:this.b=this.b<<1|d;break;case J.Ba.Ka.rd:d=ce(this);e=this.b&J.Ba.vb;this.j[d]=e;Eb(this,"doNVRCommand(): write data "+q(e)+" to addr "+q(d));break;case J.Ba.Ka.ld:d=ce(this);e=this.j[d]; -null==e&&(e=J.Ba.vb);this.b=e;Eb(this,"doNVRCommand(): read data "+q(e)+" from addr "+q(d));break;case J.Ba.Ka.md:this.b<<=1;this.S=this.b&J.Ba.vb+1;break;default:Eb(this,"doNVRCommand(): unrecognized command "+qa(e))}}c&=~J.za.kc;this.S&&(c|=J.za.kc);c&=~J.za.dc;if(d=this.B){d=this.B;if(e=d.A)e=d.u,e=Rc(d.u)>=d.F+e.Aa*e.U/1E3*1.2731488;e&&(d.A=!1);d=!d.A}d&&(c|=J.za.dc);c&=~J.za.sc;this.C&&this.C.ia&de&&(c|=J.za.sc);this.D=c;y(this,a,null,b,"FLAGS",c);return c}; -l.ae=function(a,b,c){y(this,a,b,c,"BRIGHTNESS");this.W=b};l.de=function(a,b,c){y(this,a,b,c,"NVR.LATCH");this.L=b};l.ce=function(a,b,c){y(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.w=this.w&-4|a;break;case 1:this.w=this.w&-13|a<<2;this.video&&(b=this.video,a=this.w,Eb(b,"updateScrollOffset("+a+")"),b.sa!==a&&((b.sa=a)?md(b,!0):b.xa=!0));break;case 2:switch(a){case 0:this.O=~this.O;break;case 2:case 3:this.X=3-a}break;case 3:this.V=a}}; -l.be=function(a,b,c){y(this,a,b,c,"DC011");b&J.La.kd?(b&=J.La.oc,this.I!=b&&(this.I=b,this.video&&(a=this.video,b=this.I==J.La.oc?50:60,Eb(a,"updateRate("+b+")"),a.jb=b))):(b&=J.La.Wb,this.F!=b&&(this.F=b,this.video&&(a=this.F==J.La.Wb?132:80,b=this.video,Eb(b,"updateDimensions("+a+","+(80>8;this.b-=10},function(){var a=G(this);Gd(this)||A(this,a);this.b-=10},function(){this.N&=-513;this.b-=4},function(){var a=G(this);Gd(this)||(H(this,this.j),A(this,a),this.b-=6);this.b-=11},function(){H(this,ud(this)&255|this.g<<8);this.b-=11},function(){this.g=Md(this,F(this));this.b-=7},function(){H(this,this.j);A(this,48);this.b-=11},function(){Gd(this)&& +(A(this,Rd(this)),this.b-=6);this.b-=5},function(){this.M=D(this)&65535;this.b-=5},function(){var a=G(this);Gd(this)&&A(this,a);this.b-=10},function(){this.N|=512;this.b-=4;Sd(this)},function(){var a=G(this);Gd(this)&&(H(this,this.j),A(this,a),this.b-=6);this.b-=11},Zd,function(){Nd(this,F(this));this.b-=7},function(){H(this,this.j);A(this,56);this.b-=11}]; +function $d(a){t.call(this,"ChipSet",a,32768);var b=a.model;b&&!ae[b]&&cb("Unrecognized ChipSet model: "+b);this.g=ae[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);Bb(this)}aa($d,t);l=$d.prototype;l.da=function(){return!1}; +l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.K=d;this.R=a;this.B=Lb(a,"Keyboard");this.C=Lb(a,"SerialPort");this.video=Lb(a,"Video");cc(b,this,this.g.Bb);hc(b,this,this.g.Cb);if(d){var e=this;be(d,16384,function(){for(var a="",b=0;b>8-this.T&255;x(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.Wd=function(a,b,c){x(this,a,b,c,"SHIFT.COUNT",null,!0);this.T=b};l.Yd=function(a,b,c){x(this,a,b,c,"SOUND1",null,!0);this.Y=b};l.Xd=function(a,b,c){x(this,a,b,c,"SHIFT.DATA",null,!0);this.N=b<<8|this.N>>8}; +l.Zd=function(a,b,c){x(this,a,b,c,"SOUND2",null,!0);this.Z=b};l.$d=function(a,b,c){x(this,a,b,c,"WATCHDOG",null,!0)};function de(a){var b=0,c=0,d=~a.M;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +l.Md=function(a,b){var c=this.D,c=c&~J.za.jc;if((Sc(this.u)&64)<<1&&(c|=J.za.jc,c!=this.D)){var d,e;d=this.L&1;e=this.L>>1&7;switch(e){case J.Ba.Ka.nd:break;case J.Ba.Ka.Lc:this.M=this.M<<1|d;break;case J.Ba.Ka.Rc:d=de(this);this.j[d]=J.Ba.vb;Fb(this,"doNVRCommand(): erase data at addr "+p(d));break;case J.Ba.Ka.Mc:this.b=this.b<<1|d;break;case J.Ba.Ka.rd:d=de(this);e=this.b&J.Ba.vb;this.j[d]=e;Fb(this,"doNVRCommand(): write data "+p(e)+" to addr "+p(d));break;case J.Ba.Ka.ld:d=de(this);e=this.j[d]; +null==e&&(e=J.Ba.vb);this.b=e;Fb(this,"doNVRCommand(): read data "+p(e)+" from addr "+p(d));break;case J.Ba.Ka.md:this.b<<=1;this.S=this.b&J.Ba.vb+1;break;default:Fb(this,"doNVRCommand(): unrecognized command "+ra(e))}}c&=~J.za.kc;this.S&&(c|=J.za.kc);c&=~J.za.dc;if(d=this.B){d=this.B;if(e=d.A)e=d.u,e=Sc(d.u)>=d.F+e.Aa*e.U/1E3*1.2731488;e&&(d.A=!1);d=!d.A}d&&(c|=J.za.dc);c&=~J.za.sc;this.C&&this.C.ia&ee&&(c|=J.za.sc);this.D=c;x(this,a,null,b,"FLAGS",c);return c}; +l.ae=function(a,b,c){x(this,a,b,c,"BRIGHTNESS");this.W=b};l.de=function(a,b,c){x(this,a,b,c,"NVR.LATCH");this.L=b};l.ce=function(a,b,c){x(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.w=this.w&-4|a;break;case 1:this.w=this.w&-13|a<<2;this.video&&(b=this.video,a=this.w,Fb(b,"updateScrollOffset("+a+")"),b.sa!==a&&((b.sa=a)?nd(b,!0):b.xa=!0));break;case 2:switch(a){case 0:this.O=~this.O;break;case 2:case 3:this.X=3-a}break;case 3:this.V=a}}; +l.be=function(a,b,c){x(this,a,b,c,"DC011");b&J.La.kd?(b&=J.La.oc,this.I!=b&&(this.I=b,this.video&&(a=this.video,b=this.I==J.La.oc?50:60,Fb(a,"updateRate("+b+")"),a.jb=b))):(b&=J.La.Wb,this.F!=b&&(this.F=b,this.video&&(a=this.F==J.La.Wb?132:80,b=this.video,Fb(b,"updateDimensions("+a+","+(80>>0,g],v=Da(u,k,a.Ac);0>v&&u.splice(-(v+1),0,k)}p&&(h.a=p.replace(/''/g,'"'))}a.A.push({Nf:b,J:c,Qd:d,ra:e,zc:f})}delete this.ra}return!0};ge.prototype.va=function(){return!0}; -function he(a,b,c,d){if(d)a.aa("Unable to load system ROM (error "+d+": "+b+")");else{hb(a.eb,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.b=f;else if(g)for(a.b=Array(4*g.length),d=c=0;c>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.ra=e.symbols;if(!a.b.length){r("Empty ROM: "+b);return}if(1==a.b.length){r(a.b[0]);return}}catch(h){a.aa("ROM data error: "+h.message);return}else for(b= -c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.g;0>>= -f.g;0=m.ab&&a<=m.wb?d.g&(Re|Se)||(d.g|=Se,Oe(d,20,!0),Te(d)):a>=m.yc&&a<=m.z&&d.g&Se&&(d.g&=~Se,Oe(d,20,!1),Te(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){Ue(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ua&&void 0!==this.b.Ua[b])return this.P[e]=c,c.onclick= -function(a,b){return function(d){d.preventDefault&&d.preventDefault();d=!0;var e=0;17==b?e=Ve:20==b&&(e=Se);if(e){c.style.fontWeight="normal";if(d=!(a.g&e))c.style.fontWeight="bold";We(a,b,d)}Oe(a,b,d,!e);a.R&&a.R.Za()}}(this,this.b.Ua[b]),!0}}return!1};l.Ga=function(a,b,c,d){this.R=a;this.u=c;this.K=d;var e=this;this.L=Wc(this.u,function(){Xe(e)});this.W=Kb(a,"ChipSet");this.C=Kb(a,"SerialPort");bc(b,this,this.b.Bb);gc(b,this,this.b.Cb)}; -l.wa=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){this.j=[];this.g=0;this.b.INIT&&!this.restore(this.b.INIT)&&this.aa("reset error")};l.save=function(){var a=new ud(this);switch(this.b.pa){case K.pa:a.set(0,[this.D,this.B,this.A,this.F,-1])}return a.data()}; -l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.b.pa){case Ye.pa:return!0;case K.pa:return this.D=b[0],Te(this,this.D&K.Ca.ec),this.B=b[1],this.A=b[2],this.F=b[3],this.w=b[4],!0}return!1};function Te(a,b){var c;null!=b?a.I=b:b=a.I;for(var d in a.b.fb)if(c="led-"+d,c=a.P[c]){var e=a.b.fb[d],f=!!(b&e);e&e-1&&(f=!(b&~e));c.style.backgroundColor=f?"#"+n(16711680,6):"#000000"}if(c=a.P["led-caps-lock"])c.style.backgroundColor=a.g&Se?"#"+n(65280,6):"#000000"} -function We(a,b,c,d){var e=0;switch(b){case 16:e=d?Ze:$e;break;case 17:e=d?af:Ve;break;case 18:e=d?bf:cf;break;case 91:e=d?df:ef;break;case 20:e=Se,c=!(a.g&e)}e&&(a.g=c?a.g|e:a.g&~e);return c} -function Qe(a,b,c){var d=!0,e=b.keyCode,e=la[e]||e;c=We(a,e,c,2==b.location);var f;a:if(e=a.b.Tb[e]||e,a.b.Sa[e])f=e;else{for(f in a.b.Ua)if(a.b.Ua[f]===e)break a;f=null}f&&!b.metaKey&&(d=!1,a.g&(ff|gf)&&(13==f?(f=118,d=!0):8==f&&(f=46,d=!0),d&&(a.g=c?a.g|gf:a.g&~gf)),d=Oe(a,f,c),(!(f>=m.ab&&f<=m.wb)||a.g|hf)&&b.preventDefault&&b.preventDefault());return d} -function Pe(a,b,c){var d=!0;if(c){var e=b.keyCode,f=a.b.Sa[e],g;if(g=f){a:{for(var h in a.b.sb)if(a.b.sb[h]==f){f=+h;break a}f=0}g=!f}g&&(d=Oe(a,e,c,!0),b.preventDefault&&b.preventDefault())}return d} -function Oe(a,b,c,d){var e;a:{for(e=0;ee?a.j.push({Pb:b,Mb:Date.now(),yb:d||!1}):(a.j[e].Mb=Date.now(),a.j[e].yb=d||!1),d&&Xe(a);else if(0<=e){if(!a.j[e].yb&&(d=a.j[e].Mb)&&Date.now()-dc||c>e)c=e}else{Oe(a,d,!1);b=0;continue}}b++}0<=c&&Xc(a.u,a.L,c)}l.Nd=function(a,b){var c=this.B;0<=this.w&&(this.w>>0,g],v=Ea(u,k,a.Ac);0>v&&u.splice(-(v+1),0,k)}q&&(h.a=q.replace(/''/g,'"'))}a.A.push({Nf:b,J:c,Qd:d,ra:e,zc:f})}delete this.ra}return!0};he.prototype.va=function(){return!0}; +function ie(a,b,c,d){if(d)a.aa("Unable to load system ROM (error "+d+": "+b+")");else{ib(a.eb,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.b=f;else if(g)for(a.b=Array(4*g.length),d=c=0;c>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.ra=e.symbols;if(!a.b.length){r("Empty ROM: "+b);return}if(1==a.b.length){r(a.b[0]);return}}catch(h){a.aa("ROM data error: "+h.message);return}else for(b= +c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.g;0>>= +f.g;0=m.ab&&a<=m.wb?d.g&(Se|Te)||(d.g|=Te,Pe(d,20,!0),Ue(d)):a>=m.yc&&a<=m.z&&d.g&Te&&(d.g&=~Te,Pe(d,20,!1),Ue(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){Ve(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ua&&void 0!==this.b.Ua[b])return this.P[e]=c,c.onclick= +function(a,b){return function(d){d.preventDefault&&d.preventDefault();d=!0;var e=0;17==b?e=We:20==b&&(e=Te);if(e){c.style.fontWeight="normal";if(d=!(a.g&e))c.style.fontWeight="bold";Xe(a,b,d)}Pe(a,b,d,!e);a.R&&a.R.Za()}}(this,this.b.Ua[b]),!0}}return!1};l.Ga=function(a,b,c,d){this.R=a;this.u=c;this.K=d;var e=this;this.L=Xc(this.u,function(){Ye(e)});this.W=Lb(a,"ChipSet");this.C=Lb(a,"SerialPort");cc(b,this,this.b.Bb);hc(b,this,this.b.Cb)}; +l.wa=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){this.j=[];this.g=0;this.b.INIT&&!this.restore(this.b.INIT)&&this.aa("reset error")};l.save=function(){var a=new vd(this);switch(this.b.pa){case K.pa:a.set(0,[this.D,this.B,this.A,this.F,-1])}return a.data()}; +l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.b.pa){case Ze.pa:return!0;case K.pa:return this.D=b[0],Ue(this,this.D&K.Ca.ec),this.B=b[1],this.A=b[2],this.F=b[3],this.w=b[4],!0}return!1};function Ue(a,b){var c;null!=b?a.I=b:b=a.I;for(var d in a.b.fb)if(c="led-"+d,c=a.P[c]){var e=a.b.fb[d],f=!!(b&e);e&e-1&&(f=!(b&~e));c.style.backgroundColor=f?"#"+n(16711680,6):"#000000"}if(c=a.P["led-caps-lock"])c.style.backgroundColor=a.g&Te?"#"+n(65280,6):"#000000"} +function Xe(a,b,c,d){var e=0;switch(b){case 16:e=d?$e:af;break;case 17:e=d?bf:We;break;case 18:e=d?cf:df;break;case 91:e=d?ef:ff;break;case 20:e=Te,c=!(a.g&e)}e&&(a.g=c?a.g|e:a.g&~e);return c} +function Re(a,b,c){var d=!0,e=b.keyCode,e=la[e]||e;c=Xe(a,e,c,2==b.location);var f;a:if(e=a.b.Tb[e]||e,a.b.Sa[e])f=e;else{for(f in a.b.Ua)if(a.b.Ua[f]===e)break a;f=null}f&&!b.metaKey&&(d=!1,a.g&(gf|hf)&&(13==f?(f=118,d=!0):8==f&&(f=46,d=!0),d&&(a.g=c?a.g|hf:a.g&~hf)),d=Pe(a,f,c),(!(f>=m.ab&&f<=m.wb)||a.g|jf)&&b.preventDefault&&b.preventDefault());return d} +function Qe(a,b,c){var d=!0;if(c){var e=b.keyCode,f=a.b.Sa[e],g;if(g=f){a:{for(var h in a.b.sb)if(a.b.sb[h]==f){f=+h;break a}f=0}g=!f}g&&(d=Pe(a,e,c,!0),b.preventDefault&&b.preventDefault())}return d} +function Pe(a,b,c,d){var e;a:{for(e=0;ee?a.j.push({Pb:b,Mb:Date.now(),yb:d||!1}):(a.j[e].Mb=Date.now(),a.j[e].yb=d||!1),d&&Ye(a);else if(0<=e){if(!a.j[e].yb&&(d=a.j[e].Mb)&&Date.now()-dc||c>e)c=e}else{Pe(a,d,!1);b=0;continue}}b++}0<=c&&Yc(a.u,a.L,c)}l.Nd=function(a,b){var c=this.B;0<=this.w&&(this.w"]]= -229,N[m["<"]]=230,N[m.hc]=231,N[m.Ub]=232,N[m.wc]=233,N[m["?"]]=245,N[m.gc]=246,N[m.tc]=248,N[m.Vb]=249,N[m.wb]=250,N),Tb:{},fb:{},Ua:{"caps-lock":20,ctrl:17,esc:27,tab:9,"num-comma":116,"break":117,"line-feed":118,"no-scroll":119,setup:120},Nc:{qa:130,INIT:127},Ca:{qa:130,bd:1,ad:2,$c:4,Zc:8,cd:16,fc:32,ec:63,od:64,Ce:128,INIT:0},Yc:127};K.fb={l4:K.Ca.bd,l3:K.Ca.ad,l2:K.Ca.$c,l1:K.Ca.Zc,locked:K.Ca.cd,local:K.Ca.fc,online:~K.Ca.fc,"caps-lock":Se};var Ne={SI1978:Ye,VT100:K}; -K.INIT=[[K.Ca.INIT,K.Nc.INIT,!1,0,-1]];K.Bb={130:Me.prototype.Nd};K.Cb={130:Me.prototype.ee};Va(function(){for(var a=rb(document,"pc8080","keyboard"),b=0;b>3)*a.N,!Qb(a.H,a.ka,a.L,3)))return!1;a.L?(a.Va=a.j.createImageData(b,c),a.hb=16/a.na|0,qf(a,a.L>>1)):qf(a,(a.O+1)*a.Z);a.D=document.createElement("canvas");a.D.width=b;a.D.height=c;a.ta=a.D.getContext("2d");a.T={};a.X=1<=a.Da?8:16,f=8>(7>4)*c)}return k}l.wa=function(a,b){return b||!a||this.restore(a)?!0:!1};l.va=function(a){return!a||this.save()};l.save=function(){var a=new ud(this);a.set(0,[]);return a.data()};l.restore=function(){return!0}; +229,N[m["<"]]=230,N[m.hc]=231,N[m.Ub]=232,N[m.wc]=233,N[m["?"]]=245,N[m.gc]=246,N[m.tc]=248,N[m.Vb]=249,N[m.wb]=250,N),Tb:{},fb:{},Ua:{"caps-lock":20,ctrl:17,esc:27,tab:9,"num-comma":116,"break":117,"line-feed":118,"no-scroll":119,setup:120},Nc:{qa:130,INIT:127},Ca:{qa:130,bd:1,ad:2,$c:4,Zc:8,cd:16,fc:32,ec:63,od:64,Ce:128,INIT:0},Yc:127};K.fb={l4:K.Ca.bd,l3:K.Ca.ad,l2:K.Ca.$c,l1:K.Ca.Zc,locked:K.Ca.cd,local:K.Ca.fc,online:~K.Ca.fc,"caps-lock":Te};var Oe={SI1978:Ze,VT100:K}; +K.INIT=[[K.Ca.INIT,K.Nc.INIT,!1,0,-1]];K.Bb={130:Ne.prototype.Nd};K.Cb={130:Ne.prototype.ee};Wa(function(){for(var a=sb(document,"pc8080","keyboard"),b=0;b>3)*a.N,!Rb(a.H,a.ka,a.L,3)))return!1;a.L?(a.Va=a.j.createImageData(b,c),a.hb=16/a.na|0,rf(a,a.L>>1)):rf(a,(a.O+1)*a.Z);a.D=document.createElement("canvas");a.D.width=b;a.D.height=c;a.ta=a.D.getContext("2d");a.T={};a.X=1<=a.Da?8:16,f=8>(7>4)*c)}return k}l.wa=function(a,b){return b||!a||this.restore(a)?!0:!1};l.va=function(a){return!a||this.save()};l.save=function(){var a=new vd(this);a.set(0,[]);return a.data()};l.restore=function(){return!0}; l.Xa=function(){var a=!1;if(this.b){if(this.b.Xa){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.M/this.I;b>c&&(a=Math.round(c/b*100)+"%")}this.Ta?(this.F.style.width=a,this.F.style.width=a,this.F.style.display="block",this.F.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Xa();a=!0}this.V&&this.V.focus()}return a}; -function of(a,b){!b&&a.b&&(a.Ta?a.F.style.width=a.F.style.height="":a.b.style.width=a.b.style.height="");Eb(a,"notifyFullScreen("+b+")")}function qf(a,b){a.gb=b;a.W=!1;if(void 0===a.A||a.A.length!=a.gb)a.A=Array(a.gb)}function Bf(a,b,c,d,e){d=a.g?(b.height-c-1)*b.width+d:c+d*b.width;e&&a.Y==sf&&(208<=c&&236>c?e=a.X+tf:28<=c&&72>c&&(e=a.X+uf));a=a.U[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} -function md(a,b){var c=!0;if(!b){a.oa&&(120==a.oa?a.ib&1?(Sd(a.u,2),c=!1):Sd(a.u,1):Sd(a.u,4));if(c&&a.W&&a.L){for(var d=a.H,e=a.L,f=!0,g=a.ka>>>d.g;0>=1);;){var x=Vb(a.H,u++);if((x&Cf)==Cf){var w=Vb(a.H,u++),d=w&Df,c=(w&Ef)<<8|Vb(a.H,u),c=c+(w&Ff? -Gf:Hf);break}if(p>4)*x.ca,L,ja,ua,na,Ma=x.ga,fc=x.ca;C?(L=B*w.ga,ja=e*w.ca,ua=w.ga,na=w.ca):(L=B*w.Ha,ja=e*w.Ma,ua=w.Ha,na=w.Ma);x.ga>w.ga&&(L*=2,ua*=2);x.ca>w.ca&&(v==Af&&(T+=w.ca),fc=w.ca);C?C.drawImage(x.canvas,za,T,Ma,fc,L,ja,ua,na):(L+=0,ja+=0,w.j.drawImage(x.canvas, -za,T,Ma,fc,L,ja,ua,na))}h++}g++}e++}}a.W=!0;!b&&a.xa&&1==h&&(a.A[k]=-1,h=0);a.xa=!1;(h||b)&&a.ta&&a.j.drawImage(a.D,0,a.sa,a.C,a.N-a.ca,0,0,a.Db,a.td)}else{e=a.ka;f=e+a.L;k=h=g=0;b=a.C;p=0;c=a.N;v=d=0;u=a.na;B=(1<>8|(w&255)<<8);h>C&B,Bf(a,a.Va,h++,k,za),C+=u;h>p&&(p=h);k=d&&(d=k+1)}e+=2;g++;if(h>=a.C&&(h=0,k++,k>a.N))break}a.W=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ia().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= -(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Qa("aspect"));f&&.3<=f&&3.33>=f&&(Ua("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Pa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new lf(d,e,g,f,c);qb(d,c)}}); -function If(a){t.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:r("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.S=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=Jf;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.P[b])&&this.da(null,a,b))}this.A="";this.b=this.Ra=this.I=null;this.exports={connect:this.Fc,receiveData:this.Ob,receiveStatus:this.ne}} -aa(If,t);l=If.prototype;l.da=function(a,b,c,d){var e=this;switch(b){case Jf:return this.P[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==c.length){var d=Aa(c[0]);if(d!=this.cb)return;c=Aa(c[1]);if(this.b=nb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.D);if(this.Ra=e.receiveData){this.D=a;this.I=e.receiveStatus;this.status("Connected "+this.eb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; -l.wa=function(a,b){if(!b)if(this.Fc(this.D),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){Nf(this)};l.save=function(){var a=new ud(this),b=0,c=[];c[b++]=this.F;c[b++]=this.M;c[b++]=this.O;c[b++]=this.ia;c[b++]=this.B;c[b++]=this.C;c[b]=this.L;a.set(0,c);return a.data()};l.restore=function(a){return Nf(this,a[0])}; -function Nf(a,b){var c=0;b||(b=Of);a.F=b[c++];a.M=b[c++];a.O=b[c++];a.ia=b[c++];a.B=b[c++];a.C=b[c++];a.L=b[c];return!0}function Pf(a,b){var c=a.L&b;b&15||(c>>=4);b=Qf[c];c=((a.B&Rf)>>2)+6;a.B&Sf&&c++;c+=((a.B&Tf)>>6)+1>>1;return 1E3/Math.round(b/c)}function Kf(a,b){Eb(a,"receiveByte("+qa(b)+"), status="+qa(a.ia));return a.N||a.ia&Uf?!1:(a.M=b,a.ia|=Uf,Sd(a.u,a.X),!0)} -l.Ob=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCode(a));this.A&&(Kf(this,this.A.charCodeAt(0))&&(this.A=this.A.substr(1)),this.A&&this.u&&Xc(this.u,this.Y,Pf(this,Vf)));return!0};l.ne=function(a){this.ia&=~Wf;a&64&&(this.ia|=Wf)};function Ue(a,b){a.ia=a.ia|de|Xf;b&&a.Ra&&a.Ra.call(a.b,b)}l.Hd=function(a,b){var c=this.M;y(this,a,null,b,"DATA",c);this.ia&=~Uf;return c};l.Gd=function(a,b){var c=this.ia;y(this,a,null,b,"STATUS",c);return c}; -l.Vd=function(a,b,c){y(this,a,b,c,"DATA");this.O=b;this.ia&=~(de|Xf);Eb(this,"transmitByte("+qa(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Ra&&this.Ra.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(b);c=a.length;9==b?(b=this.V||8,c=b-this.w%b,this.V&&(a=ya("",c))):13==b&&(this.w=c=0,a="\n");this.S&&!this.w&&c&&(a=String.fromCharCode(this.S)+a);this.g.value+=a;this.g.scrollTop= -this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.u&&Xc(this.u,this.Z,Pf(this,Yf))};l.Ud=function(a,b,c){y(this,a,b,c,"CONTROL");this.F?(this.I&&(b^this.C)&(Zf|$f)&&(a=0,this.D?(a|=b&Zf?32:0,a|=b&$f?320:0):(a|=b&Zf?16:0,a|=b&$f?1048576:0),this.I.call(this.b,a)),this.C=b,this.C&ag&&(this.F=!1)):(this.B=b,this.F=!0)};l.Td=function(a,b,c){y(this,a,b,c,"BAUDRATES");this.L=b}; -var Rf=12,Sf=16,Tf=192,$f=2,Zf=32,ag=64,de=1,Uf=2,Xf=4,Wf=128,Vf=15,Yf=240,Qf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Of=[!1,0,0,133,142,39,238],Jf="buffer",Lf={0:If.prototype.Hd,1:If.prototype.Gd},Mf={0:If.prototype.Vd,1:If.prototype.Ud,2:If.prototype.Td};Va(function(){for(var a=rb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.L?a="end":a=this.g[this.b+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Aa(a.substring(d,f))),d=f+1}}return b}; -function cg(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function dg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;u=!1}dg(v, -B)&&1==v.length||(p=!0);p?!1===f&&a.i("parse error ("+(h||k)+")"):g=v.pop();a.M=x;return g}function hg(a,b,c){var d;a.oa=null;b&&("{"!=a.W[0]&&(b=b.split(a.W[0]).join("{").split(a.W[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=eg(a,b,0,b.length,a.M,c),void 0!==d&&!1===c&&ig(a,null,d));return d} -function jg(a,b){var c,d=a.W[0],e=a.W[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=hg(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?kg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= -a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function fg(a,b,c,d,e){var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(f=ma(e?"-"+b:b,a.M),e=!1)),null!=f?e&&(f=-f):d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return f} -function ig(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=4,g="";if(!f||4>=1,x--;g=v+g;d>>=8}d=n(c,0,!0)+" "+c+". "+pa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e} -function lg(a,b){if(b)return ig(a,b,a.T[b]);var c=0;for(b in a.T)ig(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} -var gg={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; -function mg(a){bg.call(this,a);this.style=ng;this.F=og();this.ta=og();this.S=og();this.A=[];this.j=this.I=this.w=[];pg(this);this.X=0;qg(this);this.ka={};rg(this,a.messages);this.na=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Oc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Oc(b,a)})}aa(mg,bg);l=mg.prototype; -l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.R=a;(a=Kc(a,"messages"))&&rg(this,a);this.sa=sg;ae(this,64,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=tg(ug(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.H.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;k--;){var u=b[e];u.type==c?p++||d.i("..."):(c=u.type,p=Tb[c],u&&d.i(n(u.id)+" %"+n(e<>>e.g;f!=e.j?e.b[g].Sb(f,b&65535,d):(e.b[g++].qb(f,b&255,d),e.b[g&e.I].qb(0,b>>8&255,d+1));c&&wg(a,c);Pc(this.u,!0)}};function og(a){return{J:a,Fa:!1}}function xg(a){return[a.J,a.Fa]}function Vg(a){return{J:a[0],Fa:a[1]}} -function ug(a,b,c){var d;c=(c?a.F:a.ta).J;if(void 0!==b){d=b=jg(a,b)||b;var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cc&&(c=Fa($g,a.substr(b,1))));return c};function ah(a,b){var c=0;a=a.Lb(b);if(void 0!==a)switch(b){case bh:case ch:case dh:case eh:case fh:case gh:case hh:case ih:c=2;break;case jh:case kh:case lh:case mh:case nh:case oh:case ph:c=4}return c?n(a,c):"??"} -l.Lb=function(a){var b;if(0<=a){var c=this.u;switch(a){case bh:b=c.g;break;case ch:b=c.w;break;case dh:b=c.A;break;case jh:b=vd(c);break;case eh:b=c.B;break;case fh:b=c.C;break;case kh:b=xd(c);break;case gh:b=c.D;break;case hh:b=c.F;break;case lh:b=D(c);break;case ih:b=E(c,D(c));break;case mh:b=c.M;break;case nh:b=c.j;break;case oh:b=td(c);break;case ph:b=td(c)&255|c.g<<8}}return b}; -function qh(a,b){b=jg(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Kb(b,c+1),0<=e&&(b=b.substr(0,c)+ah(a,e)+b.substr(c+1+$g[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ma(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=ug(a,e))?(d=e+' "'+Zg(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=ug(a,e))?(wg(d),d= -e+' "'+Zg(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Yg(og(this.u.j).J));this.ha&1073741824?this.Z.push(a):this.Y&&a==this.Y||(this.Y=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.u&&(a=this.u,Yc(a),a.ta=0,Pc(a)))}; -function Fb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ha&h)!=h||a.message(b.cb+"."+(null!=d?"outPort":"inPort")+"("+q(c)+","+(f?f:"unknown")+(null!=d?","+qa(d):"")+")"+(null!=g?": "+qa(g):"")+(null!=e?" at "+Yg(e):""))} -function qg(a){var b;if(Td(a)){if(!a.D||!a.D.length){a.D=Array(rh);for(b=0;b>>d.g],!1)}a.I=["br"];if(a.w)for(b=1;b>>d.g],!0);a.w=["bw"];a.xa=0}l.Pa=function(a,b,c){var d=!0;c||xh(this,a,b,!1,!0);if(a!=this.j){var e=tg(b);if(-1===e)this.i("invalid address: "+Yg(b.J)),d=!1;else{var f=this.H;f.b[e>>>f.g].Pa(e&f.j,a==this.w)}}d&&(a.push(b),c?b.Fa=!0:(yh(this,a,a.length-1,"set"),qg(this)));return d}; -function xh(a,b,c,d,e){var f=!1;c=tg(c);for(var g=1;g>>d.g],b==a.w));h.Fa||qg(a);break}}return f}function zh(a,b){for(var c=1;c>24,4);break;case Mh:C=n(x.Gb(C,2),4);break;default:x="imm("+q(w)+")";break a}x.style==Ch&&w&Nh?C="["+C+"]":w&Oh||(C=(x.style==ng?"$":"0x")+C);x=C}else w&Oh?(x=(v&Ph)>>8, -w=$g[x],a.style==Ch&&v&Nh&&(x==ih&&(w="HL"),w="["+w+"]"),x=w):w&Qh&&(x=(f>>3&7).toString());if(!x||!x.length){h="INVALID";break}0b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Qd;if(e>=g&&ec?e=a.X+uf:28<=c&&72>c&&(e=a.X+vf));a=a.U[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function nd(a,b){var c=!0;if(!b){a.oa&&(120==a.oa?a.ib&1?(Td(a.u,2),c=!1):Td(a.u,1):Td(a.u,4));if(c&&a.W&&a.L){for(var d=a.H,e=a.L,f=!0,g=a.ka>>>d.g;0>=1);;){var y=Wb(a.H,u++);if((y&Df)==Df){var w=Wb(a.H,u++),d=w&Ef,c=(w&Ff)<<8|Wb(a.H,u),c=c+(w&Gf? +Hf:If);break}if(q>4)*y.ca,L,ja,ua,na,Ma=y.ga,fc=y.ca;C?(L=B*w.ga,ja=e*w.ca,ua=w.ga,na=w.ca):(L=B*w.Ha,ja=e*w.Ma,ua=w.Ha,na=w.Ma);y.ga>w.ga&&(L*=2,ua*=2);y.ca>w.ca&&(v==Bf&&(T+=w.ca),fc=w.ca);C?C.drawImage(y.canvas,za,T,Ma,fc,L,ja,ua,na):(L+=0,ja+=0,w.j.drawImage(y.canvas, +za,T,Ma,fc,L,ja,ua,na))}h++}g++}e++}}a.W=!0;!b&&a.xa&&1==h&&(a.A[k]=-1,h=0);a.xa=!1;(h||b)&&a.ta&&a.j.drawImage(a.D,0,a.sa,a.C,a.N-a.ca,0,0,a.Db,a.td)}else{e=a.ka;f=e+a.L;k=h=g=0;b=a.C;q=0;c=a.N;v=d=0;u=a.na;B=(1<>8|(w&255)<<8);h>C&B,Cf(a,a.Va,h++,k,za),C+=u;h>q&&(q=h);k=d&&(d=k+1)}e+=2;g++;if(h>=a.C&&(h=0,k++,k>a.N))break}a.W=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ja().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Ra("aspect"));f&&.3<=f&&3.33>=f&&(Va("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Qa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new mf(d,e,g,f,c);rb(d,c)}}); +function Jf(a){t.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:r("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.S=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=Kf;b&&(void 0===c&&(c="Panel"),(c=pb(c,this.id))&&(b=c.P[b])&&this.da(null,a,b))}this.A="";this.b=this.Ra=this.I=null;this.exports={connect:this.Fc,receiveData:this.Ob,receiveStatus:this.ne}} +aa(Jf,t);l=Jf.prototype;l.da=function(a,b,c,d){var e=this;switch(b){case Kf:return this.P[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==c.length){var d=Ca(c[0]);if(d!=this.cb)return;c=Ca(c[1]);if(this.b=ob(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.D);if(this.Ra=e.receiveData){this.D=a;this.I=e.receiveStatus;this.status("Connected "+this.eb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; +l.wa=function(a,b){if(!b)if(this.Fc(this.D),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){Of(this)};l.save=function(){var a=new vd(this),b=0,c=[];c[b++]=this.F;c[b++]=this.M;c[b++]=this.O;c[b++]=this.ia;c[b++]=this.B;c[b++]=this.C;c[b]=this.L;a.set(0,c);return a.data()};l.restore=function(a){return Of(this,a[0])}; +function Of(a,b){var c=0;b||(b=Pf);a.F=b[c++];a.M=b[c++];a.O=b[c++];a.ia=b[c++];a.B=b[c++];a.C=b[c++];a.L=b[c];return!0}function Qf(a,b){var c=a.L&b;b&15||(c>>=4);b=Rf[c];c=((a.B&Sf)>>2)+6;a.B&Tf&&c++;c+=((a.B&Uf)>>6)+1>>1;return 1E3/Math.round(b/c)}function Lf(a,b){Fb(a,"receiveByte("+ra(b)+"), status="+ra(a.ia));return a.N||a.ia&Vf?!1:(a.M=b,a.ia|=Vf,Td(a.u,a.X),!0)} +l.Ob=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCode(a));this.A&&(Lf(this,this.A.charCodeAt(0))&&(this.A=this.A.substr(1)),this.A&&this.u&&Yc(this.u,this.Y,Qf(this,Wf)));return!0};l.ne=function(a){this.ia&=~Xf;a&64&&(this.ia|=Xf)};function Ve(a,b){a.ia=a.ia|ee|Yf;b&&a.Ra&&a.Ra.call(a.b,b)}l.Hd=function(a,b){var c=this.M;x(this,a,null,b,"DATA",c);this.ia&=~Vf;return c};l.Gd=function(a,b){var c=this.ia;x(this,a,null,b,"STATUS",c);return c}; +l.Vd=function(a,b,c){x(this,a,b,c,"DATA");this.O=b;this.ia&=~(ee|Yf);Fb(this,"transmitByte("+ra(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Ra&&this.Ra.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(b);c=a.length;9==b?(b=this.V||8,c=b-this.w%b,this.V&&(a=Aa("",c))):13==b&&(this.w=c=0,a="\n");this.S&&!this.w&&c&&(a=String.fromCharCode(this.S)+a);this.g.value+=a;this.g.scrollTop= +this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.u&&Yc(this.u,this.Z,Qf(this,Zf))};l.Ud=function(a,b,c){x(this,a,b,c,"CONTROL");this.F?(this.I&&(b^this.C)&($f|ag)&&(a=0,this.D?(a|=b&$f?32:0,a|=b&ag?320:0):(a|=b&$f?16:0,a|=b&ag?1048576:0),this.I.call(this.b,a)),this.C=b,this.C&bg&&(this.F=!1)):(this.B=b,this.F=!0)};l.Td=function(a,b,c){x(this,a,b,c,"BAUDRATES");this.L=b}; +var Sf=12,Tf=16,Uf=192,ag=2,$f=32,bg=64,ee=1,Vf=2,Yf=4,Xf=128,Wf=15,Zf=240,Rf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Pf=[!1,0,0,133,142,39,238],Kf="buffer",Mf={0:Jf.prototype.Hd,1:Jf.prototype.Gd},Nf={0:Jf.prototype.Vd,1:Jf.prototype.Ud,2:Jf.prototype.Td};Wa(function(){for(var a=sb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.M?a="end":a=this.g[this.b+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; +function dg(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} +function eg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;u=!1}eg(v, +B)&&1==v.length||(q=!0);q?!1===f&&a.i("parse error ("+(h||k)+")"):g=v.pop();a.L=y;return g}function ig(a,b,c){var d;a.oa=null;b&&("{"!=a.W[0]&&(b=b.split(a.W[0]).join("{").split(a.W[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=fg(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&jg(a,null,d));return d} +function kg(a,b){var c,d=a.W[0],e=a.W[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=ig(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?lg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= +a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function gg(a,b,c,d,e){var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(f=ma(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return f} +function jg(a,b,c){var d,e=!1;if(void 0!==c){e=!0;if(8==a.L)d=c+". "+qa(c,0,!0);else{d=c;var f=4,g="";if(!f||4>=8;d=n(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function mg(a,b){if(b)return jg(a,b,a.T[b]);var c=0;for(b in a.T)jg(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var hg={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function ng(a){cg.call(this,a);this.style=og;this.F=pg();this.ta=pg();this.S=pg();this.A=[];this.j=this.I=this.w=[];qg(this);this.X=0;rg(this);this.ka={};sg(this,a.messages);this.na=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Pc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Pc(b,a)})}aa(ng,cg);l=ng.prototype; +l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.R=a;(a=Lc(a,"messages"))&&sg(this,a);this.sa=tg;be(this,64,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=ug(vg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.H.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,q=0;k--;){var u=b[e];u.type==c?q++||d.i("..."):(c=u.type,q=Ub[c],u&&d.i(n(u.id)+" %"+n(e<>>e.g;f!=e.j?e.b[g].Sb(f,b&65535,d):(e.b[g++].qb(f,b&255,d),e.b[g&e.I].qb(0,b>>8&255,d+1));c&&xg(a,c);Qc(this.u,!0)}};function pg(a){return{J:a,Fa:!1}}function yg(a){return[a.J,a.Fa]}function Wg(a){return{J:a[0],Fa:a[1]}} +function vg(a,b,c){var d;c=(c?a.F:a.ta).J;if(void 0!==b){d=b=kg(a,b)||b;var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cc&&(c=Ga(ah,a.substr(b,1))));return c};function bh(a,b){var c=0;a=a.Lb(b);if(void 0!==a)switch(b){case ch:case dh:case eh:case fh:case gh:case hh:case ih:case jh:c=2;break;case kh:case lh:case mh:case nh:case oh:case ph:case qh:c=4}return c?n(a,c):"??"} +l.Lb=function(a){var b;if(0<=a){var c=this.u;switch(a){case ch:b=c.g;break;case dh:b=c.w;break;case eh:b=c.A;break;case kh:b=wd(c);break;case fh:b=c.B;break;case gh:b=c.C;break;case lh:b=yd(c);break;case hh:b=c.D;break;case ih:b=c.F;break;case mh:b=D(c);break;case jh:b=E(c,D(c));break;case nh:b=c.M;break;case oh:b=c.j;break;case ph:b=ud(c);break;case qh:b=ud(c)&255|c.g<<8}}return b}; +function rh(a,b){b=kg(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Kb(b,c+1),0<=e&&(b=b.substr(0,c)+bh(a,e)+b.substr(c+1+ah[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ma(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=vg(a,e))?(d=e+' "'+$g(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=vg(a,e))?(xg(d),d= +e+' "'+$g(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Zg(pg(this.u.j).J));this.ha&1073741824?this.Z.push(a):this.Y&&a==this.Y||(this.Y=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.u&&(a=this.u,Zc(a),a.ta=0,Qc(a)))}; +function Gb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ha&h)!=h||a.message(b.cb+"."+(null!=d?"outPort":"inPort")+"("+p(c)+","+(f?f:"unknown")+(null!=d?","+ra(d):"")+")"+(null!=g?": "+ra(g):"")+(null!=e?" at "+Zg(e):""))} +function rg(a){var b;if(Ud(a)){if(!a.D||!a.D.length){a.D=Array(sh);for(b=0;b>>d.g],!1)}a.I=["br"];if(a.w)for(b=1;b>>d.g],!0);a.w=["bw"];a.xa=0}l.Pa=function(a,b,c){var d=!0;c||yh(this,a,b,!1,!0);if(a!=this.j){var e=ug(b);if(-1===e)this.i("invalid address: "+Zg(b.J)),d=!1;else{var f=this.H;f.b[e>>>f.g].Pa(e&f.j,a==this.w)}}d&&(a.push(b),c?b.Fa=!0:(zh(this,a,a.length-1,"set"),rg(this)));return d}; +function yh(a,b,c,d,e){var f=!1;c=ug(c);for(var g=1;g>>d.g],b==a.w));h.Fa||rg(a);break}}return f}function Ah(a,b){for(var c=1;c>24,4);break;case Nh:C=n(y.Gb(C,2),4);break;default:y="imm("+p(w)+")";break a}y.style==Dh&&w&Oh?C="["+C+"]":w&Ph||(C=(y.style==og?"$":"0x")+C);y=C}else w&Ph?(y=(v&Qh)>>8, +w=ah[y],a.style==Dh&&v&Oh&&(y==jh&&(w="HL"),w="["+w+"]"),y=w):w&Rh&&(y=(f>>3&7).toString());if(!y||!y.length){h="INVALID";break}0b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Qd;if(e>=g&&e>8&255;case "C":d.A=f&255;break;case "D":d.B=f&255;break; -case "DE":d.B=f>>8&255;case "E":d.C=f&255;break;case "H":d.D=f&255;break;case "HL":d.D=f>>8&255;case "L":d.F=f&255;break;case "SP":d.M=f&65535;break;case "PC":A(d,f);a.F=og(d.j);break;case "PS":rd(d,f);break;case "PSW":rd(d,f&255|d.N&-256);d.g=f>>8;break;case "CF":d.I=f?d.I|256:d.I&255;break;case "PF":f?Cd(d)||(d.L^=1):Cd(d)&&(d.L^=1);break;case "AF":d.O=f?~d.L&16|d.O&-17:d.L&16|d.O&-17;break;case "ZF":d.I=f?d.I&-256:d.I|255;break;case "SF":f?Fd(d)||(d.L^=192):Fd(d)&&(d.L^=192);break;case "IF":d.N= -f?d.N|512:d.N&-513;break;default:a.i("unknown register: "+e);return}Pc(d);a.i("updated registers:")}a.i(Uh(a));c&&(a.F=og(d.j),vh(a,Yg(a.F.J)))}}function ai(a,b){b=Aa(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.i(qh(a,c[2])):hg(a,b,!1)}function bi(a,b,c){var d="t"!=b;c=fg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Sa(c,function(){return Cb(a,!0)&&vg(a,e,d,!1)},function(){Pc(a.u);Cb(a,!1)})} -function vh(a,b,c,d){if(b=ug(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=ug(a,c,!0);if(!d||d.Jh[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.i(p)}h[3]&&(g=h[3],f=null);f=Bh(a,b,g,f);a.i(f);a.F=b;e-=b.J-k;c++}}} -l.Ab=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.L?a="end":a=this.g[this.b+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Aa(a.substring(d,f))),d=f+1}}return b}; -function Ah(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.L&&(a.i("ended assemble at "+Yg(a.S.J)),a.F=a.S,a.L=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Y=null;if(zb(a)&&0p||"z"Za.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var se=[];"call"==Cg&&(kc=1E5,se=["CALL"]);for(void 0!==Bg&&a.i(Ba+ -" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Eg++;kc--}}Eg||(a.i("no "+Dg+"history available"),a.ya=void 0)}else{var $c=ug(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=fg(a,Ma)>>>0,65536>4||1;Hi--&&0< -cd;){var dd=0,te=0,nc,ue="",Hg="",na=Yg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+ue+(nc?"":" "+Hg)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Ig=255,Jg=a.Ia,Kg=a.Xb;"ew"==f[0]&&(fd=2,Ig=65535,Jg=a.Gb,Kg=a.Qc);var Lg=fd<<1,Mg=f[1];if(null==Mg)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), -a.i("\tew [a] [...] edit words at address a");else{var gd=ug(a,Mg);if(gd)for(var hd=2;hdBe;){for(var ub=null,Ni=256;65536>qc.J>>>0;){Og.J=a.Gb(qc,2);if(null==qc.J||!Ni--)break;for(var Oi=a,jd=Og, -Pg=null,rc=jd.J,Qg=rc,Ce=1;6>=Ce&&rc;Ce++){if(2>8&255;case "C":d.A=f&255;break;case "D":d.B=f&255;break; +case "DE":d.B=f>>8&255;case "E":d.C=f&255;break;case "H":d.D=f&255;break;case "HL":d.D=f>>8&255;case "L":d.F=f&255;break;case "SP":d.M=f&65535;break;case "PC":A(d,f);a.F=pg(d.j);break;case "PS":sd(d,f);break;case "PSW":sd(d,f&255|d.N&-256);d.g=f>>8;break;case "CF":d.I=f?d.I|256:d.I&255;break;case "PF":f?Dd(d)||(d.L^=1):Dd(d)&&(d.L^=1);break;case "AF":d.O=f?~d.L&16|d.O&-17:d.L&16|d.O&-17;break;case "ZF":d.I=f?d.I&-256:d.I|255;break;case "SF":f?Gd(d)||(d.L^=192):Gd(d)&&(d.L^=192);break;case "IF":d.N= +f?d.N|512:d.N&-513;break;default:a.i("unknown register: "+e);return}Qc(d);a.i("updated registers:")}a.i(Vh(a));c&&(a.F=pg(d.j),wh(a,Zg(a.F.J)))}}function bi(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.i(rh(a,c[2])):ig(a,b,!1)}function ci(a,b,c){var d="t"!=b;c=gg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ta(c,function(){return Db(a,!0)&&wg(a,e,d,!1)},function(){Qc(a.u);Db(a,!1)})} +function wh(a,b,c,d){if(b=vg(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=vg(a,c,!0);if(!d||d.Jh[0].indexOf("+"))){var q=h[0]+":";h[2]&&(q+=" "+h[2]);a.i(q)}h[3]&&(g=h[3],f=null);f=Ch(a,b,g,f);a.i(f);a.F=b;e-=b.J-k;c++}}} +l.Ab=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.M?a="end":a=this.g[this.b+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; +function Bh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.M&&(a.i("ended assemble at "+Zg(a.S.J)),a.F=a.S,a.M=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Y=null;if(Ab(a)&&0q||"z"Za.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var te=[];"call"==Dg&&(kc=1E5,te=["CALL"]);for(void 0!==Cg&&a.i(Ba+ +" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Fg++;kc--}}Fg||(a.i("no "+Eg+"history available"),a.ya=void 0)}else{var $c=vg(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=gg(a,Ma)>>>0,65536>4||1;Ii--&&0< +cd;){var dd=0,ue=0,nc,ve="",Ig="",na=Zg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+ve+(nc?"":" "+Ig)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Jg=255,Kg=a.Ia,Lg=a.Xb;"ew"==f[0]&&(fd=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=fd<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), +a.i("\tew [a] [...] edit words at address a");else{var gd=vg(a,Ng);if(gd)for(var hd=2;hdCe;){for(var ub=null,Oi=256;65536>qc.J>>>0;){Pg.J=a.Gb(qc,2);if(null==qc.J||!Oi--)break;for(var Pi=a,jd=Pg, +Qg=null,rc=jd.J,Rg=rc,De=1;6>=De&&rc;De++){if(2\nLicense: GPL version 3 or later ");for(b=0;bli){if(ni(d,this.F)){this.w=new ud(this,"1.34.2",wi);ni(this.w)&&(xi(this,d),a=yi,zi(this.w));this.w.set(ti,Ea());Ai(this.w);var e=this.b&&!this.C;if(a==ui||kb("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=si(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ni(d,g):("error"==f&&"no machine state"!= -g?(this.aa("Error: "+g),"unable to verify user"==g&&(Oa(Bi,""),this.g=null)):this.i(f+": "+g),zi(d),ni(d)?(c=si(d),e=!0):c=!1))}e&&qi(this,c?d:null)}else a==yi&&d.clear()}else qi(this);delete this.F;delete this.I}e=lb(this.id);for(f=0;fa[1];a=a[2];this.W=!0;this.G.ja=!0;var d=this.P.power;d&&(d.textContent="Shutdown");this.u&&(Ci(this,this.u,b,c,a),this.u.lb());this.N&&(xi(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.j=0}; -function xi(a,b){if(kb("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PC8080",ver:"1.34.2"};d.url=a.U;d.user=c;d.type="bug";d.data=b;Ga("http://www.pcjs.org/api/v1/report",d,!0)}} -function ci(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new ud(a,"1.34.2"),g=new ud(a,"1.34.2",ri),h=Ea();g.set(ti,h);f.set(ti,h);f.set(Di,"1.34.2");f.set(Ei,window?window.location.href:null);f.set(Fi,Ia());a.u&&a.u.va&&(c&&a.u.ea(),d=a.u.va(b,c),"object"===typeof d&&f.set(a.u.id,d),c&&(a.u.G.ja=!1,!1===d&&(e=null)));for(var h=lb(a.id),k=0;kf.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>)/,"$1PC8080$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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(u){f=null,a=u.message}else a="unrecognized XML: "+(255\nLicense: GPL version 3 or later ");for(b=0;bmi){if(oi(d,this.F)){this.w=new vd(this,"1.34.2",xi);oi(this.w)&&(yi(this,d),a=zi,Ai(this.w));this.w.set(ui,Fa());Bi(this.w);var e=this.b&&!this.C;if(a==vi||lb("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=ti(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?oi(d,g):("error"==f&&"no machine state"!= +g?(this.aa("Error: "+g),"unable to verify user"==g&&(Pa(Ci,""),this.g=null)):this.i(f+": "+g),Ai(d),oi(d)?(c=ti(d),e=!0):c=!1))}e&&ri(this,c?d:null)}else a==zi&&d.clear()}else ri(this);delete this.F;delete this.I}e=nb(this.id);for(f=0;fa[1];a=a[2];this.W=!0;this.G.ja=!0;var d=this.P.power;d&&(d.textContent="Shutdown");this.u&&(Di(this,this.u,b,c,a),this.u.lb());this.N&&(yi(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.j=0}; +function yi(a,b){if(lb("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PC8080",ver:"1.34.2"};d.url=a.U;d.user=c;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} +function di(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new vd(a,"1.34.2"),g=new vd(a,"1.34.2",si),h=Fa();g.set(ui,h);f.set(ui,h);f.set(Ei,"1.34.2");f.set(Fi,window?window.location.href:null);f.set(Gi,Ja());a.u&&a.u.va&&(c&&a.u.ea(),d=a.u.va(b,c),"object"===typeof d&&f.set(a.u.id,d),c&&(a.u.G.ja=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;kf.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>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ga(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],p,u=/( [a-z]+=)(['"])(.*?)\2/g;p=u.exec(f);)k=0>k.indexOf(p[1])?k.replace(">",p[0]+">"):k.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[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);$i(a,b,c)}})}else c(a,null)} -function aj(a,b,c,d){function e(a){if(void 0===h){var b=g&&rb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);k&&(--Xi||cb(!0));k=!1}var g,h,k=!0;Xi++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var u=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));u.appendChild(v)}c|| -(c="/versions/pc8080/1.34.2/components.xsl");p=function(d,h){h?Yi(c,null,null,!1,e,function(d,k){k?(hb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Xi||cb(!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),--Xi||cb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Yi(b,a,d,!0,e,p):Zi(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(B){f(B.message)}return k}window.embedPC8080=function(a,b,c,d){cb(!1);return aj(a,b,c,d)};window.findMachineComponent=function(a,b){return ob(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!tb[a]){for(var c=!0,d=tb,e=a,f=b.length,g=[],h=[],k="",p=null,u=0;u/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],q,u=/( [a-z]+=)(['"])(.*?)\2/g;q=u.exec(f);)k=0>k.indexOf(q[1])?k.replace(">",q[0]+">"):k.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[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);aj(a,b,c)}})}else c(a,null)} +function bj(a,b,c,d){function e(a){if(void 0===h){var b=g&&sb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=xa(a))}function f(a){e("Error: "+a);k&&(--Yi||db(!0));k=!1}var g,h,k=!0;Yi++;jb[a]={};try{if(g=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=q:v.appendChild(document.createTextNode(q));u.appendChild(v)}c|| +(c="/versions/pc8080/1.34.2/components.xsl");q=function(d,h){h?Zi(c,null,null,!1,e,function(d,k){k?(ib(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Yi||db(!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),--Yi||db(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Zi(b,a,d,!0,e,q):$i(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(B){f(B.message)}return k}window.embedPC8080=function(a,b,c,d){db(!1);return bj(a,b,c,d)};window.findMachineComponent=function(a,b){return pb(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",q=null,u=0;u>>0)+b;b>a.Pg&&(8088>=a.ca||a.Z.Ka==a.Z.wa?b=a.Z.ua+(b-a.Pg&a.R):y.call(a,13,0));return b|0}function bg(a){a.da=a.Bd}function z(a){return a.Hc&~a.Y.wa|a.Aa-a.Y.ua}function he(a,b){a.Hc=b;a.Aa=a.Y.ua+(b&a.Y.wa)|0}function cg(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&dg(a),g&2&&eg(a),g&4&&fg(a),g&8&&gg(a),g&16&&hg(a),g&32&&ig(a))}f?(a.ze=d,a.ye=b):(a.ze=b,a.ye=d);a.hf=c;a.Ae=d;a.resultType=e} function jg(a,b,c,d,e){a.resultType=c|26;a.Ae=b;d?kg(a):lg(a);e?mg(a):ng(a);return b}function og(a,b,c,d){c&d?kg(a):lg(a);(b^c)&d?mg(a):ng(a)}function pg(a){return dg(a)?1:0}function dg(a){a.resultType&1&&(a.O&=-2,(a.ze^(a.ze^a.hf)&(a.hf^a.ye))&a.resultType&-2147450752&&(a.O|=1),a.resultType&=-2);return a.O&1}function eg(a){a.resultType&2&&(a.O&=-5,38505>>((a.Ae^a.Ae>>4)&15)&1&&(a.O|=4),a.resultType&=-3);return a.O&4} function fg(a){a.resultType&4&&(a.O&=-17,(a.ye^a.ze^a.hf)&16&&(a.O|=16),a.resultType&=-5);return a.O&16}function gg(a){a.resultType&8&&(a.O&=-65,a.Ae&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.O|=64),a.resultType&=-9);return a.O&64}function hg(a){a.resultType&16&&(a.O&=-129,a.Ae&a.resultType&-2147450752&&(a.O|=128),a.resultType&=-17);return a.O&128} -function ig(a){a.resultType&32&&(a.O&=-2049,(a.ze^a.ye)&(a.hf^a.ye)&a.resultType&-2147450752&&(a.O|=2048),a.resultType&=-33);return a.O&2048}function lg(a){a.resultType&=-2;a.O&=-2}function qg(a){a.resultType&=-5;a.O&=-17}function rg(a){a.resultType&=-9;a.O&=-65}function ng(a){a.resultType&=-33;a.O&=-2049}function kg(a){a.resultType&=-2;a.O|=1}function ug(a){a.resultType&=-5;a.O|=16}function vg(a){a.resultType&=-9;a.O|=64}function mg(a){a.resultType&=-33;a.O|=2048} +function ig(a){a.resultType&32&&(a.O&=-2049,(a.ze^a.ye)&(a.hf^a.ye)&a.resultType&-2147450752&&(a.O|=2048),a.resultType&=-33);return a.O&2048}function lg(a){a.resultType&=-2;a.O&=-2}function qg(a){a.resultType&=-5;a.O&=-17}function rg(a){a.resultType&=-9;a.O&=-65}function ng(a){a.resultType&=-33;a.O&=-2049}function kg(a){a.resultType&=-2;a.O|=1}function sg(a){a.resultType&=-5;a.O|=16}function vg(a){a.resultType&=-9;a.O|=64}function mg(a){a.resultType&=-33;a.O|=2048} function re(a){return a.O&-2262|dg(a)|eg(a)|fg(a)|gg(a)|hg(a)|ig(a)}function wg(a,b){b|=a.qa&1|65520;a.qa=a.qa&-65536|b&65535;a.qa&1&&je(a,!0)}function se(a,b,c){a.qa&1||(b&=~a.si);void 0===c&&(c=a.Ma);c?b=b&-12289|a.O&12288:a.lc=(b&12288)>>12;c>a.lc&&(b=b&-513|a.O&512);a.resultType=128;a.O=a.O&~(a.Qd|2261)|b&(a.Qd|2261)|a.Ri;a.O&256&&(a.Xa|=2,a.N|=4)} function xg(a,b,c,d){var e=0;if(a.qa&1&&(a.Ma>a.lc||a.O&131072)&&a.la.Si)for(var f=a.la.Si+(b>>>3),e=(1<>>=8,f++;return e?(t(a,256)&&Mb(a,"checkIOPM("+ta(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),y.call(a,13,0),!1):!0} l.Cb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.na[b]=c;this.tj++;a=!0;break;default:a=xd.prototype.Cb.call(this,a,b,c)}return a}; @@ -191,7 +191,7 @@ function Ig(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ca)2this.ca?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Xa&1&&this.O&512){var f=Kg(this.V);if(-1<=f&&(this.Xa&=-2,0<=f)){this.Xa&=-5; Lg.call(this,f);d=!0;break a}}break;case 1:if(this.Xa&2){this.Xa&=-3;80386<=this.ca&&(this.Qb[6]|=16384);Lg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.P("interrupt dispatched");this.N=0;break}if(this.Xa&4){this.N=this.A=0;break}}if(b){if(Mg(this.ba,this.da,c)){this.Jb();break}c=1}this.N=0;this.va[this.ra()].call(this)}while(0>11;ch(this);dh(this,a[b++]);for(c=0;c=eh&&fh(a,gh))}function ch(a){a.fa&=-129;a.fa&~a.Zb&63&&(a.fa|=128);if(a.fa&128&&!(a.Zb&128))return a=a.V,a.ca>=eh?hh(a,gh):a.da&ih||Lg.call(a.H,2),!0;a=a.V;a.ca>=eh&&fh(a,gh);return!1}function jh(a,b){80387<=a.ca||(b&=-65);a.fa|=b;return ch(a)} function ah(a){return a.fa|a.B<<11}function kh(a,b){return isFinite(b)?!0:!jh(a,Infinity===b?8:16)}function lh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,kh(a,d)||(d=null));return d}function mh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,kh(a,d)||(d=null));return d}function nh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,kh(a,d)||(d=null));return d}function oh(a,b,c){var d=null;null==b||null==c||!c&&jh(a,2)||(d=b/c,kh(a,d)||(d=null));return d} @@ -216,7 +216,7 @@ mh(this,zh(this),M(this,0)))},6:function(){N(this,0,oh(this,M(this,0),zh(this))) this.A,oh(this,M(this,this.A),M(this,0)))}},221:{0:function(){Gh(this,zh(this))},2:function(){th(this)&&this.da()},3:function(){th(this)&&(this.da(),Fh(this))},4:Sh,6:Th,7:Yh,48:Oh,49:ai,50:function(){N(this,this.A,M(this,0))},51:Vh},222:{0:function(){N(this,0,lh(this,M(this,0),wh(this)))},1:function(){N(this,0,nh(this,M(this,0),wh(this)))},2:function(){ph(this,M(this,0),wh(this))},3:function(){ph(this,M(this,0),wh(this))&&Fh(this)},4:function(){N(this,0,mh(this,M(this,0),wh(this)))},5:function(){N(this, 0,mh(this,wh(this),M(this,0)))},6:function(){N(this,0,oh(this,M(this,0),wh(this)))},7:function(){N(this,0,oh(this,wh(this),M(this,0)))},48:function(){N(this,this.A,lh(this,M(this,this.A),M(this,0)))&&Fh(this)},49:function(){N(this,this.A,nh(this,M(this,this.A),M(this,0)))&&Fh(this)},50:Mh,51:function(){ph(this,M(this,0),M(this,1))&&null!=Fh(this)&&Fh(this)},52:function(){N(this,this.A,mh(this,M(this,0),M(this,this.A)))&&Fh(this)},53:function(){N(this,this.A,mh(this,M(this,this.A),M(this,0)))&&Fh(this)}, 54:function(){N(this,this.A,oh(this,M(this,0),M(this,this.A)))&&Fh(this)},55:function(){N(this,this.A,oh(this,M(this,this.A),M(this,0)))&&Fh(this)}},223:{0:function(){Gh(this,wh(this))},2:function(){null!=qh(this,M(this,0),32768)&&this.H.fb(this.H.C,this.G[0])},3:function(){null!=qh(this,M(this,0),32768)&&(this.H.fb(this.H.C,this.G[0]),Fh(this))},4:function(){var a=Ah(this),b=Dh(a[0],8)+1E8*Dh(a[1],8)+1E16*Dh(a[2],2);a[2]&32768&&(b=-b);Gh(this,b)},5:function(){var a;a=this.H.ia(this.H.C);a=4294967296* -this.H.ia(this.H.C+4)+(a>>>0);Gh(this,a)},6:function(){var a=qh(this,Fh(this));null!=a&&(this.D[0]=Eh(a,8),this.D[1]=Eh(a/1E8,8),this.D[2]=Eh(a/1E16,2),0>a&&(this.D[2]|=32768),Bh(this))},7:function(){null!=qh(this,M(this,0),gi)&&(this.bl(),Fh(this))},48:function(){Oh.call(this);Fh(this)},49:ai,50:Wh,51:Wh,52:Zh}},ii=[Jh,Ph,Qh,Rh,Sh,Th,Xh,Uh,Yh,Zh];ab(function(){for(var a=Ab(document,"pcx86","fpu"),b=0;b>>0);Gh(this,a)},6:function(){var a=qh(this,Fh(this));null!=a&&(this.D[0]=Eh(a,8),this.D[1]=Eh(a/1E8,8),this.D[2]=Eh(a/1E16,2),0>a&&(this.D[2]|=32768),Bh(this))},7:function(){null!=qh(this,M(this,0),gi)&&(this.bl(),Fh(this))},48:function(){Oh.call(this);Fh(this)},49:ai,50:Wh,51:Wh,52:Zh}},ii=[Jh,Ph,Qh,Rh,Sh,Th,Xh,Uh,Yh,Zh];ab(function(){for(var a=Ab(document,"pcx86","fpu"),b=0;b>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ij;(bd)&&y.call(this,5);this.N|=2;return a}function ri(a,b){var c=0;if(b){rg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else vg(this);this.A-=11+3*c;return a}function si(a,b){var c=0;if(b){rg(this);for(var d=2==this.W?15:31,e=1<>>=1;c++;d--}}else vg(this);this.A-=11+3*c;return a} @@ -228,7 +228,7 @@ function Di(a){if(this.Tc){var b=this.Tc,c=this.sj,d=this.ga,e=d>>3&7;b.A=d&7;va function Fi(a){Ye.call(this);return a}function Gi(a,b){a=Hi.call(this,this.S(),b);80386>this.ca&&(this.A-=12);return a}function Ii(a,b){a=this.Ea();a=2==this.W?Hi.call(this,a,b):Ji.call(this,a,b);80386>this.ca&&(this.A-=12);return a}function Ki(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Li.call(this,a,b);c&&(this.Ba=~this.Ba+1|0,this.Ya=~this.Ya+(this.Ba?0:1)|0)} function Hi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return a&65535}function Ji(a,b){Ki.call(this,a,b);this.Ya!=this.Ba>>31?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return this.Ba}function Mi(a,b){this.A-=14+(-1===this.C?0:2);rg(this);-1!==this.xb.load(b)&&this.xb.qc>=this.Ma&&this.xb.qc>=(b&3)&&(vg(this),a=this.xb.mb&-256,2=this.Ma)&&this.xb.qc>=(b&3))return vg(this),this.xb.Ka;rg(this);return a}function cj(a,b){if(-1===this.C)return Ye.call(this),a;ge(this,this.ja(this.C+this.W));this.A-=this.B.Xe;return b} +function Ri(a,b){if(-1===this.C)return Ye.call(this),a;a=this.ja(this.C+this.W);this.Ha.load(a);this.A-=this.B.Xe;return b}function Si(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.xb.load(b)&&(7168==(this.xb.mb&7168)||this.xb.qc>=this.Ma)&&this.xb.qc>=(b&3))return vg(this),this.xb.Ka;rg(this);return a}function Ti(a,b){if(-1===this.C)return Ye.call(this),a;ge(this,this.ja(this.C+this.W));this.A-=this.B.Xe;return b} function dj(a,b){this.A-=-1===this.F?-1===this.C?this.B.sk:this.B.rk:this.B.pk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function fj(a,b){return b} function gj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)y.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=z(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return dj.call(this,0,b)} function hj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.Y.U;break;case 3:b=this.Ca.U;break;case 4:if(80386<=this.ca){b=this.Ga.U;break}y.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.Ha.U;break}default:y.call(this,6),b=a}-1!==this.F&&ke(this,2);return dj.call(this,0,b)} @@ -352,10 +352,10 @@ var Ae=[function(){this.tc.call(this,li)},function(){this.za.call(this,mi)},func function(){this.kc.call(this,ij)},function(){this.ma.call(this,jj)},function(){this.D=this.D&-256|ij.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|jj.call(this,this.D&this.R,this.Ea());this.A--},function(){me(this,this.Z.U,this.W,2);this.A-=this.B.re},function(){Zf(this,fe(this));this.A-=this.B.nc},function(){this.tc.call(this,ji)},function(){this.za.call(this,ki)},function(){this.kc.call(this,ji)},function(){this.ma.call(this,ki)},function(){this.D=this.D&-256|ji.call(this, this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|ki.call(this,this.D&this.R,this.Ea());this.A--},function(){me(this,this.Y.U,this.W,2);this.A-=this.B.re},function(){this.ta=this.Aa;ge(this,fe(this));this.A-=this.B.nc;this.ta=-1},function(){this.tc.call(this,kj)},function(){this.za.call(this,lj)},function(){this.kc.call(this,kj)},function(){this.ma.call(this,lj)},function(){this.D=this.D&-256|kj.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|lj.call(this, this.D&this.R,this.Ea());this.A--},function(){me(this,this.Ca.U,this.W,2);this.A-=this.B.re},function(){this.ta=this.Aa;ne(this,fe(this));this.A-=this.B.nc;this.ta=-1},function(){this.tc.call(this,ni)},function(){this.za.call(this,oi)},function(){this.kc.call(this,ni)},function(){this.ma.call(this,oi)},function(){this.D=this.D&-256|ni.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|oi.call(this,this.D&this.R,this.Ea());this.A--},function(){this.N|=20;this.Da=this.Rb=this.oa; -this.A-=this.B.bd},function(){var a=this.D&255,b=fg(this),c=dg(this);9<(a&15)||b?(a+=6,b=16):b=0;159>8&255;9<(c&15)||fg(this)?(c+=6,80286<=this.ca&&255>8&255;9<(c&15)||fg(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?kg(this):lg(this);b?ug(this):qg(this);this.A-=this.B.qe},function(){this.D=ak.call(this,this.D)},function(){this.I=ak.call(this,this.I)},function(){this.L=ak.call(this,this.L)},function(){this.G=ak.call(this,this.G)},function(){he(this, +this.A-=this.B.bd},function(){var a=this.D&255,b=fg(this),c=dg(this);9<(a&15)||b?(a+=6,b=16):b=0;159>8&255;9<(c&15)||fg(this)?(c+=6,80286<=this.ca&&255>8&255;9<(c&15)||fg(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?kg(this):lg(this);b?sg(this):qg(this);this.A-=this.B.qe},function(){this.D=ak.call(this,this.D)},function(){this.I=ak.call(this,this.I)},function(){this.L=ak.call(this,this.L)},function(){this.G=ak.call(this,this.G)},function(){he(this, ak.call(this,z(this)))},function(){this.M=ak.call(this,this.M)},function(){this.K=ak.call(this,this.K)},function(){this.J=ak.call(this,this.J)},function(){this.D=Yj.call(this,this.D)},function(){this.I=Yj.call(this,this.I)},function(){this.L=Yj.call(this,this.L)},function(){this.G=Yj.call(this,this.G)},function(){he(this,Yj.call(this,z(this)))},function(){this.M=Yj.call(this,this.M)},function(){this.K=Yj.call(this,this.K)},function(){this.J=Yj.call(this,this.J)},function(){pe(this,this.D&this.R); this.A-=this.B.Ic},function(){pe(this,this.I&this.R);this.A-=this.B.Ic},function(){pe(this,this.L&this.R);this.A-=this.B.Ic},function(){pe(this,this.G&this.R);this.A-=this.B.Ic},function(){pe(this,z(this)-2&65535);this.A-=this.B.Ic},function(){pe(this,this.M&this.R);this.A-=this.B.Ic},function(){pe(this,this.K&this.R);this.A-=this.B.Ic},function(){pe(this,this.J&this.R);this.A-=this.B.Ic},function(){this.D=this.D&~this.R|fe(this);this.A-=this.B.nc},function(){this.I=this.I&~this.R|fe(this);this.A-= this.B.nc},function(){this.L=this.L&~this.R|fe(this);this.A-=this.B.nc},function(){this.G=this.G&~this.R|fe(this);this.A-=this.B.nc},function(){he(this,z(this)&~this.R|fe(this));this.A-=this.B.nc},function(){this.M=this.M&~this.R|fe(this);this.A-=this.B.nc},function(){this.K=this.K&~this.R|fe(this);this.A-=this.B.nc},function(){this.J=this.J&~this.R|fe(this);this.A-=this.B.nc},ok,pk,qk,rk,sk,tk,uk,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,ok,pk,qk,rk,sk,tk,uk,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,Ek,function(){this.ib.call(this, @@ -363,7 +363,7 @@ Tk,this.Ea);this.A-=-1===this.F?1:this.B.yg},Ek,function(){this.ib.call(this,Tk, this.I=this.xa;Zf(this,a);break;case 2:a=this.L;this.L=this.xa;ge(this,a);break;case 3:a=this.G;this.G=this.xa;ne(this,a);break;case 4:a=z(this);he(this,this.xa);80386<=this.ca?this.Ga.load(a):oe(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.ca?this.Ha.load(a):Zf(this,a);break;case 6:a=this.K;this.K=this.xa;ge(this,a);break;case 7:a=this.J,this.J=this.xa,ne(this,a)}},function(){this.N|=1;this.ta=this.Aa;this.xa=fe(this);this.ib.call(this,Uk,hk);this.ta=-1},function(){this.A-=3},function(){var a= this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.G&this.R;this.G=this.G&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=z(this);this.D=this.D&~this.R|b&this.R;he(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a= this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.W?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.W?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Kj},function(){ik.call(this,this.Ea(),Hg(this));this.A-=this.B.Nj},function(){this.A-=3},function(){var a=re(this);a&131072&& -3>this.lc?y.call(this,13,0):(pe(this,a&-196609),this.A-=this.B.Ic)},function(){if(this.O&131072&&3>this.lc)y.call(this,13,0);else{var a=fe(this),a=a&65535|this.O&-65536;se(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?kg(this):lg(this);a&4?(this.resultType&=-3,this.O|=4):(this.resultType&=-3,this.O&=-5);a&16?ug(this):qg(this);a&64?vg(this):rg(this);a&128?(this.resultType&=-17,this.O|=128):(this.resultType&=-17,this.O&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(re(this)& +3>this.lc?y.call(this,13,0):(pe(this,a&-196609),this.A-=this.B.Ic)},function(){if(this.O&131072&&3>this.lc)y.call(this,13,0);else{var a=fe(this),a=a&65535|this.O&-65536;se(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?kg(this):lg(this);a&4?(this.resultType&=-3,this.O|=4):(this.resultType&=-3,this.O&=-5);a&16?sg(this):qg(this);a&64?vg(this):rg(this);a&128?(this.resultType&=-17,this.O|=128):(this.resultType&=-17,this.O&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(re(this)& 213)<<8;this.A-=this.B.Vb},function(){var a=this.D&-256,b;b=J(this);b=this.Ia(this.Da.bc(b,1));this.D=a|b;this.A-=this.B.Kh},function(){this.D=this.D&~this.R|le(this,this.Da,J(this));this.A-=this.B.Kh},function(){var a=J(this),b=this.D;this.fc(this.Da.cc(a,1),b);this.A-=this.B.Lh},function(){var a=J(this),b=this.D;this.yb(this.Da.cc(a,this.W),b);this.A-=this.B.Lh},function(){var a=1,b=0,c=this.wa,d=this.B.Mh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Oh,this.ha&256||(this.A-=this.B.Nh));if(a--){var e= this.Ia(this.Da.bc(this.K&c,1));this.fc(this.oa.cc(this.J&c,1),e);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Mh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Oh,this.ha&256||(this.A-=this.B.Nh));if(a--){var e=le(this,this.Da,this.K&c);this.yb(this.oa.cc(this.J&c,this.W),e);e=this.O&1024?-this.W:this.W;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d; this.I=this.I&~c|this.I-b&c;a&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.xh;this.ha&192&&(a=this.I&c,b=1,d=this.B.zh,this.ha&256||(this.A-=this.B.yh));if(a--){var e=zg(this,this.Da,this.K),f=zg(this,this.oa,this.J);this.F=this.C;Bi.call(this,e,f);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Ib;a&&gg(this)==(this.ha&64)&&(bg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.xh;this.ha&192&& @@ -409,7 +409,7 @@ B[135]=function(){var a=this.Ea();dg(this)||gg(this)?this.A-=this.B.Ra:(C(this,A B[140]=function(){var a=this.Ea();!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[141]=function(){var a=this.Ea();!hg(this)==!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[142]=function(){var a=this.Ea();gg(this)||!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};B[143]=function(){var a=this.Ea();gg(this)||!hg(this)!=!ig(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)};B[144]=function(){ck.call(this,mj)}; B[145]=function(){ck.call(this,mj)};B[146]=function(){ck.call(this,nj)};B[147]=function(){ck.call(this,oj)};B[148]=function(){ck.call(this,pj)};B[149]=function(){ck.call(this,qj)};B[150]=function(){ck.call(this,rj)};B[151]=function(){ck.call(this,sj)};B[152]=function(){ck.call(this,tj)};B[153]=function(){ck.call(this,uj)};B[154]=function(){ck.call(this,vj)};B[155]=function(){ck.call(this,wj)};B[156]=function(){ck.call(this,xj)};B[157]=function(){ck.call(this,yj)};B[158]=function(){ck.call(this,zj)}; B[159]=function(){ck.call(this,Aj)};B[160]=function(){me(this,this.Ga.U,this.W,2);this.A-=this.B.re};B[161]=function(){this.ta=this.Aa;var a=fe(this);this.Ga.load(a);this.A-=this.B.nc;this.ta=-1};B[163]=function(){this.za.call(this,xi);-1!==this.C&&(this.A-=6)};B[164]=function(){this.za.call(this,2==this.W?Bj:Dj);this.A-=-1===this.C?3:7};B[165]=function(){this.za.call(this,2==this.W?Fj:Gj);this.A-=-1===this.C?3:7};B[168]=function(){me(this,this.Ha.U,this.W,2);this.A-=this.B.re}; -B[169]=function(){this.ta=this.Aa;var a=fe(this);this.Ha.load(a);this.A-=this.B.nc;this.ta=-1};B[171]=function(){this.za.call(this,Ai);-1!==this.C&&(this.A-=5)};B[172]=function(){this.za.call(this,2==this.W?Hj:Jj);this.A-=-1===this.C?3:7};B[173]=function(){this.za.call(this,2==this.W?Lj:Mj);this.A-=-1===this.C?3:7};B[175]=function(){this.ma.call(this,2==this.W?Hi:Ji)};B[178]=function(){this.ma.call(this,cj)};B[179]=function(){this.za.call(this,zi);-1!==this.C&&(this.A-=5)}; +B[169]=function(){this.ta=this.Aa;var a=fe(this);this.Ha.load(a);this.A-=this.B.nc;this.ta=-1};B[171]=function(){this.za.call(this,Ai);-1!==this.C&&(this.A-=5)};B[172]=function(){this.za.call(this,2==this.W?Hj:Jj);this.A-=-1===this.C?3:7};B[173]=function(){this.za.call(this,2==this.W?Lj:Mj);this.A-=-1===this.C?3:7};B[175]=function(){this.ma.call(this,2==this.W?Hi:Ji)};B[178]=function(){this.ma.call(this,Ti)};B[179]=function(){this.za.call(this,zi);-1!==this.C&&(this.A-=5)}; B[180]=function(){this.ma.call(this,Qi)};B[181]=function(){this.ma.call(this,Ri)}; B[182]=function(){this.kc.call(this,ej);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|this.D&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.L=this.L&~this.R|this.L&255;break;case 3:this.G=this.G&~this.R|this.G&255;break;case 4:this.Hc=this.Hc&~this.R|this.D>>8&255;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I>>8&255;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L>>8&255;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G>>8&255,this.G=this.xa}this.A-= -1===this.C?3:6};B[183]=function(){ke(this,2);this.ma.call(this,fj);switch(this.ga>>3&7){case 0:this.D=this.D&65535;break;case 1:this.I=this.I&65535;break;case 2:this.L=this.L&65535;break;case 3:this.G=this.G&65535;break;case 4:this.Hc=this.Hc&65535;break;case 5:this.M=this.M&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.C?3:6};B[186]=function(){this.ib.call(this,$k,this.ra)};B[187]=function(){this.za.call(this,yi);-1!==this.C&&(this.A-=5)}; @@ -561,7 +561,7 @@ function Qs(a,b){if(1==b)return a.ha[0]=Rs[Ls],a.ha[1]=Rs[Js],a.ha;if(2==b){var (c.Cc[20]&12)<<4,c.Cc[16]&128&&(f&=-49,f|=(c.Cc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ha[e]=[g,h,f,255]}a.Ga=!0}return a.ha}function cq(a,b,c,d){a.lb=b;a.Ta=c;a.Da=d} function Gs(a,b){var c=!1;if(window&&a.lb&&(!b||a.I)){b=0;var d=a.Da?a.Da:8,e=Qs(a);null!=a.Ta[0]&&Vs(a,Ws,a.Ta[0],b,d,8,a.lb,e)&&(c=!0);b=a.Da?0:2048;d=a.Da?a.Da:9;null!=a.Ta[1]&&(Vs(a,Xs,a.Ta[1],b,d,14,a.lb,Ys,Zs)&&(c=!0),a.Da&&Vs(a,a.La,a.Ta[1],0,a.Da,14,a.lb,e)&&(c=!0))}return c}function Vs(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&($s(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Cd&&$s(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} function $s(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.va[b],u=16>h.length?h.length:16;v||(v={Fc:e<ua||!T?ua:8,ib=cb.createImageData(m.Fc,m.Gc);for(Sa=0;256>Sa;Sa++){for(db=0;db=ua-2,Ld=ca[db>(8<=rb&&192<=Sa&&223>=Sa?7:rb)?E:xb;at(ib,sg,ef,tg);H&&at(ib,sg+1,ef,tg)}cb.putImageData(ib,(Sa&15)*m.Fc,(Sa>>4)*m.Gc)}m.Be[K]="#"+q(E[0],2)+q(E[1],2)+q(E[2],2);m.Qi[K]=E;m.Sg[K]=za;m=!0}}a.va[b]=v;return m}function bt(a){0a.Aa&&(a.Aa=0):a.Aa=-1} +m.jf&&K&1&&db>=ua-2,Ld=ca[db>(8<=rb&&192<=Sa&&223>=Sa?7:rb)?E:xb;at(ib,tg,ef,ug);H&&at(ib,tg+1,ef,ug)}cb.putImageData(ib,(Sa&15)*m.Fc,(Sa>>4)*m.Gc)}m.Be[K]="#"+q(E[0],2)+q(E[1],2)+q(E[2],2);m.Qi[K]=E;m.Sg[K]=za;m=!0}}a.va[b]=v;return m}function bt(a){0a.Aa&&(a.Aa=0):a.Aa=-1} function Ps(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.C.Wa[b])return;var c=a.C.Wa[10],b=c&31,d=a.C.Wa[11]&31,e=a.C.Wa[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)ct(a);else{c=a.C.Wa[15]+((a.C.Wa[14]&63)<<8);a.aa!=c&&(ct(a),a.aa=c);d=d-b+1;if(a.md!=b||a.Hc!=d)a.md=b,a.Hc=d;a.za=e+1;bt(a)}}} function ct(a){if(0<=a.aa){if(void 0!==a.M){var b=dt<<8,c=a.M[a.aa];if(c&b){var c=c&~b,b=a.aa%a.F,d=a.aa/a.F|0;a.I&&a.va[a.I]&&(a.Ca&&et(a,b,d,c,a.Ca),et(a,b,d,c));a.M[a.aa]=c}}a.aa=-1}} function ft(a){var b,c=a.C;a.Pc=!1;var d=c.xd[5];if(null!=d){b=ur;var e=wr,f=c.xd[3]&31;switch(d&3){case 0:if(f){e=wr|32;switch(f&24){case 8:e=wr|96;break;case 16:e=wr|160;break;case 24:e=wr|224}c.Qc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.La==dq&&(e=3,c.Qc=f&7)}d&8&&(b=1280);c=c.$d[4];null!=c&&(c&4||(b|=vr,e|=xr),d&64&&(c&8&&(b|=16384,e|=4),a.Pc=!0));b|=e}return b} @@ -714,30 +714,30 @@ function lx(a,b){if(a.errorCode)return-1;do{if(a.eb&&a.sa.write(a.eb,a.Sa++,b))b var Tw="Hard Drive",Ww=["XTC","ATC","COMPAQ"],Uw=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966, 6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Mw=496,px=1,sx=0,jx=16,rx=3,qx=15,mx=16,ix=1,hx=8,gx=16,Qw=64,ex=128,vx=16,wx=32,xx=48,yx=64,zx= 112,tx=144,Ax=145,ux=240,Bx=2,ox=4,Hx=0,Ix=2,Lx=0,Mx=1,Dx=3,Nx=5,Ox=8,Qx=10,ax=12,Sx=15,Jx=224,Kx=228,Sw=0,Fx=4,Ux=20,Rw=0,bx=1,Yw=2,Zw=4,$w=8,Xw=32,Jw={800:Hw.prototype.Tm,801:Hw.prototype.Um,802:Hw.prototype.Sm},Iw={496:Hw.prototype.nl,497:Hw.prototype.$l,498:Hw.prototype.bm,499:Hw.prototype.cm,500:Hw.prototype.Yl,501:Hw.prototype.Xl,502:Hw.prototype.Zl,503:Hw.prototype.dm},Lw={800:Hw.prototype.ro,801:Hw.prototype.uo,802:Hw.prototype.to,803:Hw.prototype.so,807:Hw.prototype.hi,811:Hw.prototype.hi, -815:Hw.prototype.hi},Kw={496:Hw.prototype.An,497:Hw.prototype.Fn,498:Hw.prototype.Dn,499:Hw.prototype.En,500:Hw.prototype.zn,501:Hw.prototype.yn,502:Hw.prototype.Bn,503:Hw.prototype.xn,1014:Hw.prototype.Cn};ab(function(){for(var a=Ab(document,"pcx86","hdc"),b=0;bthis.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.da?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.V=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.V,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Zx(a,b,c,d,e,f){var g,h,k,m=!1,p=!1,v=[],u=[],E=a.L;for(a.L=e;c<"==k?10:e;p=!1}Yx(v, +u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.V),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} +function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; -function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.M=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; +function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ " dpl="+r(a.qc))}}else d.P("no selector")});Al(this,134217728,function(a){var b;(a=a[0])&&(b=$x(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ta(b)+")");b;){a=hy(d,0,b);var c=d.Ia(a,1),e=d.Yc(a,2),k=d.Yc(a,5);if(77!=c&&90!=c)break;d.P(uy(0,b)+": '"+String.fromCharCode(c)+"' PID="+ta(e)+" LEN="+ta(k)+' "'+vy(d,a,8)+'"');b+=1+k}});Al(this,128,function(a){py(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Al(this,8,function(a){a:{if(a=a[0]){var b=$x(d,a);if(void 0===b){d.P("invalid task selector: "+ a);break a}a=qy(d,b,ry)}else a=d.H.la;d.P("dumpTSS("+ta(a?a.U:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?wy:xy,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=yg(d.H,p,2),2304==c&&(v|=yg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ta(m)+" "+Ba(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;mu;)p=a.ua+m,v=yg(d.H,p,2),b+="\n"+ta(m)+" ports "+ta(u)+"-"+ta(u+15)+": "+ra(v,2),u+=16,m+=2;d.P(b)}}});this.F=null;this.Ma=0;this.Ca=!1;Sf(this.H,48,this.Ym.bind(this));Sf(this.H,65, -this.Zm.bind(this));this.O=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function yy(a,b,c,d,e,f){b=vy(a,b);var g=qy(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=zy(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} +this.Zm.bind(this));this.V=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function yy(a,b,c,d,e,f){b=vy(a,b);var g=qy(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=zy(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} function Ay(a,b,c,d){var e=a.Yc(b,2),f=a.Yc(b,2),g=By(a,b,4),h=By(a,b,4),k=hy(a,By(a,b,4),a.Yc(b,2));b=hy(a,By(a,b,4),a.Yc(b,2));b=vy(a,b).toUpperCase();var k=vy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&t(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=zy(a,k,e);c[k+m]=g;aq(a,k,e,f,g,null,h,c)}function Cy(a,b,c){c=vy(a,c).toUpperCase();Dy(a,c,b)} l.Ym=function(){var a=this.H;if(null!=this.F&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=hy(this,z(a)+12,a.Y.U);switch(By(this,d)){case 336:Ay(this,hy(this,a.G,b),!c,!!this.F)}}return!0}; l.Zm=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.F)return 79==c&&Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x41 handling enabled",128),a.F=!0):(Mb(a,"INT 0x41 monitoring enabled",128),a.F=!1)}}(this)),!0;switch(c){case 79:this.F&&(b.D=b.D&-65536|62342,Mb(this,"INT 0x41 handling enabled",128));break;case 80:yy(this,hy(this,h,k),d+1,e,!(g&1),!!this.F);break;case 82:Dy(this,null, d);break;case 127:this.F&&(b.D=b.D&-65536|(this.Ca?0:1));break;case 131:this.F&&(a=hy(this,b.L,e),this.Ma++?(this.P("TRAPFAULT failed"),Ey(this,this.B,a,!0,!0),this.Ma=0,this.Jb()):(this.P("INT 0x41 TRAPFAULT: fault="+ta(d)+" error="+q(b.K,8,!0)+" addr="+Fy(a)),this.Gd(this.B,a,!0),jy(this,!0)));break;case 141:this.F&&(b.D=b.D&-65536|1);break;case 336:Ay(this,hy(this,b.G,f),!g,!!this.F);break;case 338:Cy(this,d,hy(this,b.J,f))}this.Ca=!1;return!this.F}; -l.$m=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.O){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x68 handling enabled",128),a.F=a.O=!0):(Mb(a,"INT 0x68 monitoring enabled",128),a.O=!1)}}(this))}return!0}switch(d){case 67:this.O&&(b.D=b.D&-65536|62342);break;case 68:this.O&&(a=Xd(b.Z,this.yl.bind(this)))&& -(b.J=a[0],oe(b,a[1]));break;case 72:Dy(this,null,e);break;case 80:32==c?yy(this,hy(this,h,k),0,f,!0,!!this.O):128>c?yy(this,hy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.O):Ay(this,hy(this,h,k),!(c&1),!!this.O),this.O&&(b.D=b.D&-256|1)}return!this.O};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; +l.$m=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.V){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x68 handling enabled",128),a.F=a.V=!0):(Mb(a,"INT 0x68 monitoring enabled",128),a.V=!1)}}(this))}return!0}switch(d){case 67:this.V&&(b.D=b.D&-65536|62342);break;case 68:this.V&&(a=Xd(b.Z,this.yl.bind(this)))&& +(b.J=a[0],oe(b,a[1]));break;case 72:Dy(this,null,e);break;case 80:32==c?yy(this,hy(this,h,k),0,f,!0,!!this.V):128>c?yy(this,hy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.V):Ay(this,hy(this,h,k),!(c&1),!!this.V),this.V&&(b.D=b.D&-256|1)}return!this.V};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; l.Cb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",ly(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.AJz.indexOf(b),!d)){var g=Kz[b];g&&(d=t(a,g)?!0:524288==g&&t(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Rb[b])&&g[e]||"")&&(g=" "+Iz(a,g)),a.message("INT "+r(b)+": AH="+r(e)+" at "+uy(c-2-a.H.Z.ua,a.H.Z.U)+g));return d} function Nb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ua),a.message(b.be+"."+(null!=d?"outPort":"inPort")+"("+ta(c)+","+(f?f:"unknown")+(null!=d?","+r(d):"")+")"+(null!=g?": "+r(g):"")+(null!=e?" at "+uy(e,h):""))}l.ih=function(){this.P("Type ? for help with PCx86 Debugger commands");Lz(this);if(this.Ga){var a=this.Ga;this.Ga=null;ly(this,a)}}; -function jy(a,b){var c;if(Jg(a)){if(!a.N||!a.N.length){a.N=Array(Mz);for(c=0;c>>f.hb].Gd(e&f.Db,a==this.M);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Tz(this,a,a.length-1,"set"),jy(this)));return d}; -function Ey(a,b,c,d,e){for(var f=!1,g=Uz(a,a.Sb(c)),h=1;h>>f.hb].Gd(e&f.Db,a==this.N);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Tz(this,a,a.length-1,"set"),jy(this)));return d}; +function Ey(a,b,c,d,e){for(var f=!1,g=Uz(a,a.Sb(c)),h=1;h>3&7,E=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=E&&(E=u<<4|g&7);(u=bA[f])&&(v=u[E]);v&&(p=cA,k=v,m=k[0])}m>=p.length&&(g=a.Ia(b,1),k=dA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==eA? @@ -793,33 +793,33 @@ function Pz(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump a.P("ST"+f+": "+Ba(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+eB[e[1]]+"]")}a.P(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.P("SW: "+qa(d,16)+" ("+ta(d)+") CW: "+qa(b,16)+" ("+ta(b)+")");return}if("p"==e)d=80286<=a.H.ca;else{f=e.indexOf("=");if(0=a.ta&&(h=null);switch(h){case "AL":a.H.D= a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":he(a.H, z(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ne(a.H,g);break;case "ES":oe(a.H,g);break;case "SS":ge(a.H,g);break;case "CS":Zf(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "IP":case "EIP":C(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "PC":case "PS":se(a.H,g);break;case "C":g?kg(a.H):lg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g? -ug(a.H):qg(a.H);break;case "Z":g?vg(a.H):rg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?mg(a.H):ng(a.H);break;default:var k=!0;if(80286<=a.H.ca)switch(k=!1,h){case "MS":wg(a.H,g);break;case "TR":-1===a.H.la.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.ca)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I= +sg(a.H):qg(a.H);break;case "Z":g?vg(a.H):rg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?mg(a.H):ng(a.H);break;default:var k=!0;if(80286<=a.H.ca)switch(k=!1,h){case "MS":wg(a.H,g);break;case "TR":-1===a.H.la.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.ca)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I= g;break;case "EDX":a.H.L=g;break;case "ESP":he(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ha.load(g);break;case "CR0":a.H.qa=g;bk.call(a.H,g);break;case "CR2":a.H.Cd=g;break;case "CR3":a.H.Wc=g;ue.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Cd(a.H);a.P("updated registers:")}}a.P(YA(a,d));c&&(a.K=hy(a,A(a.H),a.H.Z.U),Qz(a,Fy(a.K)))}} function fB(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(Iz(a,c[2])):by(a,b,!1)}function gB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Xz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} +function Qz(a,b,c,d){if(b=Py(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Py(a,c,!0);if(!d||d.Jah[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Xz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} l.Cg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; function Wz(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.da&&(a.P("ended assemble at "+Fy(a.aa)),a.K=a.aa,a.da=!1),b="";else if(!c){var e=">> ";a.H.qa&1&&(e=a.H.O&131072?"-- ":"## ");a.P(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.za=null;if(Ib(a)&&0p||"z">>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Ng&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Ng&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Ng),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= -ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.N;if(jd.length){var uc=+wt||a.Ya,Og=+xt||10;isNaN(uc)?uc=Og:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Og=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Og--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Qg=$x(a,rm);if(void 0===Qg||0>Qg||255>>0,65536>4||1;aC--&&0Wi?String.fromCharCode(Wi):".";Vi--}Rg&&(Rg+="\n");Rg+=cb+" "+tm+(Tg?"":" "+Ft)}Rg&&a.P(Rg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Xi= -1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Xi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Xi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Yi=Py(a,Kt);if(Yi)for(var Zi=2;Zizm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Wg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Wg.U=Mt;if(kd=gB(a,Wg))break;Wg.U=a.jb(Sd);if(kd=gB(a,Wg,!0)){Mt=a.jb(Sd,!0);0>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= +ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0a?-b:b}});la("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ma={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, +function la(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function ma(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;da?-b:b}});ma("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var na={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,ld:103,md:104,nd:105,od:106,k:107,pd:108,qd:109,n:110,rd:111,p:112,q:113,r:114,sd:115,t:116,ud:117,vd:118,wd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; -function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0f&&(f+=Math.pow(2,36)),f=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ua(a,b,c){b?12"']/g,function(a){return Aa[a]})}function Ba(a,b){return(a+" ").slice(0,b)} -function Ea(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function Ha(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +function ua(a,b,c,d){var e="";isNaN(a)?a=null:null!=a&&(0>a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function va(a,b){var c,d="";b?32>=1,f--;return d} +function n(a,b,c){b?12"']/g,function(a){return Ba[a]})}function Ea(a,b){return(a+" ").slice(0,b)}function Fa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(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 Ia(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ia(a,b){var c,d={Z:null,W:null,va:null,ua:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.va=g.load;d.ua=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ka=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(t(d.Z[0]),d=null):(t("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){t("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.wa=null;jb.push(this)}function kb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function mb(){return Date.now()||+new Date} -function t(a){window&&window.alert(a)}function nb(a){var b=!1;window&&(b=window.confirm(a));return b}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.va=g.load;d.ua=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ka=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.wa=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} +function r(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, -set:this.fc};Kb(this)}n($b,u);l=$b.prototype;l.reset=function(a){this.stop();a&&bc(this,this.w=0)}; -l.oa=function(a,b,c,d){if(this.H&&this.H.oa(a,b,c,d)||this.v&&this.v.oa(a,b,c,d)||this.D&&this.D.oa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){cc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){dc(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){cc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){dc(a,b)}}(this,b),!0):u.prototype.oa.call(this,a,b,c,d)}};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;ec(this);fc(this)};l.xa=function(a,b){if(!b)if(this.U&&gc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.na=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; -l.restore=function(a){if(a=a[0])hc(this,this.i=a[0]),bc(this,this.w=a[1]),ic(this,a[2]);return!0};l.cc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}fc(this);return!0};function jc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ec(a,b){for(var c in a.C)jc(a,c,null!=b?b:a.C[c])}function kc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function fc(a){for(var b in a.b)kc(a,b,a.b[b][1])} -l.Ob=function(a,b,c){if(cc(this,b)){if(c){var d=this;setTimeout(function(){dc(d,b);a&&a()},+c);return!1}dc(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return ic(this,na(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,kc(this,a,c[1]),!0):!1};l.gc=function(a){return cc(this,a)?(dc(this,a),!0):!1};function cc(a,b){var c=a.b[b];return c?(kc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=lc&&(a.P=b==mc,a.R=b==nc),!0):!1} -function dc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(kc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[oc]&&this.b[oc][1]&&pc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; -l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[oc]&&this.b[oc][1])pc(this.v);else{if((a=this.D)&&!Lb(a,!0))Mb(a,!0),qc(a,0,null),Mb(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){m=h.size-(e-k);m>f&&(m=f);h.Pa=e-h.B+m;e=k+16384;f-=m;g++;continue}}return Gc(Hc,e,f)}e=new yc(a,e,m,16384,d);zc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Ic[d]+" at "+ua(b)),!0):Gc(Jc,b,c)} -function wc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function vc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Ec(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.pa,c=!0);0<=a.ja&&a.ja<=dd(a)&&(a.pa=a.ja=-1,$c(a),a.V(),c=!0);c&&a.u(dd(a)+" cycles: checksum="+r(a.Ca))}} -l.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&hd(a.H)}sc(a,a.M);a.M=0;a.L=mb();a.P=0;fd(a);return d}function id(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function jd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function kd(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} -l.dc=function(){if(this.A.N){this.Va>=this.eb&&fd(this,!0);this.ka=0;this.Ba=mb();if(this.P){var a=this.Ba-this.P;a>this.cb&&(this.L+=a,this.L>this.Ba&&(this.L=this.Ba))}try{do{var b=id(this,this.A.Ma?1:this.Ea);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=kd(this,!0);this.ka+=b;this.M+=b;tc(this,b);rc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Ea;++this.fb>=ld&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(mb(),dd(this));xb(this, -e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=mb();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Ea));var c=c-(this.P-this.Ba),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,ed(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; -function pc(a,b){if(!yb(a))if(a.A.N)a.u(a.toString()+" busy");else{ed(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&hd(a.H,!0),a.H.start(a.L,dd(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){kd(this);sc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(mb(),dd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var gd=30,ld=15,Xc=["power","reset"]; -function md(a){var b=+a.model||1001;Wc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=nd.bind(this);this.w=K.bind(this);this.za=null;this.ob=[];this.A.complete=!1}n(md,Wc);l=md.prototype; -l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Fa=this.Ga=this.b=this.K=0;this.i=this.Aa=this.Sa;this.I=this.sa=-1;this.F=this.j=0;this.gb=[0,0];this.qa=[0,0];this.ha=[0,0];this.ra=[0,0];this.ya=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.za=null;Zc(this);this.A.error=!1;Wc.prototype.reset.call(this)};l.Bb=function(){return 0}; -l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Fa,this.Ga,this.i,this.sa,this.I,this.j,this.C,this.Aa,this.ya,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,od(this));a.set(4,jd(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ha();ca();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.b=b.next().value;this.K=b.next().value;this.Fa=b.next().value;this.Ga=b.next().value;this.i=b.next().value;this.sa=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Aa=b.next().value;this.ya=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];ed(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.ya=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; -l.Ra=function(a){this.A.complete=!0;var b=this.D?qd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.S=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(rd(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.za||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&rd(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Fa=this.f(this.b):0<=this.sa?(this.K=this.Ga=this.f(this.sa),this.sa=-1):(this.K= -this.Ga=this.f(this.Aa=this.i),this.i=(this.i+1)%Rb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Fa=this.f(a))&Qb;a=this.K&4194304?-1:this.Ga/Xb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} -function td(){var a=0,b=this.f(this.b),c=b/Yb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Yb+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function ud(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Yb&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} -function vd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Yb&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function wd(a,b){this.g(b,this.f(this.b))}function xd(a,b){this.g(b,this.b)}function yd(a,b){this.g(this.b,this.f(b))}function zd(a,b){this.g(b,0)}function Ad(a,b){this.g(b,D-this.f(b))}function Bd(a,b){this.g(b,D)} -function Cd(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Vd(a,d,c)+(c-(c&y)))}function Wd(a,b){var c=this.f(b);this.g(b,Vd(a,c,0))}function Xd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Vd(a,c,b)+(b-(b&y)))}function Yd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function Zd(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Vd(a,d,c)+c)} -function $d(a,b){var c=this.b*z,d=this.f(b);this.g(b,Vd(a,d,c)+c)}function ae(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Vd(a,c,b)+b)}function be(a,b){var c=this.f(this.b),d=(c&y)*z,c=Vd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function ce(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,de(a,d,c)+c)}function ee(a,b){var c=this.f(b);this.g(b,de(a,c,this.b)+this.b)}function fe(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,de(a,c,b)+b)} -function ge(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Sb?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function he(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,de(a,d,c)+c)}function ie(a,b){var c=this.f(b);this.g(b,de(a,c,0))}function je(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,de(a,c,b)+b)}function ke(a,b){var c=this.f(this.b),d=c/z|0,c=de(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){le[a&7].call(this,a,a>>3&127)} -function me(){}function ne(){}function K(a){this.u("undefined opcode: "+ua(a));pd(this,-1);this.V()}function oe(a){a>A&&(a!=C?a=Ub-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;pe.call(this,a,b,c);return c} -function qe(a,b,c){var d=!1,e=!1,f=b-b%C;a=a%C+b*C%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=D-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.qa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.ra;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),se(this.gb,this.qa),te(this.ra)))break;ue(this.ha);ue(this.qa)}while(!te(this.qa)); +function ac(a,b){u.call(this,"Panel",a,512);this.K=this.L=0;this.U=b;this.i=this.I=this.j=this.w=0;this.M=this.O=-1;this.P=this.R=this.F=!1;this.T=bc;this.C={};this.b={START:[1,1,!0,!1,this.Xb],STEP:[1,1,!1,!1,this.Yb],ENABLE:[1,1,!1,!1,this.Sb],CONT:[1,1,!0,!1,this.Qb],DEP:[0,0,!0,!1,this.Rb],EXAM:[1,1,!0,!1,this.Tb],LOAD:[1,1,!0,!1,this.Vb],TEST:[0,0,!0,!1,this.Ub]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, +set:this.fc};Lb(this)}la(ac,u);l=ac.prototype;l.reset=function(a){this.stop();a&&cc(this,this.w=0)}; +l.oa=function(a,b,c,d){if(this.H&&this.H.oa(a,b,c,d)||this.v&&this.v.oa(a,b,c,d)||this.D&&this.D.oa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){dc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ec(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){dc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ec(a,b)}}(this,b),!0):u.prototype.oa.call(this,a,b,c,d)}};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;fc(this);gc(this)};l.xa=function(a,b){if(!b)if(this.U&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.na=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; +l.restore=function(a){if(a=a[0])ic(this,this.i=a[0]),cc(this,this.w=a[1]),jc(this,a[2]);return!0};l.cc=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.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fc(a,b){for(var c in a.C)kc(a,c,null!=b?b:a.C[c])}function lc(a,b,c){if(a=a.J[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])} +l.Ob=function(a,b,c){if(dc(this,b)){if(c){var d=this;setTimeout(function(){ec(d,b);a&&a()},+c);return!1}ec(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return jc(this,ta(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,lc(this,a,c[1]),!0):!1};l.gc=function(a){return dc(this,a)?(ec(this,a),!0):!1};function dc(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!=mc&&(a.P=b==nc,a.R=b==oc),!0):!1} +function ec(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)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[pc]&&this.b[pc][1]&&qc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; +l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[pc]&&this.b[pc][1])qc(this.v);else{if((a=this.D)&&!Mb(a,!0))Nb(a,!0),rc(a,0,null),Nb(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){m=h.size-(e-k);m>f&&(m=f);h.Pa=e-h.B+m;e=k+16384;f-=m;g++;continue}}return Hc(Ic,e,f)}e=new zc(a,e,m,16384,d);Ec(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Jc[d]+" at "+n(b)),!0):Hc(Kc,b,c)} +function xc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function wc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Fc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.pa,c=!0);0<=a.ja&&a.ja<=ed(a)&&(a.pa=a.ja=-1,ad(a),a.V(),c=!0);c&&a.u(ed(a)+" cycles: checksum="+q(a.Ca))}} +l.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&id(a.H)}tc(a,a.M);a.M=0;a.L=ob();a.P=0;gd(a);return d}function jd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ld(a,b){var c=a.R-=a.T;a.T=0;b&&(a.R=0);return c} +l.dc=function(){if(this.A.N){this.Va>=this.eb&&gd(this,!0);this.ka=0;this.Ba=ob();if(this.P){var a=this.Ba-this.P;a>this.cb&&(this.L+=a,this.L>this.Ba&&(this.L=this.Ba))}try{do{var b=jd(this,this.A.Ma?1:this.Ea);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=ld(this,!0);this.ka+=b;this.M+=b;uc(this,b);sc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Ea;++this.fb>=md&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(ob(),ed(this));zb(this, +e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=ob();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Ea));var c=c-(this.P-this.Ba),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,fd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; +function qc(a,b){if(!Jb(a))if(a.A.N)a.u(a.toString()+" busy");else{fd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&id(a.H,!0),a.H.start(a.L,ed(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){ld(this);tc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),ed(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var hd=30,md=15,Yc=["power","reset"]; +function nd(a){var b=+a.model||1001;Xc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=od.bind(this);this.w=K.bind(this);this.za=null;this.ob=[];this.A.complete=!1}la(nd,Xc);l=nd.prototype; +l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Fa=this.Ga=this.b=this.K=0;this.i=this.Aa=this.Sa;this.I=this.sa=-1;this.F=this.j=0;this.gb=[0,0];this.qa=[0,0];this.ha=[0,0];this.ra=[0,0];this.ya=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.za=null;$c(this);this.A.error=!1;Xc.prototype.reset.call(this)};l.Bb=function(){return 0}; +l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Fa,this.Ga,this.i,this.sa,this.I,this.j,this.C,this.Aa,this.ya,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,pd(this));a.set(4,kd(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ha();ca();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.b=b.next().value;this.K=b.next().value;this.Fa=b.next().value;this.Ga=b.next().value;this.i=b.next().value;this.sa=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Aa=b.next().value;this.ya=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];fd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.ya=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; +l.Ra=function(a){this.A.complete=!0;var b=this.D?rd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.T=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(sd(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.za||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&sd(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Fa=this.f(this.b):0<=this.sa?(this.K=this.Ga=this.f(this.sa),this.sa=-1):(this.K= +this.Ga=this.f(this.Aa=this.i),this.i=(this.i+1)%Sb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Fa=this.f(a))&Rb;a=this.K&4194304?-1:this.Ga/Yb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} +function ud(){var a=0,b=this.f(this.b),c=b/Zb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Zb+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function vd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} +function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function xd(a,b){this.g(b,this.f(this.b))}function yd(a,b){this.g(b,this.b)}function zd(a,b){this.g(this.b,this.f(b))}function Ad(a,b){this.g(b,0)}function Bd(a,b){this.g(b,C-this.f(b))}function Cd(a,b){this.g(b,C)} +function Dd(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Ed(a,d,c)+(c-(c&y)))}function Xd(a,b){var c=this.f(b);this.g(b,Ed(a,c,0))}function Yd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+(b-(b&y)))}function Zd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function $d(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)} +function ae(a,b){var c=this.b*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)}function be(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+b)}function ce(a,b){var c=this.f(this.b),d=(c&y)*z,c=Ed(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function de(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,ee(a,d,c)+c)}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,this.b)+this.b)}function ge(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)} +function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Tb?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,ee(a,d,c)+c)}function je(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ke(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=c/z|0,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){me[a&7].call(this,a,a>>3&127)} +function ne(){}function oe(){}function K(a){this.u("undefined opcode: "+n(a));qd(this,-1);this.V()}function pe(a){a>A&&(a!=B?a=Vb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;qe.call(this,a,b,c);return c} +function re(a,b,c){var d=!1,e=!1,f=b-b%B;a=a%B+b*B%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=C-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.qa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.ra;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),te(this.gb,this.qa),ue(this.ra)))break;ve(this.ha);ve(this.qa)}while(!ue(this.qa)); a=this.gb[0];this.F=this.ra[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} -function ve(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=D||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%C;b=2*b%E+Math.trunc(c/C);c=a+c%C;d=b-b%C;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} -function we(a){a?a==C?this.j|=163840:a=Ub-a:this.j|=98304;return a}function Q(a,b){var c=a-b;0>c&&(c+=E);pe.call(this,c,b,a);return c}function pe(a,b,c){a=Math.trunc(a/Tb);b=Math.trunc(b/Tb);c=Math.trunc(c/Tb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function S(a,b){return R(a,(~(b/F|0)&15)*F+(~b>>>0))}function T(a,b){return(a>>0)}function U(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function V(a){return a>>0)}function X(a){return(a/z|0)+(a&y)*z}function de(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Sb?y*z:0}return b}function Vd(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} -function se(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function re(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ue(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function te(a){return!a[0]&&!a[1]} -var sd=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},td,function(a,b){0>this.I&&td.call(this);ud.call(this,0,b)},ud,function(a,b){0>this.I&&td.call(this);vd.call(this,0,b)},vd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, +function we(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=C||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%B;b=2*b%E+Math.trunc(c/B);c=a+c%B;d=b-b%B;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} +function xe(a){a?a==B?this.j|=163840:a=Vb-a:this.j|=98304;return a}function P(a,b){var c=a-b;0>c&&(c+=E);qe.call(this,c,b,a);return c}function qe(a,b,c){a=Math.trunc(a/Ub);b=Math.trunc(b/Ub);c=Math.trunc(c/Ub);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function Q(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function R(a,b){return Q(a,(~(b/F|0)&15)*F+(~b>>>0))}function S(a,b){return(a>>0)}function T(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function U(a){return a>>0)}function W(a){return(a/z|0)+(a&y)*z}function ee(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Tb?y*z:0}return b}function Ed(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} +function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} +var td=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},ud,function(a,b){0>this.I&&ud.call(this);vd.call(this,0,b)},vd,function(a,b){0>this.I&&ud.call(this);wd.call(this,0,b)},wd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, -function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},wd,xd,yd,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(this.b)))},function(a,b){this.g(b,we.call(this,this.b))},function(a,b){this.g(this.b, -we.call(this,this.f(b)))},function(a,b){a=we.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,oe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,oe.call(this,this.f(b)))},function(a,b){a=oe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ve.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,ve.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,ve.call(this,this.f(b),this.f(this.b), -!0))},function(a,b){this.g(this.b,this.g(b,ve.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,ve.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,ve.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,ve.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,ve.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=qe.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ -1&15,this.F))},function(a,b){a=qe.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=qe.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=qe.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=qe.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=qe.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, -function(a,b){a=this.f(b);b=this.f(b+1&15);b=qe.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=qe.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?C:0,c=A):(d=d*Math.pow(2,c)%C,c=C-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; -this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& -dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=C,e+=C)}else d=d*Math.pow(2,a)%C+Math.trunc(e%C/Math.pow(2,35-a)),e=e*Math.pow(2,a)%C,c=C-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=C,e+=C)}else-36>=a?(e=-72>=a?d>A?D:0:Math.trunc(d%C/Math.pow(2,-a-35)),d<=A?d=0:(d=D,e+=C)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%C/Math.pow(2,-a))+ -d%C*Math.pow(2,35+a)%C,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=C));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ +function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},xd,yd,zd,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(this.b)))},function(a,b){this.g(b,xe.call(this,this.b))},function(a,b){this.g(this.b, +xe.call(this,this.f(b)))},function(a,b){a=xe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,pe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,pe.call(this,this.f(b)))},function(a,b){a=pe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,we.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b), +!0))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,we.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ +1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, +function(a,b){a=this.f(b);b=this.f(b+1&15);b=re.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?B:0,c=A):(d=d*Math.pow(2,c)%B,c=B-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& +dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=B,e+=B)}else d=d*Math.pow(2,a)%B+Math.trunc(e%B/Math.pow(2,35-a)),e=e*Math.pow(2,a)%B,c=B-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=B,e+=B)}else-36>=a?(e=-72>=a?d>A?C:0:Math.trunc(d%B/Math.pow(2,-a-35)),d<=A?d=0:(d=C,e+=B)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%B/Math.pow(2,-a))+ +d%B*Math.pow(2,35+a)%B,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=B));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ 1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%E,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},K,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.N||(this.g(b,d* -z+c),a||pd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a=C&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Fa,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.sa=this.b},K,function(a){this.w(a)},function(a,b){a= +z+c),a||qd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a=B&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Fa,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.sa=this.b},K,function(a){this.w(a)},function(a,b){a= this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=E&&(a-=E);a/z|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=E);(a/z|0)==y&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&y)*z+this.i);H(this,this.b+1)},function(a,b){this.g(b,(this.j&y)*z+this.i);H(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,O.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,O.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,O.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,O.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))},me,function(a,b){0>T(this.f(b),this.b)&&H(this, -this.i+1)},function(a,b){T(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&H(this,this.i+1)}, -function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))||H(this,this.b)},function(a,b){0>=V(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))&&H(this,this.b)},function(a,b){0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); -0V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), -1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, -O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0V(a)&&H(this,this.b)},function(a, -b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)}, -function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0S(this.f(b),this.b)&&H(this, +this.i+1)},function(a,b){S(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.f(this.b))&&H(this,this.i+1)}, +function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))||H(this,this.b)},function(a,b){0>=U(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))&&H(this,this.b)},function(a,b){0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); +0U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), +1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, +O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0U(a)&&H(this,this.b)},function(a, +b){a=this.g(b,P.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,P.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)}, +function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0>>f.i;0>>= -f.i;0>>a.i;0g&&g>=-C&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=ma.pb&&c<=ma.Ib&&(b=c-(ma.pb-ma.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ma.Gb&&(b=ma.Fb);d.Ya(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.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Kb(this)}; -l.Cb=function(a){if(!this.b){var b=Yc(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ea(c[0]);if(d!=this.Ta)return;c=Ea(c[1]);if(this.b=pb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.xa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.na=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Ea(b.substring(c,f))),c=f+1}}return a} -function Ie(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} -function Je(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; -case "&":e=a;32>=e.ia?f&=g:(f=Ie(e,f,0,!0),g=Ie(e,g,0,!0),f=((f/Ke|0)&(g/Ke|0))*Ke+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Ie(e,f,0,!0),g=Ie(e,g,0,!0),f=(f/Ke|0|g/Ke|0)*Ke+((f|g)>>>0));break;case "^^":e=a;32>=e.ia?f|=g:(f=Ie(e,f,0,!0),g=Ie(e,g,0,!0),f=((f/Ke|0)^(g/Ke|0))*Ke+((f^g)>>>0));break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "><":if(g=35-(g&255))0>f&&(f+=Math.pow(2,36)),f=0>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-B&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=na.pb&&c<=na.Ib&&(b=c-(na.pb-na.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==na.Gb&&(b=na.Fb);d.Ya(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.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Lb(this)}; +l.Cb=function(a){if(!this.b){var b=Zc(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Fa(c[0]);if(d!=this.Ta)return;c=Fa(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.xa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.na=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Fa(b.substring(c,f))),c=f+1}}return a} +function Je(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} +function Ke(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; +case "&":e=a;32>=e.ia?f&=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^^":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)^(g/Le|0))*Le+((f^g)>>>0));break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "><":if(g=35-(g&255))0>f&&(f+=Math.pow(2,36)),f=0<"==k?10:e; -p=!1}Je(a,q,B)&&1==q.length||(m=!0);m?!1===f&&a.u("parse error ("+(h||k)+")"):g=q.pop();a.T=P;return g}function Oe(a,b,c){var d;a.ka=null;b&&("{"!=a.ba[0]&&(b=b.split(a.ba[0]).join("{").split(a.ba[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Le(a,b,0,b.length,a.T,c),void 0!==d&&!1===c&&Pe(a,null,d));return d} -function Me(a,b,c,d,e){var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(f=na(e?"-"+b:b,a.T),e=!1)),null!=f?e&&(f=-f):d||a.u("invalid "+(c?c:"value")+": "+b)):d||a.u("missing "+(c||"value"));return f} -function Pe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=4,g="";if(!f||4>=1,P--;g=q+g;d>>=8}d=r(c,0,!0)+" "+c+". "+ua(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Qe(a){var b=a.K;a.K={};return b} -function Re(a,b){if(b)return Pe(a,b,a.K[b]);var c=0;for(b in a.K)Pe(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Ne={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11},Ke=Math.pow(2,32); -function Se(a){Ge.call(this,a);this.Ea=!1;this.Ca=18;this.ia=36;this.ba=["<",">"];this.qa=[];this.Da=Z();this.L=Z(0);this.pa=Z(0);this.fa=Z(0);this.F=[];this.b=this.M=this.I=[];Te(this);this.S=this.ja=0;this.i=[];this.Aa=void 0;Ue(this);this.D=this;this.ya={};this.Y=this.xb=0;this.U=null;this.P=[];Ve(this,a.messages);this.sa=a.commands;this.O=0;this.Ja=this.Ba=null;this.C=this.Ga=this.Fa=this.ha=this.za=0;this.ra=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return cd(b, -a)}):void 0===global[w]&&(global[w]=function(a){return cd(b,a)})}n(Se,Ge);function We(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,T:c}}function Xe(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.T=d}function Ye(a){return[a.B,a.Wa,a.la,a.T,a.Za]}function Ze(a,b){var c=Z(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=He(a,c.Za=b[4]));return c}l=Se.prototype; -l.Ha=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ca=b.F;(b=Yc(a,"messages"))&&Ve(this,b);if(a=Yc(a,"commands"))this.sa=a;$e(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=We(af(d,c,d.pa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var p=b[e];p.type==c?m++||d.u("..."):(c=p.type,m=Ic[c],p&&d.u(r(p.id,8)+" %"+ -r(e<a&&a>=-C&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function df(a){return ua(a/Rb,6)+" "+ua(a%Rb,6)} -function Ve(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=He(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Zb){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.Aa==b&&(b=pd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Xe(a.i[a.S],b),++a.S==a.i.length&&(a.S=0)));return!1} -function vf(a,b,c,d){var e=Z(b.B),f=a.Ia(b,1),g,h,k,m=0,p=f/Vb|0,q;for(q in wf)if(g=wf[q][p&q]){h=+q;p>>=6;switch(h){case 32512:k=xf;m=p&3;break;case 32256:k=yf;m=p&7;break;case 29248:k=zf,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Af&&(k="B");k=Bf[g||0]+k;if(g){if(28700==h)h=f/Wb&127,m=J(a,h,-1);else for(h=f>>23&15,m=J(a,h,-1),p=0;m&&p>18&15)&&(k+="("+J(a,f, --1)+")")}else k=Ba(k,8)+df(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ia(e,1),g+=" "+df(k),null==e.B)break;while(e.B!=b.B)}h+=Ba(g,16)+f;c&&(h=Ba(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+dd(a.v).toString()+" cs="+r(a.v.Ca)):h+(null!=d?"="+d.toString():""));return h} -function Df(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),m=0;mAf&&(ea="B");if(k==Bf[h]+ea){f=29248!=g?P:(P&3)<<1|(P&12)<<2;f=(B|f<<6)*Vb;break}}if(0<=f)break}if(0<=f)break}}else c&& -(f=g=0);if(0<=f&&c)for(k=c.split(","),q=0;qh||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Te(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.za=0;a.ja=0} -l.La=function(a,b,c){var d=!0;c||eg(this,a,b,!1,!0);if(a!=this.b){var e=We(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].La(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(gg(this,a,a.length-1,"set"),Ue(this)));return d};function eg(a,b,c,d,e){var f=!1;c=We(c);for(var g=1;g>>d.i],b==a.I));h.la||Ue(a);break}}return f} -function hg(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=ua(d,2);Xe(e.Da,d);f+="="+J(e,e.Ia(e.Da),36)+" ";c+=f}if(b){b="";for(d=0;d=jf?1:d==gf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],q=Fa(p,k,a.zb);0>q&&p.splice(-(q+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({td:b,B:c,Pb:d,W:e,tb:f})}function kg(a,b,c){var d=[],e=We(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case ff:H(h, -g);Xe(a.L,h.i);break;case jf:f=65536;break;case kf:f=32768;break;case lf:f=131072;break;case mf:f=32;break;case nf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(jg(a,e));c&&(Xe(a.L,d.i),tf(a,J(a,a.L.B)))}}function rg(a,b){b=Ea(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.u(m)}h[3]&&(g=h[3],f=null);h=a.fa;m=b;h.B=m.B;h.Wa=m.Wa;h.la=m.la;h.T=m.T;a.u(vf(a,b,g,f));e-=b.B-k;c++}}} -function ig(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(rf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Jb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length);var Hd= -[];"call"==Jf&&(zb=1E5,Hd=["CALL"]);for(void 0!==If&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.Aa=fa;Lf++;zb--}}Lf||(a.u("no "+Kf+"history available"),a.Aa=void 0)}else{var fb=af(a,oa,a.pa);if(fb){var Ka=0,Of="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||lh,Ka=Me(a,Ca);else{var Pf=af(a,Ca);Pf&& -(Ka=Pf.B-fb.B)}0>Ka&&(Ka=0);65536Bb?".":String.fromCharCode(Bb)),Ac=Ac-7}La&&(La+="\n");La=Of?La+(qa+","):La+(oa+": "+qa+(0>Rf?" "+Kd:""))}La&& -a.u(La);a.T=nh}}}}break;case "e":if("else"==g[0])break;var Sf,Tf,Uf=g[0],Md=g[1];"e"==Uf||"ew"==Uf?(Sf=a.Ia,Tf=a.rb):Md=null;if(null==Md)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=af(a,Md,a.pa);if(Bc)for(var Nd=2;NdQd;){for(var Ma=null,sh= -256;65536>Eb.B>>>0;){Rd.B=a.Ia(Eb,2);if(null==Eb.B||!sh--)break;if(!(Rd.B&1)){for(var th=a,Cc=Rd,Wf=null,Fb=Cc.B,Xf=Fb,Sd=1;6>=Sd&&Fb;Sd++){if(2cg)a.u("step commands:"), -a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var dg=Z(a.v.i);a.Ia(dg);a.O?(a.La(a.b,dg,!0),pf(a)||(a.H&&hd(a.H),a.O=0)):sg(a,cg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}sf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Hb=+g[2];if(8==Hb||10==Hb||16==Hb)a.T=Hb;else{a.u("invalid base: "+Hb);break}}a.u("default base: "+a.T);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.pa= -Ib;break;case "start":a.v.Da=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&$c(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(ed(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), -a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":sg(a,g[0],g[1]);break;case "u":tf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){pg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Pb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){rg(a,b.substr(1));break}var Td="commands:",Ud;for(Ud in ug)Td+="\n"+ -Ba(Ud,9)+ug[Ud];qd(a)||(Td+="\nnote: history disabled if no exec breakpoints");a.u(Td);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(fg){a.u("Debugger "+(fg.stack||fg.message)),d=!1}return d}function cd(a,b,c){b=He(a,b,c);for(var d in b)if(!ig(a,b[+d]))return!1;return!0} -var ug={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Af=20,Bf=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), -ff=0,gf=1,hf=2,jf=3,kf=4,lf=5,mf=6,nf=7,ef="PC RA EA C0 C1 OV ND PD".split(" "),vg={},wf=(vg[28672]={0:101},vg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},vg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Af,9216:53,9472:52, -9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},vg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},vg[29248]={24576:79,24640:80,25088:81,25152:82},vg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},vg),xf=["","I","M","S"],yf=" L E LE A GE N G".split(" "),zf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Cf=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],of=1E3,rf=">> ";Xa(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&yg(a,"unrecognized HTML entity: "+c[0])}a.ea&&(a.ea+="\n");a.ea+=e;setTimeout(function(){wg(a)},0)}})}} -function xg(a){if(0<=a.R.indexOf("p"))return a.u(a.ea),0;var b=Qe(a.i);try{var c,d=a.ea.split(/\r?\n/);for(c=0;c=--g)break}0>g&&a.error("missing bracket(s): "+f);0<=m&&(h=f.substr(m,k-m));for((f=h)&&(b=b.replace(f,Gg(a,Hg,f)));f=Ig(a,b);)b=b.replace(f,f.slice(0,-1));if(!Dg(a,d,b))switch(d){case "=":d=Bg(a,b);void 0===d?a.error("parseExpression("+ -b+")"):Fg(a,c,d);break;case Jg:case Kg:case Lg:Eg(a,e);break;case Mg:Ng(a,0,b.replace(",",",,"));break;case Og:case Pg:case Qg:Gg(a,d,b);break;case Rg:case Sg:break;default:c=d,d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Bg(a,b,!0):(c=Df(a.i,c,d,a.ta,!0),0>c&&(c=Df(a.i,"",b,a.ta,!0),0>c&&(c=void 0))),void 0!==c?Ng(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} -function Dg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){b=",";"("==c[0]&&(b+=")",c=c.substr(1));for(var e=[];c;){c=c.trim();var f=Tg(a,c,b);if(!f)break;e.push(f);c=c.substr(f.length+1)}Ag(a,d.ea,d.ub,e);return!0}if("_"!=b[0])return!1;switch(b.substr(1)){case Pg:d.mb||Ag(a,d.ea);break;case Qg:for(;0p)break;var m=p+1,q=p+h.length;p&&f[p-1].match(/[0-9A-Z$%.]/i)||!(q>=f.length)&&f[q].match(/[0-9A-Z$%.]/i)||(f=f.substr(0,p)+k+f.substr(q),m=p+k.length)}if(!zg(a,f))break}}og.prototype.error=function(a){throw Error("error"+(this.ma?" at line "+va(this.ma):"")+": "+a);}; -function yg(a,b){a.u("warning"+(a.ma?" at line "+va(a.ma):"")+": "+b)}function Tg(a,b,c){c=void 0===c?",":c;for(var d=0,e=null,f=0;d"==g&&0>--f){a.error("missing bracket(s): "+b);break}d++}f?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.w+=b}if(null==a.j){var d=b=0,e,f,g=a.w.length;a.F==Kg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Ng(a,d),b=0)}b&&Ng(a,d)}return c} -function Gg(a,b,c){var d,e,f,g;a.J="<";a.H=">";e=f=[];if(b==Og){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+" definition: "+c),"";b=d[1];a.v[b]&&a.error("macro redefined: "+b);e=d[2].match(/[A-Z$%.][0-9A-Z$%.]*/g);c=Vg;g=3}else if(b==Hg)a.J="[",a.H="]",b="_"+va(a.ta,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)],c=Wg,a.D.push(b),g=0;else{g=Tg(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+ -1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="_"+b;c=Bg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;var h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.H&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,ea:h,ma:a.ma};a.b?a.C=b:Dg(a,b);return b}function Fg(a,b,c,d){var e,f;d=void 0===d?!1:d;e=void 0===e?!1:e;f=void 0===f?!1:f;b=b.toUpperCase().substr(0,6);d&&a.O[b]?a.error("label "+b+" redefined"):(a.O[b]={name:b,value:c,ma:a.ma,jd:d,hd:e,kd:f},a.i.K[b]=c)} -function Ng(a,b,c){a.G[a.ta]=Cg(a,b);null!=c&&a.I.push({ta:a.ta,Db:c});a.ta++}function Cg(a,b,c){c=void 0===c?a.ta:c;var d=Ie(a.i,b||0,36,!0);(b<-C||b>=E)&&yg(a,"truncated value "+ua(b)+" at location "+ua(c)+" to "+ua(d));return d}var Jg="ASCII",Kg="ASCIZ",Og="DEFINE",Pg="IFE",Hg="LITERAL",Rg="PAGE",Qg="REPEAT",Lg="SIXBIT",Sg="SUBTTL",Mg="XWD",Vg=-1,Wg=-2,Ug=-3; -function Xg(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;Yg(this,b);this.O=Yc(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.S=this.P=!1;this.ca=Yc(this,"url")||"";(Math.random()+.1).toString(36);this.i=Zg(this);if(this.v=qb("CPU",this.id)){this.D=qb("Debugger",this.id);this.G=new xc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=ob(this.id);if((this.j=qb("Panel",this.id))&&this.j.wa)for(b= -0;b\nLicense: GPL version 3 or later ");for(b=0;b$g){if(ah(d,this.L)){this.C=new G(this,"1.34.2",jh);ah(this.C)&&(kh(this,d),a=wh,xh(this.C));this.C.set(gh,Ga());yh(this.C);var e=this.b&&!this.K;if(a==hh||nb("Click OK to restore the previous "+Pb+" machine state, or CANCEL to reset the machine.")){if(c=fh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ah(d,g):("error"==f&&"no machine state"!= -g?(this.da("Error: "+g),"unable to verify user"==g&&(Qa(zh,""),this.i=null)):this.u(f+": "+g),xh(d),ah(d)?(c=fh(d),e=!0):c=!1))}e&&dh(this,c?d:null)}else a==wh&&d.clear()}else dh(this);delete this.L;delete this.I}e=ob(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Ah(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(kh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function kh(a,b){if(nb("There may be a problem with your "+Pb+" machine.\n\nTo help us diagnose it, click OK to send this "+Pb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Pb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} -function tg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",eh),h=Ga();g.set(gh,h);f.set(gh,h);f.set(Bh,"1.34.2");f.set(Ch,window?window.location.href:null);f.set(Dh,window?window.navigator.userAgent:"");a.v&&a.v.na&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.na(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=ob(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.T||8,e=e||0,e=8==f?ua(e,void 0):r(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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+"...");Ha(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Lh(a,b,c)}})}else c(a,null)} -function Mh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);m&&(--Ih||ab(!0));m=!1}var h,k,m=!0;Ih++;lb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=p:B.appendChild(document.createTextNode(p));q.appendChild(B)}d|| -(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Jh(d,null,a,null,!1,f,function(a,e){e?(kb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Ih||ab(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Ih|| -ab(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Jh(c,b,a,e,!0,f,p):Kh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(P){g(P.message)}return m}window.embedPDP10=function(a,b,c,d){ab(!1);return Mh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ab(!1);return Mh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return qb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!tb[a]){for(var c=!0,d=tb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p<"==k?10:e; +p=!1}Ke(a,t,D)&&1==t.length||(m=!0);m?!1===f&&a.u("parse error ("+(h||k)+")"):g=t.pop();a.S=Y;return g}function Pe(a,b,c){var d;a.ka=null;b&&("{"!=a.ba[0]&&(b=b.split(a.ba[0]).join("{").split(a.ba[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Me(a,b,0,b.length,a.S,c),void 0!==d&&!1===c&&Qe(a,null,d));return d} +function Ne(a,b,c,d,e){var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(f=ta(e?"-"+b:b,a.S),e=!1)),null!=f?e&&(f=-f):d||a.u("invalid "+(c?c:"value")+": "+b)):d||a.u("missing "+(c||"value"));return f} +function Qe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;if(8==a.S)d=c+". "+n(c,0,!0);else{d=c;var f=4,g="";if(!f||4>=8;d=q(c,0,!0)+" "+c+". "+n(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Re(a){var b=a.K;a.K={};return b}function Se(a,b){if(b)return Qe(a,b,a.K[b]);var c=0;for(b in a.K)Qe(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Oe={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11},Le=Math.pow(2,32); +function Te(a){He.call(this,a);this.Ea=!1;this.Ca=18;this.ia=36;this.ba=["<",">"];this.qa=[];this.Da=X();this.L=X(0);this.pa=X(0);this.fa=X(0);this.F=[];this.b=this.M=this.I=[];Ue(this);this.T=this.ja=0;this.i=[];this.Aa=void 0;Ve(this);this.D=this;this.ya={};this.Y=this.xb=0;this.U=null;this.P=[];We(this,a.messages);this.sa=a.commands;this.O=0;this.Ja=this.Ba=null;this.C=this.Ga=this.Fa=this.ha=this.za=0;this.ra=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return dd(b, +a)}):void 0===global[w]&&(global[w]=function(a){return dd(b,a)})}la(Te,He);function Xe(a){a=a&&a.B;null==a&&(a=-1);return a}function X(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,S:c}}function Ye(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.S=d}function Ze(a){return[a.B,a.Wa,a.la,a.S,a.Za]}function $e(a,b){var c=X(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Ie(a,c.Za=b[4]));return c}l=Te.prototype; +l.Ha=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ca=b.F;(b=Zc(a,"messages"))&&We(this,b);if(a=Zc(a,"commands"))this.sa=a;af(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Xe(bf(d,c,d.pa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var p=b[e];p.type==c?m++||d.u("..."):(c=p.type,m=Jc[c],p&&d.u(q(p.id,8)+" %"+ +q(e<a&&a>=-B&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ef(a){return n(a/Sb,6)+" "+n(a%Sb,6)} +function We(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Ie(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in $b){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.Aa==b&&(b=qd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ye(a.i[a.T],b),++a.T==a.i.length&&(a.T=0)));return!1} +function wf(a,b,c,d){var e=X(b.B),f=a.Ia(b,1),g,h,k,m=0,p=f/Wb|0,t;for(t in xf)if(g=xf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=yf;m=p&3;break;case 32256:k=zf;m=p&7;break;case 29248:k=Af,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Bf&&(k="B");k=Cf[g||0]+k;if(g){if(28700==h)h=f/Xb&127,m=J(a,h,-1);else for(h=f>>23&15,m=J(a,h,-1),p=0;m&&p>18&15)&&(k+="("+J(a,f, +-1)+")")}else k=Ea(k,8)+ef(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ia(e,1),g+=" "+ef(k),null==e.B)break;while(e.B!=b.B)}h+=Ea(g,16)+f;c&&(h=Ea(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+ed(a.v).toString()+" cs="+q(a.v.Ca)):h+(null!=d?"="+d.toString():""));return h} +function Ef(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),m=0;mBf&&(ea="B");if(k==Cf[h]+ea){f=29248!=g?Y:(Y&3)<<1|(Y&12)<<2;f=(D|f<<6)*Wb;break}}if(0<=f)break}if(0<=f)break}}else c&& +(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ue(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.za=0;a.ja=0} +l.La=function(a,b,c){var d=!0;c||fg(this,a,b,!1,!0);if(a!=this.b){var e=Xe(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].La(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(hg(this,a,a.length-1,"set"),Ve(this)));return d};function fg(a,b,c,d,e){var f=!1;c=Xe(c);for(var g=1;g>>d.i],b==a.I));h.la||Ve(a);break}}return f} +function ig(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=n(d,2);Ye(e.Da,d);f+="="+J(e,e.Ia(e.Da),36)+" ";c+=f}if(b){b="";for(d=0;d=kf?1:d==hf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ga(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({td:b,B:c,Pb:d,W:e,tb:f})}function lg(a,b,c){var d=[],e=Xe(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case gf:H(h, +g);Ye(a.L,h.i);break;case kf:f=65536;break;case lf:f=32768;break;case mf:f=131072;break;case nf:f=32;break;case of:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(kg(a,e));c&&(Ye(a.L,d.i),uf(a,J(a,a.L.B)))}}function sg(a,b){b=Fa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.u(m)}h[3]&&(g=h[3],f=null);h=a.fa;m=b;h.B=m.B;h.Wa=m.Wa;h.la=m.la;h.S=m.S;a.u(wf(a,b,g,f));e-=b.B-k;c++}}} +function jg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(sf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Kb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length);var Jd= +[];"call"==Kf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Jf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.Aa=fa;Mf++;Ab--}}Mf||(a.u("no "+Lf+"history available"),a.Aa=void 0)}else{var fb=bf(a,oa,a.pa);if(fb){var Ka=0,Pf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||mh,Ka=Ne(a,Ca);else{var Qf=bf(a,Ca);Qf&& +(Ka=Qf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Pf?La+(qa+","):La+(oa+": "+qa+(0>Sf?" "+Md:""))}La&& +a.u(La);a.S=oh}}}}break;case "e":if("else"==g[0])break;var Tf,Uf,Vf=g[0],Od=g[1];"e"==Vf||"ew"==Vf?(Tf=a.Ia,Uf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=bf(a,Od,a.pa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null,th= +256;65536>Fb.B>>>0;){Td.B=a.Ia(Fb,2);if(null==Fb.B||!th--)break;if(!(Td.B&1)){for(var uh=a,Cc=Td,Xf=null,Gb=Cc.B,Yf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2dg)a.u("step commands:"), +a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var eg=X(a.v.i);a.Ia(eg);a.O?(a.La(a.b,eg,!0),qf(a)||(a.H&&id(a.H),a.O=0)):tg(a,dg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}tf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.S=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.S);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.pa= +Ib;break;case "start":a.v.Da=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&ad(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(fd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), +a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":tg(a,g[0],g[1]);break;case "u":uf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){qg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Qb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){sg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in vg)Vd+="\n"+ +Ea(Wd,9)+vg[Wd];rd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(gg){a.u("Debugger "+(gg.stack||gg.message)),d=!1}return d}function dd(a,b,c){b=Ie(a,b,c);for(var d in b)if(!jg(a,b[+d]))return!1;return!0} +var vg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Bf=20,Cf=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), +gf=0,hf=1,jf=2,kf=3,lf=4,mf=5,nf=6,of=7,ff="PC RA EA C0 C1 OV ND PD".split(" "),wg={},xf=(wg[28672]={0:101},wg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},wg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Bf,9216:53,9472:52, +9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},wg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},wg[29248]={24576:79,24640:80,25088:81,25152:82},wg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, +28692:98,28696:99,28700:100},wg),yf=["","I","M","S"],zf=" L E LE A GE N G".split(" "),Af="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Df=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],pf=1E3,sf=">> ";Ya(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&zg(a,"unrecognized HTML entity: "+c[0])}a.ea&&(a.ea+="\n");a.ea+=e;setTimeout(function(){xg(a)},0)}})}} +function yg(a){if(0<=a.R.indexOf("p"))return a.u(a.ea),0;var b=Re(a.i);try{var c,d=a.ea.split(/\r?\n/);for(c=0;c=--g)break}0>g&&a.error("missing bracket(s): "+f);0<=m&&(h=f.substr(m,k-m));for((f=h)&&(b=b.replace(f,Hg(a,Ig,f)));f=Jg(a,b);)b=b.replace(f,f.slice(0,-1));if(!Eg(a,d,b))switch(d){case "=":d=Cg(a,b);void 0===d?a.error("parseExpression("+ +b+")"):Gg(a,c,d);break;case Kg:case Lg:case Mg:Fg(a,e);break;case Ng:Og(a,0,b.replace(",",",,"));break;case Pg:case Qg:case Rg:Hg(a,d,b);break;case Sg:case Tg:break;default:c=d,d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Cg(a,b,!0):(c=Ef(a.i,c,d,a.ta,!0),0>c&&(c=Ef(a.i,"",b,a.ta,!0),0>c&&(c=void 0))),void 0!==c?Og(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} +function Eg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){b=",";"("==c[0]&&(b+=")",c=c.substr(1));for(var e=[];c;){c=c.trim();var f=Ug(a,c,b);if(!f)break;e.push(f);c=c.substr(f.length+1)}Bg(a,d.ea,d.ub,e);return!0}if("_"!=b[0])return!1;switch(b.substr(1)){case Qg:d.mb||Bg(a,d.ea);break;case Rg:for(;0p)break;var m=p+1,t=p+h.length;p&&f[p-1].match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&f[t].match(/[0-9A-Z$%.]/i)||(f=f.substr(0,p)+k+f.substr(t),m=p+k.length)}if(!Ag(a,f))break}}pg.prototype.error=function(a){throw Error("error"+(this.ma?" at line "+wa(this.ma):"")+": "+a);}; +function zg(a,b){a.u("warning"+(a.ma?" at line "+wa(a.ma):"")+": "+b)}function Ug(a,b,c){c=void 0===c?",":c;for(var d=0,e=null,f=0;d"==g&&0>--f){a.error("missing bracket(s): "+b);break}d++}f?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.w+=b}if(null==a.j){var d=b=0,e,f,g=a.w.length;a.F==Lg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Og(a,d),b=0)}b&&Og(a,d)}return c} +function Hg(a,b,c){var d,e,f,g;a.J="<";a.H=">";e=f=[];if(b==Pg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+" definition: "+c),"";b=d[1];a.v[b]&&a.error("macro redefined: "+b);e=d[2].match(/[A-Z$%.][0-9A-Z$%.]*/g);c=Wg;g=3}else if(b==Ig)a.J="[",a.H="]",b="_"+wa(a.ta,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)],c=Xg,a.D.push(b),g=0;else{g=Ug(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+ +1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="_"+b;c=Cg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;var h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.H&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,ea:h,ma:a.ma};a.b?a.C=b:Eg(a,b);return b}function Gg(a,b,c,d){var e,f;d=void 0===d?!1:d;e=void 0===e?!1:e;f=void 0===f?!1:f;b=b.toUpperCase().substr(0,6);d&&a.O[b]?a.error("label "+b+" redefined"):(a.O[b]={name:b,value:c,ma:a.ma,jd:d,hd:e,kd:f},a.i.K[b]=c)} +function Og(a,b,c){a.G[a.ta]=Dg(a,b);null!=c&&a.I.push({ta:a.ta,Db:c});a.ta++}function Dg(a,b,c){c=void 0===c?a.ta:c;var d=Je(a.i,b||0,36,!0);(b<-B||b>=E)&&zg(a,"truncated value "+n(b)+" at location "+n(c)+" to "+n(d));return d}pg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Kg="ASCII",Lg="ASCIZ",Pg="DEFINE",Qg="IFE",Ig="LITERAL",Sg="PAGE",Rg="REPEAT",Mg="SIXBIT",Tg="SUBTTL",Ng="XWD",Wg=-1,Xg=-2,Vg=-3; +function Yg(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;Zg(this,b);this.O=Zc(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.T=this.P=!1;this.ca=Zc(this,"url")||"";(Math.random()+.1).toString(36);this.i=$g(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new yc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.wa)for(b= +0;b\nLicense: GPL version 3 or later ");for(b=0;bah){if(bh(d,this.L)){this.C=new G(this,"1.34.2",kh);bh(this.C)&&(lh(this,d),a=xh,yh(this.C));this.C.set(hh,Ha());zh(this.C);var e=this.b&&!this.K;if(a==ih||pb("Click OK to restore the previous "+Qb+" machine state, or CANCEL to reset the machine.")){if(c=gh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?bh(d,g):("error"==f&&"no machine state"!= +g?(this.da("Error: "+g),"unable to verify user"==g&&(Ra(Ah,""),this.i=null)):this.u(f+": "+g),yh(d),bh(d)?(c=gh(d),e=!0):c=!1))}e&&eh(this,c?d:null)}else a==xh&&d.clear()}else eh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Bh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(lh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; +function lh(a,b){if(pb("There may be a problem with your "+Qb+" machine.\n\nTo help us diagnose it, click OK to send this "+Qb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Qb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ia("http://www.pcjs.org/api/v1/report",d,!0)}} +function ug(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",fh),h=Ha();g.set(hh,h);f.set(hh,h);f.set(Ch,"1.34.2");f.set(Dh,window?window.location.href:null);f.set(Eh,window?window.navigator.userAgent:"");a.v&&a.v.na&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.na(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.S||8,e=e||0,e=8==f?n(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ia(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);Mh(a,b,c)}})}else c(a,null)} +function Nh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--Jh||hb(!0));m=!1}var h,k,m=!0;Jh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=p:D.appendChild(document.createTextNode(p));t.appendChild(D)}d|| +(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Kh(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Jh||hb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Jh|| +hb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Kh(c,b,a,e,!0,f,p):Lh(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){hb(!1);return Nh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){hb(!1);return Nh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;pb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ba=g.load;d.Aa=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.qk=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(w(d.Z[0]),d=null):(w("Empty resource: "+a),d=null));d.ia=g.symbols}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Mb=this.id:(this.vb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,fb:!1,xd:!1,ba:!1,error:!1};this.Oc=null;this.A.error=!1;this.ja=c||0;this.D=this.f=this.F=this.J=this.Va=null;db.push(this)}function eb(a,b,c){fb[a]&&b&&(fb[a][b]=c)}function gb(){return Date.now()||+new Date} +function Ya(a){if(Za)try{for(var b=0;ba?this.Mb=this.id:(this.vb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,fb:!1,xd:!1,ca:!1,error:!1};this.Oc=null;this.A.error=!1;this.ja=c||0;this.D=this.f=this.F=this.J=this.Va=null;db.push(this)}function eb(a,b,c){fb[a]&&b&&(fb[a][b]=c)}function gb(){return Date.now()||+new Date} function w(a){window&&window.alert(a)}function hb(a){var b=!1;window&&(b=window.confirm(a));return b}function ib(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b=a.f.ka?8:16,c=65472<=a.ga&&a.ga<65472+b,b=c?1:2,c=c?15:a.F.I;a.b[oc]&&a.b[oc][1]||(b=-b);jc(a,a.ga&~c|a.ga+b&c)}function jc(a,b){a.ga=b&a.F.I;if(a.B!==a.ga){a.B=a.ga;b=a.B;for(var c=0;22>c;c++)Ec(a,"A"+c,b&1<c;c++)Ec(a,"D"+c,b&1<b;b++)a.b["S"+b][1]=a.Ya&1<=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=me(a)&&(a.Ob=a.Rb=-1,ie(a),a.ca(),c=!0);c&&a.v(me(a)+" cycles: checksum="+v(a.oc))}} -h.wa=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.ba)a=!0;else{var b=null,c,k=ib(a.id);for(c=0;c=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=me(a)&&(a.Ob=a.Rb=-1,ie(a),a.da(),c=!0);c&&a.v(me(a)+" cycles: checksum="+v(a.oc))}} +h.wa=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.ca)a=!0;else{var b=null,c,k=ib(a.id);for(c=0;ca.wb/a.xb?b=1:d=!0;a.mb=b;b=a.md*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&&qe(a.J)}xc(a,a.Ka);a.Ka=0;a.Ja=gb();a.kb=0;oe(a);return d}function md(a,b){var c=a.ha.length;a.ha.push([-1,b]);return c}function od(a,b,c,d){0<=b&&ba.ha[b][0])&&(c=a.Zc*a.mb/1E3*c|0,a.A.V&&(c+=re(a)),a.ha[b][0]=c)} function se(a,b){for(var c=a.ha.length-1;0<=c;c--){var d=a.ha[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function te(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function re(a,b){var c=a.lb-=a.b;a.b=a.ma=0;b&&(a.lb=0);return c} -h.hh=function(){if(this.A.V){this.zc>=this.Zc&&oe(this,!0);this.Sb=0;this.nc=gb();if(this.kb){var a=this.nc-this.kb;a>this.nd&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=se(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=re(this,!0);this.Sb+=b;this.Ka+=b;yc(this,b);wc(this,b);this.Ab-=b;if(0>=this.Ab){this.Ab+=this.qc;++this.od>=ue&&(this.J&&H(this.J,void 0),this.od=0);break}}while(this.A.V)}catch(e){this.ca();this.J&&this.J.stop(gb(),me(this)); +h.hh=function(){if(this.A.V){this.zc>=this.Zc&&oe(this,!0);this.Sb=0;this.nc=gb();if(this.kb){var a=this.nc-this.kb;a>this.nd&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=se(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=re(this,!0);this.Sb+=b;this.Ka+=b;yc(this,b);wc(this,b);this.Ab-=b;if(0>=this.Ab){this.Ab+=this.qc;++this.od>=ue&&(this.J&&H(this.J,void 0),this.od=0);break}}while(this.A.V)}catch(e){this.da();this.J&&this.J.stop(gb(),me(this)); Bb(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.Zd;this.kb=gb();var c=this.nd;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,ne(this)));if(0>c||this.wbc&&(this.Ja-=c),c=0;this.zc+=this.Sb;this.kb+=c;a(b,c)}}}; -function uc(a,b){if(!Cb(a))if(a.A.V)a.v(a.toString()+" busy");else{ne(a);a.A.V=!0;a.A.Tc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.J&&(b&&qe(a.J,!0),a.J.start(a.Ja,me(a)));a.D||a.status("Started");setTimeout(a.Zd,0)}}h.Cc=function(){return 0};h.ca=function(a){var b=!1;if(this.A.V){re(this);xc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.J&&this.J.stop(gb(),me(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var pe=30,ue=15,fe=["power","reset"]; +function uc(a,b){if(!Cb(a))if(a.A.V)a.v(a.toString()+" busy");else{ne(a);a.A.V=!0;a.A.Tc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.J&&(b&&qe(a.J,!0),a.J.start(a.Ja,me(a)));a.D||a.status("Started");setTimeout(a.Zd,0)}}h.Cc=function(){return 0};h.da=function(a){var b=!1;if(this.A.V){re(this);xc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.J&&this.J.stop(gb(),me(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var pe=30,ue=15,fe=["power","reset"]; function ve(a){var b=+a.model||1170;ee.call(this,a,6666667);this.ka=b;this.Xc=+a.addrReset||0;this.La=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.ua=this.X=[];this.M=this.B=this.Ha=this.xc=[];this.Qa=this.O=this.Td=this.yb=this.zb=this.rb=this.jb=this.P=this.uc=this.ob=this.za=this.S=this.vc=this.wc=this.W=this.i=0;this.Wd=[4,2,0,1];this.Ac=0;this.Yd=255;1120>=this.ka?(this.be=we.bind(this),this.Lb=this.Cf,this.Ac=8,this.Yd=-1,this.fe=255,this.ee=0):(this.be=xe.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 ee.prototype.Ea.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.Xc,-1,-2,-3,-4,-5,-6,-7,-8];this.ua=[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, +h.reset=function(){this.status("Model "+this.ka);this.A.V&&this.da();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.Xc,-1,-2,-3,-4,-5,-6,-7,-8];this.ua=[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.La=-1;this.u=this.j=this.Yc=this.U=this.Y=this.i=this.uc=0;sc(this);he(this);this.A.error=!1;ee.prototype.reset.call(this)};function sc(a){a.S=0;a.vc=0;a.wc=0;a.W=0;a.P=0;a.ob=0;a.za=255;a.yb=0;a.zb=0;a.rb=0;a.jb=262143;a.Qa=a.g[7];a.O=0;a.R=null;a.F&&(ye(a),a.Td=hd(a.F))} function ye(a){a.jc=a.cd;a.kc=a.dd;a.Uc=a.jd;a.lc=a.ld;a.sc&&(a.jc=a.pe,a.kc=a.te);a.tc&&(a.Uc=a.ze,a.lc=a.Ae);a.yb?(a.Ia=65536,a.ub=a.W&16?4186112:253952,a.ya=a.se,a.pa=a.sc?a.$g:a.Fd,a.Hb=a.tc?a.ti:a.Jd,$c(a.F,a.W&16?22:18)):(a.Ia=0,a.ub=57344,a.ya=a.Gf,a.pa=a.sc?a.Zg:a.ye,a.Hb=a.tc?a.si:a.De,$c(a.F,16))}function ud(a){var b=a.S;b&57344||(b=b&-3199|a.zb<<5|a.rb<<1);return b} function vd(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,ye(a))}}function wd(a){a.S&57344||(a.vc=a.O>>16&65535);a=a.vc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function xd(a){a.S&57344||(a.wc=a.O&65535);return a.wc}function yd(a,b){1170>a.ka&&(b&=-49);a.W!=b&&(a.W=b,a.jb=b&16?4194303:262143,ye(a))} -function ze(a,b,c,d){a.Xc=b;rc(a,b);Bd(a,0);a.F.reset();sc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.ba?a.A.V||uc(a):a.A.ra=!0}else a.D&&a.A.ba?a.ca()||a.J.A.reset||(je(a.D),H(a.J,-1)):!1===c&&a.ca();!a.A.V&&a.ta&&a.ta.stop()}h.qe=function(){return 0}; +function ze(a,b,c,d){a.Xc=b;rc(a,b);Bd(a,0);a.F.reset();sc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.ca?a.A.V||uc(a):a.A.ra=!0}else a.D&&a.A.ca?a.da()||a.J.A.reset||(je(a.D),H(a.J,-1)):!1===c&&a.da();!a.A.V&&a.ta&&a.ta.stop()}h.qe=function(){return 0}; h.save=function(){var a=new G(this);a.set(0,[this.g,this.ua,this.X,this.M,this.B,this.Ha,this.xc,this.P,this.uc,this.ob,this.za,this.zb,this.rb,this.Qa,this.i,this.O,this.La,this.Dc,this.Ec,this.Xc]);a.set(1,[Ad(this),ud(this),wd(this),xd(this),this.W]);a.set(2,[this.nb,this.mb,this.A.ra]);a.set(3,Ae(this));a.set(4,te(this));return a.data()}; h.restore=function(a){var b=ia(a[0]);this.g=b.next().value;this.ua=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.za=b.next().value;this.zb=b.next().value;this.rb=b.next().value;this.Qa=b.next().value;this.i=b.next().value;this.O=b.next().value;this.La=b.next().value;this.Dc=b.next().value;this.Ec=b.next().value;this.Xc=b.next().value;b=a[1];Bd(this, b[0]);vd(this,b[1]);this.vc=b[2];this.wc=b[3];yd(this,b[4]);b=a[2];this.nb=b[0];ne(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>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 zd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.ob=b} h.Fa=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 Je(a,b){a.I=a.L=a.C=b;a.G=a.I^a.C>>1}function Ke(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.qa){0>this.La?this.La=Ad(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.pa(a|this.Ia),e=this.pa(a+2&65535|this.Ia);Bd(this,e&-12289|this.La>>2&12288);Le(this,this.La);Le(this,this.g[7]);rc(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.La=-1;this.Dc=c;this.Ec=a;-1==c&&this.ca();if(-4<=c)throw a;}}; +h.sa=function(a,b,c){if(!this.qa){0>this.La?this.La=Ad(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.pa(a|this.Ia),e=this.pa(a+2&65535|this.Ia);Bd(this,e&-12289|this.La>>2&12288);Le(this,this.La);Le(this,this.g[7]);rc(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.La=-1;this.Dc=c;this.Ec=a;-1==c&&this.da();if(-4<=c)throw a;}}; function Me(a){var b=Ne(a),c=Ne(a);a.w&49152&&(c=c&-225|a.w&63712);rc(a,b);Bd(a,c);a.i&=-17}function Oe(a,b){var c=b>>13&31;31>c&&(b=a.W&32?a.Ha[c]+(b&8191)&4194303:b&-3932161);return b} function Pe(a,b,c){var d=[];if(c){c=Oe(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.Wd[a.N]||(d&=7);e=a.B[a.N][d];f=(a.M[a.N][d]<<6)+(b&8191)&a.jb;3932160<=f&&(f=Oe(a,f));if(a.qa)return f;f>=a.Td&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& @@ -166,8 +166,8 @@ function Te(a,b,c,d){a.O=a.O&65535|1441792;var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=Qe function Xe(a,b){var c=a.j=b&7;return(b=a.u=(b&56)>>3)?a.jc(a.ya(b,c,3)):a.g[c]&255}function Ye(a,b){var c,d=a.j=b&7;(b=a.u=(b&56)>>3)?c=a.kc(a.ya(b,d,2)):c=a.g[d];return c}function Ze(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Yc=a.ya(b,e,7),c=0>c?a.g[-c-1]&255:c,a.Uc(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.ya(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 $e(a,b,c,d,e){var f=a.j=b&7;(b=a.u=(b&56)>>3)?(d=a.ya(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.Uc(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 af(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.ya(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.D?bf(this.D)?1:this.A.Tc?-1:0:0,c=a?this.A.Tc?0:1:-1;this.A.Tc=!1;this.lb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(cf(this.D,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.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&&(Fe(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&He(this,f),a=!0);this.R||this.ob||(this.i&=-3)}else this.i& -1&&this.i++;if(a){if(this.i&4&&cf(this.D,this.g[7],c)){this.ca();break}if(0>c)break}if(this.i&112&&Ie(this)){if(this.i&4&&cf(this.D,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.pa(a);this.g[7]=a+2&65535;this.be(f)}while(0>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&&(Fe(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&He(this,f),a=!0);this.R||this.ob||(this.i&=-3)}else this.i& +1&&this.i++;if(a){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}if(this.i&112&&Ie(this)){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.pa(a);this.g[7]=a+2&65535;this.be(f)}while(0>1|b<<16;Je(this,a);return a&65535}function Ef(a,b){a=b&128|b>>1|b<<8;Je(this,a<<8);return a&255}function Ff(a,b){a=b&~a;this.Fa(a);return a}function Gf(a,b){a=b&~a;this.Fa(a<<8);return a} function Hf(a,b){a|=b;this.Fa(a);return a}function If(a,b){a|=b;this.Fa(a<<8);return a}function Jf(a,b){a=~b|65536;this.qb(a);return a&65535}function Kf(a,b){a=~b|256;this.qb(a<<8);return a&255}function Lf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Mf(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 Nf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Of(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255} function Pf(a,b){a=-b;this.qb(a,a&b&32768);return a&65535}function Qf(a,b){a=-b;this.qb(a<<8,(a&b&128)<<8);return a&255}function Rf(a,b){a=b<<1|this.C>>16&1;Je(this,a);return a&65535}function Sf(a,b){a=b<<1|this.C>>16&1;Je(this,a<<8);return a&255}function Tf(a,b){a=(this.C&65536|b)>>1|b<<16;Je(this,a);return a&65535}function Uf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Je(this,a<<8);return a&255}function Vf(a,b){var c=b-a;Ke(this,c,a,b);return c&65535} @@ -179,7 +179,7 @@ function hg(a){var b=Ve(this,a);a=Ye(this,a);this.Fa((0>b?this.g[-b-1]:b)&a);thi function ng(a){Ge(this,a,De(this)||!Ee(this)!=!Ce(this))}function og(a){Ge(this,a,Be(this)||De(this))}function pg(a){Ge(this,a,!Ee(this)!=!Ce(this))}function qg(a){Ge(this,a,Ee(this))}function rg(a){Ge(this,a,!De(this))}function sg(a){Ge(this,a,!Ee(this))}function tg(){this.sa(12,0,-9)}function ug(a){Ge(this,a,!0)}function vg(a){Ge(this,a,!Ce(this))}function wg(a){Ge(this,a,Ce(this))}function xg(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 yg(a){var b=Ve(this,a);a=Ye(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Ke(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=Ue(this,a);a=Xe(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Ke(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 Ag(a){var b=Ye(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 Bg(){this.sa(24,0,-9);this.b-=20} -function Cg(){this.w&49152?(this.P|=128,this.sa(4,0,-8)):(this.ta&&1120==this.ka&&this.ta.setData(this.g[0],!0),this.D?Dg(this.D):this.ca());this.b-=7}function Eg(){this.sa(16,0,-9);this.b-=20}var Fg=[0,7,7,10,7,11,9,13];function Gg(a){this.ma=this.b;rc(this,We(this,a));this.b=this.ma-Fg[this.u]}var Hg=[0,14,14,17,14,18,16,20];function Ig(a){this.ma=this.b;var b=We(this,a);a=a>>6&7;Le(this,this.g[a]);this.g[a]=this.g[7];rc(this,b);this.b=this.ma-Hg[this.u]} +function Cg(){this.w&49152?(this.P|=128,this.sa(4,0,-8)):(this.ta&&1120==this.ka&&this.ta.setData(this.g[0],!0),this.D?Dg(this.D):this.da());this.b-=7}function Eg(){this.sa(16,0,-9);this.b-=20}var Fg=[0,7,7,10,7,11,9,13];function Gg(a){this.ma=this.b;rc(this,We(this,a));this.b=this.ma-Fg[this.u]}var Hg=[0,14,14,17,14,18,16,20];function Ig(a){this.ma=this.b;var b=We(this,a);a=a>>6&7;Le(this,this.g[a]);this.g[a]=this.g[7];rc(this,b);this.b=this.ma-Hg[this.u]} var Jg=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Kg(a){var b=Ve(this,a);this.ma=this.b;af(this,a,b,this.Fa);this.b=this.ma-Jg[(this.U?8:0)+this.u]+(7!=this.j||this.u?0:2)}function Lg(a){var b=Ue(this,a);$e(this,a,b,65535,this.Fa);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}var Mg=[7,13,13,17,14,18,17,21]; function Ng(a){var b=Ye(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)rc(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ug(a){P(this,a,Ve(this,a),Vf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)}function Vg(a){P(this,a,0,Xf);this.b-=this.u?9:3+(7==this.j?2:0)}function Wg(){this.sa(28,0,-9)} @@ -202,7 +202,7 @@ c.ia=a.ia,null==c.Ba&&(c.Ba=a.Ba),null==c.Aa&&(c.Aa=a.Aa)):c.b=null);Fh(c)})}}p( function Fh(a){if(a.F&&(!a.u&&a.j&&(Yc(a.F,a.i,a.j,id)?a.u=!0:a.j=0),!Db(a))){if(!a.u)w("No RAM allocated");else if(a.b){if(!a.g)return;Gh(a,a.g,a.Ba,a.Aa,a.i)?a.status('Loaded image "'+a.w+'"'):a.T('Error loading image "'+a.w+'"')}a.B=!0;C(a)}} Eh.prototype.reset=function(){if(this.u&&!this.B){for(var a=this.F,b=this.i,c=this.j,d=b&a.i,b=b>>>a.g;0=b.length){F(a,"invalid block at offset "+ra(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){F(a,"insufficient data for block at offset "+ra(n),4096); -break}m+=b[l++]&255;if(m&255){F(a,"invalid checksum ("+v(m,2,!0)+") for block at offset "+ra(n),4096);break}if(D)for(F(a,"loading "+ra(D)+" bytes at "+ra(t)+"-"+ra(t+D),4096);D--;)gd(a.F,t++,b[r++]&255);else t&1?g=!0:null==d&&(d=t),null!=d&&F(a,"starting address: "+ra(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;ec.indexOf("/api/v1/dump")&&(e=ua(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.ba;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(eb(a.vb,e,f),(e=Fa(e,f))&&ei(a,b,c,d, +function di(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),ei(a,b,c,d,e),a.B=Yh);a.A.fb=!1;bi(a)};g.readAsArrayBuffer(e);return!1}0>c.indexOf("/api/v1/dump")&&(e=ua(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.ca;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(eb(a.vb,e,f),(e=Fa(e,f))&&ei(a,b,c,d, e.Z,e.Ba,e.Aa));a.A.fb=!1;a.g&&(a.g--,a.g||C(a));bi(a)})}function Xh(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.aa);for(d=0;d>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ba);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ua(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"):va(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Ad?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){mi(a,b,c,d)})} -function mi(a,b,c,d){var e=null,f=0>d&&!!a.J&&!a.J.A.ba;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Za+'" (error '+d+": "+b+")",f);else{eb(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)w(k[0]);else{a.aa=k.length;a.la=k[0].length;a.fa=k[0][0].length;var l=k[0][0][0];a.va=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;Dd&&!!a.J&&!a.J.A.ca;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Za+'" (error '+d+": "+b+")",f);else{eb(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)w(k[0]);else{a.ba=k.length;a.la=k[0].length;a.fa=k[0][0].length;var l=k[0][0][0];a.va=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.Ma?f=a.Xa+a.Ma&&(a.Ma+=f-(a.Xa+a.Ma)+1):(a.Xa=f,a.Ma=1);d[f]=d[f]&~(255<g)break;e|=g<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.Za+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=oi(this,a++);)qi(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 qi(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 ii=0;function ri(a,b,c,d,e,f){x.call(this,a,b,c);this.N=si(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.$c;this.g=Array(this.P);this.O=!Ma("Mobi")&&window&&"FileReader"in window;this.B=[];this.Sa=null;this.exports={bootDisk:this.le,loadDisk:this.Cd,selectDrive:this.ih,wait:this.mh}}p(ri,x); function si(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){w(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=ri.prototype; h.wa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.H[b]=c,c.onchange=function(){ti(d)},!0;case "descDisk":case "listDrives":return this.H[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ui(d,a)},!0;case "loadDisk":return this.H[b]=c,c.onclick=function(){d.Cd()},!0;case "bootDisk":return this.H[b]=c,c.onclick=function(){d.le()},!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[ma(a.value,10)||0])if(a=a.da){var b;b="";for(var c=0,k;k=oi(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 Ui(this,d),!0;if(b==Ri)return this.T('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Si){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=ta(b);this.status("Attempting to load "+b+' as "'+ -a+'"')}Yi(this,d,a,b,!1,c);return!0};h.le=function(){var a,b=this.H.listDrives,b=b&&ma(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;ze(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}; +a+'"')}Yi(this,d,a,b,!1,c);return!0};h.le=function(){var a,b=this.H.listDrives,b=b&&ma(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;ze(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 Yi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Pa.toLowerCase()!=d.toLowerCase()&&(g++,Ui(a,b,!0),k.Nc?a.T(a.type+" busy"):(k.Nc=!0,e&&(k.zd=!0,a.M++,E(a)&&F(a,"auto-loading disk: "+c)),k.Pb=!!f,li(new hi(a,k,"preload"),c,d,f,a.oe)&&g++));return g} -h.oe=function(a,b,c,d,e){a.Nc=!1;b&&(b.aa>a.aa||b.la>a.la)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Rc||"---")),b=null);b?(a.da=b,a.Za=c,a.Pa=d,this.we(a.Tb),Zi(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Rc||"---"),a.zd||e),this.J&&qe(this.J)):a.Pb=!1;a.zd&&(a.zd=!1,--this.M||C(this));ui(this,a.Tb);a.ic&&(a.ic(),a.ic=null)}; +h.oe=function(a,b,c,d,e){a.Nc=!1;b&&(b.ba>a.ba||b.la>a.la)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Rc||"---")),b=null);b?(a.ea=b,a.Za=c,a.Pa=d,this.we(a.Tb),Zi(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Rc||"---"),a.zd||e),this.J&&qe(this.J)):a.Pb=!1;a.zd&&(a.zd=!1,--this.M||C(this));ui(this,a.Tb);a.ic&&(a.ic(),a.ic=null)}; function vi(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.aa){m=S.Fc;break}n=a.seek(b,c,d+1);if(!n){m=S.ce;break}q=0;++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b))}var t,r;if(0>(t=a.read(n,q++))||0>(r=a.read(n,q++))){m=S.Gc;break}if(!k&&(Ac(this.F,Oe(this.f,f),t|r<<8),ld(this.F))){m=S.ec;break}q>=a.va&&(n=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.da;var n=null,q;a||(m=S.Ud,e=0);for(;e;){var t=Cc(this.F,Oe(this.f,f));if(ld(this.F)){m=S.ec;break}if(!n){if(b>=a.aa){m=S.Fc;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.ce;break}q=0;++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b))}if(k){var r,D;if(0>(r=a.read(n,q++))||0>(D=a.read(n,q++))){m=S.Gc;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.Gc;break}q>=a.va&&(n=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.ea;var n=null,q;a||(m=S.Ud,e=0);for(;e;){if(!n){if(b>=a.ba){m=S.Fc;break}n=a.seek(b,c,d+1);if(!n){m=S.ce;break}q=0;++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b))}var t,r;if(0>(t=a.read(n,q++))||0>(r=a.read(n,q++))){m=S.Gc;break}if(!k&&(Ac(this.F,Oe(this.f,f),t|r<<8),ld(this.F))){m=S.ec;break}q>=a.va&&(n=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.ea;var n=null,q;a||(m=S.Ud,e=0);for(;e;){var t=Cc(this.F,Oe(this.f,f));if(ld(this.F)){m=S.ec;break}if(!n){if(b>=a.ba){m=S.Fc;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.ce;break}q=0;++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b))}if(k){var r,D;if(0>(r=a.read(n,q++))||0>(D=a.read(n,q++))){m=S.Gc;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.Gc;break}q>=a.va&&(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.na.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~cj.sd|d&cj.sd;this.i|=a;dj(this);return!0};function dj(a){a.b&=~R.ib;a.i&&(a.i|=S.Je,a.b|=R.ib,a.i&S.ed&&(a.b|=R.ed),E(a)&&F(a,a.type+": ERROR: "+u(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.Ua|a&R.Ua;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&cj.sb)>>cj.na.sb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.ab|R.td);this.i&=~S.qf;switch(c=this.b&R.xa){case ej.Ee:E(this)&&F(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.ab;break;case ej.Ue:d="RCHK";case ej.tb:d||(d="READ"),b=this.Ub;case ej.wd:d||(d="WCHK");case ej.hc:d||(d="WRITE");b||(b=this.Vc);g=(this.j&cj.bc)>>cj.na.bc;k=(this.j&cj.hd)>>cj.na.hd;l=this.j&cj.sd;m=65536-this.w&65535;n=(this.b&R.Jb)<< -16-R.na.Jb|this.u;q=this.b&R.Qe?0:2;E(this)&&F(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+u(n)+"--"+u(n+(m<<1)),!0,!0);if(g>=f.aa){this.i|=S.Fc;break}if(l>=f.fa){this.i|=S.Gc;break}a=b.call(this,f,g,k,l,m,n,q,c>=ej.wd,this.Ze.bind(this));break;case ej.Lc:g=(this.j&cj.bc)>>cj.na.bc;E(this)&&F(this,this.type+": SEEK("+g+")",!0);g=f.ba){this.i|=S.Fc;break}if(l>=f.fa){this.i|=S.Gc;break}a=b.call(this,f,g,k,l,m,n,q,c>=ej.wd,this.Ze.bind(this));break;case ej.Lc:g=(this.j&cj.bc)>>cj.na.bc;E(this)&&F(this,this.type+": SEEK("+g+")",!0);g(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=hj.bb;break}Ac(this.F,Oe(this.f,f),n|q<<8);if(ld(this.F)){g=hj.ec;break}f+=2;e--;if(m>=a.va&&(k=null,++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b>=a.aa)))){g=hj.bb;break}}return l?l(g,b,c,d,e,f):g}; -h.Vc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=hj.bb,e=0);for(;e;){var n=Cc(this.F,Oe(this.f,f));if(ld(this.F)){g=hj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=hj.bb;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=hj.bb;break}if(m>=a.va&&(k=null,++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b>=a.aa)))){g=hj.bb;break}}return l?l(g,b,c,d,e,f):g}; +h.Ub=function(a,b,c,d,e,f,g,k,l){g=0;a=a.ea;k=null;var m;a||(g=hj.bb,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=hj.bb;break}m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=hj.bb;break}Ac(this.F,Oe(this.f,f),n|q<<8);if(ld(this.F)){g=hj.ec;break}f+=2;e--;if(m>=a.va&&(k=null,++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b>=a.ba)))){g=hj.bb;break}}return l?l(g,b,c,d,e,f):g}; +h.Vc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.ea;k=null;var m;a||(g=hj.bb,e=0);for(;e;){var n=Cc(this.F,Oe(this.f,f));if(ld(this.F)){g=hj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=hj.bb;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=hj.bb;break}if(m>=a.va&&(k=null,++d>=a.fa&&(d=0,++c>=a.la&&(c=0,++b>=a.ba)))){g=hj.bb;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.$a|f>>16-U.na.$a&U.$a;this.u=f>>16&ij.cb;this.j=this.i=b<>U.na.$a;if(!(this.b&U.ab)){a=!0;var b,c="",d=this.g[(this.b&U.sb)>>U.na.sb],e=d.da,f,g,k;this.b&=~U.Ga;switch(this.b&U.xa){case kj.uf:this.w&lj.Sd&&(this.b&=U.Ga|U.xa|U.$a);this.w=d.status|this.j&jj.Kc|(e&&512==e.aa?lj.Ne:0);break;case kj.Lc:(this.i&jj.Me)==jj.rf&&(b=this.i&jj.gc,c=(this.i&jj.tf)<<2,this.j=this.i&jj.sf?this.j+b:this.j-b,this.i=this.j=this.j&jj.gc|c);break;case kj.Ye:this.w=this.j;break;case kj.Ve:c="READ",b=this.Ub; -case kj.wf:c||(c="WRITE"),b||(b=this.Vc),f=this.i>>jj.na.gc,g=this.i&jj.Kc?1:0,k=this.i&jj.ae,!e||f>=e.aa||k>=e.fa?this.b=this.b|hj.bb|U.ib:(a=65536-this.w&65535,e=(this.u&ij.cb)<<16|this.C,E(this)&&F(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+u(e)+"--"+u(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.Ga|U.ab,this.b&U.Ib&&nd(this.f,this.Sa))}};h.Eg=function(){return this.C};h.Vh=function(a){this.C=a&mj.Ua};h.Hg=function(){return this.i}; +h.Xh=function(a){this.b=this.b&~U.Ua|a&U.Ua;this.u=this.u&60|(a&U.$a)>>U.na.$a;if(!(this.b&U.ab)){a=!0;var b,c="",d=this.g[(this.b&U.sb)>>U.na.sb],e=d.ea,f,g,k;this.b&=~U.Ga;switch(this.b&U.xa){case kj.uf:this.w&lj.Sd&&(this.b&=U.Ga|U.xa|U.$a);this.w=d.status|this.j&jj.Kc|(e&&512==e.ba?lj.Ne:0);break;case kj.Lc:(this.i&jj.Me)==jj.rf&&(b=this.i&jj.gc,c=(this.i&jj.tf)<<2,this.j=this.i&jj.sf?this.j+b:this.j-b,this.i=this.j=this.j&jj.gc|c);break;case kj.Ye:this.w=this.j;break;case kj.Ve:c="READ",b=this.Ub; +case kj.wf:c||(c="WRITE"),b||(b=this.Vc),f=this.i>>jj.na.gc,g=this.i&jj.Kc?1:0,k=this.i&jj.ae,!e||f>=e.ba||k>=e.fa?this.b=this.b|hj.bb|U.ib:(a=65536-this.w&65535,e=(this.u&ij.cb)<<16|this.C,E(this)&&F(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+u(e)+"--"+u(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.Ga|U.ab,this.b&U.Ib&&nd(this.f,this.Sa))}};h.Eg=function(){return this.C};h.Vh=function(a){this.C=a&mj.Ua};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&ij.cb;this.b=this.b&~U.$a|(this.u&3)<=m.aa){k=rj.Se;break}n=m.seek(b,c,d+1);if(!n){k=rj.qd;break}q=0;++d>=m.fa&&(d=0,++c>=m.la&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=rj.pd;break}Ac(this.F,Oe(this.f,f),a|t<<8);q>=m.va&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; -function pj(a){var b=0,c=a.b&W.ud?1:0,d=a.g[c],d=d&&d.da,e=a.I&sj.cb,f=a.G&tj.cb;a.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(d)if(a.i|=uj.Ga,E(a)&&F(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=rj.pd;break}a.w[e++]=g}c.Ef&&(a.i|=uj.cc)}else b=rj.qd;else b=c?rj.gd:rj.fd;qj(a,b)} +h.Ub=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.ea,n=null,q;E(this)&&F(this,this.type+".readData("+b+":"+c+":"+d+") "+u(f)+"--"+u(f+(e<<1)),!0,!0);m||(k=a.Tb?rj.gd:rj.fd,e=0);for(;e;){if(!n){if(b>=m.ba){k=rj.Se;break}n=m.seek(b,c,d+1);if(!n){k=rj.qd;break}q=0;++d>=m.fa&&(d=0,++c>=m.la&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=rj.pd;break}Ac(this.F,Oe(this.f,f),a|t<<8);q>=m.va&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k}; +function pj(a){var b=0,c=a.b&W.ud?1:0,d=a.g[c],d=d&&d.ea,e=a.I&sj.cb,f=a.G&tj.cb;a.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(d)if(a.i|=uj.Ga,E(a)&&F(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=rj.pd;break}a.w[e++]=g}c.Ef&&(a.i|=uj.cc)}else b=rj.qd;else b=c?rj.gd:rj.fd;qj(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.Ua|a&W.Ua;if(this.b&W.INIT)this.Cb();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.xa,this.b&=~(W.dc|W.eb|W.DONE|W.ib),td(this.f,this.Sa),E(this)&&F(this,this.type+".processCommand("+vj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.tb:case V.hc:case V.Mc:this.u=0;break;case V.Xe:a=this.g[this.b&W.ud?1:0];this.i&=~uj.Ga;a&&a.da&&(this.i|=uj.Ga);this.C=this.i;qj(this);break;case V.We:this.C=this.L,qj(this)}else this.b&W.Ib?this.b&W.DONE&&nd(this.f, +h.ai=function(a){this.b=this.b&~W.Ua|a&W.Ua;if(this.b&W.INIT)this.Cb();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.xa,this.b&=~(W.dc|W.eb|W.DONE|W.ib),td(this.f,this.Sa),E(this)&&F(this,this.type+".processCommand("+vj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.tb:case V.hc:case V.Mc:this.u=0;break;case V.Xe:a=this.g[this.b&W.ud?1:0];this.i&=~uj.Ga;a&&a.ea&&(this.i|=uj.Ga);this.C=this.i;qj(this);break;case V.We:this.C=this.L,qj(this)}else this.b&W.Ib?this.b&W.DONE&&nd(this.f, this.Sa):td(this.f,this.Sa)};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,E(this)&&F(this,this.type+".readByte("+this.u+"): "+v(this.C,2,!0),!0,!0),++this.u>=this.w.length&&qj(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,E(this)&&F(this,this.type+".writeByte("+this.u+","+v(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&qj(this));break;case V.tb:case V.hc:case V.Mc: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.tb)pj(this);else{var b=this.j==V.Mc,c=0,d=this.b&W.ud?1:0,e=this.g[d],e=e&&e.da,f=this.I&sj.cb,g=this.G&tj.cb;this.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(e)if(this.i|=uj.Ga,E(this)&& +h.bi=function(a){switch(this.j){case V.bd:this.b&W.eb&&(this.b&=~W.eb,this.w[this.u]=a&255,E(this)&&F(this,this.type+".writeByte("+this.u+","+v(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&qj(this));break;case V.tb:case V.hc:case V.Mc: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.tb)pj(this);else{var b=this.j==V.Mc,c=0,d=this.b&W.ud?1:0,e=this.g[d],e=e&&e.ea,f=this.I&sj.cb,g=this.G&tj.cb;this.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(e)if(this.i|=uj.Ga,E(this)&& F(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(za(b.substring(c,f))),c=f+1}}return a}function zj(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} function Aj(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==l?10:e; -n=!1}Aj(q,t)&&1==q.length||(m=!0);m?!1===f&&a.v("parse error ("+(k||l)+")"):g=q.pop();a.ea=r;return g}function Ej(a,b,c){var d;a.za=null;b&&("{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.ea,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} -function Cj(a,b,c,d,e){var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(f=ma(e?"-"+b:b,a.ea),e=!1)),null!=f?e&&(f=-f):d||a.v("invalid "+(c?c:"value")+": "+b)):d||a.v("missing "+(c||"value"));return f}function Fj(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=4,g="";if(!f||4>=8;d=v(c,0,!0)+" "+c+". "+u(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e} -function Gj(a,b){if(b)return Fj(a,b,a.S[b]);var c=0;for(b in a.S)Fj(a,b,a.S[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function Bj(a,b,c,d,e,f){var g,k,l,m=!1,n=!1,q=[],t=[],r=a.aa;for(a.aa=e;c<"==l?10:e; +n=!1}Aj(q,t)&&1==q.length||(m=!0);m?!1===f&&a.v("parse error ("+(k||l)+")"):g=q.pop();a.aa=r;return g}function Ej(a,b,c){var d;a.za=null;b&&("{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.aa,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} +function Cj(a,b,c,d,e){var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(f=ma(e?"-"+b:b,a.aa),e=!1)),null!=f?e&&(f=-f):d||a.v("invalid "+(c?c:"value")+": "+b)):d||a.v("missing "+(c||"value"));return f} +function Fj(a,b,c){var d,e=!1;if(void 0!==c){e=!0;if(8==a.aa)d=c+". "+u(c,0,!0);else{d=c;var f=4,g="";if(!f||4>=8;d=v(c,0,!0)+" "+c+". "+u(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e}function Gj(a,b){if(b)return Fj(a,b,a.S[b]);var c=0;for(b in a.S)Fj(a,b,a.S[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; function Hj(a){xj.call(this,a);this.Ia=!1;this.U=["(",")"];this.ka=[];this.G=X();this.Ha=X();this.N=X();this.B=[];this.b=this.L=this.C=[];Ij(this);this.P=this.ha=0;this.i=[];this.ta=void 0;Jj(this);this.D=this;this.ma={};this.ja=this.ke=0;this.R=null;this.M=[];Kj(this,a.messages);this.ya=a.commands;this.La=Lj;this.X=[];this.I=0;this.Qa=this.ua=null;this.w=this.Ka=this.Ja=this.Y=this.qa=0;this.g=this.W=null;var b=this;window?void 0===window[y]&&(window[y]=function(a){return le(b,a)}):void 0===global[y]&& -(global[y]=function(a){return le(b,a)})}p(Hj,xj);function Mj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Na:void 0===b?!1:b,Wa:!1,ea:c}}h=Hj.prototype;h.Hd=function(a,b){a.K=b;a.Wa=!1;a.ea=void 0;return a};function Nj(a){return[a.K,a.Na,a.ea,a.Wa,a.Qc]}function Oj(a,b){var c=X(b[0],b[1],b[2]);c.Wa=b[3];b[4]&&(c.he=yj(a,c.Qc=b[4]));return c} +(global[y]=function(a){return le(b,a)})}p(Hj,xj);function Mj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Na:void 0===b?!1:b,Wa:!1,aa:c}}h=Hj.prototype;h.Hd=function(a,b){a.K=b;a.Wa=!1;a.aa=void 0;return a};function Nj(a){return[a.K,a.Na,a.aa,a.Wa,a.Qc]}function Oj(a,b){var c=X(b[0],b[1],b[2]);c.Wa=b[3];b[4]&&(c.he=yj(a,c.Qc=b[4]));return c} h.Ca=function(a,b,c,d){this.F=b;this.J=a;this.f=c;this.g=a.i;(a=ge(a,"messages"))&&Kj(this,a);1140>this.f.ka&&(this.X=this.X.concat(Pj));1145>this.f.ka&&(this.X=this.X.concat(Qj));rd(this,16,function(a){a:{var b=d.F.b,c=a[0],e=a=0,l=b.length;if(c){a=Mj(Rj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.F.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=dd[c],n&&d.v(v(n.id,8)+" %"+v(e<d&&(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.ua[a-8];else if(20>a)b=this.f.X[a-16];else{var c=this.f,d=this.g;switch(a){case Zj:b=Ad(this.f);break;case ak:b=c.ob;break;case bk:b=c.P;break;case ck:b=c.za&65280;break;case dk:b=ud(c);break;case ek:b=wd(c);break;case fk:b=xd(c);break;case gk:b=c.W;break;case Xj:d&&(b=d.ga);break;case hk:d&&(b=d.Eb);break;case ik:d&&(b=d.Ya)}}return b}; -h.message=function(a,b){b&&(a+=" @"+Uj(this,X(this.f.O&65535)));if(!this.R||a!=this.R)if(this.R=a,this.ja&1073741824)this.M.push(a);else{var c;if(this.ja&-2147483648&&this.f&&(c=this.f.A.V)||Eb(this,!0))this.ca(),c&&(a+=" (cpu halted)");this.v(a);this.f&&(a=this.f,re(a),a.Ab=0,a.J&&H(a.J,void 0))}}; +h.message=function(a,b){b&&(a+=" @"+Uj(this,X(this.f.O&65535)));if(!this.R||a!=this.R)if(this.R=a,this.ja&1073741824)this.M.push(a);else{var c;if(this.ja&-2147483648&&this.f&&(c=this.f.A.V)||Eb(this,!0))this.da(),c&&(a+=" (cpu halted)");this.v(a);this.f&&(a=this.f,re(a),a.Ab=0,a.J&&H(a.J,void 0))}}; function Jj(a){var b;if(!bf(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(jk);for(b=0;b>8;a.v("trapped to "+K(a,c&255,8)+" ("+(0>d?Mb[-d]:K(a,d))+")")}a.G=X(a.f.g[7]);b&&1!=a.I?nk(a):ok(a)}}function lk(a,b){var c;(c=!a.f||!Db(a.f))||(c=a.f,c.A.ba?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):!Cb(a.f)}h.Ea=function(a,b){return!b&&(this.reset(!0),a)?this.restore(a):!0}; +function vc(a,b,c,d){if(!lk(a))return!1;var e="";null===c&&(e=(c=!a.ua||"tr"==a.ua)?"tr":"t");a.w=0;b||bf(a)&&cf(a,a.f.g[7],0);try{b=se(a.f,b);var f=a.f.Cc(b);0>8;a.v("trapped to "+K(a,c&255,8)+" ("+(0>d?Mb[-d]:K(a,d))+")")}a.G=X(a.f.g[7]);b&&1!=a.I?nk(a):ok(a)}}function lk(a,b){var c;(c=!a.f||!Db(a.f))||(c=a.f,c.A.ca?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):!Cb(a.f)}h.Ea=function(a,b){return!b&&(this.reset(!0),a)?this.restore(a):!0}; h.Da=function(a,b){b&&this.v(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){Jj(this);this.Y=0;this.R=null;this.w=0;this.G=X(this.f.g[7]);this.A.V=!1;pk(this);a||je(this)};h.save=function(){var a=new G(this);a.set(0,Nj(this.G));a.set(1,Nj(this.N));a.set(2,[this.j,this.O,this.ja]);a.set(3,this.B);return a.data()}; h.restore=function(a){var b=0;void 0!==a[2]&&(this.G=Oj(this,a[b++]),this.N=Oj(this,a[b++]),this.j=a[b][0],"string"==typeof this.j&&(this.j=[this.j]),this.O=a[b][1],this.ja|=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.Ja=a;this.Ka=b}; h.stop=function(a,b){if(this.A.V){this.A.V=!1;this.w=b-this.Ka;if(!this.I){b="stopped";if(this.w){a-=this.Ja;var c=0d&&(d=Dc(a.f,b)),65535!=(d&65535)&&(a.Hd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Dg(a){var b=a.f;if(b.A.V)throw rc(b,a.f.O&65535),a.ca(),-1;return!1}function ae(a,b,c){qk(a,b,c||1,a.L)&&a.ca(!1)}function be(a,b,c){qk(a,b,c||1,a.C)&&a.ca(!1)} +function cf(a,b,c){var d=-1;c||(d=Dc(a.f,b))||(a.f.O&65535)!=b||(b=Fe(a.f,2));if(0d&&(d=Dc(a.f,b)),65535!=(d&65535)&&(a.Hd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Dg(a){var b=a.f;if(b.A.V)throw rc(b,a.f.O&65535),a.da(),-1;return!1}function ae(a,b,c){qk(a,b,c||1,a.L)&&a.da(!1)}function be(a,b,c){qk(a,b,c||1,a.C)&&a.da(!1)} function Ij(a){var b,c,d;a.b=["bp"];if(a.L)for(b=1;b>>c.g],!1)):Re(a.f,!1);a.L=["br"];if(a.C)for(b=1;b>>c.g],!0)):Re(a.f,!0);a.C=["bw"];a.qa=0;a.ha=0} h.Bb=function(a,b,c){var d=!0;c||rk(this,a,b,!1,!0);if(a!=this.b){var e=Mj(b);if(-1===e)this.v("invalid address: "+Uj(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++)||ye(e)}}d&&(a.push(b),c?b.Wa=!0:(sk(this,a,a.length-1,"set"),Jj(this)));return d}; function rk(a,b,c,d,e){var f=!1;c=Mj(c);for(var g=1;g>>d.g],b)):Re(a.f,b));k.Wa||Jj(a);break}}return f}function tk(a,b){for(var c=1;cUa.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 jf=[];"call"==Ai&&(Lc=1E5,jf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ia=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var kf=oa.Na||65535O.length?(2wb&&(wb=0);65536of?String.fromCharCode(of):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=lf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+nf))}yb&&a.v(yb);a.Ha=oa;a.ea=rl}}}}break;case "e":if("else"== +yi(g)):a.v("no dump registered for "+Ta);break a}Ta||(jb=a.Qa||"dw")}else a.Qa=jb;if("dh"==jb){var zi=Ta,Ai=kb,Bi="",Ci=0,Ja=a.P,Ua=a.i;if(Ua.length){var Ca=+zi||a.ta,Lc=+Ai||10;isNaN(Ca)?Ca=Lc:Bi="more ";Ca>Ua.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ja-=Ca;0>Ja&&(null==Ua[Ua.length-1].K?(Ca=Ja+Ca,Ja=0):Ja+=Ua.length);var jf=[];"call"==Ai&&(Lc=1E5,jf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ja=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var kf=oa.Na||65535O.length?(2wb&&(wb=0);65536of?String.fromCharCode(of):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=lf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+nf))}yb&&a.v(yb);a.Ha=oa;a.aa=rl}}}}break;case "e":if("else"== g[0])break;var bc,pf,qf,rf,sf=g[0],tf=g[1];"eb"==sf?(bc=1,pf=255,qf=a.Pd,rf=a.Qd):"e"==sf||"ew"==sf?(bc=2,pf=65535,qf=a.Ta,rf=a.Le):tf=null;if(null==tf)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=Rj(a,tf);if(Od)for(var Pd=2;Pdwf;){for(var Ab=null,vl=256;65536>Rc.K>>>0;){xf.K=a.Ta(Rc,2);if(null==Rc.K||!vl--)break;if(!(xf.K&1)){for(var wl=a,Qd=xf,Hi=null,Sc=Qd.K,Ii=Sc,yf=1;6>=yf&⪼yf++){if(2> ";Sa(function(){for(var a=z(document,y,"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;bWk){if(Xk(d,this.G)){this.u=new G(this,"1.34.2",el);Xk(this.u)&&(fl(this,d),a=gl,hl(this.u));this.u.set(bl,Da());il(this.u);var e=this.b&&!this.C;if(a==cl||hb("Click OK to restore the previous "+Hb+" machine state, or CANCEL to reset the machine.")){if(c=al(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Xk(d,g):("error"==f&&"no machine state"!= g?(this.T("Error: "+g),"unable to verify user"==g&&(La(jl,""),this.g=null)):this.v(f+": "+g),hl(d),Xk(d)?(c=al(d),e=!0):c=!1))}e&&Zk(this,c?d:null)}else a==gl&&d.clear()}else Zk(this);delete this.G;delete this.B}e=ib(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.A.ba=!0;var d=this.H.power;d&&(d.textContent="Shutdown");this.f&&(kl(this,this.f,b,c,a),H(this,-2),this.f.ra());this.N&&(fl(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0}; +function kl(a,b,c,d,e){if(!b.A.ca){b.A.ca=!0;var f=null;try{if(e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,".")))),"string"===typeof f&&(f=null),!b.Ea(f,d)&&f&&(w("Unable to restore state for "+b.type),a.I&&!a.R?(c.clear(),a.b=Wk,window&&window.location.reload()):a.N=!0,b.Ea(null),e=!1),!d&&b.Vd){var g=b.Vd.split("|");for(a=0;aa[1];a=a[2];this.P=!0;this.A.ca=!0;var d=this.H.power;d&&(d.textContent="Shutdown");this.f&&(kl(this,this.f,b,c,a),H(this,-2),this.f.ra());this.N&&(fl(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0}; function fl(a,b){if(hb("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.U;a=a.g||"";b=b.toString();var d={};d.app=Hb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function Qk(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",$k),k=Da();g.set(bl,k);f.set(bl,k);f.set(ll,"1.34.2");f.set(ml,window?window.location.href:null);f.set(nl,window?window.navigator.userAgent:"");a.f&&a.f.Da&&(c&&(b&&(a.f.A.ra=a.f.A.V),a.f.ca()),d=a.f.Da(b,c),"object"===typeof d&&f.set(a.f.id,d),c&&(a.f.A.ba=!1,!1===d&&(e=null)));for(var k=ib(a.id),l=0;l=d||30<=(c.ad+=d))&&(e.textContent=c.A.V?c.wb.toFixed(2)+"Mhz":"Stopped",c.ad=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.ga=a.f.g[7]:0 Date: Sat, 18 Mar 2017 17:12:54 -0700 Subject: [PATCH 02/13] Added various MACRO-10 expression improvements --- .editorconfig | 2 +- apps/pdp10/tests/MACTEST.MAC.txt | 27 + .../tests/{optest-v01.json => OPTEST01.json} | 0 .../tests/{optest-v01.simh => OPTEST01.simh} | 0 apps/pdp10/tests/README.md | 6 +- .../machine/ka10/test/debugger/README.md | 1 + .../machine/ka10/test/debugger/machine.xml | 2 +- devices/pdp10/machine/ka10/test/machine.xml | 2 +- docs/pcx86/examples/pcx86-dbg.js | 46 +- modules/pdp10/lib/debugger.js | 2 +- modules/pdp10/lib/macro10.js | 261 +++++----- modules/shared/lib/debugger.js | 89 ++-- versions/pc8080/1.34.2/pc8080-dbg.js | 42 +- versions/pcx86/1.34.2/pcx86-dbg.js | 46 +- versions/pdpjs/1.34.2/pdp10-dbg.js | 484 +++++++++--------- versions/pdpjs/1.34.2/pdp11-dbg.js | 39 +- 16 files changed, 561 insertions(+), 488 deletions(-) create mode 100644 apps/pdp10/tests/MACTEST.MAC.txt rename apps/pdp10/tests/{optest-v01.json => OPTEST01.json} (100%) rename apps/pdp10/tests/{optest-v01.simh => OPTEST01.simh} (100%) diff --git a/.editorconfig b/.editorconfig index b3aafa914..ae9c1bbd2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ indent_style = space indent_size = 8 trim_trailing_whitespace = true -[*.{ASM,INC,MAC,NASM,LST,asm,inc,mac,nasm,lst,d80}] +[*.{ASM,INC,LST,MAC,NASM,asm,inc,lst,mac,nasm,d80,ASM.txt,INC.txt,LST.txt,MAC.txt,NASM.txt}] indent_style = tab indent_size = 8 trim_trailing_whitespace = true diff --git a/apps/pdp10/tests/MACTEST.MAC.txt b/apps/pdp10/tests/MACTEST.MAC.txt new file mode 100644 index 000000000..8aa0d1455 --- /dev/null +++ b/apps/pdp10/tests/MACTEST.MAC.txt @@ -0,0 +1,27 @@ + TITLE STORE TEXT CHARACTER BY CHARACTER + SUBTTL %1 5-APR-72 + + DEFINE TEXT (C)< + N==0 ;;INITIAL CONDITION + IRPC C, ;;COUNT CHARACTERS + CODE (N,C) ;;CALL MACRO TO STORE TEXT + > ;END OF TEXT MACRO + + DEFINE CODE (N,C)< + ZZ==N ;;INITIAL CONDITION + IRPC C,< + IFN ZZ&777B8,< + EXP ZZ ;;WORD FULL + ZZ==0> ;;START AGAIN WITH 0 + ZZ=ZZ+9+"C"> ;;END OF IRPC + IFN ZZ, ;;IF NOT LEFT JUSTIFIED + ZZ=ZZ+9 ;;MOVE LEFT 9 BITS + SHIFT> ;;RECURSE + > ;;END OF DEFINE + SHIFT ;;START MOVING LEFT + EXP ZZ> ;;END OF IFN ZZ + > ;END OF CODE MACRO + + TEXT (ABCDEFGHIJKL) + END diff --git a/apps/pdp10/tests/optest-v01.json b/apps/pdp10/tests/OPTEST01.json similarity index 100% rename from apps/pdp10/tests/optest-v01.json rename to apps/pdp10/tests/OPTEST01.json diff --git a/apps/pdp10/tests/optest-v01.simh b/apps/pdp10/tests/OPTEST01.simh similarity index 100% rename from apps/pdp10/tests/optest-v01.simh rename to apps/pdp10/tests/OPTEST01.simh diff --git a/apps/pdp10/tests/README.md b/apps/pdp10/tests/README.md index b11916dfd..9705ed697 100644 --- a/apps/pdp10/tests/README.md +++ b/apps/pdp10/tests/README.md @@ -14,14 +14,14 @@ DEC PDP-10 Opcode Tests The PDP-10 machine below loads the following test: -- [PDP-10 Half-Word Opcode Test](optest-v01.json) +- [PDP-10 Half-Word Opcode Test](OPTEST01.json) Details on how to run and modify the test, and perform similar tests in [SIMH](https://github.com/simh/simh), are provided below. {% include machine.html id="testka10" %} -The [PDP-10 Half-Word Opcode Test](optest-v01.json) file specifies that the following words: +The [PDP-10 Half-Word Opcode Test](OPTEST01.json) file specifies that the following words: 0o505040111111, // HRLI 1,111111 0o541040444444, // HRRI 1,444444 @@ -34,7 +34,7 @@ comments display the instructions that correspond to each word. If you want to alter or add new instructions, the PDP-10 Debugger now includes a rudimentary assembler. Using the `a` command, along with an optional start address, you can enter "assembler mode". For example, here's how the first four instructions from -the [PDP-10 Half-Word Opcode Test](optest-v01.json) could be entered by hand: +the [PDP-10 Half-Word Opcode Test](OPTEST01.json) could be entered by hand: >> a 100 begin assemble at 000100 diff --git a/devices/pdp10/machine/ka10/test/debugger/README.md b/devices/pdp10/machine/ka10/test/debugger/README.md index 4af850265..5e2794f05 100644 --- a/devices/pdp10/machine/ka10/test/debugger/README.md +++ b/devices/pdp10/machine/ka10/test/debugger/README.md @@ -6,6 +6,7 @@ machines: - id: testka10 type: pdp10 debugger: true + commands: a 100 /apps/pdp10/tests/MACTEST.MAC --- PDP-10 Test Machine with Debugger diff --git a/devices/pdp10/machine/ka10/test/debugger/machine.xml b/devices/pdp10/machine/ka10/test/debugger/machine.xml index bb1e191e3..6eb266c0b 100644 --- a/devices/pdp10/machine/ka10/test/debugger/machine.xml +++ b/devices/pdp10/machine/ka10/test/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-10 (Model KA10) with Debugger - + diff --git a/devices/pdp10/machine/ka10/test/machine.xml b/devices/pdp10/machine/ka10/test/machine.xml index 1e03d53db..516450b32 100644 --- a/devices/pdp10/machine/ka10/test/machine.xml +++ b/devices/pdp10/machine/ka10/test/machine.xml @@ -4,7 +4,7 @@ PDP-10 Test Machine - + diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index b06c081a9..89415a6d7 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -427,8 +427,8 @@ r(b.od)+" IRR="+r(b.ac)+" ISR="+r(b.Ec)+" DELAY="+b.We;e.ba.P(c)}});Al(d,2048,fu l.Xb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0}; l.reset=function(a){var b;Fl(this);this.F=Array(this.za);for(b=0;b=eh){this.D=Nl;this.L=0;this.K=Ol;this.oa=0;this.M=Pl|Ql;512<=Rl(this)&&(this.M|=Sl);+Tl(this,hl,void 0)==Ul&&(this.M|=Vl);(this.ca|0)==xl&&(this.M=this.M|Wl|Xl);this.qa= Yl|Zl;this.Y=Array(8);this.V=0;a&&(this.A=Array(Cl));$l(this,this.Ma);for(a=am;a<=bm;a++)this.A[a]=0;for(a=cm;ac?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} +function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[Hm]=0;a.A[Im]=c.getDay()+1;a.A[Jm]=c.getDate();a.A[Km]=c.getMonth()+1;b=c.getFullYear();a.A[Lm]=b%100;b/=100;a.A[Mm]=b%10|b/10<<4;a.A[Nm]=38;a.A[Rd]=Om;a.A[Pm]=0;a.A[Dl]=Qm;a.ma=a.Z=0;a.Ha=a.Aa=null} +function El(a,b){var c=a.A[b];if(bc?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} l.save=function(){var a=new Xf(this);a.set(0,[this.C]);for(var b=[],c=0;c=eh&&(a.set(5,[this.D,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.Y[7],this.Y,this.V,this.A,this.ma,this.Z]));return a.data()}; l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Fl(this);b=a[1];for(c=0;c=c;c++)if(d&Co<=c;c++)d&Co<>=Ho;var f=d&Io,g=d&Jo;d&=Ko;if(d==Lo)Go(a,e+c);else{e+=c;var h=a.G[e];h.Qf=d;h.mode=g;h.Zg=f;h.pc=[0,0];h.qb=[0,0];h.je=[0,0];h.gd=!1;h.Me=!1;h.le=!1;h.Qe=!1;oo(a,e);b==so&&c==to&&fh(a,uo);b==so&&c==wo&&255==a.hc[0].od&& a.J==(Mo|No|Oo|Po)&&(b=a.G[0],b.Mc[0]=b.pc[0],b.Mc[1]=b.pc[1],b.jd=Ed(a.H,a.O))}}}function vo(a,b){a=a.G[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.ad?256:65536);return b}function Pd(a,b){a=a.G[b];(b=a.Mc[1]<<8|a.Mc[0])||(b=1==a.ad?256:65536);return b}function Go(a,b){Bl(a,b);var c=a.G[b];c.je[0]=c.qb[0];c.je[1]=c.qb[1];c.Me=!0;oo(a,b)}function oo(a,b){a=a.G[b];a.rd=a.Qf==Qo?1:0;a.ad=a.Qf==Ro?2:1} function Bl(a,b,c){var d=a.G[b];if(d.le&&(b!=wo||a.J&Mo)){var e=Ed(a.H,a.O),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=vo(a,b),h=Pd(a,b)-f;d.mode==qo?(0>=h&&(h=0),h||(d.gd=!0,d.le=!1,b||hh(a,uo))):d.mode==So?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo))):d.mode==Qd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo)));d.qb[0]=h&255;d.qb[1]=h>>8&255;c&&(a.jd=0)}return d} -function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[Gm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[Gm]))){a.A[Gm]=0;a.A[Im]=a.A[Im]% +function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[Im]=a.A[Im]% 7+1;var f;f=a.A[Lm];var g=Ja[a.A[Km]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Jm]>f&&(a.A[Jm]=1,12<++a.A[Km]&&(a.A[Km]=1,a.A[Lm]=(a.A[Lm]+1)%100))}a.A[Pm]|=Zo;a.A[Rd]&$o&&(a.A[Pm]|=Uo,hh(a,Vo))}a.ma=c-d%b}}l.Gm=function(a,b){var c=this.xa;this.ga&ap&&(this.J&bp?c=this.C[0][1]:this.B&&(c=cp(this.B)));w(this,a,null,b,"PPI_A",c);return c};l.jo=function(a,b,c){w(this,a,b,c,"PPI_A");this.xa=b};l.Hm=function(a,b){var c=this.J;w(this,a,null,b,"PPI_B",c);return c}; l.ko=function(a,b,c){w(this,a,b,c,"PPI_B");dp(this,b)};function dp(a,b){var c=!!(b&ep),d=!!(a.J&ep);a.J=b;a.B&&fp(a.B,!(b&bp),!!(b&Po));c!=d&&Vm(a,c)}l.Im=function(a,b){var c=0,c=(this.ca|0)==kl?this.J&No?c|this.C[1][1]&gp:c|this.C[1][1]>>4&1:this.J&hp?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.J&Mo&&Bl(this,wo).gd&&(c=this.J&ep?c|ip:c|jp);w(this,a,null,b,"PPI_C",c,32896);return c};l.lo=function(a,b,c){w(this,a,b,c,"PPI_C");this.Ca=b};l.Jm=function(a,b){var c=this.ga;w(this,a,null,b,"PPI_CTRL",c);return c}; l.mo=function(a,b,c){w(this,a,b,c,"PPI_CTRL");this.ga=b};l.Sl=function(a,b){var c=this.B?cp(this.B):0;w(this,a,null,b,"8041_KBD",c);this.aa&=~kp;return c};l.tn=function(a,b,c){w(this,a,b,c,"8041_KBD")};l.Rl=function(a,b){var c=this.J;w(this,a,null,b,"8041_CTRL",c);return c};l.sn=function(a,b,c){w(this,a,b,c,"8041_CTRL");dp(this,b)};l.Tl=function(a,b){var c=this.aa;w(this,a,null,b,"8041_STATUS",c);return c}; @@ -466,7 +466,7 @@ l.Vl=function(a,b){var c=this.J&~(zp|Ap)|(Ed(this.H)&64?Ap:0);w(this,a,null,b,"8 l.un=function(a,b,c){w(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=np;a=0;this.L>=Bp&&(a=this.L^15,this.L=Bp);switch(this.L){case Cp:yp(this,this.K);break;case Dp:pp(this,this.K|Ol);break;case Ep:pp(this,this.K&~Ol);this.B&&mp(this.B);break;case Fp:this.B&&(a=this.B,a.A=[],t(a)&&Mb(a,"scan codes flushed"));pp(this,this.K|Ol);yp(this,Gp);rp(this,Yl|Zl);break;case Hp:yp(this,Ip);break;case Jp:yp(this,this.M);break;case Kp:yp(this,this.qa);break;case Lp:yp(this,this.K&Ol?0:Mp);break;case Bp:a& 1&&kf(this.H)}};function pp(a,b){a.K=b;a.D=a.D&~Np|b&Op;a.B&&fp(a.B,!!(b&Pp),!(b&Ol))}function yp(a,b,c){0<=b&&(a.oa=b,c?a.D|=kp:(a.D&=~kp,a.D|=lp))}function rp(a,b){a.qa=b;oc(a.ka,!!(b&Zl));b&Yl||kf(a.H)}function Qp(a,b){a.ca>4)+(c&15),e=!0);if(d==Gm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; +l.Ln=function(a,b,c){var d=this.V&Wp;t(this,4352)&&w(this,a,b,c,"CMOS.DATA["+r(d)+"]",null,!0);a=b^this.A[d];if(d<=Dl){if(c=b,d>4)+(c&15),e=!0);if(d==pm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; l.Xm=function(a){if(t(this,16)&&Wk(this.ba,26,a)){var b=this.H.D>>8;Tf(this.H,a,function(a,d){return function(c){d=Ed(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ta(h)+" CL(min)="+r(g)+" DH(sec)="+r(m);else if(4==b||5==b)e=" CX(year)="+ta(a.H.I)+" DH(month)="+r(m)+" DL(day)="+r(k);g=a.ba;h=d;g.message("INT "+r(26)+": C="+(dg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Ed(this.H)))}return!0}; function Vm(a,b){if(a.la)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ea.wb);var c=Math.round(ol/vo(a,wo));if(20>c||2E4this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.da?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; -function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Xx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Xx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} -var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(0>e&&(b="-"+b,e=0),f=oa(b,a.L))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ @@ -804,23 +804,23 @@ Py(a,g[1],!0);if(v)if(a.aa=v,void 0===g[2])a.P("begin assemble at "+Fy(v)),a.da= a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var T=K.charAt(1);if("l"==T){var L;L=0+Vz(a,a.B);L+=Vz(a,a.Z);(L+=Vz(a,a.N))||a.P("no breakpoints")}else if("n"==T)a.xa=$x(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ua={};if("*"!=H&&(ua=Py(a,H,!0,!0),!ua))break a;H=null==ua.Ja?H:ta(ua.Ja);"c"==T?null==ua.Ja?(iy(a),a.P("all breakpoints cleared")):Ey(a, a.B,ua)||Ey(a,a.Z,ua)||Ey(a,a.N,ua)||a.P("breakpoint missing: "+Fy(ua)):"i"==T?a.P("breakpoint "+(Nc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (input)"):"o"==T?a.P("breakpoint "+(Rc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (output)"):null!=ua.Ja&&(Sy(a,ua,I),"p"==T?a.Gd(a.B,ua):"r"==T?a.Gd(a.Z,ua):"w"==T?a.Gd(a.N,ua):a.P("unknown breakpoint command: "+T))}}}break;case "c":$A(a);break;case "d":a:{var ca=g,xb,za=ca[0],cb=ca[1],Sa=ca[2],rb=ca[3];if("?"==cb){var db="";for(xb in Sb)a.Ba[xb]&& (db&&(db+=","),db+=xb);db+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");db.length&&a.P("dump extension commands:\n\t"+db)}else if("state"==cb){var rc=iB(a.pa,!0);rc?"console"==Sa?console.log(rc): -($A(a),a.P(rc)):a.P("powerOff() error")}else if("symbols"==cb)for(var ib=0;ib>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==xt&&(Pg=1E5,rm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= 1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0Am;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0} asURLs + * @property {Array.} asLines */ class Macro10 { /** @@ -138,8 +142,8 @@ class Macro10 { * the LITERAL blocks in tblMacros and process the associated statement(s) at that time. * * Macros have the name that was assigned to them, REPEAT and conditional blocks have generated names - * that match the pseudo-op (eg, "_REPEAT", "_IFE"), and LITERAL blocks have generated location-based - * names. All generated names use a leading underscore ('_') so that they don't conflict with + * that match the pseudo-op (eg, "?REPEAT", "?IFE"), and LITERAL blocks have generated location-based + * names. All generated names use a leading question mark ('?') so that they don't conflict with * normal MACRO-10 labels. */ @@ -194,7 +198,11 @@ class Macro10 { */ this.sASCII = ""; - this.sText = ""; + /** + * @type {Array.} + */ + this.asLines = []; + this.iURL = 0; this.asURLs = sURL.split(';'); @@ -209,7 +217,7 @@ class Macro10 { loadNextResource() { if (this.iURL == this.asURLs.length) { - this.done(this.parseFile()); + this.done(this.parseResources()); return; } @@ -243,8 +251,9 @@ class Macro10 { match = sText.match(/&[a-z]+;/i); if (match) macro10.warning("unrecognized HTML entity: " + match[0]); } - if (macro10.sText) macro10.sText += '\n'; - macro10.sText += sText; + + macro10.asLines = macro10.asLines.concat(sText.split(/(\r?\n)/)); + setTimeout(function() { macro10.loadNextResource(); }, 0); @@ -265,14 +274,14 @@ class Macro10 { } /** - * parseFile() + * parseResources() * * Begin the assembly process. * * @this {Macro10} * @return {number} */ - parseFile() + parseResources() { var macro10 = this; @@ -280,17 +289,22 @@ class Macro10 { * If the "preprocess" option is set, then just return the plain text we retrieved. */ if (this.sOptions.indexOf('p') >= 0) { - this.println(this.sText); + this.println(this.asLines.join()); return 0; } var a = this.dbg.resetVariables(); try { var i; - var asLines = this.sText.split(/\r?\n/); - for (i = 0; i < asLines.length; i++) { + for (i = 0; i < this.asLines.length; i += 2) { this.nLine++; - if (!this.parseLine(asLines[i] + '\r\n')) break; + /* + * Since, at this early stage, I'm not sure whether all the resources I'm interested in + * assembling have had their original CR/LF line endings preserved (eg, some files may have + * been converted to LF-only line endings), I'm going to skip over whatever line endings + * are in the array and insert my own uniform CR/LF sequences. + */ + if (!this.parseLine(this.asLines[i] + '\r\n')) break; } if (this.nMacroDef) { @@ -338,9 +352,10 @@ class Macro10 { */ parseLine(sLine) { + var i; if (this.nMacroDef) { if (this.nMacroDef == 1) { - var i = sLine.indexOf(this.chMacroOpen); + i = sLine.indexOf(this.chMacroOpen); if (i >= 0) { this.nMacroDef++; sLine = sLine.substr(i+1); @@ -358,41 +373,42 @@ class Macro10 { sLine = this.addASCII(sLine); } - var reLine = /\s*([A-Z$%._][0-9A-Z$%.]*[:=]|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; - var match = sLine.match(reLine); - if (!match || match[4] && match[4].slice(0, 1) != ';') { + var reLine = /\s*([A-Z$%.?][0-9A-Z$%.]*:|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; + var matchLine = sLine.match(reLine); + if (!matchLine || matchLine[4] && matchLine[4].slice(0, 1) != ';') { this.error("failed to parse line: " + sLine); return false; } - var sLabel = match[1]; - var sOperator = match[2].toUpperCase(); - var sOperands = match[3].trim(); - var sComment = match[4]; - var sRemainder = match[3] + match[4]; + var sLabel = matchLine[1]; + var sOperator = matchLine[2].toUpperCase(); + var sOperands = matchLine[3].trim(); + var sComment = matchLine[4]; + var sRemainder = matchLine[3] + matchLine[4]; if (sLabel) { - var chSep = sLabel.slice(-1); sLabel = sLabel.slice(0, -1); - if (chSep == ':') { - this.addLabel(sLabel); - } else { - sOperands = sOperator + sOperands; - sOperator = chSep; + this.addSymbol(sLabel, this.nLocation, Macro10.SYMTYPE.LABEL); + } + + var matchOp; + if (sOperator && (matchOp = sOperands.match(/^([=:]+)(.*)/))) { + var nType = 0; + sLabel = sOperator; + sOperator = matchOp[1]; + sOperands = matchOp[2]; + if (sOperator == '==') { + nType |= Macro10.SYMTYPE.PRIVATE; } + else if (sOperator == '=:') { + nType |= Macro10.SYMTYPE.INTERNAL; + } + this.addSymbol(sLabel, sOperands, nType); + sOperator = sOperands = ""; } if (!sOperator && !sOperands) return true; - /* - * My initial read of the MACRO-10 specification suggested that lines may begin with EITHER - * "symbol:" (for a label) or "symbol=" (for an assignment), but apparently they can have BOTH. - */ - if (sOperands[0] == '=') { - sLabel = sOperator; - sOperands = sOperands.substr(1); - sOperator = '='; - } this.sOperator = sOperator; /* @@ -416,10 +432,6 @@ class Macro10 { if (!this.parseMacro(sOperator, sOperands)) { switch (sOperator) { - case "=": - this.addAssign(sLabel, sOperands); - break; - case Macro10.PSEUDO_OP.ASCII: case Macro10.PSEUDO_OP.ASCIZ: case Macro10.PSEUDO_OP.SIXBIT: @@ -432,6 +444,7 @@ class Macro10 { case Macro10.PSEUDO_OP.DEFINE: case Macro10.PSEUDO_OP.IFE: + case Macro10.PSEUDO_OP.IRP: case Macro10.PSEUDO_OP.REPEAT: this.addMacro(sOperator, sOperands); break; @@ -462,20 +475,12 @@ class Macro10 { if (!macro) return false; if (sOperands != null) { - /* - * Process this macro call; start by extracting macro argument values from sOperands. - */ - var sDelim = ','; - if (sOperands[0] == '(') { - sDelim += ')'; - sOperands = sOperands.substr(1); - } - var aValues = this.getValues(sOperands, sDelim); + var aValues = this.getValues(sOperands); this.parseText(macro.sText, macro.aParms, aValues); return true; } - if (name[0] != '_') return false; + if (name[0] != '?') return false; switch(name.substr(1)) { case Macro10.PSEUDO_OP.IFE: @@ -531,7 +536,13 @@ class Macro10 { if (iMatch < 0) break; iSearch = iMatch + 1; var iMatchEnd = iMatch + sParm.length; - if ((!iMatch || !this.isSymbolChar(sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(sLine[iMatchEnd]))) { + var chPre = '', chPost = ''; + if ((!iMatch || !this.isSymbolChar(chPre = sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(chPost = sLine[iMatchEnd]))) { + /* + * If the "concatenation character" (') appears before (or after) the symbol being replaced, remove it. + */ + if (chPre == "'") iMatch--; + if (chPost == "'") iMatchEnd++; sLine = sLine.substr(0, iMatch) + sReplace + sLine.substr(iMatchEnd); iSearch = iMatch + sReplace.length; } @@ -575,11 +586,18 @@ class Macro10 { getExpression(sOperands, sDelim = ",") { var i = 0; + var fQuotes = false; var sOperand = null; var cNesting = 0; while (i < sOperands.length) { - var ch = sOperands[i]; + var ch = sOperands[i++]; + if (ch == '"') { + fQuotes = !fQuotes; + continue; + } + if (fQuotes) continue; if (sDelim.indexOf(ch) >= 0) { + i--; break; } if (ch == '<') { @@ -590,7 +608,6 @@ class Macro10 { break; } } - i++; } if (!cNesting) { sOperand = sOperands.substr(0, i); @@ -686,6 +703,30 @@ class Macro10 { return sLiteral; } + /** + * getDefaults(aParms) + * + * Check the given array of macro parameters for default values, remove them, and return them in a parallel array. + * + * @this {Macro10} + * @param {Array.} aParms + * @return {Array.} + */ + getDefaults(aParms) + { + var aDefaults = []; + for (var i = 0; i < aParms.length; i++) { + var j = aParms[i].indexOf('<'); + if (j >= 0) { + var k = aParms[i].lastIndexOf('>'); + if (k < 0) k = aParms[i].length; + aDefaults[i] = aParms[i].substr(j, k - j); + aParms[i] = aParms[i].substr(0, j); + } + } + return aDefaults; + } + /** * getReserved(sOperands) * @@ -701,7 +742,7 @@ class Macro10 { if (match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)) { sReserved = match[0]; var sLabel = match[1]; - var name = '_' + sLabel; + var name = '?' + sLabel; if (this.tblMacros[name] !== undefined) { this.error("reserved symbol redefined: " + sReserved); } @@ -773,34 +814,6 @@ class Macro10 { return sRemain; } - /** - * addAssign(sName, sOperand) - * - * @this {Macro10} - * @param {string} sName - * @param {string} sOperand - */ - addAssign(sName, sOperand) - { - var value = this.parseExpression(sOperand); - if (value === undefined) { - this.error("parseExpression(" + sOperand + ")"); - return; - } - this.addSymbol(sName, value); - } - - /** - * addLabel(sLabel) - * - * @this {Macro10} - * @param {string} sLabel - */ - addLabel(sLabel) - { - this.addSymbol(sLabel, this.nLocation, true); - } - /** * addMacro(sOperator, sOperands) * @@ -808,7 +821,7 @@ class Macro10 { * REPEAT block instead. * * REPEAT blocks piggy-back on this code because they're essentially anonymous immediately-invoked macros; - * we use an illegal MACRO-10 symbol ('_REPEAT') to name the anonymous macro while it's being defined, and the + * we use an illegal MACRO-10 symbol ('?REPEAT') to name the anonymous macro while it's being defined, and the * macro's nOperand field will contain the repeat count. * * The piggy-backing continues with other pseudo-ops like IFE, which again contain an anonymous block of text @@ -833,24 +846,19 @@ class Macro10 { /* * This is a DEFINE (macro) block. */ - match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i); + match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i); if (!match) { - this.error("unrecognized " + sOperator + " definition: " + sOperands); + this.error("unrecognized " + sOperator + ": " + sOperands); return ""; } name = match[1]; /* - * TODO: This may not actually be an error, but I'd like to take a look if/when it happens. + * If this macro has defined parameters, parse them (and any defaults) now. */ - if (this.tblMacros[name] !== undefined) { - this.error("macro redefined: " + name); + if (match[2]) { + aParms = this.getValues(match[2]); + aDefaults = this.getDefaults(aParms); } - /* - * TODO: Tighten up this parsing at some point. All this is doing is extracting entire symbols - * from within the parentheses, if any; it's NOT ensuring that those symbols are comma-separated - * with no other intervening characters. - */ - aParms = match[2].match(/[A-Z$%.][0-9A-Z$%.]*/g); nOperand = Macro10.MACRO_OP.DEFINE; iMatch = 3; } @@ -860,7 +868,7 @@ class Macro10 { */ this.chMacroOpen = '['; this.chMacroClose = ']'; - name = '_' + Str.toDec(this.nLocation, 5); + name = '?' + Str.toDec(this.nLocation, 5); if (this.tblMacros[name] !== undefined) { this.error("literal symbol redefined: " + name); } @@ -881,7 +889,7 @@ class Macro10 { sOperands = sOperands.substr(sOperand.length + 1); sOperand = sOperand.trim(); match = sOperands.match(/\s*(<|)(.*)/i); - name = '_' + sOperator; + name = '?' + sOperator; /* * The expression is either a repeat count or a condition. Either way, we must be able to * resolve it now, so we don't set fPass1 (but that doesn't mean it's the second pass, either). @@ -951,23 +959,29 @@ class Macro10 { } /** - * addSymbol(name, value, fLabel, fGlobal, fPrivate) + * addSymbol(name, value, nType) * * @this {Macro10} * @param {string} name - * @param {number} value - * @param {boolean} [fLabel] (default is false, meaning the symbol is an assignment) - * @param {boolean} [fGlobal] (default is false, meaning the symbol is local to the current file) - * @param {boolean} [fPrivate] (default is false, meaning the symbol has visibility to the caller) + * @param {number|string} value + * @param {number} [nType] */ - addSymbol(name, value, fLabel = false, fGlobal = false, fPrivate = false) + addSymbol(name, value, nType = 0) { name = name.toUpperCase().substr(0, 6); - if (fLabel && this.tblSymbols[name] !== undefined) { + if ((nType & Macro10.SYMTYPE.LABEL) && this.tblSymbols[name] !== undefined) { this.error("label " + name + " redefined"); return; } - this.tblSymbols[name] = {name, value, nLine: this.nLine, fLabel, fGlobal, fPrivate}; + if (typeof value == 'string') { + var v = this.parseExpression(value); + if (v === undefined) { + this.error("parseExpression(" + value + ")"); + return; + } + value = v; + } + this.tblSymbols[name] = {name, value, nLine: this.nLine, nType}; this.dbg.setVariable(name, value); } @@ -1070,7 +1084,7 @@ class Macro10 { genWord(value, sFixup) { this.aWords[this.nLocation] = this.truncate(value); - if (sFixup != null) this.aFixups.push({nLocation: this.nLocation, sValue: sFixup}); + if (sFixup != null) this.aFixups.push({nLocation: this.nLocation, sValue: sFixup, nLine: this.nLine}); this.nLocation++; } @@ -1107,17 +1121,24 @@ class Macro10 { } } +Macro10.SYMTYPE = { + LABEL: 0x01, + PRIVATE: 0x02, + INTERNAL: 0x04 +}; + Macro10.PSEUDO_OP = { - ASCII: "ASCII", - ASCIZ: "ASCIZ", - DEFINE: "DEFINE", - IFE: "IFE", - LITERAL:"LITERAL", - PAGE: "PAGE", - REPEAT: "REPEAT", - SIXBIT: "SIXBIT", - SUBTTL: "SUBTTL", - XWD: "XWD" + ASCII: "ASCII", + ASCIZ: "ASCIZ", + DEFINE: "DEFINE", + IFE: "IFE", + IRP: "IRP", + LITERAL: "LITERAL", + PAGE: "PAGE", + REPEAT: "REPEAT", + SIXBIT: "SIXBIT", + SUBTTL: "SUBTTL", + XWD: "XWD" }; /* diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 4c00cc127..5507c0562 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -566,7 +566,7 @@ class Debugger extends Component case '|': valNew = this.evalIOR(val1, val2); break; - case '^^': // since MACRO-10 uses '^' for base overrides, you must now use '^^' for bitwise exclusive-or (XOR) + case '^!': // since MACRO-10 uses '^' for base overrides, '^!' is used for bitwise exclusive-or (XOR) valNew = this.evalXOR(val1, val2); break; case '&&': @@ -575,16 +575,21 @@ class Debugger extends Component case '||': valNew = (val1 || val2? 1 : 0); break; - case '><': + case '_': + case '^_': valNew = val1; - val2 = 35 - (val2 & 0xff); + /* + * While we always try to avoid assuming any particular number of bits of precision, the 'B' shift + * operator (which we've converted to '^_') is unique to the MACRO-10 environment, which imposes the + * following restrictions on the shift count. + */ + if (chOp == '^_') val2 = 35 - (val2 & 0xff); if (val2) { /* - * Since binary shifting is a logical operation, and since shifting by division only works properly - * with positive numbers, we must convert a negative value to a positive value, by computing the two's - * complement. + * Since binary shifting is a logical (not arithmetic) operation, and since shifting by division only + * works properly with positive numbers, we call truncate() to produce an unsigned value. */ - if (valNew < 0) valNew += Math.pow(2, 36); + valNew = this.truncate(valNew, 0, true); if (val2 > 0) { valNew *= Math.pow(2, val2); } else { @@ -610,7 +615,7 @@ class Debugger extends Component * * 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 * - - - - - - - - - - -- -- -- -- -- - * 2 * _ { 3 + _ { 4 / 2 } _ } _ + * 2 * { 3 + { 4 / 2 } } * * This function takes care of recursively processing sub-expressions, by processing subsets of the array, * as well as handling certain base overrides (eg, temporarily switching to base-10 for binary shift suffixes). @@ -627,7 +632,7 @@ class Debugger extends Component var value; var sValue, sOp; var fError = false; - var fNegate = false; + var iNegate = 0; var aVals = [], aOps = []; var nBasePrev = this.nBase; @@ -656,16 +661,20 @@ class Debugger extends Component sOp = (iValue < iLimit? asValues[iValue++] : ""); } else { - if (sOp != '-') { - fError = true; - break; + if (sOp == '~' || sOp == '^-') { + iNegate = 1; + continue; } - fNegate = true; - continue; + if (sOp == '-') { + iNegate = -1; + continue; + } + fError = true; + break; } } else { - v = this.parseValue(sValue, null, fQuiet, fNegate); + v = this.parseValue(sValue, null, fQuiet, iNegate); } if (v === undefined) { @@ -693,8 +702,8 @@ class Debugger extends Component * The MACRO-10 binary shifting operator assumes a base-10 shift count, regardless of the current * base, so we must override the current base to ensure the count is parsed correctly. */ - this.nBase = (sOp == '><')? 10 : nBase; - fNegate = false; + this.nBase = (sOp == '^_')? 10 : nBase; + iNegate = 0; } if (!this.evalOps(aVals, aOps) || aVals.length != 1) { @@ -729,7 +738,7 @@ class Debugger extends Component * * We pop 1 "binop" from aOps and 2 values from aVals whenever a "binop" of lower priority than its * predecessor is encountered, evaluate, and push the result back onto aVals. Only selected unary - * operators are supported (eg, minus), and ternary operators like '?:' are not supported at all. + * operators are supported (eg, minus and "not"); ternary operators like '?:' are not supported at all. * * @this {Debugger} * @param {string|undefined} sExp @@ -768,13 +777,14 @@ class Debugger extends Component * what IS important is listing operators than contain shorter operators first. For example, bitwise * shift operators must be listed BEFORE the logical less-than or greater-than operators. * - * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^^', since - * MACRO-10 uses prefixes like "^D", "^O" and "^B" with numeric constants to indicate a base override, and - * I've added '!' as an alias for '|' to perform bitwise inclusive-or. + * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^!' (since + * MACRO-10 uses prefixes like "^D", "^O" and "^B" with numeric constants to indicate a base override). + * Similarly, I've added '!' as an alias for '|' (bitwise inclusive-or), '^-' as an alias for '~' (unary + * complement "not" operator), and '_' as a shift operator. * * The MACRO-10 binary shifting suffix ('B') is a bit more problematic, since a capital B can also appear - * inside symbols. So I pre-scan for that operator and replace non-symbolic occurrences with an internal - * operator ('><'). + * inside symbols. So I pre-scan for that suffix and replace all non-symbolic occurrences with an internal + * shift operator ('^_'). * * Note that Str.parseInt(), which parseValue() relies on, supports both the MACRO-10 base prefix overrides * and the binary shifting suffix. But since the B suffix can also be a bracketed expression, we have to @@ -786,8 +796,8 @@ class Debugger extends Component * * WARNING: Whenever you make changes to this RegExp, make sure you update aBinOpPrecedence as needed, too. */ - var regExp = /(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/; - sExp = sExp.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/, "$1$2><"); + var regExp = /(\{|}|\|\||&&|\||\^!|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/; + sExp = sExp.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/, "$1$2^_"); var asValues = sExp.split(regExp); value = this.parseArray(asValues, 0, asValues.length, this.nBase, fQuiet); if (value !== undefined && fQuiet === false) { @@ -874,16 +884,16 @@ class Debugger extends Component } /** - * parseValue(sValue, sName, fQuiet, fNegate) + * parseValue(sValue, sName, fQuiet, iNegate) * * @this {Debugger} * @param {string|undefined} sValue * @param {string|null} [sName] is the name of the value, if any * @param {boolean} [fQuiet] - * @param {boolean} [fNegate] + * @param {number} [iNegate] (-1 to negate , 1 to complement) * @return {number|undefined} numeric value, or undefined if sValue is either undefined or invalid */ - parseValue(sValue, sName, fQuiet, fNegate) + parseValue(sValue, sName, fQuiet, iNegate = 0) { var value; if (sValue != null) { @@ -893,12 +903,19 @@ class Debugger extends Component } else { value = this.getVariable(sValue); if (value == null) { - value = Str.parseInt(fNegate? ('-' + sValue) : sValue, this.nBase); - fNegate = false; + if (iNegate < 0) { + sValue = '-' + sValue; + iNegate = 0; + } + value = Str.parseInt(sValue, this.nBase); } } if (value != null) { - if (fNegate) value = -value; + if (iNegate < 0) { + value = -value; + } else if (iNegate > 0) { + value = this.evalXOR(value, -1); + } } else { if (!fQuiet) { this.println("invalid " + (sName? sName : "value") + ": " + sValue); @@ -1056,12 +1073,17 @@ class Debugger extends Component if (DEBUGGER) { + /* + * Missing from this table are the (limited) set of unary operators we support (negate and complement), + * since this is only a BINARY operator precedence, not a general-purpose precedence table. Assume that + * all unary operators take precedence over all binary operators. + */ Debugger.aBinOpPrecedence = { '||': 0, // logical OR '&&': 1, // logical AND '!': 2, // bitwise OR '|': 2, // bitwise OR - '^^': 3, // bitwise XOR + '^!': 3, // bitwise XOR (added by MACRO-10 sometime between the 1972 and 1978 versions) '&': 4, // bitwise AND '!=': 5, // inequality '==': 5, // equality @@ -1077,7 +1099,8 @@ if (DEBUGGER) { '%': 9, // remainder '/': 9, // division '*': 9, // multiplication - '><': 10, // internal binary shift operator (MACRO-10-style; converted from a 'B' suffix) + '_': 10, // MACRO-10 shift operator + '^_': 10, // MACRO-10 internal shift operator (converted from 'B' suffix form that MACRO-10 uses) '{': 11, // open sub-expression (achGroup[0] default) '}': 11 // close sub-expression (achGroup[1] default) }; diff --git a/versions/pc8080/1.34.2/pc8080-dbg.js b/versions/pc8080/1.34.2/pc8080-dbg.js index e0e3451a6..359cf0d49 100644 --- a/versions/pc8080/1.34.2/pc8080-dbg.js +++ b/versions/pc8080/1.34.2/pc8080-dbg.js @@ -147,8 +147,8 @@ function je(a){if(!Ab(a))if(!a.j)Bb(a);else if(a.b&&a.H){a.g||(a.g=a.b.length);i f.g;0=m.ab&&a<=m.wb?d.g&(Se|Te)||(d.g|=Te,Pe(d,20,!0),Ue(d)):a>=m.yc&&a<=m.z&&d.g&Te&&(d.g&=~Te,Pe(d,20,!1),Ue(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){Ve(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ua&&void 0!==this.b.Ua[b])return this.P[e]=c,c.onclick= @@ -198,15 +198,15 @@ this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.lengt var Sf=12,Tf=16,Uf=192,ag=2,$f=32,bg=64,ee=1,Vf=2,Yf=4,Xf=128,Wf=15,Zf=240,Rf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Pf=[!1,0,0,133,142,39,238],Kf="buffer",Mf={0:Jf.prototype.Hd,1:Jf.prototype.Gd},Nf={0:Jf.prototype.Vd,1:Jf.prototype.Ud,2:Jf.prototype.Td};Wa(function(){for(var a=sb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.M?a="end":a=this.g[this.b+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; -function dg(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function eg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;u=!1}eg(v, -B)&&1==v.length||(q=!0);q?!1===f&&a.i("parse error ("+(h||k)+")"):g=v.pop();a.L=y;return g}function ig(a,b,c){var d;a.oa=null;b&&("{"!=a.W[0]&&(b=b.split(a.W[0]).join("{").split(a.W[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=fg(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&jg(a,null,d));return d} +function dg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function eg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=dg(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=fg(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&jg(a,null,d));return d} function kg(a,b){var c,d=a.W[0],e=a.W[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=ig(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?lg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= -a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function gg(a,b,c,d,e){var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(f=ma(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return f} +a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function gg(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(0>e&&(b="-"+b,e=0),f=ma(b,a.L))),null!=f?0>e?f=-f:0>=8;d=n(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function mg(a,b){if(b)return jg(a,b,a.T[b]);var c=0;for(b in a.T)jg(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var hg={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function lg(a,b){var c;c=void 0===c?0:c;switch(a.L){case 2:b=pa(b,0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var hg={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function ng(a){cg.call(this,a);this.style=og;this.F=pg();this.ta=pg();this.S=pg();this.A=[];this.j=this.I=this.w=[];qg(this);this.X=0;rg(this);this.ka={};sg(this,a.messages);this.na=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Pc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Pc(b,a)})}aa(ng,cg);l=ng.prototype; l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.R=a;(a=Lc(a,"messages"))&&sg(this,a);this.sa=tg;be(this,64,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=ug(vg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.H.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,q=0;k--;){var u=b[e];u.type==c?q++||d.i("..."):(c=u.type,q=Ub[c],u&&d.i(n(u.id)+" %"+n(e<> "+b):(a.M&&(a.i("e u,void 0===f[2])a.i("begin assemble at "+Zg(u.J)),a.M=!0,Qc(a.u);else{var v;a.i("not supported yet");v=[];if(v.length){for(var B=0;BZa.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var te=[];"call"==Dg&&(kc=1E5,te=["CALL"]);for(void 0!==Cg&&a.i(Ba+ -" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Fg++;kc--}}Fg||(a.i("no "+Eg+"history available"),a.ya=void 0)}else{var $c=vg(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=gg(a,Ma)>>>0,65536>4||1;Ii--&&0< -cd;){var dd=0,ue=0,nc,ve="",Ig="",na=Zg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+ve+(nc?"":" "+Ig)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Jg=255,Kg=a.Ia,Lg=a.Xb;"ew"==f[0]&&(fd=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=fd<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), -a.i("\tew [a] [...] edit words at address a");else{var gd=vg(a,Ng);if(gd)for(var hd=2;hdCe;){for(var ub=null,Oi=256;65536>qc.J>>>0;){Pg.J=a.Gb(qc,2);if(null==qc.J||!Oi--)break;for(var Pi=a,jd=Pg, -Qg=null,rc=jd.J,Rg=rc,De=1;6>=De&&rc;De++){if(2Za.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var ue=[];"call"==Dg&&(kc=1E5,ue=["CALL"]);for(void 0!==Cg&&a.i(Ba+ +" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Fg++;kc--}}Fg||(a.i("no "+Eg+"history available"),a.ya=void 0)}else{var $c=vg(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=gg(a,Ma)>>>0,65536>4||1;Ii--&&0< +cd;){var dd=0,ve=0,nc,we="",Ig="",na=Zg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+we+(nc?"":" "+Ig)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Jg=255,Kg=a.Ia,Lg=a.Xb;"ew"==f[0]&&(fd=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=fd<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), +a.i("\tew [a] [...] edit words at address a");else{var gd=vg(a,Ng);if(gd)for(var hd=2;hdDe;){for(var ub=null,Oi=256;65536>qc.J>>>0;){Pg.J=a.Gb(qc,2);if(null==qc.J||!Oi--)break;for(var Pi=a,jd=Pg, +Qg=null,rc=jd.J,Rg=rc,Ee=1;6>=Ee&&rc;Ee++){if(2c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} +function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[Hm]=0;a.A[Im]=c.getDay()+1;a.A[Jm]=c.getDate();a.A[Km]=c.getMonth()+1;b=c.getFullYear();a.A[Lm]=b%100;b/=100;a.A[Mm]=b%10|b/10<<4;a.A[Nm]=38;a.A[Rd]=Om;a.A[Pm]=0;a.A[Dl]=Qm;a.ma=a.Z=0;a.Ha=a.Aa=null} +function El(a,b){var c=a.A[b];if(bc?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} l.save=function(){var a=new Xf(this);a.set(0,[this.C]);for(var b=[],c=0;c=eh&&(a.set(5,[this.D,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.Y[7],this.Y,this.V,this.A,this.ma,this.Z]));return a.data()}; l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Fl(this);b=a[1];for(c=0;c=c;c++)if(d&Co<=c;c++)d&Co<>=Ho;var f=d&Io,g=d&Jo;d&=Ko;if(d==Lo)Go(a,e+c);else{e+=c;var h=a.G[e];h.Qf=d;h.mode=g;h.Zg=f;h.pc=[0,0];h.qb=[0,0];h.je=[0,0];h.gd=!1;h.Me=!1;h.le=!1;h.Qe=!1;oo(a,e);b==so&&c==to&&fh(a,uo);b==so&&c==wo&&255==a.hc[0].od&& a.J==(Mo|No|Oo|Po)&&(b=a.G[0],b.Mc[0]=b.pc[0],b.Mc[1]=b.pc[1],b.jd=Ed(a.H,a.O))}}}function vo(a,b){a=a.G[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.ad?256:65536);return b}function Pd(a,b){a=a.G[b];(b=a.Mc[1]<<8|a.Mc[0])||(b=1==a.ad?256:65536);return b}function Go(a,b){Bl(a,b);var c=a.G[b];c.je[0]=c.qb[0];c.je[1]=c.qb[1];c.Me=!0;oo(a,b)}function oo(a,b){a=a.G[b];a.rd=a.Qf==Qo?1:0;a.ad=a.Qf==Ro?2:1} function Bl(a,b,c){var d=a.G[b];if(d.le&&(b!=wo||a.J&Mo)){var e=Ed(a.H,a.O),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=vo(a,b),h=Pd(a,b)-f;d.mode==qo?(0>=h&&(h=0),h||(d.gd=!0,d.le=!1,b||hh(a,uo))):d.mode==So?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo))):d.mode==Qd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo)));d.qb[0]=h&255;d.qb[1]=h>>8&255;c&&(a.jd=0)}return d} -function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[Gm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[Gm]))){a.A[Gm]=0;a.A[Im]=a.A[Im]% +function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[Im]=a.A[Im]% 7+1;var f;f=a.A[Lm];var g=Ja[a.A[Km]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Jm]>f&&(a.A[Jm]=1,12<++a.A[Km]&&(a.A[Km]=1,a.A[Lm]=(a.A[Lm]+1)%100))}a.A[Pm]|=Zo;a.A[Rd]&$o&&(a.A[Pm]|=Uo,hh(a,Vo))}a.ma=c-d%b}}l.Gm=function(a,b){var c=this.xa;this.ga&ap&&(this.J&bp?c=this.C[0][1]:this.B&&(c=cp(this.B)));w(this,a,null,b,"PPI_A",c);return c};l.jo=function(a,b,c){w(this,a,b,c,"PPI_A");this.xa=b};l.Hm=function(a,b){var c=this.J;w(this,a,null,b,"PPI_B",c);return c}; l.ko=function(a,b,c){w(this,a,b,c,"PPI_B");dp(this,b)};function dp(a,b){var c=!!(b&ep),d=!!(a.J&ep);a.J=b;a.B&&fp(a.B,!(b&bp),!!(b&Po));c!=d&&Vm(a,c)}l.Im=function(a,b){var c=0,c=(this.ca|0)==kl?this.J&No?c|this.C[1][1]&gp:c|this.C[1][1]>>4&1:this.J&hp?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.J&Mo&&Bl(this,wo).gd&&(c=this.J&ep?c|ip:c|jp);w(this,a,null,b,"PPI_C",c,32896);return c};l.lo=function(a,b,c){w(this,a,b,c,"PPI_C");this.Ca=b};l.Jm=function(a,b){var c=this.ga;w(this,a,null,b,"PPI_CTRL",c);return c}; l.mo=function(a,b,c){w(this,a,b,c,"PPI_CTRL");this.ga=b};l.Sl=function(a,b){var c=this.B?cp(this.B):0;w(this,a,null,b,"8041_KBD",c);this.aa&=~kp;return c};l.tn=function(a,b,c){w(this,a,b,c,"8041_KBD")};l.Rl=function(a,b){var c=this.J;w(this,a,null,b,"8041_CTRL",c);return c};l.sn=function(a,b,c){w(this,a,b,c,"8041_CTRL");dp(this,b)};l.Tl=function(a,b){var c=this.aa;w(this,a,null,b,"8041_STATUS",c);return c}; @@ -466,7 +466,7 @@ l.Vl=function(a,b){var c=this.J&~(zp|Ap)|(Ed(this.H)&64?Ap:0);w(this,a,null,b,"8 l.un=function(a,b,c){w(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=np;a=0;this.L>=Bp&&(a=this.L^15,this.L=Bp);switch(this.L){case Cp:yp(this,this.K);break;case Dp:pp(this,this.K|Ol);break;case Ep:pp(this,this.K&~Ol);this.B&&mp(this.B);break;case Fp:this.B&&(a=this.B,a.A=[],t(a)&&Mb(a,"scan codes flushed"));pp(this,this.K|Ol);yp(this,Gp);rp(this,Yl|Zl);break;case Hp:yp(this,Ip);break;case Jp:yp(this,this.M);break;case Kp:yp(this,this.qa);break;case Lp:yp(this,this.K&Ol?0:Mp);break;case Bp:a& 1&&kf(this.H)}};function pp(a,b){a.K=b;a.D=a.D&~Np|b&Op;a.B&&fp(a.B,!!(b&Pp),!(b&Ol))}function yp(a,b,c){0<=b&&(a.oa=b,c?a.D|=kp:(a.D&=~kp,a.D|=lp))}function rp(a,b){a.qa=b;oc(a.ka,!!(b&Zl));b&Yl||kf(a.H)}function Qp(a,b){a.ca>4)+(c&15),e=!0);if(d==Gm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; +l.Ln=function(a,b,c){var d=this.V&Wp;t(this,4352)&&w(this,a,b,c,"CMOS.DATA["+r(d)+"]",null,!0);a=b^this.A[d];if(d<=Dl){if(c=b,d>4)+(c&15),e=!0);if(d==pm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; l.Xm=function(a){if(t(this,16)&&Wk(this.ba,26,a)){var b=this.H.D>>8;Tf(this.H,a,function(a,d){return function(c){d=Ed(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ta(h)+" CL(min)="+r(g)+" DH(sec)="+r(m);else if(4==b||5==b)e=" CX(year)="+ta(a.H.I)+" DH(month)="+r(m)+" DL(day)="+r(k);g=a.ba;h=d;g.message("INT "+r(26)+": C="+(dg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Ed(this.H)))}return!0}; function Vm(a,b){if(a.la)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ea.wb);var c=Math.round(ol/vo(a,wo));if(20>c||2E4this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.da?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; -function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Xx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Xx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} -var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(0>e&&(b="-"+b,e=0),f=oa(b,a.L))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ @@ -804,23 +804,23 @@ Py(a,g[1],!0);if(v)if(a.aa=v,void 0===g[2])a.P("begin assemble at "+Fy(v)),a.da= a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var T=K.charAt(1);if("l"==T){var L;L=0+Vz(a,a.B);L+=Vz(a,a.Z);(L+=Vz(a,a.N))||a.P("no breakpoints")}else if("n"==T)a.xa=$x(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ua={};if("*"!=H&&(ua=Py(a,H,!0,!0),!ua))break a;H=null==ua.Ja?H:ta(ua.Ja);"c"==T?null==ua.Ja?(iy(a),a.P("all breakpoints cleared")):Ey(a, a.B,ua)||Ey(a,a.Z,ua)||Ey(a,a.N,ua)||a.P("breakpoint missing: "+Fy(ua)):"i"==T?a.P("breakpoint "+(Nc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (input)"):"o"==T?a.P("breakpoint "+(Rc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (output)"):null!=ua.Ja&&(Sy(a,ua,I),"p"==T?a.Gd(a.B,ua):"r"==T?a.Gd(a.Z,ua):"w"==T?a.Gd(a.N,ua):a.P("unknown breakpoint command: "+T))}}}break;case "c":$A(a);break;case "d":a:{var ca=g,xb,za=ca[0],cb=ca[1],Sa=ca[2],rb=ca[3];if("?"==cb){var db="";for(xb in Sb)a.Ba[xb]&& (db&&(db+=","),db+=xb);db+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");db.length&&a.P("dump extension commands:\n\t"+db)}else if("state"==cb){var rc=iB(a.pa,!0);rc?"console"==Sa?console.log(rc): -($A(a),a.P(rc)):a.P("powerOff() error")}else if("symbols"==cb)for(var ib=0;ib>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==xt&&(Pg=1E5,rm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= 1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0Am;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0a?-b:b}});ma("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var na={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, -bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,ld:103,md:104,nd:105,od:106,k:107,pd:108,qd:109,n:110,rd:111,p:112,q:113,r:114,sd:115,t:116,ud:117,vd:118,wd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; -function ta(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a?-b:b}});na("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var ta={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, +bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,hd:103,jd:104,kd:105,ld:106,k:107,md:108,nd:109,n:110,pd:111,p:112,q:113,r:114,qd:115,t:116,sd:117,td:118,ud:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; +function ua(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0f&&(f+=Math.pow(2,36)),f=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function va(a,b){var c,d="";b?32>=1,f--;return d} -function n(a,b,c){b?12"']/g,function(a){return Ba[a]})}function Ea(a,b){return(a+" ").slice(0,b)}function Fa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(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 Ia(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 Ja(a,b){var c,d={Z:null,W:null,va:null,ua:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.va=g.load;d.ua=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ka=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.wa=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} -function r(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function wa(a,b){var c,d="";b?32>=1,f--;return d} +function m(a,b,c){b?12"']/g,function(a){return Ea[a]})}function Fa(a,b){return(a+" ").slice(0,b)}function Ga(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ea={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ha(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 Ja(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="",n;for(n in b)b.hasOwnProperty(n)&&(k&&(k+="&"),k+=n+"="+encodeURIComponent(b[n]));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 Na(a,b){var c,d={Z:null,W:null,ua:null,ta:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ua=g.load;d.ta=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ja=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.va=null;mb.push(this)}function nb(a,b,c){ob[a]&&b&&(ob[a][b]=c)}function pb(){return Date.now()||+new Date} +function r(a){window&&window.alert(a)}function qb(a){var b=!1;window&&(b=window.confirm(a));return b}function rb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, -set:this.fc};Lb(this)}la(ac,u);l=ac.prototype;l.reset=function(a){this.stop();a&&cc(this,this.w=0)}; -l.oa=function(a,b,c,d){if(this.H&&this.H.oa(a,b,c,d)||this.v&&this.v.oa(a,b,c,d)||this.D&&this.D.oa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){dc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ec(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){dc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ec(a,b)}}(this,b),!0):u.prototype.oa.call(this,a,b,c,d)}};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;fc(this);gc(this)};l.xa=function(a,b){if(!b)if(this.U&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.na=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; -l.restore=function(a){if(a=a[0])ic(this,this.i=a[0]),cc(this,this.w=a[1]),jc(this,a[2]);return!0};l.cc=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.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fc(a,b){for(var c in a.C)kc(a,c,null!=b?b:a.C[c])}function lc(a,b,c){if(a=a.J[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])} -l.Ob=function(a,b,c){if(dc(this,b)){if(c){var d=this;setTimeout(function(){ec(d,b);a&&a()},+c);return!1}ec(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return jc(this,ta(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,lc(this,a,c[1]),!0):!1};l.gc=function(a){return dc(this,a)?(ec(this,a),!0):!1};function dc(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!=mc&&(a.P=b==nc,a.R=b==oc),!0):!1} -function ec(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)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[pc]&&this.b[pc][1]&&qc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; -l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[pc]&&this.b[pc][1])qc(this.v);else{if((a=this.D)&&!Mb(a,!0))Nb(a,!0),rc(a,0,null),Nb(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){m=h.size-(e-k);m>f&&(m=f);h.Pa=e-h.B+m;e=k+16384;f-=m;g++;continue}}return Hc(Ic,e,f)}e=new zc(a,e,m,16384,d);Ec(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Jc[d]+" at "+n(b)),!0):Hc(Kc,b,c)} -function xc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function wc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Fc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.pa,c=!0);0<=a.ja&&a.ja<=ed(a)&&(a.pa=a.ja=-1,ad(a),a.V(),c=!0);c&&a.u(ed(a)+" cycles: checksum="+q(a.Ca))}} -l.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&id(a.H)}tc(a,a.M);a.M=0;a.L=ob();a.P=0;gd(a);return d}function jd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ld(a,b){var c=a.R-=a.T;a.T=0;b&&(a.R=0);return c} -l.dc=function(){if(this.A.N){this.Va>=this.eb&&gd(this,!0);this.ka=0;this.Ba=ob();if(this.P){var a=this.Ba-this.P;a>this.cb&&(this.L+=a,this.L>this.Ba&&(this.L=this.Ba))}try{do{var b=jd(this,this.A.Ma?1:this.Ea);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=ld(this,!0);this.ka+=b;this.M+=b;uc(this,b);sc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Ea;++this.fb>=md&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(ob(),ed(this));zb(this, -e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=ob();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Ea));var c=c-(this.P-this.Ba),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,fd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; -function qc(a,b){if(!Jb(a))if(a.A.N)a.u(a.toString()+" busy");else{fd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&id(a.H,!0),a.H.start(a.L,ed(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){ld(this);tc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),ed(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var hd=30,md=15,Yc=["power","reset"]; -function nd(a){var b=+a.model||1001;Xc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=od.bind(this);this.w=K.bind(this);this.za=null;this.ob=[];this.A.complete=!1}la(nd,Xc);l=nd.prototype; -l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Fa=this.Ga=this.b=this.K=0;this.i=this.Aa=this.Sa;this.I=this.sa=-1;this.F=this.j=0;this.gb=[0,0];this.qa=[0,0];this.ha=[0,0];this.ra=[0,0];this.ya=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.za=null;$c(this);this.A.error=!1;Xc.prototype.reset.call(this)};l.Bb=function(){return 0}; -l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Fa,this.Ga,this.i,this.sa,this.I,this.j,this.C,this.Aa,this.ya,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,pd(this));a.set(4,kd(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ha();ca();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.b=b.next().value;this.K=b.next().value;this.Fa=b.next().value;this.Ga=b.next().value;this.i=b.next().value;this.sa=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Aa=b.next().value;this.ya=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];fd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.ya=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; -l.Ra=function(a){this.A.complete=!0;var b=this.D?rd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.T=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(sd(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.za||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&sd(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Fa=this.f(this.b):0<=this.sa?(this.K=this.Ga=this.f(this.sa),this.sa=-1):(this.K= -this.Ga=this.f(this.Aa=this.i),this.i=(this.i+1)%Sb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Fa=this.f(a))&Rb;a=this.K&4194304?-1:this.Ga/Yb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} -function ud(){var a=0,b=this.f(this.b),c=b/Zb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Zb+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function vd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} -function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function xd(a,b){this.g(b,this.f(this.b))}function yd(a,b){this.g(b,this.b)}function zd(a,b){this.g(this.b,this.f(b))}function Ad(a,b){this.g(b,0)}function Bd(a,b){this.g(b,C-this.f(b))}function Cd(a,b){this.g(b,C)} -function Dd(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Ed(a,d,c)+(c-(c&y)))}function Xd(a,b){var c=this.f(b);this.g(b,Ed(a,c,0))}function Yd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+(b-(b&y)))}function Zd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function $d(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)} -function ae(a,b){var c=this.b*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)}function be(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+b)}function ce(a,b){var c=this.f(this.b),d=(c&y)*z,c=Ed(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function de(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,ee(a,d,c)+c)}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,this.b)+this.b)}function ge(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)} -function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Tb?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,ee(a,d,c)+c)}function je(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ke(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=c/z|0,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){me[a&7].call(this,a,a>>3&127)} -function ne(){}function oe(){}function K(a){this.u("undefined opcode: "+n(a));qd(this,-1);this.V()}function pe(a){a>A&&(a!=B?a=Vb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;qe.call(this,a,b,c);return c} -function re(a,b,c){var d=!1,e=!1,f=b-b%B;a=a%B+b*B%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=C-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.qa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.ra;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),te(this.gb,this.qa),ue(this.ra)))break;ve(this.ha);ve(this.qa)}while(!ue(this.qa)); -a=this.gb[0];this.F=this.ra[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} -function we(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=C||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%B;b=2*b%E+Math.trunc(c/B);c=a+c%B;d=b-b%B;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} -function xe(a){a?a==B?this.j|=163840:a=Vb-a:this.j|=98304;return a}function P(a,b){var c=a-b;0>c&&(c+=E);qe.call(this,c,b,a);return c}function qe(a,b,c){a=Math.trunc(a/Ub);b=Math.trunc(b/Ub);c=Math.trunc(c/Ub);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function Q(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function R(a,b){return Q(a,(~(b/F|0)&15)*F+(~b>>>0))}function S(a,b){return(a>>0)}function T(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function U(a){return a>>0)}function W(a){return(a/z|0)+(a&y)*z}function ee(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Tb?y*z:0}return b}function Ed(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} -function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} -var td=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},ud,function(a,b){0>this.I&&ud.call(this);vd.call(this,0,b)},vd,function(a,b){0>this.I&&ud.call(this);wd.call(this,0,b)},wd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, +function bc(a,b){u.call(this,"Panel",a,512);this.K=this.L=0;this.U=b;this.i=this.I=this.j=this.w=0;this.M=this.O=-1;this.P=this.R=this.F=!1;this.S=cc;this.C={};this.b={START:[1,1,!0,!1,this.Xb],STEP:[1,1,!1,!1,this.Yb],ENABLE:[1,1,!1,!1,this.Sb],CONT:[1,1,!0,!1,this.Qb],DEP:[0,0,!0,!1,this.Rb],EXAM:[1,1,!0,!1,this.Tb],LOAD:[1,1,!0,!1,this.Vb],TEST:[0,0,!0,!1,this.Ub]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, +set:this.fc};Mb(this)}ma(bc,u);l=bc.prototype;l.reset=function(a){this.stop();a&&dc(this,this.w=0)}; +l.na=function(a,b,c,d){if(this.H&&this.H.na(a,b,c,d)||this.v&&this.v.na(a,b,c,d)||this.D&&this.D.na(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ec(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fc(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){ec(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fc(a,b)}}(this,b),!0):u.prototype.na.call(this,a,b,c,d)}};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};l.wa=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.ma=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; +l.restore=function(a){if(a=a[0])jc(this,this.i=a[0]),dc(this,this.w=a[1]),kc(this,a[2]);return!0};l.cc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}hc(this);return!0};function lc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gc(a,b){for(var c in a.C)lc(a,c,null!=b?b:a.C[c])}function mc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hc(a){for(var b in a.b)mc(a,b,a.b[b][1])} +l.Ob=function(a,b,c){if(ec(this,b)){if(c){var d=this;setTimeout(function(){fc(d,b);a&&a()},+c);return!1}fc(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return kc(this,ua(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,mc(this,a,c[1]),!0):!1};l.gc=function(a){return ec(this,a)?(fc(this,a),!0):!1};function ec(a,b){var c=a.b[b];return c?(mc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.P=b==oc,a.R=b==pc),!0):!1} +function fc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(mc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; +l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[qc]&&this.b[qc][1])rc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),sc(a,0,null),Ob(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){n=h.size-(e-k);n>f&&(n=f);h.Pa=e-h.B+n;e=k+16384;f-=n;g++;continue}}return Ic(Jc,e,f)}e=new Ec(a,e,n,16384,d);Fc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=n}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+m(b)),!0):Ic(Lc,b,c)} +function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Gc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.oa,c=!0);0<=a.ja&&a.ja<=fd(a)&&(a.oa=a.ja=-1,bd(a),a.V(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+q(a.Ba))}} +l.na=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=rb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=pb();a.P=0;hd(a);return d}function kd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function md(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} +l.dc=function(){if(this.A.N){this.Va>=this.eb&&hd(this,!0);this.ka=0;this.Aa=pb();if(this.P){var a=this.Aa-this.P;a>this.cb&&(this.L+=a,this.L>this.Aa&&(this.L=this.Aa))}try{do{var b=kd(this,this.A.Ma?1:this.Da);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.ka+=b;this.M+=b;vc(this,b);tc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Da;++this.fb>=nd&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(pb(),fd(this));Jb(this, +e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=pb();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Da));var c=c-(this.P-this.Aa),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,gd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; +function rc(a,b){if(!Kb(a))if(a.A.N)a.u(a.toString()+" busy");else{gd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){md(this);uc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(pb(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; +function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=pd.bind(this);this.w=K.bind(this);this.ya=null;this.ob=[];this.A.complete=!1}ma(od,Yc);l=od.prototype; +l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Ea=this.Fa=this.b=this.K=0;this.i=this.za=this.Sa;this.I=this.ra=-1;this.F=this.j=0;this.gb=[0,0];this.pa=[0,0];this.ha=[0,0];this.qa=[0,0];this.xa=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.ya=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};l.Bb=function(){return 0}; +l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Ea,this.Fa,this.i,this.ra,this.I,this.j,this.C,this.za,this.xa,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ia();da();ia();var c=b[Symbol.iterator];b=c?c.call(b):ja(b);this.b=b.next().value;this.K=b.next().value;this.Ea=b.next().value;this.Fa=b.next().value;this.i=b.next().value;this.ra=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.za=b.next().value;this.xa=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];gd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.xa=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; +l.Ra=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.S=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.ya||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Ea=this.f(this.b):0<=this.ra?(this.K=this.Fa=this.f(this.ra),this.ra=-1):(this.K= +this.Fa=this.f(this.za=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Ea=this.f(a))&Sb;a=this.K&4194304?-1:this.Fa/Zb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} +function vd(){var a=0,b=this.f(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} +function xd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function yd(a,b){this.g(b,this.f(this.b))}function zd(a,b){this.g(b,this.b)}function Ad(a,b){this.g(this.b,this.f(b))}function Bd(a,b){this.g(b,0)}function Cd(a,b){this.g(b,D-this.f(b))}function Dd(a,b){this.g(b,D)} +function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Xd(a,d,c)+(c-(c&y)))}function Yd(a,b){var c=this.f(b);this.g(b,Xd(a,c,0))}function Zd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+(b-(b&y)))}function $d(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ae(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)} +function be(a,b){var c=this.b*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)}function ce(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+b)}function de(a,b){var c=this.f(this.b),d=(c&y)*z,c=Xd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function ee(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ge(a,b){var c=this.f(b);this.g(b,fe(a,c,this.b)+this.b)}function he(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)} +function ie(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Ub?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function je(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ke(a,b){var c=this.f(b);this.g(b,fe(a,c,0))}function le(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}function me(a,b){var c=this.f(this.b),d=c/z|0,c=fe(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){ne[a&7].call(this,a,a>>3&127)} +function oe(){}function pe(){}function K(a){this.u("undefined opcode: "+m(a));rd(this,-1);this.V()}function qe(a){a>A&&(a!=C?a=Wb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;re.call(this,a,b,c);return c} +function se(a,b,c){var d=!1,e=!1,f=b-b%C;a=a%C+b*C%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=D-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.pa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.qa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),ue(this.gb,this.pa),ve(this.qa)))break;we(this.ha);we(this.pa)}while(!ve(this.pa)); +a=this.gb[0];this.F=this.qa[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} +function xe(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=D||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%C;b=2*b%E+Math.trunc(c/C);c=a+c%C;d=b-b%C;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} +function ye(a){a?a==C?this.j|=163840:a=Wb-a:this.j|=98304;return a}function Q(a,b){var c=a-b;0>c&&(c+=E);re.call(this,c,b,a);return c}function re(a,b,c){a=Math.trunc(a/Vb);b=Math.trunc(b/Vb);c=Math.trunc(c/Vb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function S(a,b){return R(a,(~(b/F|0)&15)*F+(~b>>>0))}function T(a,b){return(a>>0)}function U(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function V(a){return a>>0)}function X(a){return(a/z|0)+(a&y)*z}function fe(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Ub?y*z:0}return b}function Xd(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} +function ue(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function te(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function we(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ve(a){return!a[0]&&!a[1]} +var ud=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, -function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},xd,yd,zd,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(this.b)))},function(a,b){this.g(b,xe.call(this,this.b))},function(a,b){this.g(this.b, -xe.call(this,this.f(b)))},function(a,b){a=xe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,pe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,pe.call(this,this.f(b)))},function(a,b){a=pe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,we.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b), -!0))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,we.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ -1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, -function(a,b){a=this.f(b);b=this.f(b+1&15);b=re.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?B:0,c=A):(d=d*Math.pow(2,c)%B,c=B-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; -this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& -dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=B,e+=B)}else d=d*Math.pow(2,a)%B+Math.trunc(e%B/Math.pow(2,35-a)),e=e*Math.pow(2,a)%B,c=B-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=B,e+=B)}else-36>=a?(e=-72>=a?d>A?C:0:Math.trunc(d%B/Math.pow(2,-a-35)),d<=A?d=0:(d=C,e+=B)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%B/Math.pow(2,-a))+ -d%B*Math.pow(2,35+a)%B,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=B));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ +function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},yd,zd,Ad,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ye.call(this,this.f(this.b)))},function(a,b){this.g(b,ye.call(this,this.b))},function(a,b){this.g(this.b, +ye.call(this,this.f(b)))},function(a,b){a=ye.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,qe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,qe.call(this,this.f(b)))},function(a,b){a=qe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,xe.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b), +!0))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,xe.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ +1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, +function(a,b){a=this.f(b);b=this.f(b+1&15);b=se.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?C:0,c=A):(d=d*Math.pow(2,c)%C,c=C-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& +dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=C,e+=C)}else d=d*Math.pow(2,a)%C+Math.trunc(e%C/Math.pow(2,35-a)),e=e*Math.pow(2,a)%C,c=C-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=C,e+=C)}else-36>=a?(e=-72>=a?d>A?D:0:Math.trunc(d%C/Math.pow(2,-a-35)),d<=A?d=0:(d=D,e+=C)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%C/Math.pow(2,-a))+ +d%C*Math.pow(2,35+a)%C,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=C));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ 1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%E,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},K,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.N||(this.g(b,d* -z+c),a||qd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a=B&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Fa,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.sa=this.b},K,function(a){this.w(a)},function(a,b){a= +z+c),a||rd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a=C&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Ea,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.ra=this.b},K,function(a){this.w(a)},function(a,b){a= this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=E&&(a-=E);a/z|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=E);(a/z|0)==y&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&y)*z+this.i);H(this,this.b+1)},function(a,b){this.g(b,(this.j&y)*z+this.i);H(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,O.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,O.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,O.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,O.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,P.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,P.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,P.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,P.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>S(this.f(b),this.b)&&H(this, -this.i+1)},function(a,b){S(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.f(this.b))&&H(this,this.i+1)}, -function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))||H(this,this.b)},function(a,b){0>=U(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))&&H(this,this.b)},function(a,b){0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); -0U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), -1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, -O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0U(a)&&H(this,this.b)},function(a, -b){a=this.g(b,P.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,P.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)}, -function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0T(this.f(b),this.b)&&H(this, +this.i+1)},function(a,b){T(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&H(this,this.i+1)}, +function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))||H(this,this.b)},function(a,b){0>=V(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))&&H(this,this.b)},function(a,b){0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); +0V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), +1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, +O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0V(a)&&H(this,this.b)},function(a, +b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)}, +function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>>f.i;0>>= -f.i;0>>a.i;0g&&g>=-B&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=na.pb&&c<=na.Ib&&(b=c-(na.pb-na.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==na.Gb&&(b=na.Fb);d.Ya(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.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Lb(this)}; -l.Cb=function(a){if(!this.b){var b=Zc(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Fa(c[0]);if(d!=this.Ta)return;c=Fa(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.xa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.na=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Fa(b.substring(c,f))),c=f+1}}return a} -function Je(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} -function Ke(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; -case "&":e=a;32>=e.ia?f&=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^^":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)^(g/Le|0))*Le+((f^g)>>>0));break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "><":if(g=35-(g&255))0>f&&(f+=Math.pow(2,36)),f=0<"==k?10:e; -p=!1}Ke(a,t,D)&&1==t.length||(m=!0);m?!1===f&&a.u("parse error ("+(h||k)+")"):g=t.pop();a.S=Y;return g}function Pe(a,b,c){var d;a.ka=null;b&&("{"!=a.ba[0]&&(b=b.split(a.ba[0]).join("{").split(a.ba[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Me(a,b,0,b.length,a.S,c),void 0!==d&&!1===c&&Qe(a,null,d));return d} -function Ne(a,b,c,d,e){var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(f=ta(e?"-"+b:b,a.S),e=!1)),null!=f?e&&(f=-f):d||a.u("invalid "+(c?c:"value")+": "+b)):d||a.u("missing "+(c||"value"));return f} -function Qe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;if(8==a.S)d=c+". "+n(c,0,!0);else{d=c;var f=4,g="";if(!f||4>=8;d=q(c,0,!0)+" "+c+". "+n(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Re(a){var b=a.K;a.K={};return b}function Se(a,b){if(b)return Qe(a,b,a.K[b]);var c=0;for(b in a.K)Qe(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Oe={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11},Le=Math.pow(2,32); -function Te(a){He.call(this,a);this.Ea=!1;this.Ca=18;this.ia=36;this.ba=["<",">"];this.qa=[];this.Da=X();this.L=X(0);this.pa=X(0);this.fa=X(0);this.F=[];this.b=this.M=this.I=[];Ue(this);this.T=this.ja=0;this.i=[];this.Aa=void 0;Ve(this);this.D=this;this.ya={};this.Y=this.xb=0;this.U=null;this.P=[];We(this,a.messages);this.sa=a.commands;this.O=0;this.Ja=this.Ba=null;this.C=this.Ga=this.Fa=this.ha=this.za=0;this.ra=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return dd(b, -a)}):void 0===global[w]&&(global[w]=function(a){return dd(b,a)})}la(Te,He);function Xe(a){a=a&&a.B;null==a&&(a=-1);return a}function X(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,S:c}}function Ye(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.S=d}function Ze(a){return[a.B,a.Wa,a.la,a.S,a.Za]}function $e(a,b){var c=X(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Ie(a,c.Za=b[4]));return c}l=Te.prototype; -l.Ha=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ca=b.F;(b=Zc(a,"messages"))&&We(this,b);if(a=Zc(a,"commands"))this.sa=a;af(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Xe(bf(d,c,d.pa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var p=b[e];p.type==c?m++||d.u("..."):(c=p.type,m=Jc[c],p&&d.u(q(p.id,8)+" %"+ -q(e<a&&a>=-B&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ef(a){return n(a/Sb,6)+" "+n(a%Sb,6)} -function We(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Ie(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in $b){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.Aa==b&&(b=qd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ye(a.i[a.T],b),++a.T==a.i.length&&(a.T=0)));return!1} -function wf(a,b,c,d){var e=X(b.B),f=a.Ia(b,1),g,h,k,m=0,p=f/Wb|0,t;for(t in xf)if(g=xf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=yf;m=p&3;break;case 32256:k=zf;m=p&7;break;case 29248:k=Af,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Bf&&(k="B");k=Cf[g||0]+k;if(g){if(28700==h)h=f/Xb&127,m=J(a,h,-1);else for(h=f>>23&15,m=J(a,h,-1),p=0;m&&p>18&15)&&(k+="("+J(a,f, --1)+")")}else k=Ea(k,8)+ef(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ia(e,1),g+=" "+ef(k),null==e.B)break;while(e.B!=b.B)}h+=Ea(g,16)+f;c&&(h=Ea(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+ed(a.v).toString()+" cs="+q(a.v.Ca)):h+(null!=d?"="+d.toString():""));return h} -function Ef(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),m=0;mBf&&(ea="B");if(k==Cf[h]+ea){f=29248!=g?Y:(Y&3)<<1|(Y&12)<<2;f=(D|f<<6)*Wb;break}}if(0<=f)break}if(0<=f)break}}else c&& -(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ue(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.za=0;a.ja=0} -l.La=function(a,b,c){var d=!0;c||fg(this,a,b,!1,!0);if(a!=this.b){var e=Xe(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].La(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(hg(this,a,a.length-1,"set"),Ve(this)));return d};function fg(a,b,c,d,e){var f=!1;c=Xe(c);for(var g=1;g>>d.i],b==a.I));h.la||Ve(a);break}}return f} -function ig(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=n(d,2);Ye(e.Da,d);f+="="+J(e,e.Ia(e.Da),36)+" ";c+=f}if(b){b="";for(d=0;d=kf?1:d==hf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ga(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({td:b,B:c,Pb:d,W:e,tb:f})}function lg(a,b,c){var d=[],e=Xe(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case gf:H(h, -g);Ye(a.L,h.i);break;case kf:f=65536;break;case lf:f=32768;break;case mf:f=131072;break;case nf:f=32;break;case of:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(kg(a,e));c&&(Ye(a.L,d.i),uf(a,J(a,a.L.B)))}}function sg(a,b){b=Fa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.u(m)}h[3]&&(g=h[3],f=null);h=a.fa;m=b;h.B=m.B;h.Wa=m.Wa;h.la=m.la;h.S=m.S;a.u(wf(a,b,g,f));e-=b.B-k;c++}}} -function jg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(sf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Kb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length);var Jd= -[];"call"==Kf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Jf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.Aa=fa;Mf++;Ab--}}Mf||(a.u("no "+Lf+"history available"),a.Aa=void 0)}else{var fb=bf(a,oa,a.pa);if(fb){var Ka=0,Pf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||mh,Ka=Ne(a,Ca);else{var Qf=bf(a,Ca);Qf&& -(Ka=Qf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Pf?La+(qa+","):La+(oa+": "+qa+(0>Sf?" "+Md:""))}La&& -a.u(La);a.S=oh}}}}break;case "e":if("else"==g[0])break;var Tf,Uf,Vf=g[0],Od=g[1];"e"==Vf||"ew"==Vf?(Tf=a.Ia,Uf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=bf(a,Od,a.pa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null,th= -256;65536>Fb.B>>>0;){Td.B=a.Ia(Fb,2);if(null==Fb.B||!th--)break;if(!(Td.B&1)){for(var uh=a,Cc=Td,Xf=null,Gb=Cc.B,Yf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2dg)a.u("step commands:"), -a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var eg=X(a.v.i);a.Ia(eg);a.O?(a.La(a.b,eg,!0),qf(a)||(a.H&&id(a.H),a.O=0)):tg(a,dg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}tf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.S=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.S);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.pa= -Ib;break;case "start":a.v.Da=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&ad(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(fd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), -a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":tg(a,g[0],g[1]);break;case "u":uf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){qg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Qb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){sg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in vg)Vd+="\n"+ -Ea(Wd,9)+vg[Wd];rd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(gg){a.u("Debugger "+(gg.stack||gg.message)),d=!1}return d}function dd(a,b,c){b=Ie(a,b,c);for(var d in b)if(!jg(a,b[+d]))return!1;return!0} -var vg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Bf=20,Cf=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), -gf=0,hf=1,jf=2,kf=3,lf=4,mf=5,nf=6,of=7,ff="PC RA EA C0 C1 OV ND PD".split(" "),wg={},xf=(wg[28672]={0:101},wg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},wg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Bf,9216:53,9472:52, -9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},wg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},wg[29248]={24576:79,24640:80,25088:81,25152:82},wg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},wg),yf=["","I","M","S"],zf=" L E LE A GE N G".split(" "),Af="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Df=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],pf=1E3,sf=">> ";Ya(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&zg(a,"unrecognized HTML entity: "+c[0])}a.ea&&(a.ea+="\n");a.ea+=e;setTimeout(function(){xg(a)},0)}})}} -function yg(a){if(0<=a.R.indexOf("p"))return a.u(a.ea),0;var b=Re(a.i);try{var c,d=a.ea.split(/\r?\n/);for(c=0;c=--g)break}0>g&&a.error("missing bracket(s): "+f);0<=m&&(h=f.substr(m,k-m));for((f=h)&&(b=b.replace(f,Hg(a,Ig,f)));f=Jg(a,b);)b=b.replace(f,f.slice(0,-1));if(!Eg(a,d,b))switch(d){case "=":d=Cg(a,b);void 0===d?a.error("parseExpression("+ -b+")"):Gg(a,c,d);break;case Kg:case Lg:case Mg:Fg(a,e);break;case Ng:Og(a,0,b.replace(",",",,"));break;case Pg:case Qg:case Rg:Hg(a,d,b);break;case Sg:case Tg:break;default:c=d,d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Cg(a,b,!0):(c=Ef(a.i,c,d,a.ta,!0),0>c&&(c=Ef(a.i,"",b,a.ta,!0),0>c&&(c=void 0))),void 0!==c?Og(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} -function Eg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){b=",";"("==c[0]&&(b+=")",c=c.substr(1));for(var e=[];c;){c=c.trim();var f=Ug(a,c,b);if(!f)break;e.push(f);c=c.substr(f.length+1)}Bg(a,d.ea,d.ub,e);return!0}if("_"!=b[0])return!1;switch(b.substr(1)){case Qg:d.mb||Bg(a,d.ea);break;case Rg:for(;0p)break;var m=p+1,t=p+h.length;p&&f[p-1].match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&f[t].match(/[0-9A-Z$%.]/i)||(f=f.substr(0,p)+k+f.substr(t),m=p+k.length)}if(!Ag(a,f))break}}pg.prototype.error=function(a){throw Error("error"+(this.ma?" at line "+wa(this.ma):"")+": "+a);}; -function zg(a,b){a.u("warning"+(a.ma?" at line "+wa(a.ma):"")+": "+b)}function Ug(a,b,c){c=void 0===c?",":c;for(var d=0,e=null,f=0;d"==g&&0>--f){a.error("missing bracket(s): "+b);break}d++}f?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.w+=b}if(null==a.j){var d=b=0,e,f,g=a.w.length;a.F==Lg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Og(a,d),b=0)}b&&Og(a,d)}return c} -function Hg(a,b,c){var d,e,f,g;a.J="<";a.H=">";e=f=[];if(b==Pg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+" definition: "+c),"";b=d[1];a.v[b]&&a.error("macro redefined: "+b);e=d[2].match(/[A-Z$%.][0-9A-Z$%.]*/g);c=Wg;g=3}else if(b==Ig)a.J="[",a.H="]",b="_"+wa(a.ta,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)],c=Xg,a.D.push(b),g=0;else{g=Ug(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+ -1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="_"+b;c=Cg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;var h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.H&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,ea:h,ma:a.ma};a.b?a.C=b:Eg(a,b);return b}function Gg(a,b,c,d){var e,f;d=void 0===d?!1:d;e=void 0===e?!1:e;f=void 0===f?!1:f;b=b.toUpperCase().substr(0,6);d&&a.O[b]?a.error("label "+b+" redefined"):(a.O[b]={name:b,value:c,ma:a.ma,jd:d,hd:e,kd:f},a.i.K[b]=c)} -function Og(a,b,c){a.G[a.ta]=Dg(a,b);null!=c&&a.I.push({ta:a.ta,Db:c});a.ta++}function Dg(a,b,c){c=void 0===c?a.ta:c;var d=Je(a.i,b||0,36,!0);(b<-B||b>=E)&&zg(a,"truncated value "+n(b)+" at location "+n(c)+" to "+n(d));return d}pg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Kg="ASCII",Lg="ASCIZ",Pg="DEFINE",Qg="IFE",Ig="LITERAL",Sg="PAGE",Rg="REPEAT",Mg="SIXBIT",Tg="SUBTTL",Ng="XWD",Wg=-1,Xg=-2,Vg=-3; -function Yg(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;Zg(this,b);this.O=Zc(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.T=this.P=!1;this.ca=Zc(this,"url")||"";(Math.random()+.1).toString(36);this.i=$g(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new yc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.wa)for(b= -0;b\nLicense: GPL version 3 or later ");for(b=0;bah){if(bh(d,this.L)){this.C=new G(this,"1.34.2",kh);bh(this.C)&&(lh(this,d),a=xh,yh(this.C));this.C.set(hh,Ha());zh(this.C);var e=this.b&&!this.K;if(a==ih||pb("Click OK to restore the previous "+Qb+" machine state, or CANCEL to reset the machine.")){if(c=gh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?bh(d,g):("error"==f&&"no machine state"!= -g?(this.da("Error: "+g),"unable to verify user"==g&&(Ra(Ah,""),this.i=null)):this.u(f+": "+g),yh(d),bh(d)?(c=gh(d),e=!0):c=!1))}e&&eh(this,c?d:null)}else a==xh&&d.clear()}else eh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Bh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(lh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function lh(a,b){if(pb("There may be a problem with your "+Qb+" machine.\n\nTo help us diagnose it, click OK to send this "+Qb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Qb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ia("http://www.pcjs.org/api/v1/report",d,!0)}} -function ug(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",fh),h=Ha();g.set(hh,h);f.set(hh,h);f.set(Ch,"1.34.2");f.set(Dh,window?window.location.href:null);f.set(Eh,window?window.navigator.userAgent:"");a.v&&a.v.na&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.na(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.S||8,e=e||0,e=8==f?n(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ia(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);Mh(a,b,c)}})}else c(a,null)} -function Nh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--Jh||hb(!0));m=!1}var h,k,m=!0;Jh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=p:D.appendChild(document.createTextNode(p));t.appendChild(D)}d|| -(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Kh(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Jh||hb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Jh|| -hb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Kh(c,b,a,e,!0,f,p):Lh(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){hb(!1);return Nh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){hb(!1);return Nh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-C&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=ta.pb&&c<=ta.Ib&&(b=c-(ta.pb-ta.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ta.Gb&&(b=ta.Fb);d.Ya(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.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; +l.Cb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ga(c[0]);if(d!=this.Ta)return;c=Ga(c[1]);if(this.b=sb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.wa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.ma=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Ga(b.substring(c,f))),c=f+1}}return a}function Ke(a,b,c){if(32>=a.ia)return b|c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Le|0)^(c/Le|0))*Le+((b^c)>>>0)} +function Y(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} +function Me(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; +case "&":e=a;32>=e.ia?f&=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^!":f=Ke(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Y(a,f,0,!0),f=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Ne(a,b,0,b.length,a.T,c),void 0!==d&&!1===c&&Re(a,null,d));return d} +function Oe(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(0>e&&(b="-"+b,e=0),f=ua(b,a.T))),null!=f?0>e?f=-f:0>=8;d=q(c,0,!0)+" "+c+". "+m(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Se(a){var b=a.K;a.K={};return b}function Te(a,b){if(b)return Re(a,b,a.K[b]);var c=0;for(b in a.K)Re(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Pe={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11},Le=Math.pow(2,32); +function Ue(a){Ie.call(this,a);this.Da=!1;this.Ba=18;this.ia=36;this.ba=["<",">"];this.pa=[];this.Ca=Z();this.L=Z(0);this.oa=Z(0);this.fa=Z(0);this.F=[];this.b=this.M=this.I=[];Ve(this);this.S=this.ja=0;this.i=[];this.za=void 0;We(this);this.D=this;this.xa={};this.Y=this.xb=0;this.U=null;this.P=[];Xe(this,a.messages);this.ra=a.commands;this.O=0;this.Ia=this.Aa=null;this.C=this.Fa=this.Ea=this.ha=this.ya=0;this.qa=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ed(b, +a)}):void 0===global[w]&&(global[w]=function(a){return ed(b,a)})}ma(Ue,Ie);function Ye(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,T:c}}function Ze(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.T=d}function $e(a){return[a.B,a.Wa,a.la,a.T,a.Za]}function af(a,b){var c=Z(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Je(a,c.Za=b[4]));return c}l=Ue.prototype; +l.Ga=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ba=b.F;(b=$c(a,"messages"))&&Xe(this,b);if(a=$c(a,"commands"))this.ra=a;bf(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Ye(cf(d,c,d.oa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.u("..."):(c=p.type,n=Kc[c],p&&d.u(q(p.id,8)+" %"+ +q(e<a&&a>=-C&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ff(a){return m(a/Tb,6)+" "+m(a%Tb,6)} +function Xe(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Je(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in ac){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.za==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ze(a.i[a.S],b),++a.S==a.i.length&&(a.S=0)));return!1} +function xf(a,b,c,d){var e=Z(b.B),f=a.Ha(b,1),g,h,k,n=0,p=f/Xb|0,t;for(t in yf)if(g=yf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=zf;n=p&3;break;case 32256:k=Af;n=p&7;break;case 29248:k=Bf,n=(p&48)>>2|(p&6)>>1}break}k=k&&k[n]||"";"S"==k&&g>Cf&&(k="B");k=Df[g||0]+k;if(g){if(28700==h)h=f/Yb&127,n=J(a,h,-1);else for(h=f>>23&15,n=J(a,h,-1),p=0;n&&p>18&15)&&(k+="("+J(a,f, +-1)+")")}else k=Fa(k,8)+ff(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ha(e,1),g+=" "+ff(k),null==e.B)break;while(e.B!=b.B)}h+=Fa(g,16)+f;c&&(h=Fa(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+fd(a.v).toString()+" cs="+q(a.v.Ba)):h+(null!=d?"="+d.toString():""));return h} +function Ff(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),n=0;nCf&&(ea="B");if(k==Df[h]+ea){f=29248!=g?P:(P&3)<<1|(P&12)<<2;f=(B|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}}else c&& +(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ve(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.ya=0;a.ja=0} +l.Ka=function(a,b,c){var d=!0;c||gg(this,a,b,!1,!0);if(a!=this.b){var e=Ye(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ka(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(ig(this,a,a.length-1,"set"),We(this)));return d};function gg(a,b,c,d,e){var f=!1;c=Ye(c);for(var g=1;g>>d.i],b==a.I));h.la||We(a);break}}return f} +function jg(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=m(d,2);Ze(e.Ca,d);f+="="+J(e,e.Ha(e.Ca),36)+" ";c+=f}if(b){b="";for(d=0;d=lf?1:d==jf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ha(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.F.push({rd:b,B:c,Pb:d,W:e,tb:f})}function mg(a,b,c){var d=[],e=Ye(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case hf:H(h, +g);Ze(a.L,h.i);break;case lf:f=65536;break;case mf:f=32768;break;case nf:f=131072;break;case of:f=32;break;case pf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(lg(a,e));c&&(Ze(a.L,d.i),vf(a,J(a,a.L.B)))}}function tg(a,b){b=Ga(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.u(n)}h[3]&&(g=h[3],f=null);h=a.fa;n=b;h.B=n.B;h.Wa=n.Wa;h.la=n.la;h.T=n.T;a.u(xf(a,b,g,f));e-=b.B-k;c++}}} +function kg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(tf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Lb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length); +var Jd=[];"call"==Lf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Kf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.za=fa;Nf++;Ab--}}Nf||(a.u("no "+Mf+"history available"),a.za=void 0)}else{var fb=cf(a,oa,a.oa);if(fb){var Ka=0,Qf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||ph,Ka=Oe(a,Ca);else{var Rf=cf(a,Ca); +Rf&&(Ka=Rf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Qf?La+(qa+","):La+(oa+": "+qa+(0>Tf?" "+Md: +""))}La&&a.u(La);a.T=rh}}}}break;case "e":if("else"==g[0])break;var Uf,Vf,Wf=g[0],Od=g[1];"e"==Wf||"ew"==Wf?(Uf=a.Ha,Vf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=cf(a,Od,a.oa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null, +wh=256;65536>Fb.B>>>0;){Td.B=a.Ha(Fb,2);if(null==Fb.B||!wh--)break;if(!(Td.B&1)){for(var xh=a,Cc=Td,Yf=null,Gb=Cc.B,Zf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2eg)a.u("step commands:"), +a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var fg=Z(a.v.i);a.Ha(fg);a.O?(a.Ka(a.b,fg,!0),rf(a)||(a.H&&jd(a.H),a.O=0)):ug(a,eg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}uf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.T=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.T);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.oa= +Ib;break;case "start":a.v.Ca=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&bd(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), +a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":ug(a,g[0],g[1]);break;case "u":vf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){rg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){tg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in wg)Vd+="\n"+ +Fa(Wd,9)+wg[Wd];sd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(hg){a.u("Debugger "+(hg.stack||hg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!kg(a,b[+d]))return!1;return!0} +var wg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Cf=20,Df=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), +hf=0,jf=1,kf=2,lf=3,mf=4,nf=5,of=6,pf=7,gf="PC RA EA C0 C1 OV ND PD".split(" "),xg={},yf=(xg[28672]={0:101},xg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},xg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Cf,9216:53,9472:52, +9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},xg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},xg[29248]={24576:79,24640:80,25088:81,25152:82},xg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, +28692:98,28696:99,28700:100},xg),zf=["","I","M","S"],Af=" L E LE A GE N G".split(" "),Bf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Ef=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],qf=1E3,tf=">> ";Za(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Ag(a,"unrecognized HTML entity: "+c[0])}a.w=a.w.concat(e.split(/(\r?\n)/));setTimeout(function(){yg(a)},0)}})}} +function zg(a){if(0<=a.S.indexOf("p"))return a.u(a.w.join()),0;var b=Se(a.i);try{var c;for(c=0;c=--e)break}0>e&&a.error("missing bracket(s): "+f);0<=k&&(g=f.substr(k,h-k));for((f=g)&&(b=b.replace(f,Lg(a,Mg,f)));f=Ng(a,b);)b=b.replace(f,f.slice(0,-1));if(!Fg(a, +c,b))switch(c){case Og:case Pg:case Qg:Gg(a,d);break;case Rg:Sg(a,0,b.replace(",",",,"));break;case Tg:case Ug:case Vg:case Wg:Lg(a,c,b);break;case Xg:case Yg:break;default:d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Dg(a,b,!0):(c=Ff(a.i,c,d,a.sa,!0),0>c&&(c=Ff(a.i,"",b,a.sa,!0),0>c&&(c=void 0))),void 0!==c?Sg(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} +function Fg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c)return b=Zg(a,c),Cg(a,d.La,d.ub,b),!0;if("?"!=b[0])return!1;switch(b.substr(1)){case Ug:d.mb||Cg(a,d.La);break;case Wg:for(;0p)break;var n=p+1,t=p+h.length,B="",P="";p&&(B=f[p-1]).match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&(P=f[t]).match(/[0-9A-Z$%.]/i)||("'"==B&&p--,"'"==P&&t++,f=f.substr(0,p)+k+f.substr(t),n=p+k.length)}if(!Bg(a,f))break}}qg.prototype.error=function(a){throw Error("error"+(this.ea?" at line "+xa(this.ea):"")+": "+a);}; +function Ag(a,b){a.u("warning"+(a.ea?" at line "+xa(a.ea):"")+": "+b)}function $g(a,b,c){c=void 0===c?",":c;for(var d=0,e=!1,f=null,g=0;d"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.D+=b}if(null==a.j){var d=b=0,e,f,g=a.D.length;a.I==Pg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Sg(a,d),b=0)}b&&Sg(a,d)}return c} +function Lg(a,b,c){var d,e,f,g;a.C="<";a.J=">";e=f=[];if(b==Tg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+": "+c),"";b=d[1];if(d[2]){f=e=Zg(a,d[2]);c=[];for(g=0;g");0>k&&(k=f[g].length);c[g]=f[g].substr(h,k-h);f[g]=f[g].substr(0,h)}}f=c}c=bh;g=3}else if(b==Mg)a.C="[",a.J="]",b="?"+xa(a.sa,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)], +c=ch,a.G.push(b),g=0;else{g=$g(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="?"+b;c=Dg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.J&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,La:h,ea:a.ea};a.b?a.F=b:Fg(a,b);return b} +function Hg(a,b,c,d){d=void 0===d?0:d;b=b.toUpperCase().substr(0,6);if(d&Ig&&a.P[b])a.error("label "+b+" redefined");else{if("string"==typeof c){var e=Dg(a,c);if(void 0===e){a.error("parseExpression("+c+")");return}c=e}a.P[b]={name:b,value:c,ea:a.ea,od:d};a.i.K[b]=c}}function Sg(a,b,c){a.H[a.sa]=Eg(a,b);null!=c&&a.K.push({sa:a.sa,Db:c,ea:a.ea});a.sa++} +function Eg(a,b,c){c=void 0===c?a.sa:c;var d=Y(a.i,b||0,36,!0);(b<-C||b>=E)&&Ag(a,"truncated value "+m(b)+" at location "+m(c)+" to "+m(d));return d}qg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Ig=1,Jg=2,Kg=4,Og="ASCII",Pg="ASCIZ",Tg="DEFINE",Ug="IFE",Vg="IRP",Mg="LITERAL",Xg="PAGE",Wg="REPEAT",Qg="SIXBIT",Yg="SUBTTL",Rg="XWD",bh=-1,ch=-2,ah=-3; +function dh(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;eh(this,b);this.O=$c(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.S=this.P=!1;this.ca=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=fh(this);if(this.v=tb("CPU",this.id)){this.D=tb("Debugger",this.id);this.G=new zc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=rb(this.id);if((this.j=tb("Panel",this.id))&&this.j.va)for(b= +0;b\nLicense: GPL version 3 or later ");for(b=0;bgh){if(hh(d,this.L)){this.C=new G(this,"1.34.2",Bh);hh(this.C)&&(Ch(this,d),a=Dh,Eh(this.C));this.C.set(nh,Ia());Fh(this.C);var e=this.b&&!this.K;if(a==oh||qb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=mh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hh(d,g):("error"==f&&"no machine state"!= +g?(this.da("Error: "+g),"unable to verify user"==g&&(Sa(Gh,""),this.i=null)):this.u(f+": "+g),Eh(d),hh(d)?(c=mh(d),e=!0):c=!1))}e&&kh(this,c?d:null)}else a==Dh&&d.clear()}else kh(this);delete this.L;delete this.I}e=rb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Hh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(Ch(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; +function Ch(a,b){if(qb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ja("http://www.pcjs.org/api/v1/report",d,!0)}} +function vg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",lh),h=Ia();g.set(nh,h);f.set(nh,h);f.set(Ih,"1.34.2");f.set(Jh,window?window.location.href:null);f.set(Kh,window?window.navigator.userAgent:"");a.v&&a.v.ma&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.ma(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=rb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.T||8,e=e||0,e=8==f?m(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ja(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],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Sh(a,b,c)}})}else c(a,null)} +function Th(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Ba(a))}function g(a){f("Error: "+a);n&&(--Ph||ib(!0));n=!1}var h,k,n=!0;Ph++;ob[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=p:B.appendChild(document.createTextNode(p));t.appendChild(B)}d|| +(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Qh(d,null,a,null,!1,f,function(a,e){e?(nb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Ph||ib(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Ph|| +ib(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Qh(c,b,a,e,!0,f,p):Rh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(P){g(P.message)}return n}window.embedPDP10=function(a,b,c,d){ib(!1);return Th("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ib(!1);return Th("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return tb(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!wb[a]){for(var c=!0,d=wb,e=a,f=b.length,g=[],h=[],k="",n=null,p=0;p>3)?(e=a.ya(b,e,6),a.lc(e,d.call function af(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.ya(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.D?bf(this.D)?1:this.A.Tc?-1:0:0,c=a?this.A.Tc?0:1:-1;this.A.Tc=!1;this.lb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(cf(this.D,this.g[7],c)){this.da();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&&(Fe(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&He(this,f),a=!0);this.R||this.ob||(this.i&=-3)}else this.i& 1&&this.i++;if(a){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}if(this.i&112&&Ie(this)){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.pa(a);this.g[7]=a+2&65535;this.be(f)}while(0>1|b<<16;Je(this,a);return a&65535}function Ef(a,b){a=b&128|b>>1|b<<8;Je(this,a<<8);return a&255}function Ff(a,b){a=b&~a;this.Fa(a);return a}function Gf(a,b){a=b&~a;this.Fa(a<<8);return a} +function df(a,b){var c=b+a;this.I=this.L=this.C=c;this.G=(a^c)&(b^c);return c&65535}function ef(a,b){var c=b+a,d=c<<8;this.I=this.L=this.C=d;this.G=(a<<8^d)&(b<<8^d);return c&255}function ff(a,b){a=b<<1;Je(this,a);return a&65535}function Cf(a,b){a=b<<1;Je(this,a<<8);return a&255}function Df(a,b){a=b&32768|b>>1|b<<16;Je(this,a);return a&65535}function Ef(a,b){a=b&128|b>>1|b<<8;Je(this,a<<8);return a&255}function Ff(a,b){a=b&~a;this.Fa(a);return a}function Gf(a,b){a=b&~a;this.Fa(a<<8);return a} function Hf(a,b){a|=b;this.Fa(a);return a}function If(a,b){a|=b;this.Fa(a<<8);return a}function Jf(a,b){a=~b|65536;this.qb(a);return a&65535}function Kf(a,b){a=~b|256;this.qb(a<<8);return a&255}function Lf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Mf(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 Nf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Of(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255} function Pf(a,b){a=-b;this.qb(a,a&b&32768);return a&65535}function Qf(a,b){a=-b;this.qb(a<<8,(a&b&128)<<8);return a&255}function Rf(a,b){a=b<<1|this.C>>16&1;Je(this,a);return a&65535}function Sf(a,b){a=b<<1|this.C>>16&1;Je(this,a<<8);return a&255}function Tf(a,b){a=(this.C&65536|b)>>1|b<<16;Je(this,a);return a&65535}function Uf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Je(this,a<<8);return a&255}function Vf(a,b){var c=b-a;Ke(this,c,a,b);return c&65535} function Wf(a,b){var c=b-a;Ke(this,c<<8,a<<8,b<<8);return c&255}function Xf(a,b){this.I=this.L=b&65280;this.G=this.C=0;return(b<<8|b>>8)&65535}function Yf(a,b){a^=b;this.Fa(a);return a&65535}function Zf(a){P(this,a,Ve(this,a),df);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)} @@ -186,7 +186,7 @@ function Sg(a){a&1&&(this.C=65536);a&2&&(this.G=32768);a&4&&(this.L=0);a&8&&(thi function Xg(){this.ta&&(this.ta.Hd(this.g[7],!0),this.ta.setData(this.g[0],!0));this.i|=8;Fe(this,-2);this.b-=3}function Yg(a){P(this,a,this.g[(a>>6&7)+this.Ac],Yf);this.b-=this.u?9:3+(7==this.j?2:0)}function Q(a){var b;if(b=this.D)b=this.D,E(b,1)?(F(b,"undefined opcode "+K(b,a),!0,!0),b=Dg(b)):b=!1;b||this.sa(8,0,-9)}function we(a){Zg[a>>12].call(this,a)}function $g(a){ah[a>>6&3].call(this,a)}function bh(a){ch[a>>6&3].call(this,a)}function dh(a){eh[a>>6&3].call(this,a)} function fh(a){gh[a&15].call(this,a)}function hh(a){ih[a&15].call(this,a)}function jh(a){kh[a>>6&3].call(this,a)}function lh(a){mh[a>>6&3].call(this,a)}function nh(a){oh[a>>6&3].call(this,a)} var Zg=[function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Zf,Q,function(a){qh[a>>8&15].call(this,a)},Lg,zg,ig,eg,gg,Ug,Q],ph=[function(a){rh[a>>4&15].call(this,a)},ug,rg,jg,kg,pg,lg,ng,Ig,Ig,$g,bh,dh,Q,Q,Q],ah=[function(a){af(this,a,0,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Jf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Nf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Lf);this.b-=this.u?9:3+(7==this.j?2:0)}],ch=[function(a){P(this,a,0,Pf); -this.b-=this.u?11:6},function(a){P(this,a,Be(this)?1:0,df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Be(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Ye(this,a);this.qb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],eh=[function(a){P(this,a,0,Tf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Bf);this.b-=this.u?9:3+(7==this.j?2:0)}],rh= +this.b-=this.u?11:6},function(a){P(this,a,Be(this)?1:0,df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Be(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Ye(this,a);this.qb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],eh=[function(a){P(this,a,0,Tf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,ff);this.b-=this.u?9:3+(7==this.j?2:0)}],rh= [function(a){sh[a&15].call(this,a)},Q,Q,Q,Gg,Gg,Gg,Gg,Qg,Q,fh,hh,Vg,Vg,Vg,Vg],sh=[Cg,Xg,Rg,tg,Eg,Pg,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q],gh=[Og,function(){this.C=0;this.b-=5},function(){this.G=0;this.b-=5},xg,function(){this.L=1;this.b-=5},xg,xg,xg,function(){this.I=0;this.b-=5},xg,xg,xg,xg,xg,xg,xg],ih=[Og,function(){this.C=65536;this.b-=5},function(){this.G=32768;this.b-=5},Sg,function(){this.L=0;this.b-=5},Sg,Sg,Sg,function(){this.I=32768;this.b-=5},Sg,Sg,Sg,Sg,Sg,Sg,Sg],qh=[sg,qg,mg,og,vg,wg,bg,cg,Bg,Wg,jh,lh, nh,Q,Q,Q],kh=[function(a){$e(this,a,0,255,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,0,Kf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,1,Of);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)}],mh=[function(a){Ze(this,a,0,Qf);this.b-=this.u?11:6},function(a){Ze(this,a,Be(this)?1:0,ef);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,Be(this)?1:0,Wf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Xe(this, a);this.qb(a<<8);this.b-=this.u?4:3+(7==this.j?2:0)}],oh=[function(a){Ze(this,a,0,Uf);this.b-=this.u?9+(this.Yc&1):3+(7==this.j?2:0)},function(a){Ze(this,a,0,Sf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,0,Ef);this.b-=this.u?9+(this.Yc&1):3+(7==this.j?2:0)},function(a){Ze(this,a,0,Cf);this.b-=this.u?9:3+(7==this.j?2:0)}];function xe(a){th[a>>12].call(this,a)} @@ -289,14 +289,15 @@ this.Sa):td(this.f,this.Sa)};h.Lg=function(a,b){if(!b)switch(this.j){case V.EMPT h.bi=function(a){switch(this.j){case V.bd:this.b&W.eb&&(this.b&=~W.eb,this.w[this.u]=a&255,E(this)&&F(this,this.type+".writeByte("+this.u+","+v(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&qj(this));break;case V.tb:case V.hc:case V.Mc: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.tb)pj(this);else{var b=this.j==V.Mc,c=0,d=this.b&W.ud?1:0,e=this.g[d],e=e&&e.ea,f=this.I&sj.cb,g=this.G&tj.cb;this.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(e)if(this.i|=uj.Ga,E(this)&& F(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(za(b.substring(c,f))),c=f+1}}return a}function zj(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Aj(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==l?10:e; -n=!1}Aj(q,t)&&1==q.length||(m=!0);m?!1===f&&a.v("parse error ("+(k||l)+")"):g=q.pop();a.aa=r;return g}function Ej(a,b,c){var d;a.za=null;b&&("{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.aa,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} -function Cj(a,b,c,d,e){var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(f=ma(e?"-"+b:b,a.aa),e=!1)),null!=f?e&&(f=-f):d||a.v("invalid "+(c?c:"value")+": "+b)):d||a.v("missing "+(c||"value"));return f} +function yj(a,b,c,d){if(c)if(b){0>a.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(za(b.substring(c,f))),c=f+1}}return a} +function zj(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Aj(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=zj(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.aa,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} +function Cj(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(0>e&&(b="-"+b,e=0),f=ma(b,a.aa))),null!=f?0>e?f=-f:0>=8;d=v(c,0,!0)+" "+c+". "+u(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e}function Gj(a,b){if(b)return Fj(a,b,a.S[b]);var c=0;for(b in a.S)Fj(a,b,a.S[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function K(a,b,c){c=void 0===c?0:c;switch(a.aa){case 2:a=pa(b,0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function Hj(a){xj.call(this,a);this.Ia=!1;this.U=["(",")"];this.ka=[];this.G=X();this.Ha=X();this.N=X();this.B=[];this.b=this.L=this.C=[];Ij(this);this.P=this.ha=0;this.i=[];this.ta=void 0;Jj(this);this.D=this;this.ma={};this.ja=this.ke=0;this.R=null;this.M=[];Kj(this,a.messages);this.ya=a.commands;this.La=Lj;this.X=[];this.I=0;this.Qa=this.ua=null;this.w=this.Ka=this.Ja=this.Y=this.qa=0;this.g=this.W=null;var b=this;window?void 0===window[y]&&(window[y]=function(a){return le(b,a)}):void 0===global[y]&& (global[y]=function(a){return le(b,a)})}p(Hj,xj);function Mj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Na:void 0===b?!1:b,Wa:!1,aa:c}}h=Hj.prototype;h.Hd=function(a,b){a.K=b;a.Wa=!1;a.aa=void 0;return a};function Nj(a){return[a.K,a.Na,a.aa,a.Wa,a.Qc]}function Oj(a,b){var c=X(b[0],b[1],b[2]);c.Wa=b[3];b[4]&&(c.he=yj(a,c.Qc=b[4]));return c} h.Ca=function(a,b,c,d){this.F=b;this.J=a;this.f=c;this.g=a.i;(a=ge(a,"messages"))&&Kj(this,a);1140>this.f.ka&&(this.X=this.X.concat(Pj));1145>this.f.ka&&(this.X=this.X.concat(Qj));rd(this,16,function(a){a:{var b=d.F.b,c=a[0],e=a=0,l=b.length;if(c){a=Mj(Rj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.F.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("..."): @@ -340,20 +341,20 @@ function uk(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.v(mk+b):(a.O&&(a.v("ende Rj(a,g[1],!0);if(q)if(a.N=q,void 0===g[2])a.v("begin assemble at "+Uj(a,q)),a.O=!0,H(a.J);else{var t;a.v("not supported yet");t=[];if(t.length){for(var r=0;rUa.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ja-=Ca;0>Ja&&(null==Ua[Ua.length-1].K?(Ca=Ja+Ca,Ja=0):Ja+=Ua.length);var jf=[];"call"==Ai&&(Lc=1E5,jf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ja=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var kf=oa.Na||65535O.length?(2wb&&(wb=0);65536of?String.fromCharCode(of):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=lf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+nf))}yb&&a.v(yb);a.Ha=oa;a.aa=rl}}}}break;case "e":if("else"== -g[0])break;var bc,pf,qf,rf,sf=g[0],tf=g[1];"eb"==sf?(bc=1,pf=255,qf=a.Pd,rf=a.Qd):"e"==sf||"ew"==sf?(bc=2,pf=65535,qf=a.Ta,rf=a.Le):tf=null;if(null==tf)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=Rj(a,tf);if(Od)for(var Pd=2;Pdwf;){for(var Ab=null,vl=256;65536>Rc.K>>>0;){xf.K=a.Ta(Rc,2);if(null==Rc.K||!vl--)break;if(!(xf.K&1)){for(var wl=a,Qd=xf,Hi=null,Sc=Qd.K,Ii=Sc,yf=1;6>=yf&⪼yf++){if(2Ua.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ja-=Ca;0>Ja&&(null==Ua[Ua.length-1].K?(Ca=Ja+Ca,Ja=0):Ja+=Ua.length);var kf=[];"call"==Ai&&(Lc=1E5,kf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ja=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var lf=oa.Na||65535O.length?(2wb&&(wb=0);65536pf?String.fromCharCode(pf):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=mf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+of))}yb&&a.v(yb);a.Ha=oa;a.aa=rl}}}}break;case "e":if("else"== +g[0])break;var bc,qf,rf,sf,tf=g[0],uf=g[1];"eb"==tf?(bc=1,qf=255,rf=a.Pd,sf=a.Qd):"e"==tf||"ew"==tf?(bc=2,qf=65535,rf=a.Ta,sf=a.Le):uf=null;if(null==uf)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=Rj(a,uf);if(Od)for(var Pd=2;Pdxf;){for(var Ab=null,vl=256;65536>Rc.K>>>0;){yf.K=a.Ta(Rc,2);if(null==Rc.K||!vl--)break;if(!(yf.K&1)){for(var wl=a,Qd=yf,Hi=null,Sc=Qd.K,Ii=Sc,zf=1;6>=zf&⪼zf++){if(2 Date: Sun, 19 Mar 2017 00:16:00 -0700 Subject: [PATCH 03/13] Added support for IRP, IRPC and IFN MACRO-10 pseudo-ops --- .../dakaa/{TEST.MAC.txt => MYDAKAA.MAC.txt} | 0 apps/pdp10/diags/klad/dakaa/README.md | 4 +- .../dakad/{TEST.MAC.txt => MYDAKAD.MAC.txt} | 0 apps/pdp10/diags/klad/dakad/README.md | 4 +- apps/pdp10/tests/MACTEST.MAC.txt | 10 +- apps/pdp10/tests/README.md | 3 +- .../machine/ka10/test/debugger/README.md | 1 - modules/pdp10/lib/macro10.js | 212 +++++--- versions/pdpjs/1.34.2/pdp10-dbg.js | 483 +++++++++--------- 9 files changed, 406 insertions(+), 311 deletions(-) rename apps/pdp10/diags/klad/dakaa/{TEST.MAC.txt => MYDAKAA.MAC.txt} (100%) rename apps/pdp10/diags/klad/dakad/{TEST.MAC.txt => MYDAKAD.MAC.txt} (100%) diff --git a/apps/pdp10/diags/klad/dakaa/TEST.MAC.txt b/apps/pdp10/diags/klad/dakaa/MYDAKAA.MAC.txt similarity index 100% rename from apps/pdp10/diags/klad/dakaa/TEST.MAC.txt rename to apps/pdp10/diags/klad/dakaa/MYDAKAA.MAC.txt diff --git a/apps/pdp10/diags/klad/dakaa/README.md b/apps/pdp10/diags/klad/dakaa/README.md index b41c73778..9e25df82b 100644 --- a/apps/pdp10/diags/klad/dakaa/README.md +++ b/apps/pdp10/diags/klad/dakaa/README.md @@ -7,7 +7,7 @@ machines: type: pdp10 config: /devices/pdp10/machine/ka10/test/debugger/machine.xml debugger: true - commands: a 30724 /apps/pdp10/diags/klad/dakaa/TEST.MAC + commands: a 30724 /apps/pdp10/diags/klad/dakaa/MYDAKAA.MAC --- PDP-10 KA10 Basic Instruction Diagnostic #1 @@ -34,7 +34,7 @@ This command: a 30724 /apps/pdp10/diags/klad/dakaa/TEST.MAC -will automatically read the [TEST.MAC](TEST.MAC.txt) source file (a slightly modified copy of [DAKAA.MAC](DAKAA.MAC.txt)), +will automatically read the [MYDAKAA.MAC](MYDAKAA.MAC.txt) source file (a slightly modified copy of [DAKAA.MAC](DAKAA.MAC.txt)), assemble it, and then load the binary output at the specified address. --- diff --git a/apps/pdp10/diags/klad/dakad/TEST.MAC.txt b/apps/pdp10/diags/klad/dakad/MYDAKAD.MAC.txt similarity index 100% rename from apps/pdp10/diags/klad/dakad/TEST.MAC.txt rename to apps/pdp10/diags/klad/dakad/MYDAKAD.MAC.txt diff --git a/apps/pdp10/diags/klad/dakad/README.md b/apps/pdp10/diags/klad/dakad/README.md index c6e73704b..7f4149935 100644 --- a/apps/pdp10/diags/klad/dakad/README.md +++ b/apps/pdp10/diags/klad/dakad/README.md @@ -7,7 +7,7 @@ machines: type: pdp10 config: /devices/pdp10/machine/ka10/test/debugger/machine.xml debugger: true - commands: a 30724 /apps/pdp10/diags/klad/dakad/TEST.MAC + commands: a 30724 /apps/pdp10/diags/klad/dakad/MYDAKAD.MAC --- PDP-10 KA10 Basic Instruction Diagnostic #4 @@ -34,7 +34,7 @@ This command: a 30724 /apps/pdp10/diags/klad/dakad/TEST.MAC -will automatically read the [TEST.MAC](TEST.MAC.txt) source file (a slightly modified copy of [DAKAD.MAC](DAKAD.MAC.txt)), +will automatically read the [MYDAKAD.MAC](MYDAKAD.MAC.txt) source file (a slightly modified copy of [DAKAD.MAC](DAKAD.MAC.txt)), assemble it, and then load the binary output at the specified address. Use the command `db 30724` to dump the first few words of binary data: diff --git a/apps/pdp10/tests/MACTEST.MAC.txt b/apps/pdp10/tests/MACTEST.MAC.txt index 8aa0d1455..ebf637531 100644 --- a/apps/pdp10/tests/MACTEST.MAC.txt +++ b/apps/pdp10/tests/MACTEST.MAC.txt @@ -14,11 +14,11 @@ EXP ZZ ;;WORD FULL ZZ==0> ;;START AGAIN WITH 0 ZZ=ZZ+9+"C"> ;;END OF IRPC - IFN ZZ, ;;IF NOT LEFT JUSTIFIED - ZZ=ZZ+9 ;;MOVE LEFT 9 BITS - SHIFT> ;;RECURSE - > ;;END OF DEFINE + IFN ZZ, ;;RECURSE + > ;;END OF DEFINE SHIFT ;;START MOVING LEFT EXP ZZ> ;;END OF IFN ZZ > ;END OF CODE MACRO diff --git a/apps/pdp10/tests/README.md b/apps/pdp10/tests/README.md index 9705ed697..846fd382d 100644 --- a/apps/pdp10/tests/README.md +++ b/apps/pdp10/tests/README.md @@ -5,8 +5,9 @@ permalink: /apps/pdp10/tests/ machines: - id: testka10 type: pdp10 - debugger: true config: /devices/pdp10/machine/ka10/test/debugger/machine.xml + debugger: true + commands: a 100 /apps/pdp10/tests/MACTEST.MAC --- DEC PDP-10 Opcode Tests diff --git a/devices/pdp10/machine/ka10/test/debugger/README.md b/devices/pdp10/machine/ka10/test/debugger/README.md index 5e2794f05..4af850265 100644 --- a/devices/pdp10/machine/ka10/test/debugger/README.md +++ b/devices/pdp10/machine/ka10/test/debugger/README.md @@ -6,7 +6,6 @@ machines: - id: testka10 type: pdp10 debugger: true - commands: a 100 /apps/pdp10/tests/MACTEST.MAC --- PDP-10 Test Machine with Debugger diff --git a/modules/pdp10/lib/macro10.js b/modules/pdp10/lib/macro10.js index 83caa45a4..3fe8f11cb 100644 --- a/modules/pdp10/lib/macro10.js +++ b/modules/pdp10/lib/macro10.js @@ -39,11 +39,14 @@ if (NODE) { /** * Elements of tblMacros. * + * NOTE: The nLine property is not required; it's added for improved error reporting. + * * @typedef {{ * name:(string), * nOperand:(number), * aParms:(Array.), * aDefaults:(Array.), + * aValues:(Array.), * sText:(string), * nLine:(number) * }} @@ -53,11 +56,13 @@ var Mac; /** * Elements of tblSymbols. * + * NOTE: The nLine property is not required; it's added for improved error reporting. + * * @typedef {{ * name:(string), * value:(number), - * nLine:(number), - * nType:(number) + * nType:(number), + * nLine:(number) * }} */ var Sym; @@ -66,7 +71,7 @@ var Sym; * * Elements of aFixups. * - * NOTE: The nLine property is not required; it's added for DEBUG support. + * NOTE: The nLine property is not required; it's added for improved error reporting. * * @typedef {{ * nLocation:(number), @@ -181,9 +186,12 @@ class Macro10 { this.nLocation = this.nAddr; // advanced by the various genXXX() functions this.sOperator = null; // the active operator, if any - this.nMacroDef = 0; // the active MACRO definition state - this.sMacroDef = null; // the active MACRO definition name + this.nMacroDef = 0; // the active macro definition state + this.sMacroDef = null; // the active macro definition name this.chMacroOpen = this.chMacroClose = ''; + this.reLine = /\s*([A-Z$%.?][0-9A-Z$%.]*:|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; + + this.macroCall = null; // the active macro being called, if any /** * If an ASCII/ASCIZ/SIXBIT pseudo-op is active, chASCII is set to the separator @@ -344,13 +352,16 @@ class Macro10 { } /** - * parseLine(sLine) + * parseLine(sLine, aParms, aValues, aDefaults) * * @this {Macro10} * @param {string} sLine (line contents) + * @param {Array.} [aParms] + * @param {Array.} [aValues] + * @param {Array.} [aDefaults] * @return {boolean} */ - parseLine(sLine) + parseLine(sLine, aParms, aValues, aDefaults) { var i; if (this.nMacroDef) { @@ -373,18 +384,51 @@ class Macro10 { sLine = this.addASCII(sLine); } - var reLine = /\s*([A-Z$%.?][0-9A-Z$%.]*:|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; - var matchLine = sLine.match(reLine); - if (!matchLine || matchLine[4] && matchLine[4].slice(0, 1) != ';') { - this.error("failed to parse line: " + sLine); - return false; + var fParse = true; + var sLabel, sOperator = "", sOperands, sRemainder; + + while (fParse) { + var matchLine = sLine.match(this.reLine); + if (!matchLine || matchLine[4] && matchLine[4].slice(0, 1) != ';') { + this.error("failed to parse line: " + sLine); + return false; + } + fParse = false; + sOperator = matchLine[2].toUpperCase(); + if (sOperator == Macro10.PSEUDO_OP.IRP || sOperator == Macro10.PSEUDO_OP.IRPC) { + aParms = null; + } + if (aParms) { + for (var iParm = 0; iParm < aParms.length; iParm++) { + var sParm = aParms[iParm]; + var sReplace = aValues[iParm] || aDefaults[iParm] || ""; + var iSearch = 0; + var iLimit = sLine.length - matchLine[4].length; // set the limit at the start of the comment, if any + while (iSearch < iLimit) { + var iMatch = sLine.indexOf(sParm, iSearch); + if (iMatch < 0) break; + iSearch = iMatch + 1; + var iMatchEnd = iMatch + sParm.length; + var chPre = '', chPost = ''; + if ((!iMatch || !this.isSymbolChar(chPre = sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(chPost = sLine[iMatchEnd]))) { + /* + * If the "concatenation character" (') appears before (or after) the symbol being replaced, remove it. + */ + if (chPre == "'") iMatch--; + if (chPost == "'") iMatchEnd++; + sLine = sLine.substr(0, iMatch) + sReplace + sLine.substr(iMatchEnd); + iSearch = iMatch + sReplace.length; + fParse = true; + } + } + } + aParms = null; + } } - var sLabel = matchLine[1]; - var sOperator = matchLine[2].toUpperCase(); - var sOperands = matchLine[3].trim(); - var sComment = matchLine[4]; - var sRemainder = matchLine[3] + matchLine[4]; + sLabel = matchLine[1]; + sOperands = matchLine[3].trim(); + sRemainder = matchLine[3] + matchLine[4]; if (sLabel) { sLabel = sLabel.slice(0, -1); @@ -444,7 +488,9 @@ class Macro10 { case Macro10.PSEUDO_OP.DEFINE: case Macro10.PSEUDO_OP.IFE: + case Macro10.PSEUDO_OP.IFN: case Macro10.PSEUDO_OP.IRP: + case Macro10.PSEUDO_OP.IRPC: case Macro10.PSEUDO_OP.REPEAT: this.addMacro(sOperator, sOperands); break; @@ -471,12 +517,16 @@ class Macro10 { */ parseMacro(name, sOperands) { + var i; var macro = this.tblMacros[name]; if (!macro) return false; if (sOperands != null) { - var aValues = this.getValues(sOperands); - this.parseText(macro.sText, macro.aParms, aValues); + var macroPrev = this.macroCall; + this.macroCall = macro; + macro.aValues = this.getValues(sOperands, true); + this.parseText(macro.sText, macro.aParms, macro.aValues, macro.aDefaults); + this.macroCall = macroPrev; return true; } @@ -489,6 +539,19 @@ class Macro10 { } break; + case Macro10.PSEUDO_OP.IFN: + if (macro.nOperand) { + this.parseText(macro.sText); + } + break; + + case Macro10.PSEUDO_OP.IRP: + case Macro10.PSEUDO_OP.IRPC: + for (i = 0; i < macro.aValues.length; i++) { + this.parseText(macro.sText, macro.aParms, [macro.aValues[i]], []); + } + break; + case Macro10.PSEUDO_OP.REPEAT: while (macro.nOperand-- > 0) { this.parseText(macro.sText); @@ -514,42 +577,20 @@ class Macro10 { } /** - * parseText(sText, aParms, aValues) + * parseText(sText, aParms, aValues, aDefaults) * * @this {Macro10} * @param {string} sText * @param {Array.} [aParms] * @param {Array.} [aValues] + * @param {Array.} [aDefaults] */ - parseText(sText, aParms, aValues) + parseText(sText, aParms, aValues, aDefaults) { var asLines = sText.split(/\r?\n/); for (var iLine = 0; iLine < asLines.length; iLine++) { var sLine = asLines[iLine] + '\r\n'; - if (aParms) { - for (var iParm = 0; iParm < aParms.length; iParm++) { - var sParm = aParms[iParm]; - var sReplace = aValues[iParm] || ""; - var iSearch = 0; - while (true) { - var iMatch = sLine.indexOf(sParm, iSearch); - if (iMatch < 0) break; - iSearch = iMatch + 1; - var iMatchEnd = iMatch + sParm.length; - var chPre = '', chPost = ''; - if ((!iMatch || !this.isSymbolChar(chPre = sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(chPost = sLine[iMatchEnd]))) { - /* - * If the "concatenation character" (') appears before (or after) the symbol being replaced, remove it. - */ - if (chPre == "'") iMatch--; - if (chPost == "'") iMatchEnd++; - sLine = sLine.substr(0, iMatch) + sReplace + sLine.substr(iMatchEnd); - iSearch = iMatch + sReplace.length; - } - } - } - } - if (!this.parseLine(sLine)) break; + if (!this.parseLine(sLine, aParms, aValues, aDefaults)) break; } } @@ -746,11 +787,14 @@ class Macro10 { if (this.tblMacros[name] !== undefined) { this.error("reserved symbol redefined: " + sReserved); } + var aParms, aDefaults, aValues; + aParms = aDefaults = aValues = []; this.tblMacros[name] = { name: name, nOperand: Macro10.MACRO_OP.RESERVED, - aParms: [], - aDefaults: [], + aParms, + aDefaults, + aValues, sText: sLabel + ": 0", nLine: this.nLine }; @@ -759,20 +803,29 @@ class Macro10 { return sReserved; } + getSymbol(sOperands) + { + var match; + if (match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)/i)) { + return match[1]; + } + } + /** - * getValues(sOperands, sDelim) + * getValues(sOperands, fParens) * * @this {Macro10} * @param {string} sOperands - * @param {string} [sDelim] + * @param {boolean} [fParens] (true to strip any parens from around the entire operands) * @return {Array.} */ - getValues(sOperands, sDelim) + getValues(sOperands, fParens) { var aValues = []; + if (fParens) sOperands = sOperands.replace(/^\(?(.*?)\)?$/, "$1"); while (sOperands) { sOperands = sOperands.trim(); - var sOperand = this.getExpression(sOperands, sDelim); + var sOperand = this.getExpression(sOperands); if (!sOperand) break; aValues.push(sOperand); sOperands = sOperands.substr(sOperand.length + 1); @@ -836,27 +889,27 @@ class Macro10 { */ addMacro(sOperator, sOperands) { - var match, name, nOperand, aParms, aDefaults, iMatch; + var i, match, name, nOperand, aParms, aDefaults, aValues, iMatch; this.chMacroOpen = '<'; this.chMacroClose = '>'; - aParms = aDefaults = []; + aParms = aDefaults = aValues = []; if (sOperator == Macro10.PSEUDO_OP.DEFINE) { /* * This is a DEFINE (macro) block. */ - match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i); + match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i); if (!match) { this.error("unrecognized " + sOperator + ": " + sOperands); - return ""; + return sOperands; } name = match[1]; /* * If this macro has defined parameters, parse them (and any defaults) now. */ if (match[2]) { - aParms = this.getValues(match[2]); + aParms = this.getValues(match[2], true); aDefaults = this.getDefaults(aParms); } nOperand = Macro10.MACRO_OP.DEFINE; @@ -877,6 +930,38 @@ class Macro10 { this.aLiterals.push(name); iMatch = 0; } + else if (sOperator == Macro10.PSEUDO_OP.IRP || sOperator == Macro10.PSEUDO_OP.IRPC) { + /* + * IRP (and IRPC) blocks are very similar to DEFINE blocks, but they define exactly ONE macro parameter + * with NO parentheses (whereas regular macros always define their parameters, if any, WITH parentheses), + * and then the IRP (or IRPC) block is immediately invoked with the corresponding value from the + * enclosing macro. + */ + if (!this.macroCall) { + this.error(sOperator + " outside of macro"); + } + match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)(.*)/i); + if (!match) { + this.error("unrecognized " + sOperator + ": " + sOperands); + return sOperands; + } + for (i = 0; i < this.macroCall.aParms.length; i++) { + if (match[1] == this.macroCall.aParms[i]) break; + } + if (i == this.macroCall.aParms.length) { + this.error("invalid " + sOperator + " parameter: " + match[1]); + return sOperands; + } + name = '?' + sOperator; + aParms = [match[1]]; + if (sOperator == Macro10.PSEUDO_OP.IRPC) { + aValues = this.macroCall.aValues[i].split(""); + } else { + aValues = this.getValues(this.macroCall.aValues[i]); + } + nOperand = aValues.length; + iMatch = 2; + } else { /* * This must be a REPEAT or CONDITIONAL block. @@ -884,7 +969,7 @@ class Macro10 { var sOperand = this.getExpression(sOperands); if (!sOperand) { this.error("missing " + sOperator + " expression: " + sOperands); - return ""; + return sOperands; } sOperands = sOperands.substr(sOperand.length + 1); sOperand = sOperand.trim(); @@ -916,7 +1001,7 @@ class Macro10 { } } - this.tblMacros[name] = {name, nOperand, aParms, aDefaults, sText, nLine: this.nLine}; + this.tblMacros[name] = {name, nOperand, aParms, aDefaults, aValues, sText, nLine: this.nLine}; if (!this.nMacroDef) { this.parseMacro(name); @@ -981,7 +1066,14 @@ class Macro10 { } value = v; } - this.tblSymbols[name] = {name, value, nLine: this.nLine, nType}; + var sym = this.tblSymbols[name]; + if (sym) { + sym.value = value; + sym.nType = nType; + sym.nLine = this.nLine; + } else { + this.tblSymbols[name] = {name, value, nType, nLine: this.nLine}; + } this.dbg.setVariable(name, value); } @@ -1132,7 +1224,9 @@ Macro10.PSEUDO_OP = { ASCIZ: "ASCIZ", DEFINE: "DEFINE", IFE: "IFE", + IFN: "IFN", IRP: "IRP", + IRPC: "IRPC", LITERAL: "LITERAL", PAGE: "PAGE", REPEAT: "REPEAT", diff --git a/versions/pdpjs/1.34.2/pdp10-dbg.js b/versions/pdpjs/1.34.2/pdp10-dbg.js index e8e16ae5c..92d286656 100644 --- a/versions/pdpjs/1.34.2/pdp10-dbg.js +++ b/versions/pdpjs/1.34.2/pdp10-dbg.js @@ -27,256 +27,257 @@ http://pcjs.org/modules/pdp10/lib/debugger.js (C) Jeff Parsons 2012-2017 http://pcjs.org/modules/pdp10/lib/macro10.js (C) Jeff Parsons 2012-2017 */ -var l,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ga)}var ha=0;function ga(a){return"jscomp_symbol_"+(a||"")+ha++} -function ia(){da();var a=ca.Symbol.iterator;a||(a=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ja(this)}});ia=function(){}}function ja(a){var b=0;return la(function(){return ba?-b:b}});na("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var ta={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, -bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,hd:103,jd:104,kd:105,ld:106,k:107,md:108,nd:109,n:110,pd:111,p:112,q:113,r:114,qd:115,t:116,sd:117,td:118,ud:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; -function ua(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a?-b:b}});la("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var ma={oc:0,Gb:1,qc:2,rc:3,sc:4,tc:5,uc:6,vc:7,sb:8,wc:9,Hb:10,xc:11,yc:12,Ib:13,zc:14,Ac:15,Bc:16,Cc:17,Dc:18,Ec:19,Fc:20,Gc:21,Hc:22,Ic:23,Jc:24,Kc:25,Lc: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,rb:65,nc:66,pc:67,Mc:68,E:69,Nc:70,Oc:71,Pc:72,Qc:73,Rc:74,Sc:75,Tc:76,Uc:77,Vc:78,Wc:79,Xc:80,Q:81,Yc:82,Zc:83,$c:84,ad:85,bd:86,cd:87, +dd:88,ed:89,Kb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,fd:97,gd:98,hd:99,d:100,e:101,jd:102,kd:103,ld:104,md:105,nd:106,k:107,od:108,pd:109,n:110,qd:111,p:112,q:113,r:114,rd:115,t:116,td:117,ud:118,vd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Jb:127}; +function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0f&&(f+=Math.pow(2,36)),f=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function wa(a,b){var c,d="";b?32>=1,f--;return d} -function m(a,b,c){b?12"']/g,function(a){return Ea[a]})}function Fa(a,b){return(a+" ").slice(0,b)}function Ga(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ea={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ha(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 Ja(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, +function ta(a,b,c,d){var e="";isNaN(a)?a=null:null!=a&&(0>a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ua(a,b){var c,d="";b?32>=1,f--;return d} +function m(a,b,c){b?12"']/g,function(a){return Aa[a]})}function Ba(a,b){return(a+" ").slice(0,b)}function Ea(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Ha(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var k="",n;for(n in b)b.hasOwnProperty(n)&&(k&&(k+="&"),k+=n+"="+encodeURIComponent(b[n]));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 Na(a,b){var c,d={Z:null,W:null,ua:null,ta:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ua=g.load;d.ta=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ja=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.va=null;mb.push(this)}function nb(a,b,c){ob[a]&&b&&(ob[a][b]=c)}function pb(){return Date.now()||+new Date} -function r(a){window&&window.alert(a)}function qb(a){var b=!1;window&&(b=window.confirm(a));return b}function rb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ua=g.load;d.ta=g.exec;if(e=g.bytes)d.aa=e;else if(e=g.words)for(d.aa=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.aa=Array(4*e.length),f=c=0;c>8&255,d.aa[f++]=e[c]>>16&255,d.aa[f++]=e[c]>>24&255;else(e=g.data)?d.Ka=e:d.aa=g;d.aa&&(d.aa.length?1==d.aa.length&&(r(d.aa[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Va=this.id:(this.Wa=this.id.substr(0,a),this.Va=this.id.substr(a+1));this.A={ready:!1,Pa:!1,kb:!1,X:!1,error:!1};this.Za=null;this.A.error=!1;this.Z=c||0;this.D=this.v=this.G=this.H=this.va=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} +function r(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, -set:this.fc};Mb(this)}ma(bc,u);l=bc.prototype;l.reset=function(a){this.stop();a&&dc(this,this.w=0)}; +function bc(a,b){u.call(this,"Panel",a,512);this.K=this.L=0;this.T=b;this.i=this.I=this.j=this.w=0;this.M=this.O=-1;this.P=this.R=this.F=!1;this.S=cc;this.C={};this.b={START:[1,1,!0,!1,this.Zb],STEP:[1,1,!1,!1,this.$b],ENABLE:[1,1,!1,!1,this.Ub],CONT:[1,1,!0,!1,this.Sb],DEP:[0,0,!0,!1,this.Tb],EXAM:[1,1,!0,!1,this.Vb],LOAD:[1,1,!0,!1,this.Xb],TEST:[0,0,!0,!1,this.Wb]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Yb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Pb,toggle:this.ic,reset:this.ec, +set:this.hc};Mb(this)}ja(bc,u);l=bc.prototype;l.reset=function(a){this.stop();a&&dc(this,this.w=0)}; l.na=function(a,b,c,d){if(this.H&&this.H.na(a,b,c,d)||this.v&&this.v.na(a,b,c,d)||this.D&&this.D.na(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ec(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fc(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){ec(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fc(a,b)}}(this,b),!0):u.prototype.na.call(this,a,b,c,d)}};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};l.wa=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.ma=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; -l.restore=function(a){if(a=a[0])jc(this,this.i=a[0]),dc(this,this.w=a[1]),kc(this,a[2]);return!0};l.cc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}hc(this);return!0};function lc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gc(a,b){for(var c in a.C)lc(a,c,null!=b?b:a.C[c])}function mc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hc(a){for(var b in a.b)mc(a,b,a.b[b][1])} -l.Ob=function(a,b,c){if(ec(this,b)){if(c){var d=this;setTimeout(function(){fc(d,b);a&&a()},+c);return!1}fc(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return kc(this,ua(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,mc(this,a,c[1]),!0):!1};l.gc=function(a){return ec(this,a)?(fc(this,a),!0):!1};function ec(a,b){var c=a.b[b];return c?(mc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.P=b==oc,a.R=b==pc),!0):!1} -function fc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(mc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; -l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[qc]&&this.b[qc][1])rc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),sc(a,0,null),Ob(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){n=h.size-(e-k);n>f&&(n=f);h.Pa=e-h.B+n;e=k+16384;f-=n;g++;continue}}return Ic(Jc,e,f)}e=new Ec(a,e,n,16384,d);Fc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=n}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+m(b)),!0):Ic(Lc,b,c)} -function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Gc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.oa,c=!0);0<=a.ja&&a.ja<=fd(a)&&(a.oa=a.ja=-1,bd(a),a.V(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+q(a.Ba))}} -l.na=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=rb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=pb();a.P=0;hd(a);return d}function kd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cc;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Ra+=h.B-e,h.B=e,!0;if(e>=h.B+h.Ra){n=h.size-(e-k);n>f&&(n=f);h.Ra=e-h.B+n;e=k+16384;f-=n;g++;continue}}return Ic(Jc,e,f)}e=new Ac(a,e,n,16384,d);Bc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=n}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+m(b)),!0):Ic(Lc,b,c)} +function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Cc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.oa,c=!0);0<=a.ja&&a.ja<=fd(a)&&(a.oa=a.ja=-1,bd(a),a.V(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+q(a.Ca))}} +l.na=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.Y/a.da?b=1:d=!0;a.fa=b;b=a.fb*a.fa;if(a.da!=b){a.da=b;b=a.da.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=ob();a.P=0;hd(a);return d}function kd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function md(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} -l.dc=function(){if(this.A.N){this.Va>=this.eb&&hd(this,!0);this.ka=0;this.Aa=pb();if(this.P){var a=this.Aa-this.P;a>this.cb&&(this.L+=a,this.L>this.Aa&&(this.L=this.Aa))}try{do{var b=kd(this,this.A.Ma?1:this.Da);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.ka+=b;this.M+=b;vc(this,b);tc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Da;++this.fb>=nd&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(pb(),fd(this));Jb(this, -e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=pb();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Da));var c=c-(this.P-this.Aa),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,gd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; -function rc(a,b){if(!Kb(a))if(a.A.N)a.u(a.toString()+" busy");else{gd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){md(this);uc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(pb(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; -function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=pd.bind(this);this.w=K.bind(this);this.ya=null;this.ob=[];this.A.complete=!1}ma(od,Yc);l=od.prototype; -l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Ea=this.Fa=this.b=this.K=0;this.i=this.za=this.Sa;this.I=this.ra=-1;this.F=this.j=0;this.gb=[0,0];this.pa=[0,0];this.ha=[0,0];this.qa=[0,0];this.xa=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.ya=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};l.Bb=function(){return 0}; -l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Ea,this.Fa,this.i,this.ra,this.I,this.j,this.C,this.za,this.xa,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ia();da();ia();var c=b[Symbol.iterator];b=c?c.call(b):ja(b);this.b=b.next().value;this.K=b.next().value;this.Ea=b.next().value;this.Fa=b.next().value;this.i=b.next().value;this.ra=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.za=b.next().value;this.xa=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];gd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.xa=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; -l.Ra=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.S=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.ya||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Ea=this.f(this.b):0<=this.ra?(this.K=this.Fa=this.f(this.ra),this.ra=-1):(this.K= -this.Fa=this.f(this.za=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Ea=this.f(a))&Sb;a=this.K&4194304?-1:this.Fa/Zb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} -function vd(){var a=0,b=this.f(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} -function xd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function yd(a,b){this.g(b,this.f(this.b))}function zd(a,b){this.g(b,this.b)}function Ad(a,b){this.g(this.b,this.f(b))}function Bd(a,b){this.g(b,0)}function Cd(a,b){this.g(b,D-this.f(b))}function Dd(a,b){this.g(b,D)} -function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Xd(a,d,c)+(c-(c&y)))}function Yd(a,b){var c=this.f(b);this.g(b,Xd(a,c,0))}function Zd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+(b-(b&y)))}function $d(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ae(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)} -function be(a,b){var c=this.b*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)}function ce(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+b)}function de(a,b){var c=this.f(this.b),d=(c&y)*z,c=Xd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function ee(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ge(a,b){var c=this.f(b);this.g(b,fe(a,c,this.b)+this.b)}function he(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)} -function ie(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Ub?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function je(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ke(a,b){var c=this.f(b);this.g(b,fe(a,c,0))}function le(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}function me(a,b){var c=this.f(this.b),d=c/z|0,c=fe(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){ne[a&7].call(this,a,a>>3&127)} -function oe(){}function pe(){}function K(a){this.u("undefined opcode: "+m(a));rd(this,-1);this.V()}function qe(a){a>A&&(a!=C?a=Wb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;re.call(this,a,b,c);return c} -function se(a,b,c){var d=!1,e=!1,f=b-b%C;a=a%C+b*C%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=D-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.pa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.qa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),ue(this.gb,this.pa),ve(this.qa)))break;we(this.ha);we(this.pa)}while(!ve(this.pa)); -a=this.gb[0];this.F=this.qa[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} -function xe(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=D||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%C;b=2*b%E+Math.trunc(c/C);c=a+c%C;d=b-b%C;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} -function ye(a){a?a==C?this.j|=163840:a=Wb-a:this.j|=98304;return a}function Q(a,b){var c=a-b;0>c&&(c+=E);re.call(this,c,b,a);return c}function re(a,b,c){a=Math.trunc(a/Vb);b=Math.trunc(b/Vb);c=Math.trunc(c/Vb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function S(a,b){return R(a,(~(b/F|0)&15)*F+(~b>>>0))}function T(a,b){return(a>>0)}function U(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function V(a){return a>>0)}function X(a){return(a/z|0)+(a&y)*z}function fe(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Ub?y*z:0}return b}function Xd(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} -function ue(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function te(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function we(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ve(a){return!a[0]&&!a[1]} -var ud=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, +l.fc=function(){if(this.A.N){this.Xa>=this.hb&&hd(this,!0);this.ka=0;this.Aa=ob();if(this.P){var a=this.Aa-this.P;a>this.gb&&(this.L+=a,this.L>this.Aa&&(this.L=this.Aa))}try{do{var b=kd(this,this.A.Oa?1:this.Ea);try{this.Ta(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.ka+=b;this.M+=b;vc(this,b);tc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Ea;++this.ib>=nd&&(this.H&&K(this.H,void 0),this.ib=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(ob(),fd(this));zb(this, +e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.Ab;this.P=ob();var c=this.gb;this.ka&&(c=Math.round(c*this.ka/this.Ea));var c=c-(this.P-this.Aa),d=this.P-this.L;d&&(this.Y=Math.round(this.M/(10*d))/100,864E5<=d&&(this.T=0,gd(this)));if(0>c||this.Yc&&(this.L-=c),c=0;this.Xa+=this.ka;this.P+=c;a(b,c)}}}; +function rc(a,b){if(!Ab(a))if(a.A.N)a.u(a.toString()+" busy");else{gd(a);a.A.N=!0;a.A.cb=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.Ab,0)}}l.Ta=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){md(this);uc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; +function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.yb=b;this.Ua=+a.addrReset||0;this.Lb=pd.bind(this);this.w=M.bind(this);this.ya=null;this.qb=[];this.A.complete=!1}ja(od,Yc);l=od.prototype; +l.reset=function(){this.status("Model "+this.yb);this.A.N&&this.V();this.Fa=this.Ga=this.b=this.K=0;this.i=this.za=this.Ua;this.I=this.ra=-1;this.F=this.j=0;this.jb=[0,0];this.pa=[0,0];this.ha=[0,0];this.qa=[0,0];this.xa=this.i;this.C=0;this.f=this.bc;this.g=this.mc;this.ya=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};l.Db=function(){return 0}; +l.save=function(){var a=new I(this);a.set(0,[this.b,this.K,this.Fa,this.Ga,this.i,this.ra,this.I,this.j,this.C,this.za,this.xa,this.Ua]);a.set(1,[]);a.set(2,[this.T,this.fa,this.A.ba]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ga();ca();ga();var c=b[Symbol.iterator];b=c?c.call(b):ha(b);this.b=b.next().value;this.K=b.next().value;this.Fa=b.next().value;this.Ga=b.next().value;this.i=b.next().value;this.ra=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.za=b.next().value;this.xa=b.next().value;this.Ua=b.next().value;b=a[2];this.T=b[0];gd(this,b[1]);this.A.ba=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.mc=function(a,b){var c=this.G;a=this.xa=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; +l.Ta=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.cb?-1:0:0,c=a?this.A.cb?0:1:-1;this.A.cb=!1;this.R=this.S=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.ya||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Fa=this.f(this.b):0<=this.ra?(this.K=this.Ga=this.f(this.ra),this.ra=-1):(this.K= +this.Ga=this.f(this.za=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Fa=this.f(a))&Sb;a=this.K&4194304?-1:this.Ga/Zb|0;0<=a&&this.Lb(a)}while(0>4].call(this,a,a&15)}function O(a){this.w(a)} +function vd(){var a=0,b=this.f(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%F);this.g(this.b,b)}function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} +function xd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%F;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function yd(a,b){this.g(b,this.f(this.b))}function zd(a,b){this.g(b,this.b)}function Ad(a,b){this.g(this.b,this.f(b))}function Bd(a,b){this.g(b,0)}function Cd(a,b){this.g(b,E-this.f(b))}function Dd(a,b){this.g(b,E)} +function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Fd(a,d,c)+(c-(c&y)))}function Gd(a,b){var c=this.f(b);this.g(b,Fd(a,c,0))}function Hd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Fd(a,c,b)+(b-(b&y)))}function Id(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function $d(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Fd(a,d,c)+c)} +function ae(a,b){var c=this.b*z,d=this.f(b);this.g(b,Fd(a,d,c)+c)}function be(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Fd(a,c,b)+b)}function ce(a,b){var c=this.f(this.b),d=(c&y)*z,c=Fd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function de(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,ee(a,d,c)+c)}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,this.b)+this.b)}function ge(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)} +function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Ub?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,ee(a,d,c)+c)}function je(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ke(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=c/z|0,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function P(a){me[a&7].call(this,a,a>>3&127)} +function ne(){}function oe(){}function M(a){this.u("undefined opcode: "+m(a));rd(this,-1);this.V()}function pe(a){a>A&&(a!=D?a=Wb-a:this.j|=163840);return a}function Q(a,b){var c=(a+b)%F;qe.call(this,a,b,c);return c} +function re(a,b,c){var d=!1,e=!1,f=b-b%D;a=a%D+b*D%F;b=this.F=f+Math.trunc(b/2);c>A&&(c=F-c,d=!d);b>A&&(a?(b=E-b,a=F-a):b&&(b=F-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.jb;f[0]=0;f[1]=0;f=this.pa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.qa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=F,b[1]--),te(this.jb,this.pa),ue(this.qa)))break;ve(this.ha);ve(this.pa)}while(!ue(this.pa)); +a=this.jb[0];this.F=this.qa[0];d&&a&&(a=F-a);e&&this.F&&(this.F=F-this.F);return a} +function we(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=F-d,b=!b);e>A&&(e=F-e,b=!b);if(dA)&&(f!=E||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%D;b=2*b%F+Math.trunc(c/D);c=a+c%D;d=b-b%D;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} +function xe(a){a?a==D?this.j|=163840:a=Wb-a:this.j|=98304;return a}function S(a,b){var c=a-b;0>c&&(c+=F);qe.call(this,c,b,a);return c}function qe(a,b,c){a=Math.trunc(a/Vb);b=Math.trunc(b/Vb);c=Math.trunc(c/Vb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function T(a,b){return((a/G|0)&(b/G|0))*G+((a&b)>>>0)}function U(a,b){return T(a,(~(b/G|0)&15)*G+(~b>>>0))}function ye(a,b){return(a>>0)}function V(a,b){return(a/G|0|b/G|0)*G+((a|b)>>>0)}function W(a){return a>>0)}function Y(a){return(a/z|0)+(a&y)*z}function ee(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Ub?y*z:0}return b}function Fd(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} +function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=F&&(a[0]%=F,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=F);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} +var ud=[O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, -function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},yd,zd,Ad,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ye.call(this,this.f(this.b)))},function(a,b){this.g(b,ye.call(this,this.b))},function(a,b){this.g(this.b, -ye.call(this,this.f(b)))},function(a,b){a=ye.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,qe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,qe.call(this,this.f(b)))},function(a,b){a=qe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,xe.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b), -!0))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,xe.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ -1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, -function(a,b){a=this.f(b);b=this.f(b+1&15);b=se.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?C:0,c=A):(d=d*Math.pow(2,c)%C,c=C-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; -this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& -dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=C,e+=C)}else d=d*Math.pow(2,a)%C+Math.trunc(e%C/Math.pow(2,35-a)),e=e*Math.pow(2,a)%C,c=C-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=C,e+=C)}else-36>=a?(e=-72>=a?d>A?D:0:Math.trunc(d%C/Math.pow(2,-a-35)),d<=A?d=0:(d=D,e+=C)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%C/Math.pow(2,-a))+ -d%C*Math.pow(2,35+a)%C,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=C));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ -1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%E,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},K,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.N||(this.g(b,d* -z+c),a||rd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a=C&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Ea,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.ra=this.b},K,function(a){this.w(a)},function(a,b){a= -this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=E&&(a-=E);a/z|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=E);(a/z|0)==y&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&y)*z+this.i);H(this,this.b+1)},function(a,b){this.g(b,(this.j&y)*z+this.i);H(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,O.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,O.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,O.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,O.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))},oe,function(a,b){0>T(this.f(b),this.b)&&H(this, -this.i+1)},function(a,b){T(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&H(this,this.i+1)}, -function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))||H(this,this.b)},function(a,b){0>=V(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))&&H(this,this.b)},function(a,b){0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); -0V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), -1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, -O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0V(a)&&H(this,this.b)},function(a, -b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)}, -function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>>f.i;0>>= -f.i;0>>a.i;0g&&g>=-C&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=ta.pb&&c<=ta.Ib&&(b=c-(ta.pb-ta.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ta.Gb&&(b=ta.Fb);d.Ya(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.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; -l.Cb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ga(c[0]);if(d!=this.Ta)return;c=Ga(c[1]);if(this.b=sb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.wa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.ma=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Ga(b.substring(c,f))),c=f+1}}return a}function Ke(a,b,c){if(32>=a.ia)return b|c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Le|0)^(c/Le|0))*Le+((b^c)>>>0)} -function Y(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} -function Me(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; -case "&":e=a;32>=e.ia?f&=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^!":f=Ke(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Y(a,f,0,!0),f=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Ne(a,b,0,b.length,a.T,c),void 0!==d&&!1===c&&Re(a,null,d));return d} -function Oe(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(0>e&&(b="-"+b,e=0),f=ua(b,a.T))),null!=f?0>e?f=-f:0>=8;d=q(c,0,!0)+" "+c+". "+m(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Se(a){var b=a.K;a.K={};return b}function Te(a,b){if(b)return Re(a,b,a.K[b]);var c=0;for(b in a.K)Re(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Pe={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11},Le=Math.pow(2,32); -function Ue(a){Ie.call(this,a);this.Da=!1;this.Ba=18;this.ia=36;this.ba=["<",">"];this.pa=[];this.Ca=Z();this.L=Z(0);this.oa=Z(0);this.fa=Z(0);this.F=[];this.b=this.M=this.I=[];Ve(this);this.S=this.ja=0;this.i=[];this.za=void 0;We(this);this.D=this;this.xa={};this.Y=this.xb=0;this.U=null;this.P=[];Xe(this,a.messages);this.ra=a.commands;this.O=0;this.Ia=this.Aa=null;this.C=this.Fa=this.Ea=this.ha=this.ya=0;this.qa=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ed(b, -a)}):void 0===global[w]&&(global[w]=function(a){return ed(b,a)})}ma(Ue,Ie);function Ye(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,T:c}}function Ze(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.T=d}function $e(a){return[a.B,a.Wa,a.la,a.T,a.Za]}function af(a,b){var c=Z(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Je(a,c.Za=b[4]));return c}l=Ue.prototype; -l.Ga=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ba=b.F;(b=$c(a,"messages"))&&Xe(this,b);if(a=$c(a,"commands"))this.ra=a;bf(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Ye(cf(d,c,d.oa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.u("..."):(c=p.type,n=Kc[c],p&&d.u(q(p.id,8)+" %"+ -q(e<a&&a>=-C&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ff(a){return m(a/Tb,6)+" "+m(a%Tb,6)} -function Xe(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Je(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in ac){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.za==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ze(a.i[a.S],b),++a.S==a.i.length&&(a.S=0)));return!1} -function xf(a,b,c,d){var e=Z(b.B),f=a.Ha(b,1),g,h,k,n=0,p=f/Xb|0,t;for(t in yf)if(g=yf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=zf;n=p&3;break;case 32256:k=Af;n=p&7;break;case 29248:k=Bf,n=(p&48)>>2|(p&6)>>1}break}k=k&&k[n]||"";"S"==k&&g>Cf&&(k="B");k=Df[g||0]+k;if(g){if(28700==h)h=f/Yb&127,n=J(a,h,-1);else for(h=f>>23&15,n=J(a,h,-1),p=0;n&&p>18&15)&&(k+="("+J(a,f, --1)+")")}else k=Fa(k,8)+ff(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ha(e,1),g+=" "+ff(k),null==e.B)break;while(e.B!=b.B)}h+=Fa(g,16)+f;c&&(h=Fa(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+fd(a.v).toString()+" cs="+q(a.v.Ba)):h+(null!=d?"="+d.toString():""));return h} -function Ff(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),n=0;nCf&&(ea="B");if(k==Df[h]+ea){f=29248!=g?P:(P&3)<<1|(P&12)<<2;f=(B|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}}else c&& -(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ve(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.ya=0;a.ja=0} -l.Ka=function(a,b,c){var d=!0;c||gg(this,a,b,!1,!0);if(a!=this.b){var e=Ye(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ka(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(ig(this,a,a.length-1,"set"),We(this)));return d};function gg(a,b,c,d,e){var f=!1;c=Ye(c);for(var g=1;g>>d.i],b==a.I));h.la||We(a);break}}return f} -function jg(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=m(d,2);Ze(e.Ca,d);f+="="+J(e,e.Ha(e.Ca),36)+" ";c+=f}if(b){b="";for(d=0;d=lf?1:d==jf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ha(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.F.push({rd:b,B:c,Pb:d,W:e,tb:f})}function mg(a,b,c){var d=[],e=Ye(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case hf:H(h, -g);Ze(a.L,h.i);break;case lf:f=65536;break;case mf:f=32768;break;case nf:f=131072;break;case of:f=32;break;case pf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(lg(a,e));c&&(Ze(a.L,d.i),vf(a,J(a,a.L.B)))}}function tg(a,b){b=Ga(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.u(n)}h[3]&&(g=h[3],f=null);h=a.fa;n=b;h.B=n.B;h.Wa=n.Wa;h.la=n.la;h.T=n.T;a.u(xf(a,b,g,f));e-=b.B-k;c++}}} -function kg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(tf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Lb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length); -var Jd=[];"call"==Lf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Kf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.za=fa;Nf++;Ab--}}Nf||(a.u("no "+Mf+"history available"),a.za=void 0)}else{var fb=cf(a,oa,a.oa);if(fb){var Ka=0,Qf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||ph,Ka=Oe(a,Ca);else{var Rf=cf(a,Ca); -Rf&&(Ka=Rf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Qf?La+(qa+","):La+(oa+": "+qa+(0>Tf?" "+Md: -""))}La&&a.u(La);a.T=rh}}}}break;case "e":if("else"==g[0])break;var Uf,Vf,Wf=g[0],Od=g[1];"e"==Wf||"ew"==Wf?(Uf=a.Ha,Vf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=cf(a,Od,a.oa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null, -wh=256;65536>Fb.B>>>0;){Td.B=a.Ha(Fb,2);if(null==Fb.B||!wh--)break;if(!(Td.B&1)){for(var xh=a,Cc=Td,Yf=null,Gb=Cc.B,Zf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2eg)a.u("step commands:"), -a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var fg=Z(a.v.i);a.Ha(fg);a.O?(a.Ka(a.b,fg,!0),rf(a)||(a.H&&jd(a.H),a.O=0)):ug(a,eg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}uf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.T=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.T);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.oa= -Ib;break;case "start":a.v.Ca=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&bd(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), -a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":ug(a,g[0],g[1]);break;case "u":vf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){rg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){tg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in wg)Vd+="\n"+ -Fa(Wd,9)+wg[Wd];sd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(hg){a.u("Debugger "+(hg.stack||hg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!kg(a,b[+d]))return!1;return!0} -var wg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Cf=20,Df=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), -hf=0,jf=1,kf=2,lf=3,mf=4,nf=5,of=6,pf=7,gf="PC RA EA C0 C1 OV ND PD".split(" "),xg={},yf=(xg[28672]={0:101},xg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},xg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Cf,9216:53,9472:52, +function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},yd,zd,Ad,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(this.b)))},function(a,b){this.g(b,xe.call(this,this.b))},function(a,b){this.g(this.b, +xe.call(this,this.f(b)))},function(a,b){a=xe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,pe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,pe.call(this,this.f(b)))},function(a,b){a=pe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,we.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b), +!0))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,we.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ +1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, +function(a,b){a=this.f(b);b=this.f(b+1&15);b=re.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(F-a):a;0d?D:0,c=A):(d=d*Math.pow(2,c)%D,c=D-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+F:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%F+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& +dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=D,e+=D)}else d=d*Math.pow(2,a)%D+Math.trunc(e%D/Math.pow(2,35-a)),e=e*Math.pow(2,a)%D,c=D-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=D,e+=D)}else-36>=a?(e=-72>=a?d>A?E:0:Math.trunc(d%D/Math.pow(2,-a-35)),d<=A?d=0:(d=E,e+=D)):(c=d>A?F-Math.pow(2,36+a):0,e=Math.trunc(e%D/Math.pow(2,-a))+ +d%D*Math.pow(2,35+a)%D,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=D));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%F+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%F+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%F+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%F+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ +1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%F,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},M,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.N||(this.g(b,d* +z+c),a||rd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%E;this.g(b,a);a=D&&J(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Fa,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);J(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,J(this,this.b))},function(){this.ra=this.b},M,function(a){this.w(a)},function(a,b){a= +this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=F&&(a-=F);a/z|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=F);(a/z|0)==y&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&y)*z+this.i);J(this,this.b+1)},function(a,b){this.g(b,(this.j&y)*z+this.i);J(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a, +b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,S.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,S.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,S.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,S.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>ye(this.f(b),this.b)&&J(this, +this.i+1)},function(a,b){ye(this.f(b),this.b)||J(this,this.i+1)},function(a,b){0>=ye(this.f(b),this.b)&&J(this,this.i+1)},function(){J(this,this.i+1)},function(a,b){0<=ye(this.f(b),this.b)&&J(this,this.i+1)},function(a,b){ye(this.f(b),this.b)&&J(this,this.i+1)},function(a,b){0ye(this.f(b),this.f(this.b))&&J(this,this.i+1)},function(a,b){ye(this.f(b),this.f(this.b))||J(this,this.i+1)},function(a,b){0>=ye(this.f(b),this.f(this.b))&&J(this, +this.i+1)},function(){J(this,this.i+1)},function(a,b){0<=ye(this.f(b),this.f(this.b))&&J(this,this.i+1)},function(a,b){ye(this.f(b),this.f(this.b))&&J(this,this.i+1)},function(a,b){0W(this.f(b))&&J(this,this.b)},function(a,b){W(this.f(b))||J(this,this.b)},function(a,b){0>=W(this.f(b))&&J(this,this.b)},function(){J(this,this.b)},function(a,b){0<=W(this.f(b))&&J(this,this.b)},function(a,b){W(this.f(b))&&J(this,this.b)},function(a,b){0< +W(this.f(b))&&J(this,this.b)},function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0>W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);W(a)||J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){J(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a, +b){a=this.f(this.b);0W(a)&&J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));W(a)||J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=W(a)&&J(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=W(a)&&J(this,this.b)},function(a,b){a=this.g(b, +Q.call(this,this.f(b),1));W(a)&&J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));W(a)||J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=W(a)&&J(this,this.i+1);b&&this.g(b, +a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0W(a)&&J(this,this.b)},function(a,b){a=this.g(b,S.call(this,this.f(b),1));W(a)||J(this,this.b)},function(a,b){a=this.g(b,S.call(this,this.f(b),1));0>=W(a)&&J(this,this.b)},function(a,b){this.g(b,S.call(this,this.f(b),1));J(this,this.b)},function(a,b){a=this.g(b,S.call(this,this.f(b),1));0<=W(a)&&J(this,this.b)},function(a,b){a=this.g(b,S.call(this,this.f(b),1));W(a)&&J(this,this.b)},function(a,b){a=this.g(b,S.call(this,this.f(b),1));0W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));W(a)||J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));0>=W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));0<=W(a)&& +J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));W(a)&&J(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,S.call(this,this.f(this.b),1));0>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-D&&(g+=F);for(var g=Math.trunc(Math.abs(g))%F,h=d;f--&&h=ma.rb&&c<=ma.Kb&&(b=c-(ma.rb-ma.Gb));b&&(a.preventDefault&&a.preventDefault(),d.ab(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ma.Ib&&(b=ma.Hb);d.ab(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.ab(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; +l.Eb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ea(c[0]);if(d!=this.Va)return;c=Ea(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Wa+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.wa=function(a,b){if(!b)if(this.Eb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.ma=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new I(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.ab=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Ea(b.substring(c,f))),c=f+1}}return a}function Ke(a,b,c){if(32>=a.ia)return b|c;b=Le(a,b,0,!0);c=Le(a,c,0,!0);return((b/Me|0)^(c/Me|0))*Me+((b^c)>>>0)} +function Le(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} +function Ne(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; +case "&":e=a;32>=e.ia?f&=g:(f=Le(e,f,0,!0),g=Le(e,g,0,!0),f=((f/Me|0)&(g/Me|0))*Me+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Le(e,f,0,!0),g=Le(e,g,0,!0),f=(f/Me|0|g/Me|0)*Me+((f|g)>>>0));break;case "^!":f=Ke(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Le(a,f,0,!0),f=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Oe(a,b,0,b.length,a.U,c),void 0!==d&&!1===c&&Se(a,null,d));return d} +function Pe(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.nb(b),0<=f?f=a.ob(f):(f=a.K[b],null==f&&(0>e&&(b="-"+b,e=0),f=na(b,a.U))),null!=f?0>e?f=-f:0>=8;d=q(c,0,!0)+" "+c+". "+m(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Te(a){var b=a.K;a.K={};return b}function Ue(a,b){if(b)return Se(a,b,a.K[b]);var c=0;for(b in a.K)Se(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Qe={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11},Me=Math.pow(2,32); +function Ve(a){Ie.call(this,a);this.Ea=!1;this.Ca=18;this.ia=36;this.Y=["<",">"];this.pa=[];this.Da=Z();this.L=Z(0);this.oa=Z(0);this.fa=Z(0);this.F=[];this.b=this.M=this.I=[];We(this);this.S=this.ja=0;this.i=[];this.za=void 0;Xe(this);this.D=this;this.xa={};this.Z=this.zb=0;this.T=null;this.P=[];Ye(this,a.messages);this.ra=a.commands;this.O=0;this.Ja=this.Aa=null;this.C=this.Ga=this.Fa=this.ha=this.ya=0;this.qa=this.ga=this.da=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ed(b, +a)}):void 0===global[w]&&(global[w]=function(a){return ed(b,a)})}ja(Ve,Ie);function Ze(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,Ya:void 0===b?!1:b,la:!1,U:c}}function $e(a,b,c,d){a.B=b;a.Ya=c||!1;a.la=!1;a.U=d}function af(a){return[a.B,a.Ya,a.la,a.U,a.bb]}function bf(a,b){var c=Z(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.ub=Je(a,c.bb=b[4]));return c}l=Ve.prototype; +l.Ha=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ca=b.F;(b=$c(a,"messages"))&&Ye(this,b);if(a=$c(a,"commands"))this.ra=a;cf(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Ze(df(d,c,d.oa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.u("..."):(c=p.type,n=Kc[c],p&&d.u(q(p.id,8)+" %"+ +q(e<a&&a>=-D&&(a+=F);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function gf(a){return m(a/Tb,6)+" "+m(a%Tb,6)} +function Ye(a,b){a.D=a;a.Z=a.zb=536870916;a.T=null;a.P=[];b=Je(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in ac){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.za==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&($e(a.i[a.S],b),++a.S==a.i.length&&(a.S=0)));return!1} +function yf(a,b,c,d){var e=Z(b.B),f=a.Ia(b,1),g,h,k,n=0,p=f/Xb|0,t;for(t in zf)if(g=zf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=Af;n=p&3;break;case 32256:k=Bf;n=p&7;break;case 29248:k=Cf,n=(p&48)>>2|(p&6)>>1}break}k=k&&k[n]||"";"S"==k&&g>Df&&(k="B");k=Ef[g||0]+k;if(g){if(28700==h)h=f/Yb&127,n=L(a,h,-1);else for(h=f>>23&15,n=L(a,h,-1),p=0;n&&p>18&15)&&(k+="("+L(a,f, +-1)+")")}else k=Ba(k,8)+gf(f);f=k;g="";h=L(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ia(e,1),g+=" "+gf(k),null==e.B)break;while(e.B!=b.B)}h+=Ba(g,16)+f;c&&(h=Ba(h,48)+";"+(c||""),h=a.v.A.Oa?h+("cycles="+fd(a.v).toString()+" cs="+q(a.v.Ca)):h+(null!=d?"="+d.toString():""));return h} +function Gf(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),n=0;nDf&&(R="B");if(k==Ef[h]+R){f=29248!=g?H:(H&3)<<1|(H&12)<<2;f=(B|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}}else c&&(f= +g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function We(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.ya=0;a.ja=0} +l.Ma=function(a,b,c){var d=!0;c||Hf(this,a,b,!1,!0);if(a!=this.b){var e=Ze(b);if(-1===e)this.u("invalid address: "+L(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ma(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(If(this,a,a.length-1,"set"),Xe(this)));return d};function Hf(a,b,c,d,e){var f=!1;c=Ze(c);for(var g=1;g>>d.i],b==a.I));h.la||Xe(a);break}}return f} +function Jf(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=m(d,2);$e(e.Da,d);f+="="+L(e,e.Ia(e.Da),36)+" ";c+=f}if(b){b="";for(d=0;d=mf?1:d==kf?23:18)+" "),b+=e;c+="\n"+b}return c}l.Bb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Fa(p,k,a.Bb);0>t&&p.splice(-(t+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.F.push({sd:b,B:c,Qb:d,W:e,wb:f})}function mg(a,b,c){var d=[],e=Ze(b)>>>0;for(b=0;b>>0,h=f.Qb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case jf:J(h, +g);$e(a.L,h.i);break;case mf:f=65536;break;case nf:f=32768;break;case of:f=131072;break;case pf:f=32;break;case qf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);K(a.H);a.u("updated registers:")}}a.u(lg(a,e));c&&($e(a.L,d.i),wf(a,L(a,a.L.B)))}}function tg(a,b){b=Ea(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.u(n)}h[3]&&(g=h[3],f=null);h=a.fa;n=b;h.B=n.B;h.Ya=n.Ya;h.la=n.la;h.U=n.U;a.u(yf(a,b,g,f));e-=b.B-k;c++}}} +function jg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(uf+b):(a.R&&(a.u("ended assemble at "+L(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.T=null;if(Cb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length);var Md= +[];"call"==Of&&(Db=1E5,Md=["CALL"]);for(void 0!==Nf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.za=fa;Qf++;Db--}}Qf||(a.u("no "+Pf+"history available"),a.za=void 0)}else{var gb=df(a,oa,a.oa);if(gb){var Ka=0,Tf="ds"==db;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||sh,Ka=Pe(a,Ca);else{var Uf=df(a,Ca);Uf&& +(Ka=Uf.B-gb.B)}0>Ka&&(Ka=0);65536Fb?".":String.fromCharCode(Fb)),Ec=Ec-7}La&&(La+="\n");La=Tf?La+(qa+","):La+(oa+": "+qa+(0>Wf?" "+Pd:""))}La&& +a.u(La);a.U=uh}}}}break;case "e":if("else"==g[0])break;var Xf,Yf,Zf=g[0],Rd=g[1];"e"==Zf||"ew"==Zf?(Xf=a.Ia,Yf=a.tb):Rd=null;if(null==Rd)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Fc=df(a,Rd,a.oa);if(Fc)for(var Sd=2;SdVd;){for(var Ma=null,zh= +256;65536>Ib.B>>>0;){Wd.B=a.Ia(Ib,2);if(null==Ib.B||!zh--)break;if(!(Wd.B&1)){for(var Ah=a,Gc=Wd,ag=null,Jb=Gc.B,bg=Jb,Xd=1;6>=Xd&&Jb;Xd++){if(2hg)a.u("step commands:"), +a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var ig=Z(a.v.i);a.Ia(ig);a.O?(a.Ma(a.b,ig,!0),sf(a)||(a.H&&jd(a.H),a.O=0)):ug(a,hg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}vf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var hb=+g[2];if(2==hb||8==hb||10==hb||16==hb)a.U=hb;else{a.u("invalid base: "+hb);break}}a.u("default base: "+a.U);break;case "cs":var Lb;void 0!==g[3]&&(Lb=+g[3]);switch(g[2]){case "int":a.v.oa= +Lb;break;case "start":a.v.Da=Lb;break;case "stop":a.v.ja=Lb;break;default:a.u("unknown cs option");break a}void 0!==Lb&&bd(a.v);a.u("checksums "+(a.v.A.Oa?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.da.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), +a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":ug(a,g[0],g[1]);break;case "u":wf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){rg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.2 ("+a.v.yb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){tg(a,b.substr(1));break}var Yd="commands:",Zd;for(Zd in wg)Yd+="\n"+ +Ba(Zd,9)+wg[Zd];sd(a)||(Yd+="\nnote: history disabled if no exec breakpoints");a.u(Yd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(kg){a.u("Debugger "+(kg.stack||kg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!jg(a,b[+d]))return!1;return!0} +var wg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Df=20,Ef=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), +jf=0,kf=1,lf=2,mf=3,nf=4,of=5,pf=6,qf=7,hf="PC RA EA C0 C1 OV ND PD".split(" "),xg={},zf=(xg[28672]={0:101},xg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},xg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Df,9216:53,9472:52, 9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},xg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},xg[29248]={24576:79,24640:80,25088:81,25152:82},xg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},xg),zf=["","I","M","S"],Af=" L E LE A GE N G".split(" "),Bf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Ef=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],qf=1E3,tf=">> ";Za(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Ag(a,"unrecognized HTML entity: "+c[0])}a.w=a.w.concat(e.split(/(\r?\n)/));setTimeout(function(){yg(a)},0)}})}} -function zg(a){if(0<=a.S.indexOf("p"))return a.u(a.w.join()),0;var b=Se(a.i);try{var c;for(c=0;c=--e)break}0>e&&a.error("missing bracket(s): "+f);0<=k&&(g=f.substr(k,h-k));for((f=g)&&(b=b.replace(f,Lg(a,Mg,f)));f=Ng(a,b);)b=b.replace(f,f.slice(0,-1));if(!Fg(a, -c,b))switch(c){case Og:case Pg:case Qg:Gg(a,d);break;case Rg:Sg(a,0,b.replace(",",",,"));break;case Tg:case Ug:case Vg:case Wg:Lg(a,c,b);break;case Xg:case Yg:break;default:d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Dg(a,b,!0):(c=Ff(a.i,c,d,a.sa,!0),0>c&&(c=Ff(a.i,"",b,a.sa,!0),0>c&&(c=void 0))),void 0!==c?Sg(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} -function Fg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c)return b=Zg(a,c),Cg(a,d.La,d.ub,b),!0;if("?"!=b[0])return!1;switch(b.substr(1)){case Ug:d.mb||Cg(a,d.La);break;case Wg:for(;0p)break;var n=p+1,t=p+h.length,B="",P="";p&&(B=f[p-1]).match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&(P=f[t]).match(/[0-9A-Z$%.]/i)||("'"==B&&p--,"'"==P&&t++,f=f.substr(0,p)+k+f.substr(t),n=p+k.length)}if(!Bg(a,f))break}}qg.prototype.error=function(a){throw Error("error"+(this.ea?" at line "+xa(this.ea):"")+": "+a);}; -function Ag(a,b){a.u("warning"+(a.ea?" at line "+xa(a.ea):"")+": "+b)}function $g(a,b,c){c=void 0===c?",":c;for(var d=0,e=!1,f=null,g=0;d"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.D+=b}if(null==a.j){var d=b=0,e,f,g=a.D.length;a.I==Pg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Sg(a,d),b=0)}b&&Sg(a,d)}return c} -function Lg(a,b,c){var d,e,f,g;a.C="<";a.J=">";e=f=[];if(b==Tg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+": "+c),"";b=d[1];if(d[2]){f=e=Zg(a,d[2]);c=[];for(g=0;g");0>k&&(k=f[g].length);c[g]=f[g].substr(h,k-h);f[g]=f[g].substr(0,h)}}f=c}c=bh;g=3}else if(b==Mg)a.C="[",a.J="]",b="?"+xa(a.sa,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)], -c=ch,a.G.push(b),g=0;else{g=$g(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="?"+b;c=Dg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.J&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,La:h,ea:a.ea};a.b?a.F=b:Fg(a,b);return b} -function Hg(a,b,c,d){d=void 0===d?0:d;b=b.toUpperCase().substr(0,6);if(d&Ig&&a.P[b])a.error("label "+b+" redefined");else{if("string"==typeof c){var e=Dg(a,c);if(void 0===e){a.error("parseExpression("+c+")");return}c=e}a.P[b]={name:b,value:c,ea:a.ea,od:d};a.i.K[b]=c}}function Sg(a,b,c){a.H[a.sa]=Eg(a,b);null!=c&&a.K.push({sa:a.sa,Db:c,ea:a.ea});a.sa++} -function Eg(a,b,c){c=void 0===c?a.sa:c;var d=Y(a.i,b||0,36,!0);(b<-C||b>=E)&&Ag(a,"truncated value "+m(b)+" at location "+m(c)+" to "+m(d));return d}qg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Ig=1,Jg=2,Kg=4,Og="ASCII",Pg="ASCIZ",Tg="DEFINE",Ug="IFE",Vg="IRP",Mg="LITERAL",Xg="PAGE",Wg="REPEAT",Qg="SIXBIT",Yg="SUBTTL",Rg="XWD",bh=-1,ch=-2,ah=-3; -function dh(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;eh(this,b);this.O=$c(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.S=this.P=!1;this.ca=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=fh(this);if(this.v=tb("CPU",this.id)){this.D=tb("Debugger",this.id);this.G=new zc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=rb(this.id);if((this.j=tb("Panel",this.id))&&this.j.va)for(b= -0;b\nLicense: GPL version 3 or later ");for(b=0;bgh){if(hh(d,this.L)){this.C=new G(this,"1.34.2",Bh);hh(this.C)&&(Ch(this,d),a=Dh,Eh(this.C));this.C.set(nh,Ia());Fh(this.C);var e=this.b&&!this.K;if(a==oh||qb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=mh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hh(d,g):("error"==f&&"no machine state"!= -g?(this.da("Error: "+g),"unable to verify user"==g&&(Sa(Gh,""),this.i=null)):this.u(f+": "+g),Eh(d),hh(d)?(c=mh(d),e=!0):c=!1))}e&&kh(this,c?d:null)}else a==Dh&&d.clear()}else kh(this);delete this.L;delete this.I}e=rb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Hh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(Ch(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function Ch(a,b){if(qb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ja("http://www.pcjs.org/api/v1/report",d,!0)}} -function vg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",lh),h=Ia();g.set(nh,h);f.set(nh,h);f.set(Ih,"1.34.2");f.set(Jh,window?window.location.href:null);f.set(Kh,window?window.navigator.userAgent:"");a.v&&a.v.ma&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.ma(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=rb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.T||8,e=e||0,e=8==f?m(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ja(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],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Sh(a,b,c)}})}else c(a,null)} -function Th(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Ba(a))}function g(a){f("Error: "+a);n&&(--Ph||ib(!0));n=!1}var h,k,n=!0;Ph++;ob[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=p:B.appendChild(document.createTextNode(p));t.appendChild(B)}d|| -(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Qh(d,null,a,null,!1,f,function(a,e){e?(nb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Ph||ib(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Ph|| -ib(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Qh(c,b,a,e,!0,f,p):Rh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(P){g(P.message)}return n}window.embedPDP10=function(a,b,c,d){ib(!1);return Th("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ib(!1);return Th("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return tb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!wb[a]){for(var c=!0,d=wb,e=a,f=b.length,g=[],h=[],k="",n=null,p=0;p> ";Xa(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Ag(a,"unrecognized HTML entity: "+c[0])}a.D=a.D.concat(e.split(/(\r?\n)/));setTimeout(function(){yg(a)},0)}})}} +function zg(a){if(0<=a.Y.indexOf("p"))return a.u(a.D.join()),0;var b=Te(a.i);try{var c;for(c=0;cH)break;var t=H+1,R=H+n.length,bb="",Bb="";H&&(bb=b[H-1]).match(/[0-9A-Z$%.]/i)||!(R>=b.length)&&(Bb=b[R]).match(/[0-9A-Z$%.]/i)||("'"==bb&&H--,"'"==Bb&&R++,b=b.substr(0,H)+p+b.substr(R),t=H+p.length,g=!0)}c=null}}d=h[1];c=h[3].trim();h=h[3]+h[4];d&&(d=d.slice(0,-1),Jg(a,d,a.sa,Kg));var C;f&&(C=c.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=C[1],c=C[2],"=="==f?e|= +Lg:"=:"==f&&(e|=Mg),Jg(a,d,c,e),f=c="");if(!f&&!c)return!0;a.K=f;C=c;d=0;e=null;b=0;for(g=-1;b=--d););0>d&&a.error("missing bracket(s): "+C);0<=g&&(e=C.substr(g,b-g));for((C=e)&&(c=c.replace(C,Ng(a,Og,C)));C=Pg(a,c);)c=c.replace(C,C.slice(0,-1));if(!Fg(a,f,c))switch(f){case Qg:case Rg:case Sg:Gg(a,h);break;case Tg:Ug(a,0,c.replace(",",",,"));break;case Vg:case Wg:case Xg:case Hg:case Ig:case Yg:Ng(a,f,c);break;case Zg:case $g:break;default:h= +c,C=f+h,0<=C.indexOf(",,")||!f&&0>C.indexOf("@")&&0>C.indexOf("(")?f=Dg(a,C,!0):(f=Gf(a.i,f,h,a.sa,!0),0>f&&(f=Gf(a.i,"",C,a.sa,!0),0>f&&(f=void 0))),void 0!==f?Ug(a,f,a.i.ka):a.error("unrecognized expression: "+C)}return!0} +function Fg(a,b,c){var d=a.j[b];if(!d)return!1;if(null!=c)return b=a.v,a.v=d,d.La=ah(a,c,!0),Cg(a,d.Ba,d.Na,d.La,d.vb),a.v=b,!0;if("?"!=b[0])return!1;switch(b.substr(1)){case Wg:d.$a||Cg(a,d.Ba);break;case Xg:d.$a&&Cg(a,d.Ba);break;case Hg:case Ig:for(c=0;c"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.w=null);a.G+=b}if(null==a.w){var d=b=0,e,f,g=a.G.length;a.K==Rg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Ug(a,d),b=0)}b&&Ug(a,d)}return c} +function Ng(a,b,c){var d,e,f,g,h,k;a.F="<";a.C=">";g=h=k=[];if(b==Vg){e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;f=e[1];if(e[2]){h=g=ah(a,e[2],!0);b=[];for(c=0;c");0>n&&(n=h[c].length);b[c]=h[c].substr(d,n-d);h[c]=h[c].substr(0,d)}h=b}b=dh;c=3}else if(b==Og)a.F="[",a.C="]",f="?"+va(a.sa,5),a.j[f]&&a.error("literal symbol redefined: "+f),e=[c[0],f+": "+c.substr(1)], +b=eh,a.H.push(f),c=0;else if(b==Hg||b==Ig){a.v||a.error(b+" outside of macro");e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)(.*)/i);if(!e)return a.error("unrecognized "+b+": "+c),c;for(d=0;d=F)&&Ag(a,"truncated value "+m(b)+" at location "+m(c)+" to "+m(d));return d}qg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Kg=1,Lg=2,Mg=4,Qg="ASCII",Rg="ASCIZ",Vg="DEFINE",Wg="IFE",Xg="IFN",Hg="IRP",Ig="IRPC",Og="LITERAL",Zg="PAGE",Yg="REPEAT",Sg="SIXBIT",$g="SUBTTL",Tg="XWD",dh=-1,eh=-2,ch=-3; +function fh(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;gh(this,b);this.O=$c(this,"autoPower",a,6);this.w=0;this.Y=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.T=!1;this.I=this.C=null;this.S=this.P=!1;this.da=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=hh(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new zc({id:this.Wa+".bus",busWidth:this.Y},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.va)for(b= +0;b\nLicense: GPL version 3 or later ");for(b=0;bih){if(jh(d,this.L)){this.C=new I(this,"1.34.2",Dh);jh(this.C)&&(Eh(this,d),a=Fh,Gh(this.C));this.C.set(ph,Ga());Hh(this.C);var e=this.b&&!this.K;if(a==qh||pb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=oh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jh(d,g):("error"==f&&"no machine state"!= +g?(this.ea("Error: "+g),"unable to verify user"==g&&(Qa(Ih,""),this.i=null)):this.u(f+": "+g),Gh(d),jh(d)?(c=oh(d),e=!0):c=!1))}e&&mh(this,c?d:null)}else a==Fh&&d.clear()}else mh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Jh(this,this.v,b,c,a),K(this,-2),this.v.ba());this.P&&(Eh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; +function Eh(a,b){if(pb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.da;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} +function vg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new I(a,"1.34.2"),g=new I(a,"1.34.2",nh),h=Ga();g.set(ph,h);f.set(ph,h);f.set(Kh,"1.34.2");f.set(Lh,window?window.location.href:null);f.set(Mh,window?window.navigator.userAgent:"");a.v&&a.v.ma&&(c&&(b&&(a.v.A.ba=a.v.A.N),a.v.V()),d=a.v.ma(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.eb+=d))&&(e.textContent=c.A.N?c.Y.toFixed(2)+"Mhz":"Stopped",c.eb=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.U||8,e=e||0,e=8==f?m(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i: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(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Uh(a,b,c)}})}else c(a,null)} +function Vh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);n&&(--Rh||ab(!0));n=!1}var h,k,n=!0;Rh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=p:B.appendChild(document.createTextNode(p));t.appendChild(B)}d|| +(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Sh(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Rh||ab(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Rh|| +ab(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Sh(c,b,a,e,!0,f,p):Th(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(H){g(H.message)}return n}window.embedPDP10=function(a,b,c,d){ab(!1);return Vh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ab(!1);return Vh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",n=null,p=0;p Date: Sun, 19 Mar 2017 12:03:45 -0700 Subject: [PATCH 04/13] More MACRO-10 parsing improvements --- apps/pdp10/tests/MACTEST.MAC.txt | 25 +- docs/pcx86/examples/pcx86-dbg.js | 337 ++++++++++---------- modules/pdp10/lib/macro10.js | 32 +- modules/shared/lib/debugger.js | 65 +++- versions/pc8080/1.34.2/pc8080-dbg.js | 227 ++++++------- versions/pcx86/1.34.2/pcx86-dbg.js | 337 ++++++++++---------- versions/pdpjs/1.34.2/pdp10-dbg.js | 455 ++++++++++++++------------- versions/pdpjs/1.34.2/pdp11-dbg.js | 197 ++++++------ 8 files changed, 869 insertions(+), 806 deletions(-) diff --git a/apps/pdp10/tests/MACTEST.MAC.txt b/apps/pdp10/tests/MACTEST.MAC.txt index ebf637531..52981cf22 100644 --- a/apps/pdp10/tests/MACTEST.MAC.txt +++ b/apps/pdp10/tests/MACTEST.MAC.txt @@ -1,4 +1,23 @@ - TITLE STORE TEXT CHARACTER BY CHARACTER +; From the MACR0-10 ASSEMBLER PROGRAMMER'S REFERENCE MANUAL (June 1972): +; +; Example 4 (Figure 7-4) shows nested macros which use IRPC. The desired operation +; is to take an ASCII text string and store the characters four per word, left-justified, +; with the character count stored in the first nine bits of the first word. +; +; The TEXT macro counts the string characters and invokes the CODE macro to store the +; characters four per word. The CODE macro invokes a SHIFT macro which left-justifies the +; last word if it is not already left-justified. The first part of the example shows the +; normal listing, then SALL is set to show what code the macros are generating. +; +; The original listing encodes the following two lines as follows: +; +; IFN ZZ, ;;IF NOT LEFT JUSTIFIED +; +; The April 1978 MACRO-10 manual says that a macro body "must be enclosed in angle brackets", +; so I'm not sure how the above lines make sense. +; + TITLE STORE TEXT CHARACTER BY CHARACTER SUBTTL %1 5-APR-72 DEFINE TEXT (C)< @@ -13,10 +32,10 @@ IFN ZZ&777B8,< EXP ZZ ;;WORD FULL ZZ==0> ;;START AGAIN WITH 0 - ZZ=ZZ+9+"C"> ;;END OF IRPC + ZZ==ZZ_9+"C"> ;;END OF IRPC IFN ZZ, ;;RECURSE > ;;END OF DEFINE SHIFT ;;START MOVING LEFT diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 89415a6d7..e5c277415 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -229,9 +229,9 @@ function Fi(a){Ye.call(this);return a}function Gi(a,b){a=Hi.call(this,this.S(),b function Hi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return a&65535}function Ji(a,b){Ki.call(this,a,b);this.Ya!=this.Ba>>31?(kg(this),mg(this)):(lg(this),ng(this));this.A-=-1===this.C?9:12;return this.Ba}function Mi(a,b){this.A-=14+(-1===this.C?0:2);rg(this);-1!==this.xb.load(b)&&this.xb.qc>=this.Ma&&this.xb.qc>=(b&3)&&(vg(this),a=this.xb.mb&-256,2=this.Ma)&&this.xb.qc>=(b&3))return vg(this),this.xb.Ka;rg(this);return a}function Ti(a,b){if(-1===this.C)return Ye.call(this),a;ge(this,this.ja(this.C+this.W));this.A-=this.B.Xe;return b} -function dj(a,b){this.A-=-1===this.F?-1===this.C?this.B.sk:this.B.rk:this.B.pk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function fj(a,b){return b} -function gj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)y.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=z(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return dj.call(this,0,b)} -function hj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.Y.U;break;case 3:b=this.Ca.U;break;case 4:if(80386<=this.ca){b=this.Ga.U;break}y.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.Ha.U;break}default:y.call(this,6),b=a}-1!==this.F&&ke(this,2);return dj.call(this,0,b)} +function Ui(a,b){this.A-=-1===this.F?-1===this.C?this.B.sk:this.B.rk:this.B.pk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function fj(a,b){return b} +function gj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)y.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=z(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return Ui.call(this,0,b)} +function hj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.Y.U;break;case 3:b=this.Ca.U;break;case 4:if(80386<=this.ca){b=this.Ga.U;break}y.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.Ha.U;break}default:y.call(this,6),b=a}-1!==this.F&&ke(this,2);return Ui.call(this,0,b)} function Li(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.Ba=d<<16|e&65535;this.Ya=f+((d>>>16)+b*a)|0}else this.Ba=a*b|0,this.Ya=0}function ij(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Ib:this.B.Ac;return jg(this,a|b,128)}function jj(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Ib:this.B.Ac;return jg(this,a|b,this.Fb)&this.R} function kj(a,b){var c=a-b-pg(this)|0;cg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Ib:this.B.Ac;return c&255}function lj(a,b){var c=a-b-pg(this)|0;cg(this,a,b,c,this.Fb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Ib:this.B.Ac;return c&this.R}function mj(){return ig(this)?1:0}function nj(){return dg(this)?1:0}function oj(){return dg(this)?0:1}function pj(){return gg(this)?1:0}function qj(){return gg(this)?0:1}function rj(){return dg(this)||gg(this)?1:0} function sj(){return dg(this)||gg(this)?0:1}function tj(){return hg(this)?1:0}function uj(){return hg(this)?0:1}function vj(){return eg(this)?1:0}function wj(){return eg(this)?0:1}function xj(){return!hg(this)!=!ig(this)?1:0}function yj(){return!hg(this)!=!ig(this)?0:1}function zj(){return gg(this)||!hg(this)!=!ig(this)?1:0}function Aj(){return gg(this)||!hg(this)!=!ig(this)?0:1}function Bj(a,b){return Cj.call(this,a,b,this.ra())}function Dj(a,b){return Ej.call(this,a,b,this.ra())} @@ -344,7 +344,7 @@ function Pe(){var a=1,b=0,c=this.wa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256 function pk(){var a=this.S();ig(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function qk(){var a=this.S();dg(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function rk(){var a=this.S();dg(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function sk(){var a=this.S();gg(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function tk(){var a=this.S();gg(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)} function uk(){var a=this.S();dg(this)||gg(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function vk(){var a=this.S();dg(this)||gg(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function wk(){var a=this.S();hg(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function xk(){var a=this.S();hg(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function yk(){var a=this.S();eg(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra} function zk(){var a=this.S();eg(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function Ak(){var a=this.S();!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Bk(){var a=this.S();!hg(this)==!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Ck(){var a=this.S();gg(this)||!hg(this)!=!ig(this)?(C(this,A(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra} -function Dk(){var a=this.S();gg(this)||!hg(this)!=!ig(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function Ek(){this.kd.call(this,Fk,this.ra);this.A-=-1===this.F?1:this.B.yg}function Gk(){this.N|=1;this.tc.call(this,dj)}function Hk(){this.N|=1;this.za.call(this,dj)}function Ik(){this.kc.call(this,dj)}function Jk(){this.ma.call(this,dj)}function Qe(){this.kd.call(this,Kk,fk)}function Re(){this.ib.call(this,2==this.W?Lk:Mk,fk)} +function Dk(){var a=this.S();gg(this)||!hg(this)!=!ig(this)?this.A-=this.B.Ra:(C(this,A(this)+a),this.A-=this.B.Qa)}function Ek(){this.kd.call(this,Fk,this.ra);this.A-=-1===this.F?1:this.B.yg}function Gk(){this.N|=1;this.tc.call(this,Ui)}function Hk(){this.N|=1;this.za.call(this,Ui)}function Ik(){this.kc.call(this,Ui)}function Jk(){this.ma.call(this,Ui)}function Qe(){this.kd.call(this,Kk,fk)}function Re(){this.ib.call(this,2==this.W?Lk:Mk,fk)} function Nk(){var a=Hg(this),b=fe(this);C(this,b);a&&he(this,z(this)+a);this.A-=this.B.Ek}function Ok(){var a=fe(this);C(this,a);this.A-=this.B.Bk}function Se(){this.ta=this.Aa;var a=Hg(this),b=this.ra()&31;this.A-=11;pe(this,this.M);var c=z(this)&this.R;if(0=bq){var 350>f?d=m?ot:pt:480<=f&&(d=a.ga==Ul?qt:rt):d=m?7-d:st:d-=m?2:0);c=ft(a)}}else e.Xc&8&&(e.Xc&2?(d=e.Xc&16?st:tt,e.Xc&4||--d):(d=e.Xc&1?Cs:ut,e.Xc&4&&--d));else a.oa=null,null==d&&(d=a.da);if(!Hs(a,d,b))return!1;gt(a,c);return!0} function Hs(a,b,c){if(null!=b&&(b!=a.oa||c)){a.Ad=0;a.oa=b;a.Ga=!1;b=a.C||(b==Es?a.Y:a.K);if(b!=a.C||b.cb!=a.cb||b.Ob!=a.Ob){ct(a);if(a.cb){if(!Cc(a.ka,a.cb,a.Ob))return!1;a.C&&(a.C.rc=!1)}a.C=b;b.rc=!0;a.cb=b.cb;a.Ob=b.Ob;if(!pc(a.ka,b.cb,b.Ob,3,b===a.A?b:null))return!1}a:{a.I=0;a.F=a.Fb;a.J=a.sc;a.Ma=a.F;a.Eb=is[Es][2];b=0;if(c=is[a.oa])a.F=c[0],a.J=c[1],a.Eb=c[2],b=c[3],a.I=c[4],4!=a.ga&&7!=a.ga||a.C!==a.A||a.I!=Ws||(7==(a.A.Wa[fs]&31)?a.J=350>Kr(a.A,Wr)?43:50:a.I=a.La);a.Wc=a.F*a.J|0;a.Vc=a.Wc/ a.Eb|0;a.Xa=a.Vc;a.Pb=0;void 0!==b&&(a.Xa=(a.Xa<<1)+b|0,a.Pb=a.Xa+b>>1);if(a.va.length){a.qa=a.Z/a.F|0;a.ta=a.la/a.J|0;if(a.I){b=a.va[a.I];if(!b)break a;c=a.va[a.I<<1];a.Uc&&80==a.F?c&&a.qa>=3*c.Fc>>2&&(a.I<<=1,b=c):(c&&a.qa>=c.Fc&&(a.I<<=1,b=c),a.Uc||(a.qa=b.Fc,a.ta=b.Gc));a.Ya=a.ab=0;b&&(a.Ya=a.F*b.Fc,a.ab=a.J*b.Gc)}else a.qa=a.ta=1,a.Ya=a.F,a.ab=a.J;a.Ha=a.L.createImageData(a.Ya,a.ab);a.Ba=document.createElement("canvas");a.Ba.width=a.Ya;a.Ba.height=a.ab;a.Ca=a.Ba.getContext("2d");a.vc=a.zc=0; -a.Qb=a.Z;a.Rb=a.la;b=a.Z-a.F*a.qa;c=a.la-a.J*a.ta;0>1,a.Qb-=b);0>1,a.Rb-=c);if(b||c)a.L.fillStyle=a.O.style.backgroundColor,a.L.fillRect(0,0,a.Z,a.la)}}Tt(a,!0);zs(a)}return!0}function at(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Vt(a){a.xa=-1;a.ma=!1;var b=a.Vc;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function Tt(a,b){b||(a.Ga=!1);Vt(a)} -function et(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.va[a.I];h.jf&&(d=h.jf[d]);var k=g>>4&15;h.jf&&(k=h.jf[k]);e?(b*=h.Fc,c*=h.Gc,e.fillStyle=h.Be[k],e.fillRect(b,c,h.Fc,h.Gc)):(b=b*a.qa+a.vc,c=c*a.ta+a.zc,a.L.fillStyle=h.Be[k],a.L.fillRect(b,c,a.qa,a.ta));g&Wt&&(k=(f&15)*h.Fc,f=(f>>4)*h.Gc,e?e.drawImage(h.Sg[d],k,f,h.Fc,h.Gc,b,c,h.Fc,h.Gc):a.L.drawImage(h.Sg[d],k,f,h.Fc,h.Gc,b,c,a.qa,a.ta));g&dt&&(f=a.md,g=a.Hc,e?(a.za&&a.za!==h.Gc&&(f=f*h.Gc/a.za|0,g=g*h.Gc/a.za|0),e.fillStyle=h.Be[d],e.fillRect(b, +a.Qb=a.Z;a.Rb=a.la;b=a.Z-a.F*a.qa;c=a.la-a.J*a.ta;0>1,a.Qb-=b);0>1,a.Rb-=c);if(b||c)a.L.fillStyle=a.O.style.backgroundColor,a.L.fillRect(0,0,a.Z,a.la)}}vt(a,!0);zs(a)}return!0}function at(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function wt(a){a.xa=-1;a.ma=!1;var b=a.Vc;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function vt(a,b){b||(a.Ga=!1);wt(a)} +function et(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.va[a.I];h.jf&&(d=h.jf[d]);var k=g>>4&15;h.jf&&(k=h.jf[k]);e?(b*=h.Fc,c*=h.Gc,e.fillStyle=h.Be[k],e.fillRect(b,c,h.Fc,h.Gc)):(b=b*a.qa+a.vc,c=c*a.ta+a.zc,a.L.fillStyle=h.Be[k],a.L.fillRect(b,c,a.qa,a.ta));g&Vt&&(k=(f&15)*h.Fc,f=(f>>4)*h.Gc,e?e.drawImage(h.Sg[d],k,f,h.Fc,h.Gc,b,c,h.Fc,h.Gc):a.L.drawImage(h.Sg[d],k,f,h.Fc,h.Gc,b,c,a.qa,a.ta));g&dt&&(f=a.md,g=a.Hc,e?(a.za&&a.za!==h.Gc&&(f=f*h.Gc/a.za|0,g=g*h.Gc/a.za|0),e.fillStyle=h.Be[d],e.fillRect(b, c+f,h.Fc,g)):(a.za&&a.za!==a.ta&&(f=f*a.ta/a.za|0,g=g*a.ta/a.za|0),a.L.fillStyle=h.Be[d],a.L.fillRect(b,c+f,a.qa,g)))} -function zs(a,b){if(a.ea.Yb){var c=!1,d=a.C;d&&(d!==a.A?d.Xc&8&&(c=!0):d.wd&32&&(c=!0));if(c||b){if(b)Vt(a);else if(void 0===a.M)return;var e=!1;!(b||++a.Ad&15)&&0<=a.Aa&&(a.Aa++,e=!0);var f=0,g=a.Wc,h=a.cb,c=h,k=c+a.Ob;a.oa>=lt&&(h=c=655360,k=c+65536);if(Xt(a,d)&8||d.Ye&&d.Ye=bq&&d.Wa[19]&&d.Wa[19]<<1!=d.Wa[1]+1&&(a.Ma=d.Wa[19]<<(a.I?1:d.Wa[20]&64?3:4),m=(a.Ma*(a.J-1)+a.F)/a.Eb|0,a.oa<=Es&& -(m<<=1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.ma){b=a.ka;for(var p=!0,v=c>>>b.A;0f)return;g=f+1}}if(a.I){if(a.va[a.I]){d=f;f=0;e=a.xa=0;h=Wt<<8;b=1048575;p=a.C.Xc&32;a.La>=bq&&(p=a.C.Cc[16]&8);m=a.aa-a.C.vd;p&&(e=Is<<8,b&=~e,a.Aa&2||(b&=~h));for(c+=d<<1;c=lt&&(h=c=655360,k=c+65536);if(Xt(a,d)&8||d.Ye&&d.Ye=bq&&d.Wa[19]&&d.Wa[19]<<1!=d.Wa[1]+1&&(a.Ma=d.Wa[19]<<(a.I?1:d.Wa[20]&64?3:4),m=(a.Ma*(a.J-1)+a.F)/a.Eb|0,a.oa<=Es&& +(m<<=1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.ma){b=a.ka;for(var p=!0,v=c>>>b.A;0f)return;g=f+1}}if(a.I){if(a.va[a.I]){d=f;f=0;e=a.xa=0;h=Vt<<8;b=1048575;p=a.C.Xc&32;a.La>=bq&&(p=a.C.Cc[16]&8);m=a.aa-a.C.vd;p&&(e=Is<<8,b&=~e,a.Aa&2||(b&=~h));for(c+=d<<1;c>8|(u&255)<<8;var I=e,T=16;m>=h))>>(T-=h);at(a.Ha,m++,p,b[ua])}m>E&&(E=m);p=H&&(H=p+1)}k+=2;d++;if(m>=a.F){m=0;p+=2;if(p>a.J)break;p==a.J&&(p=1,k=c+a.Pb)}}a.ma=!0; va.F?a.Ma-a.F-u>>3:0;c>=8;b>v&&(v=b);m=K&&(K=m+1)}c+=H;if(b>=a.F){b=0;if(++m>a.J)break;c+=I}}u||(a.ma=!0);pa.F?a.Ma-a.F-K>>3:0;cI&&(T=I)):(u<<=K,T-=K,a.ma=!1):(a.ma&&u===a.M[d]?(h+=T,T=0):a.M[d]=u,d++);if(T){hp&&(p=h);b=E&&(E=b+1)}if(h>=a.F){h=0;if(++b>a.J)break;c+=H}}K||(a.ma=!0);ma&&(b.wh=a,a=-a|0);a%b.rh>b.mn&&(c|=1);a%b.uh>b.on&&(c|=9);b.fi=a/b.uh|0;return c}l.Cm=function(a,b){return Zt(this,this.Y,a,b)};l.fo=function(a,b,c){var d=this.Y;d.Fg=d.ec;d.ec=b&31;w(this,a,b,c,"CRTC.INDX")};l.Bm=function(a,b){return $t(this,this.Y,a,b)};l.eo=function(a,b,c){au(this,this.Y,a,b,c)};l.Dm=function(a,b){return bu(this,this.Y,b)};l.ho=function(a,b,c){a=this.Y;w(this,a.port+4,b,c,"MODE");a.Xc=b;Os(this,!1)}; l.Em=function(a,b){return cu(this,this.Y,b)};l.Mk=function(a,b,c){this.A.Pf=this.A.Pf&-4|b&3;w(this,a,b,c,"FEAT")};l.am=function(a,b){a=this.A.wd;b&&!t(this)||w(this,960,null,b,"ATC.INDX",a);return a};l.rl=function(a,b){a=this.A.Cc[this.A.wd&31];b&&!t(this)||w(this,960,null,b,"ATC."+this.A.Tg[this.A.wd&31],a);return a}; -l.Lk=function(a,b,c){var d=this.A,e=d.wd&32;if(d.Ke){d.Ke=!1;var f=d.wd&31;if(16<=f||!e)if(du||d.Cc[f]!==b)c&&!t(this)||w(this,a,b,c,"ATC."+d.Tg[f]),d.Cc[f]=b,Tt(this,!1)}else d.wd=b,w(this,a,b,c,"ATC.INDX"),d.Ke=!0,b&32&&!e&&Gs(this,!0)&&zs(this,!0),a=(d.Wa[12]<<8)+d.Wa[13]|0,d.vd!=a&&(d.vd=a,Tt(this)),d.Ye=0}; +l.Lk=function(a,b,c){var d=this.A,e=d.wd&32;if(d.Ke){d.Ke=!1;var f=d.wd&31;if(16<=f||!e)if(du||d.Cc[f]!==b)c&&!t(this)||w(this,a,b,c,"ATC."+d.Tg[f]),d.Cc[f]=b,vt(this,!1)}else d.wd=b,w(this,a,b,c,"ATC.INDX"),d.Ke=!0,b&32&&!e&&Gs(this,!0)&&zs(this,!0),a=(d.Wa[12]<<8)+d.Wa[13]|0,d.vd!=a&&(d.vd=a,vt(this)),d.Ye=0}; l.Om=function(a,b){a=0;if(this.La==bq)a=3-((this.A.af&12)>>2),a=(this.xb&1<>this.A.xc&63;b&&!t(this)||w(this,969,null,b,"DAC.DATA["+r(this.A.dd)+"]["+r(this.A.xc)+"]",a);this.A.xc+=6;12>this.A.xc&63;b&&!t(this)||w(this,969,null,b,"DAC.DATA["+r(this.A.dd)+"]["+r(this.A.xc)+"]",a);this.A.xc+=6;12>>0;else if(32>b)d=a&(1<a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Xx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} -function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(0>e&&(b="-"+b,e=0),f=oa(b,a.L))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; -function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; -l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, -b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ -" dpl="+r(a.qc))}}else d.P("no selector")});Al(this,134217728,function(a){var b;(a=a[0])&&(b=$x(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ta(b)+")");b;){a=hy(d,0,b);var c=d.Ia(a,1),e=d.Yc(a,2),k=d.Yc(a,5);if(77!=c&&90!=c)break;d.P(uy(0,b)+": '"+String.fromCharCode(c)+"' PID="+ta(e)+" LEN="+ta(k)+' "'+vy(d,a,8)+'"');b+=1+k}});Al(this,128,function(a){py(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Al(this,8,function(a){a:{if(a=a[0]){var b=$x(d,a);if(void 0===b){d.P("invalid task selector: "+ -a);break a}a=qy(d,b,ry)}else a=d.H.la;d.P("dumpTSS("+ta(a?a.U:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?wy:xy,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=yg(d.H,p,2),2304==c&&(v|=yg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ta(m)+" "+Ba(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;mu;)p=a.ua+m,v=yg(d.H,p,2),b+="\n"+ta(m)+" ports "+ta(u)+"-"+ta(u+15)+": "+ra(v,2),u+=16,m+=2;d.P(b)}}});this.F=null;this.Ma=0;this.Ca=!1;Sf(this.H,48,this.Ym.bind(this));Sf(this.H,65, -this.Zm.bind(this));this.V=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function yy(a,b,c,d,e,f){b=vy(a,b);var g=qy(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=zy(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} -function Ay(a,b,c,d){var e=a.Yc(b,2),f=a.Yc(b,2),g=By(a,b,4),h=By(a,b,4),k=hy(a,By(a,b,4),a.Yc(b,2));b=hy(a,By(a,b,4),a.Yc(b,2));b=vy(a,b).toUpperCase();var k=vy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&t(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=zy(a,k,e);c[k+m]=g;aq(a,k,e,f,g,null,h,c)}function Cy(a,b,c){c=vy(a,c).toUpperCase();Dy(a,c,b)} -l.Ym=function(){var a=this.H;if(null!=this.F&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=hy(this,z(a)+12,a.Y.U);switch(By(this,d)){case 336:Ay(this,hy(this,a.G,b),!c,!!this.F)}}return!0}; -l.Zm=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.F)return 79==c&&Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x41 handling enabled",128),a.F=!0):(Mb(a,"INT 0x41 monitoring enabled",128),a.F=!1)}}(this)),!0;switch(c){case 79:this.F&&(b.D=b.D&-65536|62342,Mb(this,"INT 0x41 handling enabled",128));break;case 80:yy(this,hy(this,h,k),d+1,e,!(g&1),!!this.F);break;case 82:Dy(this,null, -d);break;case 127:this.F&&(b.D=b.D&-65536|(this.Ca?0:1));break;case 131:this.F&&(a=hy(this,b.L,e),this.Ma++?(this.P("TRAPFAULT failed"),Ey(this,this.B,a,!0,!0),this.Ma=0,this.Jb()):(this.P("INT 0x41 TRAPFAULT: fault="+ta(d)+" error="+q(b.K,8,!0)+" addr="+Fy(a)),this.Gd(this.B,a,!0),jy(this,!0)));break;case 141:this.F&&(b.D=b.D&-65536|1);break;case 336:Ay(this,hy(this,b.G,f),!g,!!this.F);break;case 338:Cy(this,d,hy(this,b.J,f))}this.Ca=!1;return!this.F}; +u.push(k);a.L="^_"==k?10:e;p=0}Yx(v,u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=e,k=f+1;h--;){var m=b[k++];if(m==c)break;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=Xx(g*Math.pow(2,d)+m,d*e,!0)}b=b.substr(0,f)+cy(a,g,-1)+b.substr(k)}return b} +function dy(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=by(a,b,'"',7,5),b=by(a,b,"'",6,6),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_"),b=b.split(/(\{|}|\|\||&&|\||\^!|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&ey(a,null,d));return d} +function fy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=dy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?cy(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=1e&&(b="-"+b,e=0),f=oa(b,f))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function gy(a,b){if(b)return ey(a,b,a.ga[b]);var c=0;for(b in a.ga)ey(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; +function hy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=iy(this);this.Ta=iy(this);this.aa=iy(this);this.D=[];this.B=this.Z=this.N=[];jy(this);this.xa=0;ky(this);this.Ba={};ly(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return my(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return my(b,a)})}ba(hy,Wx);l=hy.prototype; +l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ly(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=ny;80186<=this.H.ca&&(this.oa=ny.slice(),this.oa[15]=oy,80286<=this.H.ca&&(this.oa[15]=py,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){qy(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=ry(d, +b,sy),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=ty[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+uy(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ +" dpl="+r(a.qc))}}else d.P("no selector")});Al(this,134217728,function(a){var b;(a=a[0])&&(b=$x(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ta(b)+")");b;){a=iy(d,0,b);var c=d.Ia(a,1),e=d.Yc(a,2),k=d.Yc(a,5);if(77!=c&&90!=c)break;d.P(vy(0,b)+": '"+String.fromCharCode(c)+"' PID="+ta(e)+" LEN="+ta(k)+' "'+wy(d,a,8)+'"');b+=1+k}});Al(this,128,function(a){qy(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Al(this,8,function(a){a:{if(a=a[0]){var b=$x(d,a);if(void 0===b){d.P("invalid task selector: "+ +a);break a}a=ry(d,b,sy)}else a=d.H.la;d.P("dumpTSS("+ta(a?a.U:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?xy:yy,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=yg(d.H,p,2),2304==c&&(v|=yg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ta(m)+" "+Ba(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;mu;)p=a.ua+m,v=yg(d.H,p,2),b+="\n"+ta(m)+" ports "+ta(u)+"-"+ta(u+15)+": "+ra(v,2),u+=16,m+=2;d.P(b)}}});this.F=null;this.Ma=0;this.Ca=!1;Sf(this.H,48,this.Ym.bind(this));Sf(this.H,65, +this.Zm.bind(this));this.V=null;Sf(this.H,104,this.$m.bind(this));Jb(this)};function zy(a,b,c,d,e,f){b=wy(a,b);var g=ry(a,d),g=g?g.Ka+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&t(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=Ay(a,b,c);e[b+h]=0;aq(a,b,c,d,0,null,g,e)} +function By(a,b,c,d){var e=a.Yc(b,2),f=a.Yc(b,2),g=Cy(a,b,4),h=Cy(a,b,4),k=iy(a,Cy(a,b,4),a.Yc(b,2));b=iy(a,Cy(a,b,4),a.Yc(b,2));b=wy(a,b).toUpperCase();var k=wy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&t(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=Ay(a,k,e);c[k+m]=g;aq(a,k,e,f,g,null,h,c)}function Dy(a,b,c){c=wy(a,c).toUpperCase();Ey(a,c,b)} +l.Ym=function(){var a=this.H;if(null!=this.F&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=iy(this,z(a)+12,a.Y.U);switch(Cy(this,d)){case 336:By(this,iy(this,a.G,b),!c,!!this.F)}}return!0}; +l.Zm=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.F)return 79==c&&Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x41 handling enabled",128),a.F=!0):(Mb(a,"INT 0x41 monitoring enabled",128),a.F=!1)}}(this)),!0;switch(c){case 79:this.F&&(b.D=b.D&-65536|62342,Mb(this,"INT 0x41 handling enabled",128));break;case 80:zy(this,iy(this,h,k),d+1,e,!(g&1),!!this.F);break;case 82:Ey(this,null, +d);break;case 127:this.F&&(b.D=b.D&-65536|(this.Ca?0:1));break;case 131:this.F&&(a=iy(this,b.L,e),this.Ma++?(this.P("TRAPFAULT failed"),Fy(this,this.B,a,!0,!0),this.Ma=0,this.Jb()):(this.P("INT 0x41 TRAPFAULT: fault="+ta(d)+" error="+q(b.K,8,!0)+" addr="+Gy(a)),this.Gd(this.B,a,!0),ky(this,!0)));break;case 141:this.F&&(b.D=b.D&-65536|1);break;case 336:By(this,iy(this,b.G,f),!g,!!this.F);break;case 338:Dy(this,d,iy(this,b.J,f))}this.Ca=!1;return!this.F}; l.$m=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.V){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;Tf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Mb(a,"INT 0x68 handling enabled",128),a.F=a.V=!0):(Mb(a,"INT 0x68 monitoring enabled",128),a.V=!1)}}(this))}return!0}switch(d){case 67:this.V&&(b.D=b.D&-65536|62342);break;case 68:this.V&&(a=Xd(b.Z,this.yl.bind(this)))&& -(b.J=a[0],oe(b,a[1]));break;case 72:Dy(this,null,e);break;case 80:32==c?yy(this,hy(this,h,k),0,f,!0,!!this.V):128>c?yy(this,hy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.V):Ay(this,hy(this,h,k),!(c&1),!!this.V),this.V&&(b.D=b.D&-256|1)}return!this.V};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; -l.Cb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",ly(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A>>0)+1;a.mb=f;a.type=g;a.ext=k;a.Lb=d;Wd(a,!0,!0,!1)}}return a}l.Sb=function(a,b,c){var d=a&&a.ya;if(null==d&&(d=-1,a)){var e=qy(this,a.U,a.type);e&&(b=a.Ja||0,c=c||1,d=e=-1===e.Lb||e.Oc&&(b>>>0)+c>e.Nb||!e.Oc&&(b>>>0)+c<=e.Nb?e.ua+b|0:-1,a.ya=d)}return d};l.Ia=function(a,b){var c=255,d=this.Sb(a,!1,1);-1!==d&&(c=yg(this.H,d,1,a.type==Jy)|0,b&&Ky(this,a,b));return c}; -l.jb=function(a,b){return a.Hb?By(this,a,b?4:0):this.Yc(a,b?2:0)};l.Yc=function(a,b){var c=65535,d=this.Sb(a,!1,2);-1!==d&&(c=yg(this.H,d,2,a.type==Jy)|0,b&&Ky(this,a,b));return c};function By(a,b,c){var d=-1,e=a.Sb(b,!1,4);-1!==e&&(d=yg(a.H,e,4,b.type==Jy)|0,c&&Ky(a,b,c));return d}l.fc=function(a,b,c,d){var e=this.Sb(a,!0,1);if(-1!==e){if(a.type!=Jy)this.H.fc(e,b);else{var f=this.ka;f.aa[(e&f.C)>>>f.A].bf(e&f.D,b&255,e)}c&&Ky(this,a,c);d||Cd(this.H,!0)}}; -l.il=function(a,b,c){var d=this.Sb(a,!0,2);-1!==d&&(a.type!=Jy?this.H.fb(d,b):Kc(this.ka,d,b),c&&Ky(this,a,c),Cd(this.H,!0))};function hy(a,b,c,d,e,f,g){return Ly(a,{},b,c,d,e,f,g)}function Ly(a,b,c,d,e,f,g,h){b.Ja=c||0;b.U=d;b.ya=e;b.type=f||(Hy(a)?ry:Iy);b.Hb=null!=g?g:!(!a.H||4!=a.H.Z.W);b.dc=null!=h?h:!(!a.H||4!=a.H.Z.Jc);b.Jd=!1;return b}function My(a){return[a.Ja,a.U,a.ya,a.Jd,a.Hb,a.dc,a.Fe,a.bh]}function Ny(a){return{Ja:a[0],U:a[1],ya:a[2],Jd:a[3],Hb:a[4],dc:a[5],Fe:a[6],bh:a[7]}} -function Oy(a,b,c){if(null!=b.U&&(a=qy(a,b.U,b.type))){var d=b.Ja&a.wa;if(!a.Oc){if(d>>>0>=a.Nb)return!1}else if(d>>>0f?null!=h?(g=by(a,b,void 0),f=null):(f=by(a,b,void 0),null==f&&(g=null)):(h=by(a,b.substring(0,f),void 0),g=by(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=hy(a,g,h,f,c),d||Oy(a,e,!0)||(a.P("invalid offset: "+Fy(e)),e=null));return e}function Sy(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.sl=a.Cg(b.Yk=c[2]))}l.Pk=function(a,b){var c=Py(this,b);return a.replace("["+b+"]",c?q(this.jb(c),c.Hb?8:4):"undefined")}; -function Ky(a,b,c){c=c||1;null!=b.ya&&(b.ya+=c);null!=b.U&&(b.Ja+=c,Oy(a,b)||(b.Ja=0,b.ya=null))}function uy(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function Fy(a){var b;switch(a.type){case Iy:case Ty:b="&";break;case ry:b="#";break;case Ry:b="%";break;case Jy:b="%%";break;default:b=a.U?"":"%"}return a.type>=Ry||null==a.U?b+q(a.ya):b+uy(a.Ja,a.U,a.dc)} -function vy(a,b,c){var d="";for(c=c||256;d.length>>a.H.hb;g=1}a.P("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.P("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==cd&&(d=td(a.H,e,!1,!0)),d.type==c?h++||a.P("..."):(c=d.type,h=vc[c],c==ed&&(d=d.pd,h+=" -> "+vc[d.type]),d&&a.P(q(d.id,8)+" %"+q(f<c&&(c=Ia(Vy,a.substr(b,2))));return c}; -function Wy(a,b){var c=0,d=a.hh(b);if(null!=d)switch(b){case Xy:case Yy:case Zy:case $y:case az:case bz:case cz:case dz:c=2;break;case ez:case fz:case gz:case hz:case iz:case jz:case kz:case lz:case mz:case nz+oz:case nz+pz:case nz+qz:case nz+rz:case nz+sz:case nz+tz:c=4;break;case uz:case vz:case wz:case xz:case yz:case zz:case Az:case Bz:case Cz:case Dz:case Ez:case Fz:case Gz:c=8;break;case Hz:c=a.ta}return c?q(d,c):"??"} -l.hh=function(a){var b;if(0<=a){var c=this.H;switch(a){case Xy:b=c.D&255;break;case Yy:b=c.I&255;break;case Zy:b=c.L&255;break;case $y:b=c.G&255;break;case az:b=c.D>>8&255;break;case bz:b=c.I>>8&255;break;case cz:b=c.L>>8&255;break;case dz:b=c.G>>8&255;break;case ez:b=c.D&65535;break;case fz:b=c.I&65535;break;case gz:b=c.L&65535;break;case hz:b=c.G&65535;break;case iz:b=z(c)&65535;break;case jz:b=c.M&65535;break;case kz:b=c.K&65535;break;case lz:b=c.J&65535;break;case mz:b=A(c)&65535;break;case Hz:b= -re(c);break;case nz+oz:b=c.oa.U;break;case nz+pz:b=c.Z.U;break;case nz+qz:b=c.Y.U;break;case nz+rz:b=c.Ca.U;break;default:if(80286==this.H.ca)a==Cz&&(b=c.qa);else if(80386<=this.H.ca)switch(a){case uz:b=c.D;break;case vz:b=c.I;break;case wz:b=c.L;break;case xz:b=c.G;break;case yz:b=z(c);break;case zz:b=c.M;break;case Az:b=c.K;break;case Bz:b=c.J;break;case Cz:b=c.qa;break;case Dz:b=c.Og;break;case Ez:b=c.Cd;break;case Fz:b=c.Wc;break;case nz+sz:b=c.Ga.U;break;case nz+tz:b=c.Ha.U;break;case Gz:b=A(c)}}}return b}; -function Iz(a,b){b=dy(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.gh(b,c+1),0<=e&&(b=b.substr(0,c)+Wy(a,e)+b.substr(c+1+Vy[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=oa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=Py(a,e))?(d=e+' "'+vy(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=Py(a,e))?(Ky(a,d), -d=e+' "'+vy(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Fy(hy(this,A(this.H),this.H.Z.U))+" (%"+q(this.H.da)+")");this.za&&a==this.za||(this.za=a,this.ic&-2147483648&&(this.Jb(),a+=" (cpu halted)"),this.P(a),this.H&&(a=this.H,a.zc-=a.A,a.A=0,a.T.Ve=0,Cd(a)))}; -function Wk(a,b,c,d){var e,f;if(!d&&(d=t(a,1)&&0>Jz.indexOf(b),!d)){var g=Kz[b];g&&(d=t(a,g)?!0:524288==g&&t(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Rb[b])&&g[e]||"")&&(g=" "+Iz(a,g)),a.message("INT "+r(b)+": AH="+r(e)+" at "+uy(c-2-a.H.Z.ua,a.H.Z.U)+g));return d} -function Nb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ua),a.message(b.be+"."+(null!=d?"outPort":"inPort")+"("+ta(c)+","+(f?f:"unknown")+(null!=d?","+r(d):"")+")"+(null!=g?": "+r(g):"")+(null!=e?" at "+uy(e,h):""))}l.ih=function(){this.P("Type ? for help with PCx86 Debugger commands");Lz(this);if(this.Ga){var a=this.Ga;this.Ga=null;ly(this,a)}}; -function jy(a,b){var c;if(Jg(a)){if(!a.O||!a.O.length){a.O=Array(Mz);for(c=0;c>>f.hb].Gd(e&f.Db,a==this.N);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Tz(this,a,a.length-1,"set"),jy(this)));return d}; -function Ey(a,b,c,d,e){for(var f=!1,g=Uz(a,a.Sb(c)),h=1;h>3&7,E=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=E&&(E=u<<4|g&7);(u=bA[f])&&(v=u[E]);v&&(p=cA,k=v,m=k[0])}m>=p.length&&(g=a.Ia(b,1),k=dA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==eA? -p="CWDE":m==fA?p="CDQ":m>=gA&&m<=hA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Hb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,E=!0,K=1;K<=u;K++){var H,I;H="";I=k[K];if(void 0!==I){0>f&&(f=I>>iA);m==jA&&(f==kA?v="[%800]":f==lA&&(v="ES:["+(b.dc?"E":"")+"DI]"));var T=I&mA;if(T!=nA)if(T==oA)E=!1;else{var L=I&pA;if(L>=R)if(0>g&&(g=a.Ia(b,1)),L>6,za=g&7;if(3>xb){T=!p.indexOf("FI");if(!xb&&(!I.dc&&6==za||I.dc&&5==za))xb=2;else{if(I.dc)if(4!=za)za+= -8;else{var ca=L,cb=xb,Sa=I,rb=ca.Ia(Sa,1),db=rb>>6,rc=rb>>3&7,rb=rb&7,ib="";if(cb||5!=rb)ib=rA[rb+8];4!=rc&&(ib&&(ib+="+"),ib+=rA[rc+8],db&&(ib+="*"+(1<>24),2)):ca+("+"+q(L,2))):2==xb&&(ca&&(ca+="+"),I.dc?(L=By(L,I,4),ca+=q(L)):(L=L.Yc(I,2),ca+=q(L,4)));ca="["+ca+"]";if(1==ua){L="";H&=mA;H==S&&(H=I.Hb?sA:U);switch(H){case tA:L="FAR";break;case V:L="BYTE";break;case U:if(T){L="INT16"; -break}L="WORD";break;case sA:L="DWORD";break;case uA:if(T){L="INT32";break}case vA:L="REAL32";break;case wA:if(T){L="INT64";break}case xA:L="REAL64";break;case yA:L="REAL80";break;case zA:L="BCD80"}L&&(ca=L+" "+ca)}}else ca=AA(L,za,H,I);H=ca}else H=L==qA?AA(a,g&7,I,b):AA(a,g>>3&7,I,b);else if(L==BA)H="1";else if(L==W){H=a;T=I;L=b;I=" ";switch(T&mA){case V:T&X&&(I=q(H.Ia(L,1),2));break;case CA:I=q(H.Ia(L,1)<<24>>24,L.Hb?8:4);break;case S:if(L.Hb){I=q(By(H,L,4));break}case U:I=q(H.Yc(L,2),4);break; -case tA:L=hy(H,H.jb(L,!0),H.Yc(L,2),null,L.type,L.Hb,L.dc);I=Fy(L);H=DA(H,L);H[0]&&(I+=" ("+H[0]+")");break;default:I="imm("+ta(T)+")"}H=I}else L==EA?(b.dc?(H=8,I=By(a,b,4)):(H=4,I=a.Yc(b,2)),H="["+q(I,H)+"]"):L==FA?(H=T==V?a.Ia(b,1)<<24>>24:a.jb(b,!0),I=b.Ja+H&(b.Hb?-1:65535),H=q(I,b.Hb?8:4),I=DA(a,hy(a,I,b.U)),I[0]&&(H+=" ("+I[0]+")")):L==Y?H=T==GA?"ST":T==HA?"ST("+(g&7)+")":AA(a,(I&IA)>>8,I,b):L==JA?H=AA(a,(I&IA)>>8,KA,b):L==LA?H="DS:[SI]":L==MA&&(H="ES:[DI]");if(!H||!H.length){v="INVALID";break}0< -v.length&&(v+=",");v+=H||"???"}}}g="";k=Fy(e)+" ";if(-1!==e.ya&&-1!==b.ya){do if(g+=q(a.Ia(e,1),2),null==e.ya)break;while(e.ya!=b.ya)}k+=Ba(g,e.dc?24:16);k+=Ba(p,8);v&&(k+=" "+v);a.H.catz||b>=sz&&80386>a.H.ca)return"??";b+=nz}else if(e==PA)b+=Cz;else if(e==QA)b+=RA;else if(e==SA)b+=TA;else if(a=c&mA,a>=U&&(b=ez&&b<=lz&&4a.H.ca&&(d="\n"+d,c+=e,e="");c+="\n"+WA(a,a.H.Z,b)+" ";80386<=a.H.ca&&(e+="\n",c+=WA(a,a.H.Ga,b)+" "+WA(a,a.H.Ha,b)+"\n");c+=XA(a,"LD",a.H.Eb.U,a.H.Eb.ua,a.H.Eb.ua+a.H.Eb.Ka)+" "+XA(a,"GD",null,a.H.Kb,a.H.Pc)+" "+XA(a,"ID", -null,a.H.Pb,a.H.cd)+" ";c=c+(d+" "+e)+VA(a,Cz);80386<=a.H.ca&&(c+=VA(a,Ez)+VA(a,Fz))}else 80386<=a.H.ca&&(c+=WA(a,a.H.Ga,b)+" "+WA(a,a.H.Ha,b)+" ");return c+=VA(a,Hz)+UA(a,"V")+UA(a,"D")+UA(a,"I")+UA(a,"T")+UA(a,"S")+UA(a,"Z")+UA(a,"A")+UA(a,"P")+UA(a,"C")}l.gj=function(a,b){return a[0]>b[0]?1:a[0]c?zy(this,iy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.V):By(this,iy(this,h,k),!(c&1),!!this.V),this.V&&(b.D=b.D&-256|1)}return!this.V};l.yl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1}; +l.Cb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",my(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A>>0)+1;a.mb=f;a.type=g;a.ext=k;a.Lb=d;Wd(a,!0,!0,!1)}}return a}l.Sb=function(a,b,c){var d=a&&a.ya;if(null==d&&(d=-1,a)){var e=ry(this,a.U,a.type);e&&(b=a.Ja||0,c=c||1,d=e=-1===e.Lb||e.Oc&&(b>>>0)+c>e.Nb||!e.Oc&&(b>>>0)+c<=e.Nb?e.ua+b|0:-1,a.ya=d)}return d};l.Ia=function(a,b){var c=255,d=this.Sb(a,!1,1);-1!==d&&(c=yg(this.H,d,1,a.type==Ky)|0,b&&Ly(this,a,b));return c}; +l.jb=function(a,b){return a.Hb?Cy(this,a,b?4:0):this.Yc(a,b?2:0)};l.Yc=function(a,b){var c=65535,d=this.Sb(a,!1,2);-1!==d&&(c=yg(this.H,d,2,a.type==Ky)|0,b&&Ly(this,a,b));return c};function Cy(a,b,c){var d=-1,e=a.Sb(b,!1,4);-1!==e&&(d=yg(a.H,e,4,b.type==Ky)|0,c&&Ly(a,b,c));return d}l.fc=function(a,b,c,d){var e=this.Sb(a,!0,1);if(-1!==e){if(a.type!=Ky)this.H.fc(e,b);else{var f=this.ka;f.aa[(e&f.C)>>>f.A].bf(e&f.D,b&255,e)}c&&Ly(this,a,c);d||Cd(this.H,!0)}}; +l.il=function(a,b,c){var d=this.Sb(a,!0,2);-1!==d&&(a.type!=Ky?this.H.fb(d,b):Kc(this.ka,d,b),c&&Ly(this,a,c),Cd(this.H,!0))};function iy(a,b,c,d,e,f,g){return My(a,{},b,c,d,e,f,g)}function My(a,b,c,d,e,f,g,h){b.Ja=c||0;b.U=d;b.ya=e;b.type=f||(Iy(a)?sy:Jy);b.Hb=null!=g?g:!(!a.H||4!=a.H.Z.W);b.dc=null!=h?h:!(!a.H||4!=a.H.Z.Jc);b.Jd=!1;return b}function Ny(a){return[a.Ja,a.U,a.ya,a.Jd,a.Hb,a.dc,a.Fe,a.bh]}function Oy(a){return{Ja:a[0],U:a[1],ya:a[2],Jd:a[3],Hb:a[4],dc:a[5],Fe:a[6],bh:a[7]}} +function Py(a,b,c){if(null!=b.U&&(a=ry(a,b.U,b.type))){var d=b.Ja&a.wa;if(!a.Oc){if(d>>>0>=a.Nb)return!1}else if(d>>>0f?null!=h?(g=dy(a,b,void 0),f=null):(f=dy(a,b,void 0),null==f&&(g=null)):(h=dy(a,b.substring(0,f),void 0),g=dy(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=iy(a,g,h,f,c),d||Py(a,e,!0)||(a.P("invalid offset: "+Gy(e)),e=null));return e}function Ty(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.sl=a.Cg(b.Yk=c[2]))}l.Pk=function(a,b){var c=Qy(this,b);return a.replace("["+b+"]",c?q(this.jb(c),c.Hb?8:4):"undefined")}; +function Ly(a,b,c){c=c||1;null!=b.ya&&(b.ya+=c);null!=b.U&&(b.Ja+=c,Py(a,b)||(b.Ja=0,b.ya=null))}function vy(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function Gy(a){var b;switch(a.type){case Jy:case Uy:b="&";break;case sy:b="#";break;case Sy:b="%";break;case Ky:b="%%";break;default:b=a.U?"":"%"}return a.type>=Sy||null==a.U?b+q(a.ya):b+vy(a.Ja,a.U,a.dc)} +function wy(a,b,c){var d="";for(c=c||256;d.length>>a.H.hb;g=1}a.P("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.P("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==cd&&(d=td(a.H,e,!1,!0)),d.type==c?h++||a.P("..."):(c=d.type,h=vc[c],c==ed&&(d=d.pd,h+=" -> "+vc[d.type]),d&&a.P(q(d.id,8)+" %"+q(f<c&&(c=Ia(Wy,a.substr(b,2))));return c}; +function Xy(a,b){var c=0,d=a.hh(b);if(null!=d)switch(b){case Yy:case Zy:case $y:case az:case bz:case cz:case dz:case ez:c=2;break;case fz:case gz:case hz:case iz:case jz:case kz:case lz:case mz:case nz:case oz+pz:case oz+qz:case oz+rz:case oz+sz:case oz+tz:case oz+uz:c=4;break;case vz:case wz:case xz:case yz:case zz:case Az:case Bz:case Cz:case Dz:case Ez:case Fz:case Gz:case Hz:c=8;break;case Iz:c=a.ta}return c?q(d,c):"??"} +l.hh=function(a){var b;if(0<=a){var c=this.H;switch(a){case Yy:b=c.D&255;break;case Zy:b=c.I&255;break;case $y:b=c.L&255;break;case az:b=c.G&255;break;case bz:b=c.D>>8&255;break;case cz:b=c.I>>8&255;break;case dz:b=c.L>>8&255;break;case ez:b=c.G>>8&255;break;case fz:b=c.D&65535;break;case gz:b=c.I&65535;break;case hz:b=c.L&65535;break;case iz:b=c.G&65535;break;case jz:b=z(c)&65535;break;case kz:b=c.M&65535;break;case lz:b=c.K&65535;break;case mz:b=c.J&65535;break;case nz:b=A(c)&65535;break;case Iz:b= +re(c);break;case oz+pz:b=c.oa.U;break;case oz+qz:b=c.Z.U;break;case oz+rz:b=c.Y.U;break;case oz+sz:b=c.Ca.U;break;default:if(80286==this.H.ca)a==Dz&&(b=c.qa);else if(80386<=this.H.ca)switch(a){case vz:b=c.D;break;case wz:b=c.I;break;case xz:b=c.L;break;case yz:b=c.G;break;case zz:b=z(c);break;case Az:b=c.M;break;case Bz:b=c.K;break;case Cz:b=c.J;break;case Dz:b=c.qa;break;case Ez:b=c.Og;break;case Fz:b=c.Cd;break;case Gz:b=c.Wc;break;case oz+tz:b=c.Ga.U;break;case oz+uz:b=c.Ha.U;break;case Hz:b=A(c)}}}return b}; +function Jz(a,b){b=fy(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.gh(b,c+1),0<=e&&(b=b.substr(0,c)+Xy(a,e)+b.substr(c+1+Wy[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=oa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=Qy(a,e))?(d=e+' "'+wy(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=Qy(a,e))?(Ly(a,d), +d=e+' "'+wy(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Gy(iy(this,A(this.H),this.H.Z.U))+" (%"+q(this.H.da)+")");this.za&&a==this.za||(this.za=a,this.ic&-2147483648&&(this.Jb(),a+=" (cpu halted)"),this.P(a),this.H&&(a=this.H,a.zc-=a.A,a.A=0,a.T.Ve=0,Cd(a)))}; +function Wk(a,b,c,d){var e,f;if(!d&&(d=t(a,1)&&0>Kz.indexOf(b),!d)){var g=Lz[b];g&&(d=t(a,g)?!0:524288==g&&t(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Rb[b])&&g[e]||"")&&(g=" "+Jz(a,g)),a.message("INT "+r(b)+": AH="+r(e)+" at "+vy(c-2-a.H.Z.ua,a.H.Z.U)+g));return d} +function Nb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ua),a.message(b.be+"."+(null!=d?"outPort":"inPort")+"("+ta(c)+","+(f?f:"unknown")+(null!=d?","+r(d):"")+")"+(null!=g?": "+r(g):"")+(null!=e?" at "+vy(e,h):""))}l.ih=function(){this.P("Type ? for help with PCx86 Debugger commands");Mz(this);if(this.Ga){var a=this.Ga;this.Ga=null;my(this,a)}}; +function ky(a,b){var c;if(Jg(a)){if(!a.O||!a.O.length){a.O=Array(Nz);for(c=0;c>>f.hb].Gd(e&f.Db,a==this.N);g&&tc(f)}}d&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.Jd=!0):(Uz(this,a,a.length-1,"set"),ky(this)));return d}; +function Fy(a,b,c,d,e){for(var f=!1,g=Vz(a,a.Sb(c)),h=1;h>3&7,E=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=E&&(E=u<<4|g&7);(u=cA[f])&&(v=u[E]);v&&(p=dA,k=v,m=k[0])}m>=p.length&&(g=a.Ia(b,1),k=eA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==fA? +p="CWDE":m==gA?p="CDQ":m>=hA&&m<=iA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Hb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,E=!0,K=1;K<=u;K++){var H,I;H="";I=k[K];if(void 0!==I){0>f&&(f=I>>jA);m==kA&&(f==lA?v="[%800]":f==mA&&(v="ES:["+(b.dc?"E":"")+"DI]"));var T=I&nA;if(T!=oA)if(T==pA)E=!1;else{var L=I&qA;if(L>=R)if(0>g&&(g=a.Ia(b,1)),L>6,za=g&7;if(3>xb){T=!p.indexOf("FI");if(!xb&&(!I.dc&&6==za||I.dc&&5==za))xb=2;else{if(I.dc)if(4!=za)za+= +8;else{var ca=L,cb=xb,Sa=I,rb=ca.Ia(Sa,1),db=rb>>6,rc=rb>>3&7,rb=rb&7,ib="";if(cb||5!=rb)ib=sA[rb+8];4!=rc&&(ib&&(ib+="+"),ib+=sA[rc+8],db&&(ib+="*"+(1<>24),2)):ca+("+"+q(L,2))):2==xb&&(ca&&(ca+="+"),I.dc?(L=Cy(L,I,4),ca+=q(L)):(L=L.Yc(I,2),ca+=q(L,4)));ca="["+ca+"]";if(1==ua){L="";H&=nA;H==S&&(H=I.Hb?tA:U);switch(H){case uA:L="FAR";break;case V:L="BYTE";break;case U:if(T){L="INT16"; +break}L="WORD";break;case tA:L="DWORD";break;case vA:if(T){L="INT32";break}case wA:L="REAL32";break;case xA:if(T){L="INT64";break}case yA:L="REAL64";break;case zA:L="REAL80";break;case AA:L="BCD80"}L&&(ca=L+" "+ca)}}else ca=BA(L,za,H,I);H=ca}else H=L==rA?BA(a,g&7,I,b):BA(a,g>>3&7,I,b);else if(L==CA)H="1";else if(L==W){H=a;T=I;L=b;I=" ";switch(T&nA){case V:T&X&&(I=q(H.Ia(L,1),2));break;case DA:I=q(H.Ia(L,1)<<24>>24,L.Hb?8:4);break;case S:if(L.Hb){I=q(Cy(H,L,4));break}case U:I=q(H.Yc(L,2),4);break; +case uA:L=iy(H,H.jb(L,!0),H.Yc(L,2),null,L.type,L.Hb,L.dc);I=Gy(L);H=EA(H,L);H[0]&&(I+=" ("+H[0]+")");break;default:I="imm("+ta(T)+")"}H=I}else L==FA?(b.dc?(H=8,I=Cy(a,b,4)):(H=4,I=a.Yc(b,2)),H="["+q(I,H)+"]"):L==GA?(H=T==V?a.Ia(b,1)<<24>>24:a.jb(b,!0),I=b.Ja+H&(b.Hb?-1:65535),H=q(I,b.Hb?8:4),I=EA(a,iy(a,I,b.U)),I[0]&&(H+=" ("+I[0]+")")):L==Y?H=T==HA?"ST":T==IA?"ST("+(g&7)+")":BA(a,(I&JA)>>8,I,b):L==KA?H=BA(a,(I&JA)>>8,LA,b):L==MA?H="DS:[SI]":L==NA&&(H="ES:[DI]");if(!H||!H.length){v="INVALID";break}0< +v.length&&(v+=",");v+=H||"???"}}}g="";k=Gy(e)+" ";if(-1!==e.ya&&-1!==b.ya){do if(g+=q(a.Ia(e,1),2),null==e.ya)break;while(e.ya!=b.ya)}k+=Ba(g,e.dc?24:16);k+=Ba(p,8);v&&(k+=" "+v);a.H.cauz||b>=tz&&80386>a.H.ca)return"??";b+=oz}else if(e==QA)b+=Dz;else if(e==RA)b+=SA;else if(e==TA)b+=UA;else if(a=c&nA,a>=U&&(b=fz&&b<=mz&&4a.H.ca&&(d="\n"+d,c+=e,e="");c+="\n"+XA(a,a.H.Z,b)+" ";80386<=a.H.ca&&(e+="\n",c+=XA(a,a.H.Ga,b)+" "+XA(a,a.H.Ha,b)+"\n");c+=YA(a,"LD",a.H.Eb.U,a.H.Eb.ua,a.H.Eb.ua+a.H.Eb.Ka)+" "+YA(a,"GD",null,a.H.Kb,a.H.Pc)+" "+YA(a,"ID", +null,a.H.Pb,a.H.cd)+" ";c=c+(d+" "+e)+WA(a,Dz);80386<=a.H.ca&&(c+=WA(a,Fz)+WA(a,Gz))}else 80386<=a.H.ca&&(c+=XA(a,a.H.Ga,b)+" "+XA(a,a.H.Ha,b)+" ");return c+=WA(a,Iz)+VA(a,"V")+VA(a,"D")+VA(a,"I")+VA(a,"T")+VA(a,"S")+VA(a,"Z")+VA(a,"A")+VA(a,"P")+VA(a,"C")}l.gj=function(a,b){return a[0]>b[0]?1:a[0]>>0,p],H=Ea(E,u,a.gj);0>H&&E.splice(-(H+1),0,u)}K&&(v.a=K.replace(/''/g,'"'))}a.D.push({Rf:b,pn:c,U:d,Ja:e,ya:f,en:g,Fd:h,Pi:m})} -function Dy(a,b,c){for(var d=0;d>>0,f=a.Sb(b)>>>0,g=0;g>>0,p=h.ya;null!=p&&(p>>>=0);var v=h.en;48==k&&(k=40);if(k==b.U&&e>=m&&e=p&&fc?(a.P("out of data at address "+Fy(b)),p=!0):(a.fc(b,c,1,!0),m++)})})(a,g);Cd(a.H, +function Ey(a,b,c){for(var d=0;d>>0,f=a.Sb(b)>>>0,g=0;g>>0,p=h.ya;null!=p&&(p>>>=0);var v=h.en;48==k&&(k=40);if(k==b.U&&e>=m&&e=p&&fc?(a.P("out of data at address "+Gy(b)),p=!0):(a.fc(b,c,1,!0),m++)})})(a,g);Cd(a.H, !0);a.P(m+" bytes read at "+b)}else a.P("sector "+e+" request out of range");else a.P("drive "+d+" not loaded");else a.P("invalid drive: "+d)}else a.P("disk controller not present")}}else a.P("load commands:"),a.P("\tl [address] [drive #] [sector #] [# sectors]")} -function Pz(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump registers"),a.Tc&&a.P("\trfp\tdump floating-point registers"),a.P("\trp\tdump all registers"),a.P("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1f;f++){var g=c,e=null;if(f=a.ta&&(h=null);switch(h){case "AL":a.H.D= +function Qz(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump registers"),a.Tc&&a.P("\trfp\tdump floating-point registers"),a.P("\trp\tdump all registers"),a.P("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1f;f++){var g=c,e=null;if(f=a.ta&&(h=null);switch(h){case "AL":a.H.D= a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":he(a.H, -z(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ne(a.H,g);break;case "ES":oe(a.H,g);break;case "SS":ge(a.H,g);break;case "CS":Zf(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "IP":case "EIP":C(a.H,g);a.K=hy(a,A(a.H),a.H.Z.U);break;case "PC":case "PS":se(a.H,g);break;case "C":g?kg(a.H):lg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g? +z(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ne(a.H,g);break;case "ES":oe(a.H,g);break;case "SS":ge(a.H,g);break;case "CS":Zf(a.H,g);a.K=iy(a,A(a.H),a.H.Z.U);break;case "IP":case "EIP":C(a.H,g);a.K=iy(a,A(a.H),a.H.Z.U);break;case "PC":case "PS":se(a.H,g);break;case "C":g?kg(a.H):lg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g? sg(a.H):qg(a.H);break;case "Z":g?vg(a.H):rg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?mg(a.H):ng(a.H);break;default:var k=!0;if(80286<=a.H.ca)switch(k=!1,h){case "MS":wg(a.H,g);break;case "TR":-1===a.H.la.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.ca)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I= -g;break;case "EDX":a.H.L=g;break;case "ESP":he(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ha.load(g);break;case "CR0":a.H.qa=g;bk.call(a.H,g);break;case "CR2":a.H.Cd=g;break;case "CR3":a.H.Wc=g;ue.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Cd(a.H);a.P("updated registers:")}}a.P(YA(a,d));c&&(a.K=hy(a,A(a.H),a.H.Z.U),Qz(a,Fy(a.K)))}} -function fB(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(Iz(a,c[2])):by(a,b,!1)}function gB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Xz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} +g;break;case "EDX":a.H.L=g;break;case "ESP":he(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ha.load(g);break;case "CR0":a.H.qa=g;bk.call(a.H,g);break;case "CR2":a.H.Cd=g;break;case "CR3":a.H.Wc=g;ue.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Cd(a.H);a.P("updated registers:")}}a.P(ZA(a,d));c&&(a.K=iy(a,A(a.H),a.H.Z.U),Rz(a,Gy(a.K)))}} +function gB(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(Jz(a,c[2])):dy(a,b,!1)}function hB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=Yz(a,b,g,f);b.bh||d||d++;a.P(f);a.K=b;e-=b.ya-k;c++}}} l.Cg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ca(a.substring(d,f))),d=f+1}}return b}; -function Wz(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.da&&(a.P("ended assemble at "+Fy(a.aa)),a.K=a.aa,a.da=!1),b="";else if(!c){var e=">> ";a.H.qa&1&&(e=a.H.O&131072?"-- ":"## ");a.P(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.za=null;if(Ib(a)&&0p||"z">>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= -ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==xt&&(Pg=1E5,rm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= -1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$iAm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0p||"z">>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Vy(nf.Ti,nf.Aj)),ve= +ve+(" %%"+Vy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";eB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var xt=a.Ba[xb];xt?(ca.shift(),ca.shift(),xt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var yt=cb,zt=Sa,At="",Bt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+yt||a.Ya,Pg=+zt||10;isNaN(uc)?uc=Pg:At="more ";uc>jd.length&&(a.P("note: only "+ +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==zt&&(Pg=1E5,rm=["CALL"]);for(void 0!==yt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;Bt++;Pg--}}Bt||(a.P("no "+At+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;bC--&&0Yi?String.fromCharCode(Yi):".";Xi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ht)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Zi= +1,It=255,Jt=a.Ia,Kt=a.fc;"ew"==g[0]&&(Zi=2,It=65535,Jt=a.Yc,Kt=a.il);var Lt=Zi<<1,Mt=g[1];if(null==Mt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var $i=Qy(a,Mt);if($i)for(var aj=2;ajAm;){for(var kd=null,gC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!gC--)break;Xg.U=Ot;if(kd=hB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=hB(a,Xg,!0)){Ot=a.jb(Sd,!0);0\nLicense: GPL version 3 or later ");for(b=0;bDB){if(d.load(this.L)){this.F=new Xf(this,"1.34.2",NB);this.F.load()&&(OB(this,d),a=PB,QB(this.F));this.F.set(KB,Fa());RB(this.F);var e=this.A&&!this.I;if(a==LB||sb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=JB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!= -g?(this.Fa("Error: "+g),"unable to verify user"==g&&(Ta(SB,""),this.B=null)):this.P(f+": "+g),QB(d),d.load()?(c=JB(d),e=!0):c=!1))}e&&HB(this,c?d:null)}else a==PB&&d.clear()}else HB(this);delete this.L;delete this.M}e=tb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.ea.Yb=!0;var d=this.na.power;d&&(d.textContent="Shutdown");this.H&&(TB(this,this.H,b,c,a),this.H.lf());this.Y&&(OB(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0}; -function OB(a,b){if(sb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.2"};d.url=a.da;d.user=c;d.type="bug";d.data=b;La("http://www.pcjs.org/api/v1/report",d,!0)}} -function iB(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Xf(a,"1.34.2"),g=new Xf(a,"1.34.2",IB),h=Fa();g.set(KB,h);f.set(KB,h);f.set(UB,"1.34.2");f.set(VB,window?window.location.href:null);f.set(WB,Na());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=tb(a.id),k=0;k\nLicense: GPL version 3 or later ");for(b=0;bEB){if(d.load(this.L)){this.F=new Xf(this,"1.34.2",OB);this.F.load()&&(PB(this,d),a=QB,RB(this.F));this.F.set(LB,Fa());SB(this.F);var e=this.A&&!this.I;if(a==MB||sb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=KB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!= +g?(this.Fa("Error: "+g),"unable to verify user"==g&&(Ta(TB,""),this.B=null)):this.P(f+": "+g),RB(d),d.load()?(c=KB(d),e=!0):c=!1))}e&&IB(this,c?d:null)}else a==QB&&d.clear()}else IB(this);delete this.L;delete this.M}e=tb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.ea.Yb=!0;var d=this.na.power;d&&(d.textContent="Shutdown");this.H&&(UB(this,this.H,b,c,a),this.H.lf());this.Y&&(PB(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0}; +function PB(a,b){if(sb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.2"};d.url=a.da;d.user=c;d.type="bug";d.data=b;La("http://www.pcjs.org/api/v1/report",d,!0)}} +function jB(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Xf(a,"1.34.2"),g=new Xf(a,"1.34.2",JB),h=Fa();g.set(LB,h);f.set(LB,h);f.set(VB,"1.34.2");f.set(WB,window?window.location.href:null);f.set(XB,Na());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=tb(a.id),k=0;k>>b.A;d=d+e-1>>>b.A;c.ah=0;for(c.Hd=0;f<=d;)e=b.aa[f],c.ah+=e.size,e.size&&(c.Rg.push(Ga(cc,f,0,0,e.type)),c.Hd++),f++;a.A=c;a.da=a.A.Hd*a.ka.B/(bc*lc);d=0;a.A.$i=0;a.A.kf||(a.A.kf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.Nc>1,b.I+=(b.J>>1)-2,ic(b,e),b.Y&&(b.D.restore(),b.Y=!1)}}else ic(a,"This space intentionally left blank");a.context.drawImage(a.K,0,0,a.K.width,a.K.height,a.Ga,a.Ma,a.xa,a.Aa);a.oa=!1}}var NB="failsafe",IB="validate",KB="timestamp",UB="version",VB="url",WB="browser",SB="user",MB=-1,DB=0,LB=1,PB=2,YB=3; -ab(function(){for(var a=Ab(document,"pcx86-machine"),b=0;bf.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>)/,"$1PCx86$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$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+"...");La(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);oC(a,b,c)}})}else c(a,null)} -function pC(a,b,c,d){function e(a){if(void 0===h){var b=g&&Ab(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ya(a))}function f(a){e("Error: "+a);k&&(--lC||jb(!0));k=!1}var g,h,k=!0;lC++;qb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c|| -(c="/versions/pcx86/1.34.2/components.xsl");m=function(d,h){h?mC(c,null,null,!1,e,function(d,k){k?(pb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--lC||jb(!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),--lC||jb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mC(b,a,d,!0,e,m):nC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function qC(a,b,c,d){jb(!1);return pC(a,b,c,d)}window.embedPC=qC;window.embedPCx86=qC;window.findMachineComponent=function(a,b){return vb(b,a+".machine")}; +g),b.D.rotate(-Math.PI/2),c=g=0),h>1,b.I+=(b.J>>1)-2,ic(b,e),b.Y&&(b.D.restore(),b.Y=!1)}}else ic(a,"This space intentionally left blank");a.context.drawImage(a.K,0,0,a.K.width,a.K.height,a.Ga,a.Ma,a.xa,a.Aa);a.oa=!1}}var OB="failsafe",JB="validate",LB="timestamp",VB="version",WB="url",XB="browser",TB="user",NB=-1,EB=0,MB=1,QB=2,ZB=3; +ab(function(){for(var a=Ab(document,"pcx86-machine"),b=0;bf.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>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$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+"...");La(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);pC(a,b,c)}})}else c(a,null)} +function qC(a,b,c,d){function e(a){if(void 0===h){var b=g&&Ab(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ya(a))}function f(a){e("Error: "+a);k&&(--mC||jb(!0));k=!1}var g,h,k=!0;mC++;qb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c|| +(c="/versions/pcx86/1.34.2/components.xsl");m=function(d,h){h?nC(c,null,null,!1,e,function(d,k){k?(pb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--mC||jb(!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),--mC||jb(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?nC(b,a,d,!0,e,m):oC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function rC(a,b,c,d){jb(!1);return qC(a,b,c,d)}window.embedPC=rC;window.embedPCx86=rC;window.findMachineComponent=function(a,b){return vb(b,a+".machine")}; window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Cb[a]){for(var c=!0,d=Cb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=va(m)}else"xsl"==v&&(e=m=va(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, +function sC(a,b,c,d){if(!c&&b){d.push(b);a=qb[d[0]];b=null;for(var e in a)if(xa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?La(b,null,!0,function(a,b){tC(b,d)}):tC(null,d)}else hb("Error ("+c+") requesting "+a)} +function tC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=qb[f],k={},m;for(m in h){var p=h[m],v=wa(m);if("xml"==v){for(v=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=va(m)}else"xsl"==v&&(e=m=va(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, "©"),a=Xa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('
\n')+"...\n",a=a+('