PDP-11 panel switches can now be scripted

This commit is contained in:
Jeff Parsons 2017-02-06 13:07:15 -08:00 committed by Jeff Parsons
commit 2e93b71095
14 changed files with 334 additions and 224 deletions

View file

@ -34,7 +34,7 @@ f.toString=function(){return this.name?this.name:this.id||this.type};
f.T=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.Sa=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.Wa=function(a){this.l(a,this.fb)}),!0;default:return!1}};f.log=function(){};f.l=function(){};
f.status=function(a){this.l(this.fb+": "+a)};f.Wa=function(a,b,c){c=c||this.type;b||y((c?c+": ":"")+a)};function ua(a,b){a.C.error=!0;a.Wa(b)}function G(a,b){b&&(a.C.ready?b():a.eb=b);return a.C.ready}f.X=function(a){this.C.error||(this.C.ready=!1!==a,this.C.ready&&(a=this.eb,this.eb=null,a&&a()))};function H(a,b){a.C.Ga&&(b?a.C.bb=!0:void 0===b&&a.l(a.toString()+" busy"));return a.C.Ga}
function I(a,b){if(a.C.bb)return a.C.Ga=!1,a.C.bb=!1;if(a.C.error)return a.l(a.toString()+" error"),!1;a.C.Ga=b;return a.C.Ga}function J(a,b){if(a.u){a===a.u?b|=0:b=b||a.ma;var c=a.u.ma&b;return!!b&&c===b||!!(c&a.u.Re)}return!1}window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));
var K=window?window.PCjs.Machines:{},B=window?window.PCjs.Components:[],ra=["sleep","wait"],sa={alert:function(a){y(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ta={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
var K=window?window.PCjs.Machines:{},B=window?window.PCjs.Components:[],ra=["hold","sleep","wait"],sa={alert:function(a){y(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ta={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function va(a){A.call(this,"C1PPanel",a);this.C.N=!1}p(va,A);va.prototype.T=function(a,b,c,d){return this.U&&this.U.T(a,b,c,d)||this.s&&this.s.T(a,b,c,d)||this.b&&this.b.T(a,b,c,d)||this.u&&this.u.T(a,b,c,d)?!0:A.prototype.T.call(this,a,b,c,d)};va.prototype.ia=function(a,b){a&&!this.C.N&&(this.C.N=!0,this.U=b,this.s=L(b,"cpu"),this.b=L(b,"keyboard"),this.u=L(b,"debugger"),wa())};
function wa(){for(var a=!1,b=F(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],e=C(d),g=oa(e.id);g||(a=!0,g=new va(e));D(g,d);a&&g.X()}}w(wa);

View file

@ -32,7 +32,7 @@ function ka(a,b,c){for(var d=!0;c<b.length;){var f=b[c],g=f[0],h=null;0<=la.inde
e.toString=function(){return this.name?this.name:this.id||this.type};
e.L=function(a,b,c){switch(b){case "clear":return this.B[b]||(this.B[b]=c,c.onclick=function(a){return function(){a.B.print&&(a.B.print.value="")}}(this)),!0;case "print":return this.B[b]||(this.sa=this.B[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.ta=function(a){this.F(a,this.va)}),!0;default:return!1}};e.log=function(){};e.F=function(){};
e.status=function(a){this.F(this.va+": "+a)};e.ta=function(a,b,c){c=c||this.type;b||z((c?c+": ":"")+a)};function oa(a,b){a.u.error=!0;a.ta(b)}function I(a,b){b&&(a.u.ready?b():a.ua=b);return a.u.ready}e.R=function(a){this.u.error||(this.u.ready=!1!==a,this.u.ready&&(a=this.ua,this.ua=null,a&&a()))};function pa(a,b){if(a.u.wa)return a.u.ra=!1,a.u.wa=!1;if(a.u.error)return a.F(a.toString()+" error"),!1;a.u.ra=b;return a.u.ra}
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var J=window?window.PCjs.Machines:{},D=window?window.PCjs.Components:[],la=["sleep","wait"],ma={alert:function(a){z(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},na={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var J=window?window.PCjs.Machines:{},D=window?window.PCjs.Components:[],la=["hold","sleep","wait"],ma={alert:function(a){z(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},na={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b});function K(a){C.call(this,"C1PPanel",a);this.u.I=!1}p(K,C);
K.prototype.L=function(a,b,c,d){return this.J&&this.J.L(a,b,c,d)||this.G&&this.G.L(a,b,c,d)||this.b&&this.b.L(a,b,c,d)?!0:C.prototype.L.call(this,a,b,c,d)};K.prototype.$=function(a,b){a&&!this.u.I&&(this.u.I=!0,this.J=b,this.G=L(b,"cpu"),this.b=L(b,"keyboard"),qa())};function qa(){for(var a=!1,b=H(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],f=F(d),g=E(f.id);g||(a=!0,g=new K(f));G(g,d);a&&g.R()}}v(qa);

View file

@ -42,7 +42,7 @@ k.toString=function(){return this.name?this.name:this.id||this.type};
k.ca=function(a,b,c){switch(b){case "clear":return this.P[b]||(this.P[b]=c,c.onclick=function(a){return function(){a.P.print&&(a.P.print.value="")}}(this)),!0;case "print":return this.P[b]||(this.ta=this.P[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.aa=function(a){this.i(a,this.cb)}),!0;default:return!1}};k.log=function(){};k.i=function(){};
k.status=function(a){this.i(this.cb+": "+a)};k.aa=function(a,b,c){ha(a,b,c||this.type)};function wa(a,b){a.G.error=!0;a.aa(b)}function xa(a,b){b&&(a.G.ready?b():a.zb=b);return a.G.ready}function ya(a){if(!a.G.error&&(a.G.ready=!0,a.G.ready)){var b=a.zb;a.zb=null;b&&b()}}function Aa(a,b){a.G.mb&&(b?a.G.Ib=!0:void 0===b&&a.i(a.toString()+" busy"));return a.G.mb}function Ca(a,b){if(a.G.Ib)return a.G.mb=!1,a.G.Ib=!1;if(a.G.error)return a.i(a.toString()+" error"),!1;a.G.mb=b;return a.G.mb}
k.va=function(){return this.G.ja=!0};k.ua=function(a,b){b&&(this.G.ja=!1);return!0};function Da(a,b){if(a.K){a===a.K?b|=0:b=b||a.ha;var c=a.K.ha&b;return!!b&&c===b||!!(c&a.K.wd)}return!1}function Ea(a,b){a.K&&Da(a,0)&&a.K.message(b,void 0)}function r(a,b,c,d,e,f,g){a.K&&(!0===g?g=0:null==g&&(g=a.ha),Fa(a.K,a,b,c,d,e,f,g))}window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));
var fa=window?window.PCjs.Machines:{},da=window?window.PCjs.Components:[],sa=["sleep","wait"],ta={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},va={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
var fa=window?window.PCjs.Machines:{},da=window?window.PCjs.Components:[],sa=["hold","sleep","wait"],ta={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},va={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function Ga(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function Ha(a,b,c){var d="";b?11<b&&(b=11):b=a&-16777216?11:a&-65536?8:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function t(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}

View file

@ -41,7 +41,7 @@ function la(a,b,c){for(var d=!0;c<b.length;){var e=b[c],f=e[0],g=null;0<=ma.inde
k.toString=function(){return this.name?this.name:this.id||this.type};
k.S=function(a,b,c){switch(b){case "clear":return this.w[b]||(this.w[b]=c,c.onclick=function(a){return function(){a.w.print&&(a.w.print.value="")}}(this)),!0;case "print":return this.w[b]||(this.pa=this.w[b]=c,c.value="",this.aa=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.G=function(a){this.aa(a,this.Ya)}),!0;default:return!1}};k.log=function(){};k.aa=function(){};
k.status=function(a){this.aa(this.Ya+": "+a)};k.G=function(a,b,c){fa(a,b,c||this.type)};function pa(a,b){b&&(a.i.ready?b():a.eb=b);return a.i.ready}function z(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.eb;a.eb=null;b&&b()}}function qa(a,b){if(a.i.nb)return a.i.ab=!1,a.i.nb=!1;if(a.i.error)return a.aa(a.toString()+" error"),!1;a.i.ab=b;return a.i.ab}k.ca=function(){return this.i.U=!0};k.ba=function(a,b){b&&(this.i.U=!1);return!0};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var ca=window?window.PCjs.Machines:{},r=window?window.PCjs.Components:[],ma=["sleep","wait"],na={alert:function(a){t(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},oa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var ca=window?window.PCjs.Machines:{},r=window?window.PCjs.Components:[],ma=["hold","sleep","wait"],na={alert:function(a){t(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},oa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function ra(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==

View file

@ -73,7 +73,7 @@ l.toString=function(){return this.name?this.name:this.id||this.type};
l.Cb=function(a,b,c){switch(b){case "clear":return this.na[b]||(this.na[b]=c,c.onclick=function(a){return function(){a.na.print&&(a.na.print.value="")}}(this)),!0;case "print":return this.na[b]||(this.Ie=this.na[b]=c,c.value="",this.P=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.Fa=function(a){this.P(a,this.be)}),!0;default:return!1}};l.log=function(){};l.P=function(){};
l.status=function(a){this.P(this.be+": "+a)};l.Fa=function(a,b,c){c=c||this.type;b||Wa((c?c+": ":"")+a)};function vb(a,b){a.ea.error=!0;a.Fa(b)}function wb(a,b){b&&(a.ea.ready?b():a.pg=b);return a.ea.ready}function yb(a,b){a.ea.error||(a.ea.ready=!1!==b,a.ea.ready&&(b=a.pg,a.pg=null,b&&b()))}function zb(a,b){a.ea.pf&&(b?a.ea.$g=!0:void 0===b&&a.P(a.toString()+" busy"));return a.ea.pf}
function Ab(a,b){if(a.ea.$g)return a.ea.pf=!1,a.ea.$g=!1;if(a.ea.error)return a.P(a.toString()+" error"),!1;a.ea.pf=b;return a.ea.pf}l.Xb=function(){return this.ea.Yb=!0};l.Wb=function(a,b){b&&(this.ea.Yb=!1);return!0};function t(a,b){if(a.ba){a===a.ba?b|=0:b=b||a.ic;var c=a.ba.ic&b;return!!b&&c===b||!!(c&a.ba.wl)}return!1}function Bb(a,b,c,d){a.ba&&(!0===c||t(a,c|0))&&a.ba.message(b,d)}function v(a,b,c,d,e,f,g){a.ba&&(!0===g?g=0:null==g&&(g=a.ic),Cb(a.ba,a,b,c,d,e,f,g))}
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var gb=window?window.PCjs.Machines:{},bb=window?window.PCjs.Components:[],sb=["sleep","wait"],tb={alert:function(a){Wa(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ub={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var gb=window?window.PCjs.Machines:{},bb=window?window.PCjs.Components:[],sb=["hold","sleep","wait"],tb={alert:function(a){Wa(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ub={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var Db="undefined"!==typeof ArrayBuffer,Eb={zg:4,wc:5,td:6,Rc:7,Sc:8,Va:9,Tb:11,Ub:12,qe:4,Gj:60,Hj:83,mc:3,Ib:9,Ac:16,yg:1,Lj:19,Nj:28,Pj:16,Oj:21,Mj:37,Jj:2,Ah:9,Kj:5,Ij:33,Ch:10,Bh:8,Df:3,Cf:15,ck:51,dk:1,ek:2,fk:4,bk:32,Dh:15,hk:15,Qa:16,Ra:4,jk:11,ik:18,gk:24,Vb:4,kk:2,Xe:16,lk:17,Ih:18,mk:19,Hh:5,Jh:6,sk:2,rk:8,pk:9,qk:10,nk:10,Kh:10,Lh:10,Rj:80,Tj:144,Qj:86,Sj:154,Vj:101,Xj:165,Uj:107,Wj:171,uk:70,wk:113,tk:76,vk:124,Zj:80,ak:128,Yj:86,$j:134,Ff:3,Ef:16,Qh:10,Ph:8,xk:51,nc:8,yk:17,zk:36,Ic:11,

View file

@ -71,7 +71,7 @@ k.toString=function(){return this.name?this.name:this.id||this.type};
k.wb=function(a,b,c){switch(b){case "clear":return this.ia[b]||(this.ia[b]=c,c.onclick=function(a){return function(){a.ia.print&&(a.ia.print.value="")}}(this)),!0;case "print":return this.ia[b]||(this.Cf=this.ia[b]=c,c.value="",this.lc=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.Aa=function(a){this.lc(a,this.Td)}),!0;default:return!1}};k.log=function(){};k.lc=function(){};
k.status=function(a){this.lc(this.Td+": "+a)};k.Aa=function(a,b,c){c=c||this.type;b||r((c?c+": ":"")+a)};function bb(a,b){a.ca.error=!0;a.Aa(b)}function cb(a,b){b&&(a.ca.ready?b():a.Ff=b);return a.ca.ready}function db(a,b){a.ca.error||(a.ca.ready=!1!==b,a.ca.ready&&(b=a.Ff,a.Ff=null,b&&b()))}function eb(a,b){if(a.ca.lg)return a.ca.wf=!1,a.ca.lg=!1;if(a.ca.error)return a.lc(a.toString()+" error"),!1;a.ca.wf=b;return a.ca.wf}k.Ob=function(){return this.ca.Pb=!0};
k.Nb=function(a,b){b&&(this.ca.Pb=!1);return!0};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));
var Oa=window?window.PCjs.Machines:{},Ma=window?window.PCjs.Components:[],Ya=["sleep","wait"],Za={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ab={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
var Oa=window?window.PCjs.Machines:{},Ma=window?window.PCjs.Components:[],Ya=["hold","sleep","wait"],Za={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ab={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var fb="undefined"!==typeof ArrayBuffer,gb={Pf:4,dc:5,Xc:6,Ac:7,Bc:8,Na:9,Fb:11,Gb:12,Kd:4,Di:60,Ei:83,Xb:3,vb:9,kc:16,Of:1,Ii:19,Ki:28,Mi:16,Li:21,Ji:37,Gi:2,Eg:9,Hi:5,Fi:33,Gg:10,Fg:8,Te:3,Se:15,$i:51,aj:1,bj:2,cj:4,Zi:32,Hg:15,ej:15,Ia:16,Ja:4,gj:11,fj:18,dj:24,Hb:4,hj:2,se:16,ij:17,Mg:18,jj:19,Lg:5,Ng:6,oj:2,nj:8,lj:9,mj:10,kj:10,Og:10,Pg:10,Oi:80,Qi:144,Ni:86,Pi:154,Si:101,Ui:165,Ri:107,Ti:171,qj:70,sj:113,pj:76,rj:124,Wi:80,Yi:128,Vi:86,Xi:134,Ve:3,Ue:16,Ug:10,Tg:8,tj:51,Yb:8,uj:17,vj:36,qc:11,
wj:16,Ld:10,Gc:2,Bg:18,Cg:7,Dg:15,Ig:12,Jg:7,Kg:11,Qg:18,Rg:7,Sg:15,Vg:15,Wg:7,Xg:13,ah:11,bh:7,dh:8,xj:8,Aj:12,yj:18,zj:17,Bj:15,Zg:8,Yg:20,$g:2,gh:3,We:9,fh:5,eh:11,ih:4,hh:17,Cj:11},hb={Pf:0,dc:0,Xc:0,Ac:0,Bc:0,Na:0,Fb:1,Gb:1,Kd:3,Di:14,Ei:16,Xb:2,vb:7,kc:7,Of:0,Ii:7,Ki:13,Mi:7,Li:11,Ji:16,Gi:3,Eg:6,Hi:2,Fi:13,Gg:5,Fg:5,Te:2,Se:7,$i:23,aj:0,bj:1,cj:3,Zi:17,Hg:7,ej:11,Ia:7,Ja:3,gj:7,fj:11,dj:15,Hb:2,hj:3,se:7,ij:8,Mg:8,jj:8,Lg:4,Ng:4,oj:2,nj:3,lj:5,mj:2,kj:3,Og:5,Pg:3,Oi:14,Qi:22,Ni:17,Pi:25,Si:17,

View file

@ -7,7 +7,6 @@
http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2017
@ -24,6 +23,7 @@
http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2017
@ -38,8 +38,8 @@ var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:functi
function fa(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ga(this)}});fa=function(){}}function ga(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){fa();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}function ia(a){fa();ca();fa();var b=a[Symbol.iterator];return b?b.call(a):ga(a)}
function p(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 ja(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}
ja("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}});ja("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c<d;c++)this[c]=a;return this}});
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={wi:0,Fe:1,Di:2,Ei:3,Fi:4,Gi:5,Hi:6,Ii:7,Md:8,Ji:9,Ge:10,Ki:11,Li:12,He:13,Mi:14,Ni:15,Oi:16,Pi:17,Qi:18,Ri:19,Si:20,Ti:21,Ui:22,Vi:23,Wi:24,Xi:25,Yi: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,Id:65,si:66,yi:67,Zi:68,E:69,ej:70,hj:71,tj:72,vj:73,wj:74,xj:75,yj:76,Bj:77,Dj:78,Jj:79,Mj:80,Q:81,Oj:82,Rj:83,$j:84,bk:85,dk:86,ek:87,ik:88,jk:89,xf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,kk:97,lk:98,pk:99,d:100,e:101,qk:102,rk:103,sk:104,tk:105,xk:106,k:107,yk:108,zk:109,n:110,Ak:111,p:112,q:113,r:114,Bk:115,t:116,Ek:117,Fk:118,Gk:119,x:120,
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={zi:0,Fe:1,Gi:2,Hi:3,Ii:4,Ji:5,Ki:6,Li:7,Md:8,Mi:9,Ge:10,Ni:11,Oi:12,He:13,Pi:14,Qi:15,Ri:16,Si:17,Ti:18,Ui:19,Vi:20,Wi:21,Xi:22,Yi:23,Zi:24,$i:25,aj: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,Id:65,vi:66,Bi:67,bj:68,E:69,hj:70,kj:71,wj:72,yj:73,zj:74,Aj:75,Bj:76,Ej:77,Gj:78,Mj:79,Pj:80,Q:81,Rj:82,Uj:83,ck:84,ek:85,gk:86,hk:87,lk:88,mk:89,xf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,nk:97,pk:98,sk:99,d:100,e:101,tk:102,uk:103,vk:104,wk:105,Ak:106,k:107,Bk:108,Ck:109,n:110,Dk:111,p:112,q:113,r:114,Ek:115,t:116,Hk:117,Ik:118,Jk:119,x:120,
y:121,z:122,"{":123,"|":124,"}":125,"~":126,cc:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Vd=b.comment;this.vf=b;this.exports={};this.H=this.bindings={};a=this.id.indexOf(".");0>a?this.Mb=this.id:(this.wb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,gb:!1,wd:!1,aa:!1,error:!1};this.Nc=null;this.A.error=!1;this.ha=c||0;this.F=this.f=this.D=this.J=this.Ta=null;ma.push(this)}function oa(a,b,c){pa[a]&&b&&(pa[a][b]=c)}
function qa(){return Date.now()||+new Date}function v(a){window&&window.alert(a)}function ra(a){var b=!1;window&&(b=window.confirm(a));return b}function ta(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<ma.length;b++){var d=ma[b];a&&d.id.indexOf(a)||c.push(d)}return c}function ua(a){if(void 0!==a){var b;for(b=0;b<ma.length;b++)if(ma[b].id===a)return ma[b]}return null}
function va(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<ma.length;d++)if(c)c==ma[d]&&(c=null);else if(!(a!=ma[d].type||b&&ma[d].id.indexOf(b)))return ma[d]}return null}function wa(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){v(c.message+" ("+a+")")}return b}
@ -50,7 +50,7 @@ h.toString=function(){return this.name?this.name:this.id||this.type};
h.va=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.Ta=this.H[b]=c,c.value="",this.v=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.T=function(a){this.v(a,this.Mb)}),!0;default:return!1}};h.log=function(){};h.v=function(){};
h.status=function(a){this.v(this.Mb+": "+a)};h.T=function(a,b,c){c=c||this.type;b||v((c?c+": ":"")+a)};function Da(a,b){a.A.error=!0;a.T(b)}function Ea(a){return a.A.error?(a.v(a.toString()+" error"),!0):!1}function Fa(a,b){b&&(a.A.ready?b():a.Nc=b);return a.A.ready}function y(a,b){a.A.error||(a.A.ready=!1!==b,a.A.ready&&(b=a.Nc,a.Nc=null,b&&b()))}function Ga(a,b){a.A.gb&&(b?a.A.wd=!0:void 0===b&&a.v(a.toString()+" busy"));return a.A.gb}
function Ha(a,b){if(a.A.wd)return a.A.gb=!1,a.A.wd=!1;if(a.A.error)return a.v(a.toString()+" error"),!1;a.A.gb=b;return a.A.gb}h.Da=function(){return this.A.aa=!0};h.Ca=function(a,b){b&&(this.A.aa=!1);return!0};function z(a,b){if(a.F){a===a.F?b|=0:b=b||a.ha;var c=a.F.ha&b;return!!b&&c===b||!!(c&a.F.je)}return!1}function C(a,b,c,d){a.F&&(!0===c||z(a,c|0))&&a.F.message(b,d)}
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var pa=window?window.PCjs.Machines:{},ma=window?window.PCjs.Components:[],za=["sleep","wait"],Aa={alert:function(a){v(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Ba={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var pa=window?window.PCjs.Machines:{},ma=window?window.PCjs.Components:[],za=["hold","sleep","wait"],Aa={alert:function(a){v(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Ba={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function Ja(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
@ -68,26 +68,26 @@ function gb(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return
function ib(a){if(!mb){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}mb=c}return mb[a]}function nb(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
function ob(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}function pb(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function qb(a){rb.init.push(a)}
function sb(a){if(tb)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){v(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function ub(a){!tb&&a?(tb=!0,wb&&Cb("init"),Db&&Cb("show")):tb=a}function Cb(a){rb[a]&&sb(rb[a])}var mb=null,rb={init:[],show:[],exit:[]},wb=!1,Db=!1,tb=!0,eb=null;pb("onload",function(){wb=!0;sb(rb.init)});pb("onpageshow",function(){Db=!0;sb(rb.show)});pb(hb("Opera")||hb("iOS")?"onunload":"onbeforeunload",function(){sb(rb.exit)});
var Eb="undefined"!==typeof ArrayBuffer,w="pdp11",Fb="PDPjs",Gb=!1,Hb=Eb,Ib=!0,Jb=!0,Kb="UNKNOWN PANIC ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Lb={qd:5,ud:144,Zc:8,Hc:{pf:15,Sj:16,hk:32,Zd:64,Fa:128,ce:256,Wj:512,cj:1024,Gc:2048,bj:4096,kd:57344,ma:{kd:13}},bf:{fe:1,Ci:2,qf:3,Kb:28,Fc:32,Ec:64,Td:128,ak:256,Ie:512,ec:1024,Nj:2048,be:4096,fk:8192,Lj:16384,Je:32768,ed:32736},$e:{dc:1,wa:14,Jb:48,Ib:64,$a:128,Zj:256,dj:512,fj:1024,Qe:2048,sd:8192,ed:16384,jb:32768,Kb:4608,
fc:61438,Sa:3967,ma:{wa:1,Jb:4}},af:{rd:15,hd:16,bc:8160,tb:57344,ma:{hd:4,bc:5,tb:13}},wa:{Ee:0,hc:2,ub:4,vd:6,Kc:8,Ue:10,Ke:12,gk:14}},Mb={qd:5,ud:112,Zc:4,Te:"DY",gf:{Fa:1,wa:14,Za:48,Ib:64,$a:128,tb:768,Pd:15360,aj:16384,jb:32768,zi:16254,Vj:128,fc:65535,Sa:1022,ma:{wa:1,Za:4,tb:8}},ef:{Sa:65534},hf:{rf:1,sf:4,tf:16,Tj:65408,$d:63,Jc:64,gc:65408,Me:3,mj:8,ma:{Jc:6,gc:7}},Ic:{Pe:{zj:0,Yj:1,xi:2,Aj:3,Kc:4,Re:5,ck:6,Xj:7},Qd:8,Oe:16,jj:32,lj:64,Ne:128,kj:256,pj:512,rj:1024,oj:2048,nj:4096,sj:8192,
ij:16384,qj:32768},ff:{bb:63},Pd:{Kj:1024,$i:2048,fe:2048,uj:3072,Ie:4096,ab:5120,ec:8192,Cj:9216},wa:{Ej:0,vd:2,uf:4,Kc:6,Ye:8,wf:10,Ve:12,Pj:14}},Nb={qd:5,ud:180,Zc:2,Te:"DX",kf:{dc:1,wa:14,td:16,DONE:32,Ib:64,fb:128,INIT:16384,jb:32768,Kb:16128,fc:32992,Sa:16479},Qj:{},nf:{bb:127},mf:{bb:31},lf:{Ld:1,Wd:2,kd:4,cc:64,Fa:128},wa:{bd:0,EMPTY:2,hc:4,ub:6,Kb:8,Xe:10,Lc:12,We:14},ERROR:{fd:8,gd:16,ti:24,Se:32,gj:40,Uj:48,pd:56,Ij:72,Hj:80,Gj:88,Bi:96,vi:104,Fj:112,od:120,Ai:128,ui:136}},Ob={48:"DL11R",
var Eb="undefined"!==typeof ArrayBuffer,w="pdp11",Fb="PDPjs",Gb=!1,Hb=Eb,Ib=!0,Jb=!0,Kb="UNKNOWN PANIC ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Lb={qd:5,ud:144,Zc:8,Hc:{pf:15,Vj:16,kk:32,Zd:64,Fa:128,ce:256,Zj:512,fj:1024,Gc:2048,ej:4096,kd:57344,ma:{kd:13}},bf:{fe:1,Fi:2,qf:3,Kb:28,Fc:32,Ec:64,Td:128,dk:256,Ie:512,ec:1024,Qj:2048,be:4096,ik:8192,Oj:16384,Je:32768,ed:32736},$e:{dc:1,wa:14,Jb:48,Ib:64,$a:128,bk:256,gj:512,ij:1024,Qe:2048,sd:8192,ed:16384,jb:32768,Kb:4608,
fc:61438,Sa:3967,ma:{wa:1,Jb:4}},af:{rd:15,hd:16,bc:8160,tb:57344,ma:{hd:4,bc:5,tb:13}},wa:{Ee:0,hc:2,ub:4,vd:6,Kc:8,Ue:10,Ke:12,jk:14}},Mb={qd:5,ud:112,Zc:4,Te:"DY",gf:{Fa:1,wa:14,Za:48,Ib:64,$a:128,tb:768,Pd:15360,dj:16384,jb:32768,Ci:16254,Yj:128,fc:65535,Sa:1022,ma:{wa:1,Za:4,tb:8}},ef:{Sa:65534},hf:{rf:1,sf:4,tf:16,Wj:65408,$d:63,Jc:64,gc:65408,Me:3,pj:8,ma:{Jc:6,gc:7}},Ic:{Pe:{Cj:0,ak:1,Ai:2,Dj:3,Kc:4,Re:5,fk:6,$j:7},Qd:8,Oe:16,mj:32,oj:64,Ne:128,nj:256,sj:512,uj:1024,rj:2048,qj:4096,vj:8192,
lj:16384,tj:32768},ff:{bb:63},Pd:{Nj:1024,cj:2048,fe:2048,xj:3072,Ie:4096,ab:5120,ec:8192,Fj:9216},wa:{Hj:0,vd:2,uf:4,Kc:6,Ye:8,wf:10,Ve:12,Sj:14}},Nb={qd:5,ud:180,Zc:2,Te:"DX",kf:{dc:1,wa:14,td:16,DONE:32,Ib:64,fb:128,INIT:16384,jb:32768,Kb:16128,fc:32992,Sa:16479},Tj:{},nf:{bb:127},mf:{bb:31},lf:{Ld:1,Wd:2,kd:4,cc:64,Fa:128},wa:{bd:0,EMPTY:2,hc:4,ub:6,Kb:8,Xe:10,Lc:12,We:14},ERROR:{fd:8,gd:16,wi:24,Se:32,jj:40,Xj:48,pd:56,Lj:72,Kj:80,Jj:88,Ei:96,yi:104,Ij:112,od:120,Di:128,xi:136}},Ob={48:"DL11R",
52:"DL11X",56:"PC11R",60:"PC11X",64:"KW11",112:"RL11",144:"RK11",180:"RX11"};Nb.jf=["DX",77,1,26,128,1,0,0,128,0];Lb.Gc=["RK",203,2,12,512,0,0,0,512,Lb.Hc.Gc|Lb.Hc.ce|Lb.Hc.Zd];Mb.cf=["RL",512,2,40,256,0,0,0,256,Mb.Ic.Pe.Re|Mb.Ic.Qd|Mb.Ic.Oe];
var w="pdp11",Fb="PDPjs",Gb=!1,Hb=Eb,Jb=Ib=!0,Pb={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,rx11:262144,dl11:1048576,serial:1048576,kw11:2097152,timer:2097152,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
function Qb(a,b){r.call(this,"Panel",a,512);this.j=this.u=0;this.M=b;this.fa=this.g=this.Xa=this.Wa=0;this.B=this.C=-1;this.G=this.I=this.w=!1;this.L=Rb;this.i={};this.b={START:[1,1,!0,!1,this.Rf],STEP:[1,1,!1,!1,this.Sf],ENABLE:[1,1,!1,!1,this.Nf],CONT:[1,1,!0,!1,this.Lf],DEP:[0,0,!0,!1,this.Mf],EXAM:[1,1,!0,!1,this.Of],LOAD:[1,1,!0,!1,this.Qf],TEST:[0,0,!0,!1,this.Pf]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Tf,a];this.F=this.f=this.D=this.J=null;y(this)}p(Qb,r);h=Qb.prototype;
h.reset=function(a){this.stop();a&&Sb(this,this.Wa=0)};
function Qb(a,b){r.call(this,"Panel",a,512);this.j=this.u=0;this.M=b;this.fa=this.g=this.Xa=this.Wa=0;this.B=this.C=-1;this.G=this.I=this.w=!1;this.L=Rb;this.i={};this.b={START:[1,1,!0,!1,this.Sf],STEP:[1,1,!1,!1,this.Tf],ENABLE:[1,1,!1,!1,this.Of],CONT:[1,1,!0,!1,this.Mf],DEP:[0,0,!0,!1,this.Nf],EXAM:[1,1,!0,!1,this.Pf],LOAD:[1,1,!0,!1,this.Rf],TEST:[0,0,!0,!1,this.Qf]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Uf,a];this.F=this.f=this.D=this.J=null;this.exports={hold:this.Hf,toggle:this.kh,
reset:this.gh};y(this)}p(Qb,r);h=Qb.prototype;h.reset=function(a){this.stop();a&&Sb(this,this.Wa=0)};
h.va=function(a,b,c,d){if(this.J&&this.J.va(a,b,c,d)||this.f&&this.f.va(a,b,c,d)||this.F&&this.F.va(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.H[b]=c,this.u++,!0;default:return"led"==a||"rled"==a?(this.H[b]=c,this.i[b]=d?1:0,this.u++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.H[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
b){return function(){Tb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ub(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Tb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ub(a,b)}}(this,b),!0):r.prototype.va.call(this,a,b,c,d)}};h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;Vb(b,this,Wb);Xb(b,this.reset.bind(this));Yb(this);ec(this)};
h.Da=function(a,b){if(!b)if(this.M&&fc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,[this.fa,this.Wa,this.Xa]);return a.data()};h.restore=function(a){if(a=a[0])gc(this,this.fa=a[0]),Sb(this,this.Wa=a[1]),hc(this,a[2]);return!0};function ic(a,b,c){if(a=a.H[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Yb(a,b){for(var c in a.i)ic(a,c,null!=b?b:a.i[c])}
function jc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ec(a){for(var b in a.b)jc(a,b,a.b[b][1])}function kc(a,b,c,d){if(a.H[b]){var e=a.F&&a.F.Ba||8;c=c||0;c=8==e?E(c,d):F(c,d);a.H[b].textContent!=c&&(a.H[b].textContent=c)}}function Tb(a,b){var c=a.b[b];jc(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=lc&&(a.G=b==mc,a.I=b==nc)}
function Ub(a,b){var c=a.b[b];c[2]&&c[3]&&(jc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rf=function(a){a||this.f.A.V||(a=this.f,a.D.reset(),oc(a),this.b[pc]&&this.b[pc][1]&&qc(this.f))};h.Sf=function(){};h.Nf=function(a){a||this.f.ba()};
h.Lf=function(a){if(!a&&!this.f.A.V)if(this.b[pc]&&this.b[pc][1])qc(this.f);else{if((a=this.F)&&!Ga(a,!0))Ha(a,!0),rc(a,0,null),Ha(a,!1);else try{var b=this.f.Cc(1);0<b&&(sc(this.f,b),tc(this.f,b,!0),uc(this.f,b))}catch(c){"number"!=typeof c&&Da(this.f,c.stack||c.message)}this.stop();this.J&&H(this.J)}};h.Mf=function(a){if(a&&!this.f.A.V)if(this.G&&vc(this),a=Sb(this,this.Xa),this.L==Rb)wc(this.D,this.fa,a);else{var b=this.f,c=this.fa;b.pa++;b.D.ac(xc(b,c,4),a);b.pa--}};
h.Of=function(a){a||this.f.A.V||(this.I&&vc(this),a=this.L==Rb?yc(this.D,this.fa):zc(this.f,this.fa),Sb(this,a))};h.Qf=function(a){a||this.f.A.V||gc(this,this.Xa)};h.Pf=function(a){a?(this.w=!0,Yb(this,!0)):(this.w=!1,Yb(this),hc(this,0))};h.Tf=function(a,b){this.Xa=a?this.Xa|1<<b:this.Xa&~(1<<b)};function vc(a){var b=1140>=a.f.ka?8:16,c=65472<=a.fa&&a.fa<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[lc]&&a.b[lc][1]||(b=-b);gc(a,a.fa&~c|a.fa+b&c)}
h.Da=function(a,b){if(!b)if(this.M&&fc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,[this.fa,this.Wa,this.Xa]);return a.data()};h.restore=function(a){if(a=a[0])gc(this,this.fa=a[0]),Sb(this,this.Wa=a[1]),hc(this,a[2]);return!0};h.gh=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}ec(this);return!0};function ic(a,b,c){if(a=a.H[b])a.style.backgroundColor=c?"#ff0000":"#000000"}
function Yb(a,b){for(var c in a.i)ic(a,c,null!=b?b:a.i[c])}function jc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ec(a){for(var b in a.b)jc(a,b,a.b[b][1])}function kc(a,b,c,d){if(a.H[b]){var e=a.F&&a.F.Ba||8;c=c||0;c=8==e?E(c,d):F(c,d);a.H[b].textContent!=c&&(a.H[b].textContent=c)}}h.Hf=function(a,b,c){if(Tb(this,b)){if(c){var d=this;setTimeout(function(){Ub(d,b);a&&a()},+c);return!1}Ub(this,b)}return!0};
h.kh=function(a){return Tb(this,a)?(Ub(this,a),!0):!1};function Tb(a,b){var c=a.b[b];return c?(jc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=lc&&(a.G=b==mc,a.I=b==nc),!0):!1}function Ub(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(jc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}h.Sf=function(a){a||this.f.A.V||(a=this.f,a.D.reset(),oc(a),this.b[pc]&&this.b[pc][1]&&qc(this.f))};h.Tf=function(){};h.Of=function(a){a||this.f.ba()};
h.Mf=function(a){if(!a&&!this.f.A.V)if(this.b[pc]&&this.b[pc][1])qc(this.f);else{if((a=this.F)&&!Ga(a,!0))Ha(a,!0),rc(a,0,null),Ha(a,!1);else try{var b=this.f.Cc(1);0<b&&(sc(this.f,b),tc(this.f,b,!0),uc(this.f,b))}catch(c){"number"!=typeof c&&Da(this.f,c.stack||c.message)}this.stop();this.J&&H(this.J)}};h.Nf=function(a){if(a&&!this.f.A.V)if(this.G&&vc(this),a=Sb(this,this.Xa),this.L==Rb)wc(this.D,this.fa,a);else{var b=this.f,c=this.fa;b.pa++;b.D.ac(xc(b,c,4),a);b.pa--}};
h.Pf=function(a){a||this.f.A.V||(this.I&&vc(this),a=this.L==Rb?yc(this.D,this.fa):zc(this.f,this.fa),Sb(this,a))};h.Rf=function(a){a||this.f.A.V||gc(this,this.Xa)};h.Qf=function(a){a?(this.w=!0,Yb(this,!0)):(this.w=!1,Yb(this),hc(this,0))};h.Uf=function(a,b){this.Xa=a?this.Xa|1<<b:this.Xa&~(1<<b)};function vc(a){var b=1140>=a.f.ka?8:16,c=65472<=a.fa&&a.fa<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[lc]&&a.b[lc][1]||(b=-b);gc(a,a.fa&~c|a.fa+b&c)}
function gc(a,b){a.fa=b&a.D.I;if(a.B!==a.fa){a.B=a.fa;b=a.B;for(var c=0;22>c;c++)Ac(a,"A"+c,b&1<<c)}}function Sb(a,b){a.g=b&65535;if(a.C!==a.g){a.C=a.g;b=a.C;for(var c=0;16>c;c++)Ac(a,"D"+c,b&1<<c)}return a.g}function Ac(a,b,c){a.i[b]=c;a.w||ic(a,b,c)}function Bc(a){return void 0!==a.H[Cc]}function hc(a,b){if(Bc(a)){a.Xa=b;for(var c=0;22>c;c++)a.b["S"+c][1]=b&1<<c?1:0;ec(a)}}h.stop=function(){gc(this,this.f.g[7])};h.Fd=function(a){this.fa=a};h.setData=function(a,b){b?this.Wa=a:this.g=a};
h.Yf=function(a,b){return(b?this.Wa:this.Xa)&65535};h.nh=function(a){this.Wa=a};function fc(){for(var a=x(document,w,"panel"),b=0;b<a.length;b++){var c=a[b],d=wa(c),e=ua(d.id);e||(e=new Qb(d,!0));xa(e,c)}}var Rb=7,Cc="S0",mc="DEP",pc="ENABLE",nc="EXAM",lc="STEP",Dc={},Wb=(Dc[65400]=[null,null,Qb.prototype.Yf,Qb.prototype.nh,"CNSW"],Dc);qb(fc);
function Ec(a,b,c){r.call(this,"Bus",a,16);this.f=b;this.F=c;this.U=+a.busWidth||16;this.M=1<<this.U;this.I=this.M-1;this.j=Fc;this.g=Math.log2(this.j);this.R=this.j>>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.yf=[Gc,Hc,Ic,Jc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Vc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b<this.G;b++)this.b[b]=this.u[b]=a;this.B=this.M-Fc;Wc(this,this.B,Fc,Xc,this);this.P=
h.Zf=function(a,b){return(b?this.Wa:this.Xa)&65535};h.qh=function(a){this.Wa=a};function fc(){for(var a=x(document,w,"panel"),b=0;b<a.length;b++){var c=a[b],d=wa(c),e=ua(d.id);e||(e=new Qb(d,!0));xa(e,c)}}var Rb=7,Cc="S0",mc="DEP",pc="ENABLE",nc="EXAM",lc="STEP",Dc={},Wb=(Dc[65400]=[null,null,Qb.prototype.Zf,Qb.prototype.qh,"CNSW"],Dc);qb(fc);
function Ec(a,b,c){r.call(this,"Bus",a,16);this.f=b;this.F=c;this.U=+a.busWidth||16;this.M=1<<this.U;this.I=this.M-1;this.j=Fc;this.g=Math.log2(this.j);this.R=this.j>>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.yf=[Gc,Hc,Ic,Jc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Kc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b<this.G;b++)this.b[b]=this.u[b]=a;this.B=this.M-Fc;Wc(this,this.B,Fc,Xc,this);this.P=
this.O=(this.B&this.I)>>>this.g;this.L=0;this.w=this.I;y(this)}p(Ec,r);function Yc(a,b){if(b!=a.L){for(var c=0;c<a.G;c++)a.u[c]=a.b[c];a.L=0;a.w=a.I;b&&(a.L=b,b=1<<b,a.w=b-1,b-=Fc,a.P=(b&a.w)>>>a.g,a.u[a.P]=a.b[a.O])}}h=Ec.prototype;h.reset=function(){for(var a=0;a<this.N.length;a++)this.N[a]();Yc(this,16)};h.Da=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,Zc(this));return a.data()};
h.restore=function(a){a:{a=a[0];var b;for(b=0;b<a.length-1;b+=2){var c=a[b],d=a[b+1];if(d&&d.length<this.R){for(var e=0,f=Array(this.R),g=0;g<d.length-1;)for(var k=d[g++],l=d[g++];k--;)f[e++]=l;d=f}e=this.b[c];if(!e||!e.restore(d)){v("Unable to restore memory block "+c);a=!1;break a}}a=!0}return a};
function Wc(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.g;0<g&&k<a.b.length;){var l=a.b[k],m=k*a.j,n=a.j-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.K)return l.Xb+=l.K-f,l.K=f,!0;if(f>=l.K+l.Xb){n=l.size-(f-m);n>g&&(n=g);l.Xb=f-l.K+n;f=m+a.j;g-=n;k++;continue}}return $c(ad,f,g)}f=new I(a,f,n,a.j,d,e);Vc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+bd[d]+" at "+E(b)),!0):$c(cd,b,c)}h.Jd=function(a){return this.u[(a&this.w)>>>this.g].Eb(a&this.i,a)};
function Wc(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.g;0<g&&k<a.b.length;){var l=a.b[k],m=k*a.j,n=a.j-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.K)return l.Xb+=l.K-f,l.K=f,!0;if(f>=l.K+l.Xb){n=l.size-(f-m);n>g&&(n=g);l.Xb=f-l.K+n;f=m+a.j;g-=n;k++;continue}}return $c(ad,f,g)}f=new I(a,f,n,a.j,d,e);Kc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+bd[d]+" at "+E(b)),!0):$c(cd,b,c)}h.Jd=function(a){return this.u[(a&this.w)>>>this.g].Eb(a&this.i,a)};
h.Bc=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Jb||b!=this.i?this.u[c].oa(b,a):this.u[c++].Eb(b,a)|this.u[c&this.S].Eb(0,a+1)<<8};h.Kd=function(a,b){this.u[(a&this.w)>>>this.g].Gb(a&this.i,b,a)};h.ac=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Jb||c!=this.i?this.u[d].Hb(c,b,a):(this.u[d++].Gb(c,b&255,a),this.u[d&this.S].Gb(0,b>>8&255,a+1))};function dd(a,b){return a.b[(b&a.I)>>>a.g]}
function yc(a,b){var c;a.C=!1;a.na++;var d=b&a.i,e=dd(a,b);Jb||d!=a.i?c=e.B(d,b):c=e.J(d,b)|dd(a,b+1).J(0,b+1)<<8;a.na--;return c}function ed(a,b,c){a.C=!1;a.na++;dd(a,b).F(b&a.i,c&255,b);a.na--}function wc(a,b,c){a.C=!1;a.na++;var d=b&a.i,e=dd(a,b);Jb||d!=a.i?e.C(d,c&65535,b):(e.F(d,c&255,b),dd(a,b+1).F(0,c>>8&255,b+1));a.na--}
function Zc(a){for(var b=0,c=[],d=0;d<a.G;d++){var e=a.b[d];if(e.hb||e.Ff){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[k++]=n-g;l[k++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function fd(a){for(var b=gd,c=0,d=0;d<a.b.length;d++){var e=a.b[d];e.type==b&&(c=e.K+e.Xb)}return c}
@ -100,47 +100,47 @@ b),!0,!e.na))}function Ic(a,b){var c=-1,d=this.controller;a=d.Pa[a];var e=b&6553
function Jc(a,b,c){var d=!1,e=this.controller;a=e.Pa[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.f&&z(this.f,16|a[5])&&C(this.f,a[4]+".writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0,!e.na):(e.Na(c,16,4),this.f&&z(this.f,16)&&C(this.f,"warning: unconverted write access to word @"+K(this.f,c)+": "+K(this.f,b),!0,!e.na))}function L(a){r.call(this,"Device",a,256);this.b={ib:128,Gd:-1}}p(L,r);h=L.prototype;
h.Aa=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.F=d;var e=this;this.b.Gd=kd(c,function(){e.b.ib|=128;e.b.ib&64&&ld(e.f,e.b.Qa);e.J&&H(e.J,1);md(e.f,e.b.Gd,1E3/60)});this.b.Qa=nd(c,64,6,2097152);Vb(b,this,od);Xb(b,this.reset.bind(this));d&&pd(d,64,function(a){var b=e.f;qd(e,"KIPDR",b.B[0],0,a[0]);qd(e,"KDPDR",b.B[0],8,a[0]);qd(e,"KIPAR",b.M[0],0,a[0]);qd(e,"KDPAR",b.M[0],8,a[0],!0);qd(e,"SIPDR",b.B[1],0,a[0]);qd(e,"SDPDR",b.B[1],8,a[0]);qd(e,"SIPAR",b.M[1],0,a[0]);qd(e,"SDPAR",b.M[1],8,a[0],
!0);qd(e,"UIPDR",b.B[3],0,a[0]);qd(e,"UDPDR",b.B[3],8,a[0]);qd(e,"UIPAR",b.M[3],0,a[0]);qd(e,"UDPAR",b.M[3],8,a[0],!0);b.U&32&&qd(e,"UNIMAP",b.Ha,-1,a[0])});y(this)};function qd(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n<e;n++)n%m||(g&&(g+="\n"),g+=b+(k?"["+La(n)+"]":"")+":"),g+=" "+K(a,c[d+n],l);a.v(g+(f?"\n":""))}}h.Da=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};
h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.b.ib=128;md(this.f,this.b.Gd,1E3/60,!0)};h.save=function(){var a=new G(this);a.set(0,[this.b.ib]);return a.data()};h.restore=function(a){a=ia(a[0]);this.b.ib=a.next().value;return!0};h.eg=function(){return this.b.ib};h.uh=function(a){this.b.ib=a&192;this.b.ib&64||rd(this.f,this.b.Qa)};h.gg=function(){return sd(this.f)};h.wh=function(a){td(this.f,a&-129|this.f.S&128)};h.hg=function(){return ud(this.f)};h.ig=function(){return vd(this.f)};
h.jg=function(){return this.f.U};h.xh=function(a){wd(this.f,a)};h.Vg=function(a){a=a>>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.ii=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Og=function(a){return this.f.B[1][a>>1&7]};h.bi=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Mg=function(a){return this.f.B[1][(a>>1&7)+8]};h.$h=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Ng=function(a){return this.f.M[1][a>>1&7]};
h.ai=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Lg=function(a){return this.f.M[1][(a>>1&7)+8]};h.Zh=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.dg=function(a){return this.f.B[0][a>>1&7]};h.th=function(a,b){this.f.B[0][b>>1&7]=a&65295};h.bg=function(a){return this.f.B[0][(a>>1&7)+8]};h.rh=function(a,b){this.f.B[0][(b>>1&7)+8]=a&65295};h.cg=function(a){return this.f.M[0][a>>1&7]};h.sh=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.B[0][b]&=65295};
h.ag=function(a){return this.f.M[0][(a>>1&7)+8]};h.qh=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.B[0][b]&=65295};h.Ug=function(a){return this.f.B[3][a>>1&7]};h.hi=function(a,b){this.f.B[3][b>>1&7]=a&65295};h.Sg=function(a){return this.f.B[3][(a>>1&7)+8]};h.fi=function(a,b){this.f.B[3][(b>>1&7)+8]=a&65295};h.Tg=function(a){return this.f.M[3][a>>1&7]};h.gi=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Rg=function(a){return this.f.M[3][(a>>1&7)+8]};
h.ei=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a};h.qg=function(){return this.f.w&49152?this.f.W[0]:this.f.g[6]};h.Eh=function(a){this.f.w&49152?this.f.W[0]=a:this.f.g[6]=a};h.tg=function(){return this.f.g[7]};h.Hh=function(a){this.f.g[7]=a};h.Wb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]};
h.$b=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.rg=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[1]};h.Fh=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[1]=a};h.sg=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[3]};h.Gh=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[3]=a};h.$f=function(a){return this.f.xc[a-65504>>1]};h.ph=function(a,b){this.f.xc[b-65504>>1]=a};h.xe=function(a){return 65520==a?(fd(this.D)>>6)-1:0};
h.Ce=function(){};h.Qg=function(){return 1};h.di=function(){};h.Zf=function(){return this.f.P};h.oh=function(){this.f.P=0};h.fg=function(){return this.f.uc};h.vh=function(a,b){b&1||(a&=255);this.f.uc=a};h.kg=function(a,b){return b?0:this.f.eb};h.yh=function(a){xd(this.f,a)};h.Pg=function(a,b){return b?0:this.f.xa&65280};h.ci=function(a){this.f.xa=a|255};h.pg=function(){return yd(this.f)};h.Dh=function(a){zd(this.f,a)};h.Be=function(a,b){z(this)&&C(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)};
var M={},od=(M[61568]=[null,null,L.prototype.Vg,L.prototype.ii,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.Og,L.prototype.bi,"SIPDR",8,1145,64],M[62608]=[null,null,L.prototype.Mg,L.prototype.$h,"SDPDR",8,1145,64],M[62624]=[null,null,L.prototype.Ng,L.prototype.ai,"SIPAR",8,1145,64],M[62640]=[null,null,L.prototype.Lg,L.prototype.Zh,"SDPAR",8,1145,64],M[62656]=[null,null,L.prototype.dg,L.prototype.th,"KIPDR",8,1140,64],M[62672]=[null,null,L.prototype.bg,L.prototype.rh,"KDPDR",8,1145,64],M[62688]=
[null,null,L.prototype.cg,L.prototype.sh,"KIPAR",8,1140,64],M[62704]=[null,null,L.prototype.ag,L.prototype.qh,"KDPAR",8,1145,64],M[62798]=[null,null,L.prototype.jg,L.prototype.xh,"MMR3",1,1145,64],M[65382]=[null,null,L.prototype.eg,L.prototype.uh,"LKS"],M[65402]=[null,null,L.prototype.gg,L.prototype.wh,"MMR0",1,1140,64],M[65404]=[null,null,L.prototype.hg,L.prototype.Be,"MMR1",1,1145,64],M[65406]=[null,null,L.prototype.ig,L.prototype.Be,"MMR2",1,1140,64],M[65408]=[null,null,L.prototype.Ug,L.prototype.hi,
"UIPDR",8,1140,64],M[65424]=[null,null,L.prototype.Sg,L.prototype.fi,"UDPDR",8,1145,64],M[65440]=[null,null,L.prototype.Tg,L.prototype.gi,"UIPAR",8,1140,64],M[65456]=[null,null,L.prototype.Rg,L.prototype.ei,"UDPAR",8,1145,64],M[65472]=[null,null,L.prototype.Vb,L.prototype.Zb,"R0SET0"],M[65473]=[null,null,L.prototype.Vb,L.prototype.Zb,"R1SET0"],M[65474]=[null,null,L.prototype.Vb,L.prototype.Zb,"R2SET0"],M[65475]=[null,null,L.prototype.Vb,L.prototype.Zb,"R3SET0"],M[65476]=[null,null,L.prototype.Vb,
L.prototype.Zb,"R4SET0"],M[65477]=[null,null,L.prototype.Vb,L.prototype.Zb,"R5SET0"],M[65478]=[null,null,L.prototype.qg,L.prototype.Eh,"R6KERNEL"],M[65479]=[null,null,L.prototype.tg,L.prototype.Hh,"R7KERNEL"],M[65480]=[null,null,L.prototype.Wb,L.prototype.$b,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Wb,L.prototype.$b,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Wb,L.prototype.$b,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Wb,L.prototype.$b,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Wb,
L.prototype.$b,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Wb,L.prototype.$b,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.rg,L.prototype.Fh,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.sg,L.prototype.Gh,"R6USER",1,1145],M[65504]=[null,null,L.prototype.$f,L.prototype.ph,"CTRL",8,1170],M[65520]=[null,null,L.prototype.xe,L.prototype.Ce,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.xe,L.prototype.Ce,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.Qg,L.prototype.di,"SYSID",1,1170],M[65526]=
[null,null,L.prototype.Zf,L.prototype.oh,"ERR",1,1170],M[65528]=[null,null,L.prototype.fg,L.prototype.vh,"MBR",1,1170],M[65530]=[null,null,L.prototype.kg,L.prototype.yh,"PIR"],M[65532]=[null,null,L.prototype.Pg,L.prototype.ci,"SLR"],M[65534]=[null,null,L.prototype.pg,L.prototype.Dh,"PSW"],M);
qb(function(){for(var a=x(document,w,"device"),b=0;b<a.length;b++){var c,d=a[b];c=wa(d);switch(c.type){case "default":c=new L(c);xa(c,d);break;case "pc11":c=new Ad(c);xa(c,d);break;case "rl11":c=new Cd(c);xa(c,d);break;case "rk11":c=new N(c);xa(c,d);break;case "rx11":c=new Dd(c),xa(c,d)}}});
function I(a,b,c,d,e,f){this.D=a;this.id=Ed+=2;this.b=null;this.K=b;this.Xb=c;this.size=d||0;this.type=e||Fd;this.j=e==Gd;this.f=this.controller=null;this.Eb=this.J=this.Bd;this.oa=this.B=this.Cd;this.Gb=this.F=this.Yb;this.Hb=this.C=this.Vc;this.H=this.i=0;Vc(this);this.hb=this.Ff=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Hd(this,f.yf);else if(Eb)this.u=new ArrayBuffer(this.size),this.w=new DataView(this.u,0,this.size),this.g=new Uint8Array(this.u,0,this.size),this.G=new Uint16Array(this.u,
h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.b.ib=128;md(this.f,this.b.Gd,1E3/60,!0)};h.save=function(){var a=new G(this);a.set(0,[this.b.ib]);return a.data()};h.restore=function(a){a=ia(a[0]);this.b.ib=a.next().value;return!0};h.fg=function(){return this.b.ib};h.xh=function(a){this.b.ib=a&192;this.b.ib&64||rd(this.f,this.b.Qa)};h.hg=function(){return sd(this.f)};h.zh=function(a){td(this.f,a&-129|this.f.S&128)};h.ig=function(){return ud(this.f)};h.jg=function(){return vd(this.f)};
h.kg=function(){return this.f.U};h.Ah=function(a){wd(this.f,a)};h.Wg=function(a){a=a>>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.li=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Pg=function(a){return this.f.B[1][a>>1&7]};h.ei=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Ng=function(a){return this.f.B[1][(a>>1&7)+8]};h.ci=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Og=function(a){return this.f.M[1][a>>1&7]};
h.di=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Mg=function(a){return this.f.M[1][(a>>1&7)+8]};h.bi=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.eg=function(a){return this.f.B[0][a>>1&7]};h.wh=function(a,b){this.f.B[0][b>>1&7]=a&65295};h.cg=function(a){return this.f.B[0][(a>>1&7)+8]};h.uh=function(a,b){this.f.B[0][(b>>1&7)+8]=a&65295};h.dg=function(a){return this.f.M[0][a>>1&7]};h.vh=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.B[0][b]&=65295};
h.bg=function(a){return this.f.M[0][(a>>1&7)+8]};h.th=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.B[0][b]&=65295};h.Vg=function(a){return this.f.B[3][a>>1&7]};h.ki=function(a,b){this.f.B[3][b>>1&7]=a&65295};h.Tg=function(a){return this.f.B[3][(a>>1&7)+8]};h.ii=function(a,b){this.f.B[3][(b>>1&7)+8]=a&65295};h.Ug=function(a){return this.f.M[3][a>>1&7]};h.ji=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Sg=function(a){return this.f.M[3][(a>>1&7)+8]};
h.hi=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a};h.rg=function(){return this.f.w&49152?this.f.W[0]:this.f.g[6]};h.Hh=function(a){this.f.w&49152?this.f.W[0]=a:this.f.g[6]=a};h.ug=function(){return this.f.g[7]};h.Kh=function(a){this.f.g[7]=a};h.Wb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]};
h.$b=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.sg=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[1]};h.Ih=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[1]=a};h.tg=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[3]};h.Jh=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[3]=a};h.ag=function(a){return this.f.xc[a-65504>>1]};h.sh=function(a,b){this.f.xc[b-65504>>1]=a};h.xe=function(a){return 65520==a?(fd(this.D)>>6)-1:0};
h.Ce=function(){};h.Rg=function(){return 1};h.gi=function(){};h.$f=function(){return this.f.P};h.rh=function(){this.f.P=0};h.gg=function(){return this.f.uc};h.yh=function(a,b){b&1||(a&=255);this.f.uc=a};h.lg=function(a,b){return b?0:this.f.eb};h.Bh=function(a){xd(this.f,a)};h.Qg=function(a,b){return b?0:this.f.xa&65280};h.fi=function(a){this.f.xa=a|255};h.qg=function(){return yd(this.f)};h.Gh=function(a){zd(this.f,a)};h.Be=function(a,b){z(this)&&C(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)};
var M={},od=(M[61568]=[null,null,L.prototype.Wg,L.prototype.li,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.Pg,L.prototype.ei,"SIPDR",8,1145,64],M[62608]=[null,null,L.prototype.Ng,L.prototype.ci,"SDPDR",8,1145,64],M[62624]=[null,null,L.prototype.Og,L.prototype.di,"SIPAR",8,1145,64],M[62640]=[null,null,L.prototype.Mg,L.prototype.bi,"SDPAR",8,1145,64],M[62656]=[null,null,L.prototype.eg,L.prototype.wh,"KIPDR",8,1140,64],M[62672]=[null,null,L.prototype.cg,L.prototype.uh,"KDPDR",8,1145,64],M[62688]=
[null,null,L.prototype.dg,L.prototype.vh,"KIPAR",8,1140,64],M[62704]=[null,null,L.prototype.bg,L.prototype.th,"KDPAR",8,1145,64],M[62798]=[null,null,L.prototype.kg,L.prototype.Ah,"MMR3",1,1145,64],M[65382]=[null,null,L.prototype.fg,L.prototype.xh,"LKS"],M[65402]=[null,null,L.prototype.hg,L.prototype.zh,"MMR0",1,1140,64],M[65404]=[null,null,L.prototype.ig,L.prototype.Be,"MMR1",1,1145,64],M[65406]=[null,null,L.prototype.jg,L.prototype.Be,"MMR2",1,1140,64],M[65408]=[null,null,L.prototype.Vg,L.prototype.ki,
"UIPDR",8,1140,64],M[65424]=[null,null,L.prototype.Tg,L.prototype.ii,"UDPDR",8,1145,64],M[65440]=[null,null,L.prototype.Ug,L.prototype.ji,"UIPAR",8,1140,64],M[65456]=[null,null,L.prototype.Sg,L.prototype.hi,"UDPAR",8,1145,64],M[65472]=[null,null,L.prototype.Vb,L.prototype.Zb,"R0SET0"],M[65473]=[null,null,L.prototype.Vb,L.prototype.Zb,"R1SET0"],M[65474]=[null,null,L.prototype.Vb,L.prototype.Zb,"R2SET0"],M[65475]=[null,null,L.prototype.Vb,L.prototype.Zb,"R3SET0"],M[65476]=[null,null,L.prototype.Vb,
L.prototype.Zb,"R4SET0"],M[65477]=[null,null,L.prototype.Vb,L.prototype.Zb,"R5SET0"],M[65478]=[null,null,L.prototype.rg,L.prototype.Hh,"R6KERNEL"],M[65479]=[null,null,L.prototype.ug,L.prototype.Kh,"R7KERNEL"],M[65480]=[null,null,L.prototype.Wb,L.prototype.$b,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Wb,L.prototype.$b,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Wb,L.prototype.$b,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Wb,L.prototype.$b,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Wb,
L.prototype.$b,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Wb,L.prototype.$b,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.sg,L.prototype.Ih,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.tg,L.prototype.Jh,"R6USER",1,1145],M[65504]=[null,null,L.prototype.ag,L.prototype.sh,"CTRL",8,1170],M[65520]=[null,null,L.prototype.xe,L.prototype.Ce,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.xe,L.prototype.Ce,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.Rg,L.prototype.gi,"SYSID",1,1170],M[65526]=
[null,null,L.prototype.$f,L.prototype.rh,"ERR",1,1170],M[65528]=[null,null,L.prototype.gg,L.prototype.yh,"MBR",1,1170],M[65530]=[null,null,L.prototype.lg,L.prototype.Bh,"PIR"],M[65532]=[null,null,L.prototype.Qg,L.prototype.fi,"SLR"],M[65534]=[null,null,L.prototype.qg,L.prototype.Gh,"PSW"],M);
qb(function(){for(var a=x(document,w,"device"),b=0;b<a.length;b++){var c,d=a[b];c=wa(d);switch(c.type){case "default":c=new L(c);xa(c,d);break;case "pc11":c=new Ad(c);xa(c,d);break;case "rl11":c=new Bd(c);xa(c,d);break;case "rk11":c=new N(c);xa(c,d);break;case "rx11":c=new Cd(c),xa(c,d)}}});
function I(a,b,c,d,e,f){this.D=a;this.id=Ed+=2;this.b=null;this.K=b;this.Xb=c;this.size=d||0;this.type=e||Fd;this.j=e==Gd;this.f=this.controller=null;this.Eb=this.J=this.Bd;this.oa=this.B=this.Cd;this.Gb=this.F=this.Yb;this.Hb=this.C=this.Vc;this.H=this.i=0;Kc(this);this.hb=this.Ff=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Hd(this,f.yf);else if(Eb)this.u=new ArrayBuffer(this.size),this.w=new DataView(this.u,0,this.size),this.g=new Uint8Array(this.u,0,this.size),this.G=new Uint16Array(this.u,
0,this.size>>1),this.b=new Int32Array(this.u,0,this.size>>2),Hd(this,Id?Jd:Kd);else{a=this.b=Array(this.size>>2);for(f=0;f<a.length;f++)a[f]=0;Hd(this,Ld)}else Hd(this)}h=I.prototype;h.save=function(){var a,b;if(this.controller)a=null;else if(Eb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.w.getInt32(b<<2,!0);else a=this.b;return a};
h.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Eb)for(b=0;b<a.length;b++)this.w.setInt32(b<<2,a[b],!0);else this.b=a;return this.hb=!0}return!1};function Hd(a,b){b||(b=Md);Nd(a,b,void 0);Od(a,b,void 0)}function Nd(a,b,c){c&&a.H||(a.Eb=b[0]||a.Bd,a.oa=b[2]||a.Cd);if(c||void 0===c)a.J=b[0]||a.Bd,a.B=b[2]||a.Cd}function Od(a,b,c){c&&a.i||(a.Gb=!a.j&&b[1]||a.Yb,a.Hb=!a.j&&b[3]||a.Vc);if(c||void 0===c)a.F=b[1]||a.Yb,a.C=b[3]||a.Vc}
h.Cb=function(a,b){b?this.i++||Od(this,Pd,!1):this.H++||Nd(this,Pd,!1)};function Qd(a,b){b?--a.i||(a.Gb=a.j?a.Yb:a.F,a.Hb=a.j?a.Vc:a.C):--a.H||(a.Eb=a.J,a.oa=a.B)}function Vc(a,b,c){a.f=b;a.H=a.i=0;c&&((a.H=c.H)&&Nd(a,Pd,!1),(a.i=c.i)&&Od(a,Pd,!1))}h.Bd=function(a,b){this.f&&z(this.f,32)&&C(this.f,"attempt to read invalid address "+K(this.f,b),!0);this.D.Na(b,32,2);return 255};
h.Yb=function(a,b,c){this.f&&z(this.f,32)&&C(this.f,"attempt to write "+K(this.f,b)+" to invalid addresses "+K(this.f,c),!0);this.D.Na(c,32,4)};h.Cd=function(a,b){return this.Eb(a++,b++)|this.Eb(a,b)<<8};h.Vc=function(a,b,c){this.Gb(a++,b&255,c++);this.Gb(a,b>>8,c)};h.Xf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.ah=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8};
h.mh=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.hb=!0};h.mi=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.hb=!0};h.Vf=function(a,b){this.f&&null!=this.K&&Rd(this.f,this.K+a);return this.J(a,b)};h.Xg=function(a,b){this.f&&null!=this.K&&Rd(this.f,this.K+a,2);return this.B(a,b)};
h.kh=function(a,b,c){this.f&&null!=this.K&&Sd(this.f,this.K+a);this.j?this.Yb(0,b,c):this.F(a,b,c)};h.ki=function(a,b,c){this.f&&null!=this.K&&Sd(this.f,this.K+a,2);this.j?this.Yb(0,b,c):this.C(a,b,c)};h.Uf=function(a){return this.g[a]};h.Wf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&C(this.f,"Memory.readByte("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.Wg=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)};
h.$g=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);a=!Jb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&C(this.f,"Memory.readWord("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.jh=function(a,b){this.g[a]=b;this.hb=!0};h.lh=function(a,b,c){this.g[a]=b;this.hb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeByte("+K(this.f,c)+","+K(this.f,b)+")",!0)};h.ji=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.hb=!0};
h.li=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);!Jb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.hb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0)};var Fd=0,gd=1,Gd=2,Xc=4,bd=["NONE","RAM","ROM","VID","H/W"],Ed=0,Md=[],Ld=[I.prototype.Xf,I.prototype.mh,I.prototype.ah,I.prototype.mi],Pd=[I.prototype.Vf,I.prototype.kh,I.prototype.Xg,I.prototype.ki];
if(Eb)var Kd=[I.prototype.Uf,I.prototype.jh,I.prototype.Wg,I.prototype.ji],Jd=[I.prototype.Wf,I.prototype.lh,I.prototype.$g,I.prototype.li];var Td;if(Eb){var be=new ArrayBuffer(2);(new DataView(be)).setUint16(0,256,!0);Td=256===(new Uint16Array(be))[0]}else Td=!1;var Id=Td;
function ce(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.$c=0;this.Xc=b;this.ob=c;this.ld=Math.round(this.Xc/1E4)/100;this.yb=this.ld*this.ob;this.md=this.qc=this.Bb=this.Yc=0;this.A.V=this.A.Sc=!1;this.A.ra=a.autoStart;"string"==typeof this.A.ra&&(this.A.ra="true"==this.A.ra);this.A.Nb=!1;this.oc=this.Qb=0;this.pc=+a.csStart;this.Ob=+a.csInterval;this.Rb=+a.csStop;this.ia=[];this.ae=this.fh.bind(this);this.pb=this.Ka=this.nb=this.b=this.la=this.Ja=this.nc=this.mb=this.Sb=
this.nd=this.xb=0;this.ta=null;y(this)}p(ce,r);h=ce.prototype;h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.F=d;this.ta=a.i;for(a=0;a<de.length;a++)(b=this.H[de[a]])&&this.J.va(null,de[a],b);y(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
h.Cb=function(a,b){b?this.i++||Od(this,Pd,!1):this.H++||Nd(this,Pd,!1)};function Qd(a,b){b?--a.i||(a.Gb=a.j?a.Yb:a.F,a.Hb=a.j?a.Vc:a.C):--a.H||(a.Eb=a.J,a.oa=a.B)}function Kc(a,b,c){a.f=b;a.H=a.i=0;c&&((a.H=c.H)&&Nd(a,Pd,!1),(a.i=c.i)&&Od(a,Pd,!1))}h.Bd=function(a,b){this.f&&z(this.f,32)&&C(this.f,"attempt to read invalid address "+K(this.f,b),!0);this.D.Na(b,32,2);return 255};
h.Yb=function(a,b,c){this.f&&z(this.f,32)&&C(this.f,"attempt to write "+K(this.f,b)+" to invalid addresses "+K(this.f,c),!0);this.D.Na(c,32,4)};h.Cd=function(a,b){return this.Eb(a++,b++)|this.Eb(a,b)<<8};h.Vc=function(a,b,c){this.Gb(a++,b&255,c++);this.Gb(a,b>>8,c)};h.Yf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.bh=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8};
h.ph=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.hb=!0};h.pi=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.hb=!0};h.Wf=function(a,b){this.f&&null!=this.K&&Rd(this.f,this.K+a);return this.J(a,b)};h.Yg=function(a,b){this.f&&null!=this.K&&Rd(this.f,this.K+a,2);return this.B(a,b)};
h.nh=function(a,b,c){this.f&&null!=this.K&&Sd(this.f,this.K+a);this.j?this.Yb(0,b,c):this.F(a,b,c)};h.ni=function(a,b,c){this.f&&null!=this.K&&Sd(this.f,this.K+a,2);this.j?this.Yb(0,b,c):this.C(a,b,c)};h.Vf=function(a){return this.g[a]};h.Xf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&C(this.f,"Memory.readByte("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.Xg=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)};
h.ah=function(a,b){Ib&&a&1&&this.D.Na(b,64,2);a=!Jb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&C(this.f,"Memory.readWord("+K(this.f,b)+"): "+K(this.f,a),!0);return a};h.mh=function(a,b){this.g[a]=b;this.hb=!0};h.oh=function(a,b,c){this.g[a]=b;this.hb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeByte("+K(this.f,c)+","+K(this.f,b)+")",!0)};h.mi=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.hb=!0};
h.oi=function(a,b,c){Ib&&a&1&&this.D.Na(c,64,4);!Jb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.hb=!0;this.f&&z(this.f,32)&&C(this.f,"Memory.writeWord("+K(this.f,c)+","+K(this.f,b)+")",!0)};var Fd=0,gd=1,Gd=2,Xc=4,bd=["NONE","RAM","ROM","VID","H/W"],Ed=0,Md=[],Ld=[I.prototype.Yf,I.prototype.ph,I.prototype.bh,I.prototype.pi],Pd=[I.prototype.Wf,I.prototype.nh,I.prototype.Yg,I.prototype.ni];
if(Eb)var Kd=[I.prototype.Vf,I.prototype.mh,I.prototype.Xg,I.prototype.mi],Jd=[I.prototype.Xf,I.prototype.oh,I.prototype.ah,I.prototype.oi];var Td;if(Eb){var Ud=new ArrayBuffer(2);(new DataView(Ud)).setUint16(0,256,!0);Td=256===(new Uint16Array(Ud))[0]}else Td=!1;var Id=Td;
function Vd(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.$c=0;this.Xc=b;this.ob=c;this.ld=Math.round(this.Xc/1E4)/100;this.yb=this.ld*this.ob;this.md=this.qc=this.Bb=this.Yc=0;this.A.V=this.A.Sc=!1;this.A.ra=a.autoStart;"string"==typeof this.A.ra&&(this.A.ra="true"==this.A.ra);this.A.Nb=!1;this.oc=this.Qb=0;this.pc=+a.csStart;this.Ob=+a.csInterval;this.Rb=+a.csStop;this.ia=[];this.ae=this.hh.bind(this);this.pb=this.Ka=this.nb=this.b=this.la=this.Ja=this.nc=this.mb=this.Sb=
this.nd=this.xb=0;this.ta=null;y(this)}p(Vd,r);h=Vd.prototype;h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.F=d;this.ta=a.i;for(a=0;a<de.length;a++)(b=this.H[de[a]])&&this.J.va(null,de[a],b);y(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
h.Da=function(a,b){var c=ee(this.J,"autoStart");null!=c?this.A.ra="true"==c?!0:"false"==c?!1:!!c:null==this.A.ra&&(this.A.ra=!this.F&&void 0===this.H.run);if(!b){if(a){fe(this);if(!this.restore(a))return!1;ge(this)}else this.reset();this.F?(a=this.F,b=this.A.ra,a.Ga=!0,a.v("Type ? for help with PDPjs Debugger commands"),he(a),b||ie(a),a.ta&&(b=a.ta,a.ta=null,je(a,b))):this.status("No debugger detected");this.A.ra||this.v("CPU will not be auto-started "+(this.ta?"(click Run to start)":"(type 'go' to start)"))}return!0};
h.Ca=function(a){return a?this.save():!0};h.ra=function(){return this.A.V?!0:this.A.ra?(qc(this),!0):!1};h.pe=function(){return 0};function ge(a){void 0===a.pc&&(a.pc=0);void 0===a.Ob&&(a.Ob=-1);void 0===a.Rb&&(a.Rb=-1);a.A.Nb=0<=a.pc&&0<a.Ob;a.A.Nb&&(a.oc=0,a.Qb=a.pc-a.pb)}function uc(a,b){if(a.A.Nb){var c=!1;a.oc=a.oc+a.pe()|0;a.Qb-=b;0>=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=ke(a)&&(a.Ob=a.Rb=-1,ge(a),a.ba(),c=!0);c&&a.v(ke(a)+" cycles: checksum="+F(a.oc))}}
h.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.H[b]=c,!0;case "run":return this.H[b]=c,c.onclick=function(){var a;if(a=d.J)if(a=d.J,a.A.aa)a=!0;else{var b=null,c,k=ta(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.A.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.A.aa);c++);c==k.length&&(b=a);v("The "+b.type+" component ("+b.id+") is not "+(b.A.ready?"powered yet":"ready yet"+(b.Nc?" (waiting for notification)":""))+".");a=!1}a&&(d.A.V?d.ba():qc(d))},!0;
case "speed":return this.H[b]=c,!0;case "setSpeed":return this.H[b]=c,c.onclick=function(){le(d,d.ob<<1,!0)},c.textContent=this.yb.toFixed(2)+"Mhz",!0}return!1};function tc(a,b,c){a.pb+=b;c&&(a.nb=a.b=a.la=0)}function me(a,b){var c=1;b&&1<a.ob&&a.xb&&(c=a.xb/a.ld);a.md=Math.round(1E3/ne);a.qc=Math.floor(a.Xc/ne*c);b||(a.Bb=a.qc);a.Yc=0}function ke(a){return a.pb+a.Ka+a.nb-a.b}function fe(a){a.xb=0;a.nd=0;a.pb=a.Ka=a.nb=a.b=a.la=0;ge(a);le(a,1)}
function le(a,b,c){var d=!1;if(void 0!==b){.8>a.xb/a.yb?b=1:d=!0;a.ob=b;b=a.ld*a.ob;if(a.yb!=b){a.yb=b;b=a.yb.toFixed(2)+"Mhz";var e=a.H.setSpeed;e&&(e.textContent=b);a.v("target speed: "+b)}c&&a.J&&oe(a.J)}tc(a,a.Ka);a.Ka=0;a.Ja=qa();a.mb=0;me(a);return d}function kd(a,b){var c=a.ia.length;a.ia.push([-1,b]);return c}function md(a,b,c,d){0<=b&&b<a.ia.length&&(d||0>a.ia[b][0])&&(c=a.Xc*a.ob/1E3*c|0,a.A.V&&(c+=pe(a)),a.ia[b][0]=c)}
function qe(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function re(a){for(var b=[],c=0;c<a.ia.length;c++)b.push(a.ia[c][0]);return b}function sc(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function pe(a,b){var c=a.nb-=a.b;a.b=a.la=0;b&&(a.nb=0);return c}
h.fh=function(){if(this.A.V){this.Yc>=this.Xc&&me(this,!0);this.Sb=0;this.nc=qa();if(this.mb){var a=this.nc-this.mb;a>this.md&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=qe(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=pe(this,!0);this.Sb+=b;this.Ka+=b;uc(this,b);sc(this,b);this.Bb-=b;if(0>=this.Bb){this.Bb+=this.qc;++this.nd>=se&&(this.J&&H(this.J,void 0),this.nd=0);break}}while(this.A.V)}catch(e){this.ba();this.J&&this.J.stop(qa(),ke(this));
h.hh=function(){if(this.A.V){this.Yc>=this.Xc&&me(this,!0);this.Sb=0;this.nc=qa();if(this.mb){var a=this.nc-this.mb;a>this.md&&(this.Ja+=a,this.Ja>this.nc&&(this.Ja=this.nc))}try{do{var b=qe(this,this.A.Nb?1:this.qc);try{this.Cc(b)}catch(e){if("number"!=typeof e)throw e;}b=pe(this,!0);this.Sb+=b;this.Ka+=b;uc(this,b);sc(this,b);this.Bb-=b;if(0>=this.Bb){this.Bb+=this.qc;++this.nd>=se&&(this.J&&H(this.J,void 0),this.nd=0);break}}while(this.A.V)}catch(e){this.ba();this.J&&this.J.stop(qa(),ke(this));
Da(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.ae;this.mb=qa();var c=this.md;this.Sb&&(c=Math.round(c*this.Sb/this.qc));var c=c-(this.mb-this.nc),d=this.mb-this.Ja;d&&(this.xb=Math.round(this.Ka/(10*d))/100,864E5<=d&&(this.pb=0,le(this)));if(0>c||this.xb<this.yb)-1E3>c&&(this.Ja-=c),c=0;this.Yc+=this.Sb;this.mb+=c;a(b,c)}}};
function qc(a,b){if(!Ea(a))if(a.A.V)a.v(a.toString()+" busy");else{le(a);a.A.V=!0;a.A.Sc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.J&&(b&&oe(a.J,!0),a.J.start(a.Ja,ke(a)));a.F||a.status("Started");setTimeout(a.ae,0)}}h.Cc=function(){return 0};h.ba=function(a){var b=!1;if(this.A.V){pe(this);tc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.J&&this.J.stop(qa(),ke(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var ne=30,se=15,de=["power","reset"];
function te(a){var b=+a.model||1170;ce.call(this,a,6666667);this.ka=b;this.Ud=+a.addrReset||0;this.cb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.qa=this.W=[];this.M=this.B=this.Ha=this.xc=[];this.kb=this.O=this.Sd=this.zb=this.Ab=this.sb=this.lb=this.P=this.uc=this.eb=this.xa=this.S=this.vc=this.wc=this.U=this.i=0;this.Xd=[4,2,0,1];this.zc=0;this.Yd=255;1120>=this.ka?(this.Rd=ue.bind(this),this.Lb=this.Cf,this.zc=8,this.Yd=-1,this.ee=255,this.de=0):(this.Rd=ve.bind(this),this.Lb=this.Df,
this.ee=~(1792|(1140>=this.ka?2048:0))&65535,this.de=1140<this.ka?2048:0);this.Dc=this.Ac=this.pa=0;this.R=null;this.mc=[];this.jc=this.ad=this.oe;this.kc=this.cd=this.te;this.Tc=this.dd=this.ze;this.lc=this.jd=this.Ae;this.Ia=this.vb=this.sc=this.tc=0;this.Ga=this.se;this.oa=this.Dd;this.Hb=this.Hd;this.u=this.j=this.Wc=this.X=this.Y=0;this.A.complete=!1}p(te,ce);h=te.prototype;
h.Aa=function(a,b,c,d){ce.prototype.Aa.call(this,a,b,c,d);this.ad=b.Jd.bind(b);this.cd=b.Bc.bind(b);this.dd=b.Kd.bind(b);this.jd=b.ac.bind(b)};h.Da=function(a,b){for(var c=192,d=0;d<this.mc.length;d++){var e=this.mc[d];0>e.Fb&&(e.Fb=c,c+=4)}return ce.prototype.Da.call(this,a,b)};
function te(a){var b=+a.model||1170;Vd.call(this,a,6666667);this.ka=b;this.Ud=+a.addrReset||0;this.cb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.qa=this.W=[];this.M=this.B=this.Ha=this.xc=[];this.kb=this.O=this.Sd=this.zb=this.Ab=this.sb=this.lb=this.P=this.uc=this.eb=this.xa=this.S=this.vc=this.wc=this.U=this.i=0;this.Xd=[4,2,0,1];this.zc=0;this.Yd=255;1120>=this.ka?(this.Rd=ue.bind(this),this.Lb=this.Cf,this.zc=8,this.Yd=-1,this.ee=255,this.de=0):(this.Rd=ve.bind(this),this.Lb=this.Df,
this.ee=~(1792|(1140>=this.ka?2048:0))&65535,this.de=1140<this.ka?2048:0);this.Dc=this.Ac=this.pa=0;this.R=null;this.mc=[];this.jc=this.ad=this.oe;this.kc=this.cd=this.te;this.Tc=this.dd=this.ze;this.lc=this.jd=this.Ae;this.Ia=this.vb=this.sc=this.tc=0;this.Ga=this.se;this.oa=this.Dd;this.Hb=this.Hd;this.u=this.j=this.Wc=this.X=this.Y=0;this.A.complete=!1}p(te,Vd);h=te.prototype;
h.Aa=function(a,b,c,d){Vd.prototype.Aa.call(this,a,b,c,d);this.ad=b.Jd.bind(b);this.cd=b.Bc.bind(b);this.dd=b.Kd.bind(b);this.jd=b.ac.bind(b)};h.Da=function(a,b){for(var c=192,d=0;d<this.mc.length;d++){var e=this.mc[d];0>e.Fb&&(e.Fb=c,c+=4)}return Vd.prototype.Da.call(this,a,b)};
h.reset=function(){this.status("Model "+this.ka);this.A.V&&this.ba();this.C=65536;this.G=32768;this.L=65535;this.I=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Ud,-1,-2,-3,-4,-5,-6,-7,-8];this.qa=[0,0,0,0,0,0];this.W=[0,0,0,0];this.M=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.B=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,
65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Ha=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.xc=[0,0,0,0,0,0,0,0];this.N=0;this.cb=-1;this.u=this.j=this.Wc=this.X=this.Y=this.i=this.uc=0;oc(this);fe(this);this.A.error=!1;ce.prototype.reset.call(this)};function oc(a){a.S=0;a.vc=0;a.wc=0;a.U=0;a.P=0;a.eb=0;a.xa=255;a.zb=0;a.Ab=0;a.sb=0;a.lb=262143;a.kb=a.g[7];a.O=0;a.R=null;a.D&&(we(a),a.Sd=fd(a.D))}
function we(a){a.jc=a.ad;a.kc=a.cd;a.Tc=a.dd;a.lc=a.jd;a.sc&&(a.jc=a.oe,a.kc=a.te);a.tc&&(a.Tc=a.ze,a.lc=a.Ae);a.zb?(a.Ia=65536,a.vb=a.U&16?4186112:253952,a.Ga=a.se,a.oa=a.sc?a.Zg:a.Dd,a.Hb=a.tc?a.oi:a.Hd,Yc(a.D,a.U&16?22:18)):(a.Ia=0,a.vb=57344,a.Ga=a.Gf,a.oa=a.sc?a.Yg:a.ye,a.Hb=a.tc?a.ni:a.De,Yc(a.D,16))}function sd(a){var b=a.S;b&57344||(b=b&-3199|a.Ab<<5|a.sb<<1);return b}
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.cb=-1;this.u=this.j=this.Wc=this.X=this.Y=this.i=this.uc=0;oc(this);fe(this);this.A.error=!1;Vd.prototype.reset.call(this)};function oc(a){a.S=0;a.vc=0;a.wc=0;a.U=0;a.P=0;a.eb=0;a.xa=255;a.zb=0;a.Ab=0;a.sb=0;a.lb=262143;a.kb=a.g[7];a.O=0;a.R=null;a.D&&(we(a),a.Sd=fd(a.D))}
function we(a){a.jc=a.ad;a.kc=a.cd;a.Tc=a.dd;a.lc=a.jd;a.sc&&(a.jc=a.oe,a.kc=a.te);a.tc&&(a.Tc=a.ze,a.lc=a.Ae);a.zb?(a.Ia=65536,a.vb=a.U&16?4186112:253952,a.Ga=a.se,a.oa=a.sc?a.$g:a.Dd,a.Hb=a.tc?a.si:a.Hd,Yc(a.D,a.U&16?22:18)):(a.Ia=0,a.vb=57344,a.Ga=a.Gf,a.oa=a.sc?a.Zg:a.ye,a.Hb=a.tc?a.ri:a.De,Yc(a.D,16))}function sd(a){var b=a.S;b&57344||(b=b&-3199|a.Ab<<5|a.sb<<1);return b}
function td(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.vc=a.O>>16&65535,a.wc=a.O&65535);a.S=b;a.Ab=(b&96)>>5;a.sb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.zb!=c&&(a.zb=c,we(a))}}function ud(a){a.S&57344||(a.vc=a.O>>16&65535);a=a.vc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function vd(a){a.S&57344||(a.wc=a.O&65535);return a.wc}function wd(a,b){1170>a.ka&&(b&=-49);a.U!=b&&(a.U=b,a.lb=b&16?4194303:262143,we(a))}
function xe(a,b,c,d){a.Ud=b;ye(a,b);zd(a,0);a.D.reset();oc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.aa?a.A.V||qc(a):a.A.ra=!0}else a.F&&a.A.aa?a.ba()||a.J.A.reset||(he(a.F),H(a.J,-1)):!1===c&&a.ba();!a.A.V&&a.ta&&a.ta.stop()}h.pe=function(){return 0};
h.save=function(){var a=new G(this);a.set(0,[this.g,this.qa,this.W,this.M,this.B,this.Ha,this.xc,this.P,this.uc,this.eb,this.xa,this.Ab,this.sb,this.kb,this.i,this.O,this.cb,this.Ac,this.Dc]);a.set(1,[yd(this),sd(this),ud(this),vd(this),this.U]);a.set(2,[this.pb,this.ob,this.A.ra]);a.set(3,ze(this));a.set(4,re(this));return a.data()};
@ -157,14 +157,14 @@ function xc(a,b,c){var d,e,f;if(!(c&a.zb))return f=b&65535,57344<=f&&(f|=a.vb),f
(g|=16384));a.B[a.N][d]=e;if(f!=(4194170&a.lb)||a.N)a.Ab=a.N,a.sb=d;g&&(g&57344&&(0<=a.cb&&(g|=128),a.S&57344||(g|=a.S&4096|a.Ab<<5|a.sb<<1,td(a,a.S&-61695|g&61694)),a.sa(168,64,-2)),a.S&61440||!(f<(4191360&a.lb)||f>(4194239&a.lb))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function Me(a){var b=a.oa(a.g[6]|a.Ia);a.g[6]=a.g[6]+2&65535;return b}function Ke(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.O=a.O&65535|(a.O&-65536)<<8|16121856;a.i&256||a.Lb(4,-2,c);a.Hb(c,b)}
function Pe(a,b,c,d){var e,f,g=d&8?0:a.Ia;switch(b){case 0:return a.sa(4,0,-3),0;case 1:return 6==c&&a.Lb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Lb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Lb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.oa(e)|g;a.b-=8;break;case 6:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,6==c&&a.Lb(d,
0,e),a.b-=6,e|g;case 7:return e=a.oa(Ee(a,2)),e=e+a.g[c]&65535,e=a.oa(e|a.Ia),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.O=a.O&65535|(a.O&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cf=function(a,b,c){!this.N&&0>=b&&c<=this.xa&&(this.i|=32)};h.Df=function(a,b,c){this.N||(65534<=c&&(c|=-65536),a&4&&c<=this.xa&&(c<=this.xa-32?this.sa(4,0,-4):(this.P|=8,this.i|=32)))};h.oe=function(a){this.F&&Rd(this.F,a,1);return this.ad(a)};h.te=function(a){this.F&&Rd(this.F,a,2);return this.cd(a)};
h.ze=function(a,b){this.F&&Sd(this.F,a,1);this.dd(a,b)};h.Ae=function(a,b){this.F&&Sd(this.F,a,2);this.jd(a,b)};function zc(a,b){a.pa++;b=a.D.Bc(xc(a,b,2));a.pa--;return b}function Qe(a,b){(b?--a.tc:--a.sc)||we(a)}h.Gf=function(a,b,c){return Pe(this,a,b,c)};h.se=function(a,b,c){return xc(this,Pe(this,a,b,c),c)};h.ye=function(a){return this.D.Bc(this.kb=a)};h.Yg=function(a){this.F&&Rd(this.F,a,2);return this.ye(a)};h.Dd=function(a){return this.D.Bc(this.kb=xc(this,a,2))};
h.Zg=function(a){this.F&&Rd(this.F,a,2);return this.Dd(a)};h.De=function(a,b){this.D.ac(this.kb=a,b)};h.ni=function(a,b){this.F&&Sd(this.F,a,2);this.De(a,b)};h.Hd=function(a,b){this.D.ac(this.kb=xc(this,a,4),b)};h.oi=function(a,b){this.F&&Sd(this.F,a,2);this.Hd(a,b)};function Re(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Pe(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.W[a.w>>12&3];return c}
h.ze=function(a,b){this.F&&Sd(this.F,a,1);this.dd(a,b)};h.Ae=function(a,b){this.F&&Sd(this.F,a,2);this.jd(a,b)};function zc(a,b){a.pa++;b=a.D.Bc(xc(a,b,2));a.pa--;return b}function Qe(a,b){(b?--a.tc:--a.sc)||we(a)}h.Gf=function(a,b,c){return Pe(this,a,b,c)};h.se=function(a,b,c){return xc(this,Pe(this,a,b,c),c)};h.ye=function(a){return this.D.Bc(this.kb=a)};h.Zg=function(a){this.F&&Rd(this.F,a,2);return this.ye(a)};h.Dd=function(a){return this.D.Bc(this.kb=xc(this,a,2))};
h.$g=function(a){this.F&&Rd(this.F,a,2);return this.Dd(a)};h.De=function(a,b){this.D.ac(this.kb=a,b)};h.ri=function(a,b){this.F&&Sd(this.F,a,2);this.De(a,b)};h.Hd=function(a,b){this.D.ac(this.kb=xc(this,a,4),b)};h.si=function(a,b){this.F&&Sd(this.F,a,2);this.Hd(a,b)};function Re(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Pe(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.W[a.w>>12&3];return c}
function Se(a,b,c,d){a.O=a.O&65535|1441792;var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=Pe(a,b,e,4),c&65536||(e&=65535),a.N=a.w>>12&3,e=xc(a,e|c&65536,4),a.N=a.w>>14&3,a.lc(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.W[a.w>>12&3]=d}function Te(a,b){b>>=6;var c=a.Y=b&7;return(b=a.X=(b&56)>>3)?a.jc(a.Ga(b,c,3)):a.g[c+a.zc]&a.Yd}function Ue(a,b){var c;b>>=6;var d=a.Y=b&7;(b=a.X=(b&56)>>3)?c=a.kc(a.Ga(b,d,2)):c=a.g[d+a.zc];return c}function Ve(a,b){var c=a.j=b&7;b=a.u=(b&56)>>3;return Pe(a,b,c,8)}
function We(a,b){var c=a.j=b&7;return(b=a.u=(b&56)>>3)?a.jc(a.Ga(b,c,3)):a.g[c]&255}function Xe(a,b){var c,d=a.j=b&7;(b=a.u=(b&56)>>3)?c=a.kc(a.Ga(b,d,2)):c=a.g[d];return c}function Ye(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Wc=a.Ga(b,e,7),c=0>c?a.g[-c-1]&255:c,a.Tc(e,d.call(a,c,a.jc(e))),e&1&&a.b--):(b=a.g[e],c=0>c?a.g[-c-1]&255:c,a.g[e]=b&65280|d.call(a,c,b&255))}
function P(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,6),a.lc(e,d.call(a,0>c?a.g[-c-1]:c,a.kc(e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function Ze(a,b,c,d,e){var f=a.j=b&7;(b=a.u=(b&56)>>3)?(d=a.Ga(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.Tc(d,c),d&1&&a.b--):(c?(c=0>c?a.g[-c-1]&255:c,a.g[f]=a.g[f]&~d|c<<24>>24&d):a.g[f]&=~d,e.call(a,c<<8))}
function vf(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.lc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))}
h.Cc=function(a){this.A.complete=!0;var b=this.F?wf(this.F)?1:this.A.Sc?-1:0:0,c=a?this.A.Sc?0:1:-1;this.A.Sc=!1;this.nb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(xf(this.F,this.g[7],c)){this.ba();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.eb&224)>>5,f=this.R&&this.R.qb>e?this.R:null;f&&(d=f.Fb,e=f.qb);e>(this.w&224)>>5?(this.i&8&&(Ee(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&Ge(this,f),a=!0);this.R||this.eb||(this.i&=-3)}else this.i&
1&&this.i++;if(a){if(this.i&4&&xf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}if(this.i&112&&He(this)){if(this.i&4&&xf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.oa(a);this.g[7]=a+2&65535;this.Rd(f)}while(0<this.b);return this.A.complete?this.nb-this.b:!1===this.A.complete?-1:0};qb(function(){for(var a=x(document,w,"cpu"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new te(d);xa(d,c)}});
function $e(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.lc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))}
h.Cc=function(a){this.A.complete=!0;var b=this.F?af(this.F)?1:this.A.Sc?-1:0:0,c=a?this.A.Sc?0:1:-1;this.A.Sc=!1;this.nb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(bf(this.F,this.g[7],c)){this.ba();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.eb&224)>>5,f=this.R&&this.R.qb>e?this.R:null;f&&(d=f.Fb,e=f.qb);e>(this.w&224)>>5?(this.i&8&&(Ee(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&Ge(this,f),a=!0);this.R||this.eb||(this.i&=-3)}else this.i&
1&&this.i++;if(a){if(this.i&4&&bf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}if(this.i&112&&He(this)){if(this.i&4&&bf(this.F,this.g[7],c)){this.ba();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.oa(a);this.g[7]=a+2&65535;this.Rd(f)}while(0<this.b);return this.A.complete?this.nb-this.b:!1===this.A.complete?-1:0};qb(function(){for(var a=x(document,w,"cpu"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new te(d);xa(d,c)}});
function yf(a,b){var c=b+a;this.I=this.L=this.C=c;this.G=(a^c)&(b^c);return c&65535}function zf(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 Af(a,b){a=b<<1;Ie(this,a);return a&65535}function Bf(a,b){a=b<<1;Ie(this,a<<8);return a&255}function Cf(a,b){a=b&32768|b>>1|b<<16;Ie(this,a);return a&65535}function Df(a,b){a=b&128|b>>1|b<<8;Ie(this,a<<8);return a&255}function Ef(a,b){a=b&~a;this.Ea(a);return a}function Ff(a,b){a=b&~a;this.Ea(a<<8);return a}
function Gf(a,b){a|=b;this.Ea(a);return a}function Hf(a,b){a|=b;this.Ea(a<<8);return a}function If(a,b){a=~b|65536;this.rb(a);return a&65535}function Jf(a,b){a=~b|256;this.rb(a<<8);return a&255}function Kf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Lf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.G=b&(b^c);return a&255}function Mf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Nf(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255}
function Of(a,b){a=-b;this.rb(a,a&b&32768);return a&65535}function Pf(a,b){a=-b;this.rb(a<<8,(a&b&128)<<8);return a&255}function Qf(a,b){a=b<<1|this.C>>16&1;Ie(this,a);return a&65535}function Rf(a,b){a=b<<1|this.C>>16&1;Ie(this,a<<8);return a&255}function Sf(a,b){a=(this.C&65536|b)>>1|b<<16;Ie(this,a);return a&65535}function Tf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Ie(this,a<<8);return a&255}function Uf(a,b){var c=b-a;Je(this,c,a,b);return c&65535}
@ -177,23 +177,23 @@ function mg(a){Fe(this,a,Ce(this)||!De(this)!=!Be(this))}function ng(a){Fe(this,
function xg(a){var b=Ue(this,a);a=Xe(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)}function yg(a){var b=Te(this,a);a=We(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Je(this,c,a,b);this.b-=this.u?4+(this.Y&&6<=this.j?1:0):(this.X?4:3)+(7==this.j?2:0)}
function zg(a){var b=Xe(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.C=this.G=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.L=d>>16|d,this.I=d>>16):(this.G=32768,this.L=d>>15|d,this.I=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.b-=53}else this.L=this.I=0,this.G=32768,this.C=65536,this.b-=7}function Ag(){this.sa(24,0,-9);this.b-=20}
function Bg(){this.w&49152?(this.P|=128,this.sa(4,0,-8)):(this.ta&&1120==this.ka&&this.ta.setData(this.g[0],!0),this.F?Cg(this.F):this.ba());this.b-=7}function Dg(){this.sa(16,0,-9);this.b-=20}var Eg=[0,7,7,10,7,11,9,13];function Fg(a){this.la=this.b;ye(this,Ve(this,a));this.b=this.la-Eg[this.u]}var Gg=[0,14,14,17,14,18,16,20];function Hg(a){this.la=this.b;var b=Ve(this,a);a=a>>6&7;Ke(this,this.g[a]);this.g[a]=this.g[7];ye(this,b);this.b=this.la-Gg[this.u]}
var Ig=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Jg(a){var b=Ue(this,a);this.la=this.b;vf(this,a,b,this.Ea);this.b=this.la-Ig[(this.X?8:0)+this.u]+(7!=this.j||this.u?0:2)}function Kg(a){var b=Te(this,a);Ze(this,a,b,65535,this.Ea);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}var Lg=[7,13,13,17,14,18,17,21];
var Ig=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Jg(a){var b=Ue(this,a);this.la=this.b;$e(this,a,b,this.Ea);this.b=this.la-Ig[(this.X?8:0)+this.u]+(7!=this.j||this.u?0:2)}function Kg(a){var b=Te(this,a);Ze(this,a,b,65535,this.Ea);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}var Lg=[7,13,13,17,14,18,17,21];
function Mg(a){var b=Xe(this,a);a=a>>6&7;b=(b<<16>>16)*(this.g[a]<<16>>16);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;b|=0;this.I=b>>16;this.L=this.I|b;this.G=0;this.C=-32768>b||32767<b?65536:0;this.b-=23}function Ng(){this.b-=5}function Og(){this.w&49152||(this.D.reset(),oc(this),this.ta&&this.ta.setData(this.g[0],!0));this.b-=667}function Pg(a){if(a&8)Q.call(this,a);else{var b=Me(this);a&=7;7==a?ye(this,b):(ye(this,this.g[a]),this.g[a]=b);this.b-=9}}function Qg(){Le(this);this.b-=13}
function Rg(a){a&1&&(this.C=65536);a&2&&(this.G=32768);a&4&&(this.L=0);a&8&&(this.I=32768);this.b-=5}function Sg(a){var b=(a&448)>>6;if(this.g[b]=this.g[b]-1&65535)ye(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Tg(a){P(this,a,Ue(this,a),Uf);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.X?5:3)+(7==this.j?2:0)}function Ug(a){P(this,a,0,Wf);this.b-=this.u?9:3+(7==this.j?2:0)}function Vg(){this.sa(28,0,-9)}
function Wg(){this.ta&&(this.ta.Fd(this.g[7],!0),this.ta.setData(this.g[0],!0));this.i|=8;Ee(this,-2);this.b-=3}function Xg(a){P(this,a,this.g[(a>>6&7)+this.zc],Xf);this.b-=this.u?9:3+(7==this.j?2:0)}function Q(a){var b;if(b=this.F)b=this.F,z(b,1)?(C(b,"undefined opcode "+K(b,a),!0,!0),b=Cg(b)):b=!1;b||this.sa(8,0,-9)}function ue(a){Yg[a>>12].call(this,a)}function Zg(a){$g[a>>6&3].call(this,a)}function ah(a){bh[a>>6&3].call(this,a)}function ch(a){dh[a>>6&3].call(this,a)}
function eh(a){fh[a&15].call(this,a)}function gh(a){hh[a&15].call(this,a)}function ih(a){jh[a>>6&3].call(this,a)}function kh(a){lh[a>>6&3].call(this,a)}function mh(a){nh[a>>6&3].call(this,a)}
var Yg=[function(a){oh[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,Q,function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],oh=[function(a){qh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,Q,Q,Q],$g=[function(a){vf(this,a,0,this.rb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,If);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Kf);this.b-=this.u?9:3+(7==this.j?2:0)}],bh=[function(a){P(this,a,0,Of);
var Yg=[function(a){oh[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,Q,function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],oh=[function(a){qh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,Q,Q,Q],$g=[function(a){$e(this,a,0,this.rb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,If);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Kf);this.b-=this.u?9:3+(7==this.j?2:0)}],bh=[function(a){P(this,a,0,Of);
this.b-=this.u?11:6},function(a){P(this,a,Ae(this)?1:0,yf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Ae(this)?1:0,Uf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Xe(this,a);this.rb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],dh=[function(a){P(this,a,0,Sf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Qf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Cf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Af);this.b-=this.u?9:3+(7==this.j?2:0)}],qh=
[function(a){rh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,Q,eh,gh,Ug,Ug,Ug,Ug],rh=[Bg,Wg,Qg,sg,Dg,Og,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q],fh=[Ng,function(){this.C=0;this.b-=5},function(){this.G=0;this.b-=5},wg,function(){this.L=1;this.b-=5},wg,wg,wg,function(){this.I=0;this.b-=5},wg,wg,wg,wg,wg,wg,wg],hh=[Ng,function(){this.C=65536;this.b-=5},function(){this.G=32768;this.b-=5},Rg,function(){this.L=0;this.b-=5},Rg,Rg,Rg,function(){this.I=32768;this.b-=5},Rg,Rg,Rg,Rg,Rg,Rg,Rg],ph=[rg,pg,lg,ng,ug,vg,ag,bg,Ag,Vg,ih,kh,
mh,Q,Q,Q],jh=[function(a){Ze(this,a,0,255,this.rb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Jf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Nf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,1,Lf);this.b-=this.u?9:3+(7==this.j?2:0)}],lh=[function(a){Ye(this,a,0,Pf);this.b-=this.u?11:6},function(a){Ye(this,a,Ae(this)?1:0,zf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,Ae(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=We(this,
a);this.rb(a<<8);this.b-=this.u?4:3+(7==this.j?2:0)}],nh=[function(a){Ye(this,a,0,Tf);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ye(this,a,0,Df);this.b-=this.u?9+(this.Wc&1):3+(7==this.j?2:0)},function(a){Ye(this,a,0,Bf);this.b-=this.u?9:3+(7==this.j?2:0)}];function ve(a){sh[a>>12].call(this,a)}
var sh=[function(a){th[a>>8&15].call(this,a)},Jg,xg,gg,cg,eg,Yf,function(a){uh[a>>8&15].call(this,a)},function(a){vh[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Tg,Q],th=[function(a){wh[a>>4&15].call(this,a)},tg,qg,ig,jg,og,kg,mg,Hg,Hg,Zg,ah,ch,function(a){xh[a>>6&3].call(this,a)},Q,Q],xh=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.oa(a|this.Ia);ye(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.b-=8},function(a){a=Re(this,a,0);this.Ea(a);Ke(this,a);this.b-=11},function(a){var b=Me(this);
this.la=this.b;this.Ea(b);Se(this,a,0,b);this.b=this.la-Lg[this.u]},function(a){vf(this,a,De(this)?65535:0,this.Ea);this.b-=this.u?9:3+(7==this.j?2:0)}],wh=[function(a){yh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,function(a){!(a&8)||1145>this.ka?Q.call(this,a):(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5)},eh,gh,Ug,Ug,Ug,Ug],yh=[Bg,Wg,function(){Le(this);this.i|=this.w&16;this.b-=13},sg,Dg,Og,Qg,function(a){Q.call(this,a)},Q,Q,Q,Q,Q,Q,Q,Q],uh=[Mg,Mg,zg,zg,Zf,Zf,$f,$f,
this.la=this.b;this.Ea(b);Se(this,a,0,b);this.b=this.la-Lg[this.u]},function(a){$e(this,a,De(this)?65535:0,this.Ea);this.b-=this.u?9:3+(7==this.j?2:0)}],wh=[function(a){yh[a&15].call(this,a)},Q,Q,Q,Fg,Fg,Fg,Fg,Pg,function(a){!(a&8)||1145>this.ka?Q.call(this,a):(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5)},eh,gh,Ug,Ug,Ug,Ug],yh=[Bg,Wg,function(){Le(this);this.i|=this.w&16;this.b-=13},sg,Dg,Og,Qg,function(a){Q.call(this,a)},Q,Q,Q,Q,Q,Q,Q,Q],uh=[Mg,Mg,zg,zg,Zf,Zf,$f,$f,
Xg,Xg,Q,Q,Q,Q,Sg,Sg],vh=[rg,pg,lg,ng,ug,vg,ag,bg,Ag,Vg,ih,kh,mh,function(a){1145>this.ka?Q.call(this,a):zh[a>>6&3].call(this,a)},Q,Q],zh=[function(a){Q.call(this,a)},function(a){a=Re(this,a,65536);this.Ea(a);Ke(this,a);this.b-=11},function(a){var b=Me(this);this.la=this.b;this.Ea(b);Se(this,a,65536,b);this.b=this.la-Lg[this.u]},function(a){Q.call(this,a)}];
function Ah(a){r.call(this,"ROM",a,128);this.ga=this.g=null;this.u=+a.addr;this.b=+a.size;this.w=!1;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.j=a.file;this.B=Na(this.j);if(this.j){a=this.j;var b=Oa(this.B);"json"!=b&&"hex"!=b&&(a=cb()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;ab(a,null,!0,function(a,b,f){f?(c.T("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(oa(c.wb,a,b),(a=bb(a,b))?(c.g=a.ca,c.ga=a.ga):c.j=null);Bh(c)})}}p(Ah,r);
h=Ah.prototype;h.Aa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Bh(this)};h.Da=function(){this.ga&&(this.F&&Ch(this.F,this.id,this.u,this.b,this.ga),delete this.ga);return!0};h.Ca=function(){return!0};
function Bh(a){if(!Fa(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)Da(a,"ROM size ("+F(a.g.length,8,!0)+") does not match specified size ("+F(a.b,8,!0)+")");else{var b;a:{b=a.u;if(57344<=b&&b<57344+Fc){var c={},c=(c[b]=[Ah.prototype.Ig,Ah.prototype.Wh,null,null,null,a.b>>1],c);if(Vb(a.D,a,c)){a.status("Added "+a.b+"-byte ROM at "+E(b));b=a.w=!0;break a}}else if(Wc(a.D,b,a.b,Gd)){for(c=0;c<a.g.length;c++)ed(a.D,b+c,a.g[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.i?
b.push(a.i):null!=a.i&&a.i.length&&(b=a.i);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.D,g=d.b,k=[],l=d.u>>>f.g;0<g&&l<f.b.length;)k.push(f.b[l++]),g-=f.j;f=d.D;d=d.b;g=0;for(e>>>=f.g;0<d&&e<f.b.length;){l=k[g++];if(!l)break;f.b[e++]=l;d-=f.j}}a.w||delete a.g}}}y(a)}}h.Ig=function(a){return this.g[a-this.u]};h.Wh=function(){};qb(function(){for(var a=x(document,w,"rom"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Ah(d);xa(d,c)}});
function Bh(a){if(!Fa(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)Da(a,"ROM size ("+F(a.g.length,8,!0)+") does not match specified size ("+F(a.b,8,!0)+")");else{var b;a:{b=a.u;if(57344<=b&&b<57344+Fc){var c={},c=(c[b]=[Ah.prototype.Jg,Ah.prototype.Zh,null,null,null,a.b>>1],c);if(Vb(a.D,a,c)){a.status("Added "+a.b+"-byte ROM at "+E(b));b=a.w=!0;break a}}else if(Wc(a.D,b,a.b,Gd)){for(c=0;c<a.g.length;c++)ed(a.D,b+c,a.g[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.i?
b.push(a.i):null!=a.i&&a.i.length&&(b=a.i);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.D,g=d.b,k=[],l=d.u>>>f.g;0<g&&l<f.b.length;)k.push(f.b[l++]),g-=f.j;f=d.D;d=d.b;g=0;for(e>>>=f.g;0<d&&e<f.b.length;){l=k[g++];if(!l)break;f.b[e++]=l;d-=f.j}}a.w||delete a.g}}}y(a)}}h.Jg=function(a){return this.g[a-this.u]};h.Zh=function(){};qb(function(){for(var a=x(document,w,"rom"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Ah(d);xa(d,c)}});
function Dh(a){r.call(this,"RAM",a);this.ga=this.g=null;this.i=+a.addr;this.j=+a.size;this.za=a.load;this.ya=a.exec;null!=this.za&&(this.za=+this.za);null!=this.ya&&(this.ya=+this.ya);this.u=!1;this.b=a.file;this.w=Na(this.b);if(this.b){a=this.b;var b=Oa(this.w);"json"!=b&&"hex"!=b&&(a=cb()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;ab(a,null,!0,function(a,b,f){f?(c.T("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(oa(c.wb,a,b),(a=bb(a,b))?(c.g=a.ca,c.ga=a.ga,
null==c.za&&(c.za=a.za),null==c.ya&&(c.ya=a.ya)):c.b=null);Eh(c)})}}p(Dh,r);Dh.prototype.Aa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Eh(this)};Dh.prototype.Da=function(a,b){this.ga&&(this.F&&Ch(this.F,this.id,this.i,this.j,this.ga),delete this.ga);b||this.reset();return!0};Dh.prototype.Ca=function(){return!0};
function Eh(a){if(a.D&&(!a.u&&a.j&&(Wc(a.D,a.i,a.j,gd)?a.u=!0:a.j=0),!Fa(a))){if(!a.u)v("No RAM allocated");else if(a.b){if(!a.g||!a.D)return;Fh(a,a.g,a.za,a.ya,a.i)?a.status('Loaded image "'+a.w+'"'):a.T('Error loading image "'+a.w+'"')}y(a)}}
@ -202,16 +202,16 @@ function Fh(a,b,c,d,e,f){var g=!1,k=!1;if(null==c)for(var l=0;l<b.length-1;){var
break}m+=b[l++]&255;if(m&255){C(a,"invalid checksum ("+F(m,2,!0)+") for block at offset "+Ma(n),4096);break}if(D)for(C(a,"loading "+Ma(D)+" bytes at "+Ma(t)+"-"+Ma(t+D),4096);D--;)ed(a.D,t++,b[u++]&255);else t&1?g=!0:null==d&&(d=t),null!=d&&C(a,"starting address: "+Ma(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)ed(a.D,c+e,b[e]);k=!0}if(k){if(null==d||g)a.f.ba(),f=!1;null!=d&&xe(a.f,d,f)}return k}
qb(function(){for(var a=x(document,w,"ram"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Dh(d);xa(d,c)}});function Gh(a){r.call(this,"Keyboard",a,1024);y(this)}p(Gh,r);Gh.prototype.va=function(){return!1};Gh.prototype.Aa=function(a,b,c,d){this.J=a;this.f=c;this.F=d};qb(function(){for(var a=x(document,w,"keyboard"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Gh(d);xa(d,c)}});
function Hh(a){r.call(this,"SerialPort",a,1048576);this.M=+a.adapter;this.S=+a.baudReceive||9600;this.Y=+a.baudTransmit||9600;this.L=a.upperCase;"string"==typeof this.L&&(this.L="true"==this.L);this.u=this.w=null;this.W=+a.tabSize;this.U=+a.charBOL;this.B=0;this.I=!0;this.P=this.N=null;this.R=this.X=-1;this.C=this.b=this.g=0;this.i=[];var b=a.binding;if("console"==b)this.w="";else{var c;a=Ih;b&&(void 0===c&&(c="Panel"),(c=va(c,this.id))&&(b=c.H[b])&&this.va(null,a,b))}this.j=this.G=this.O=null;this.exports=
{connect:this.ue,receiveData:this.Oc,receiveStatus:this.eh,setConnection:this.hh}}p(Hh,r);h=Hh.prototype;
{connect:this.ue,receiveData:this.Oc,receiveStatus:this.fh,setConnection:this.jh}}p(Hh,r);h=Hh.prototype;
h.va=function(a,b,c){var d=this;switch(b){case Ih:return this.H[b]=this.u=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.Md:la.cc:46==c?b=la.Md:a.ctrlKey&&c>=la.Id&&c<=la.xf&&(b=c-(la.Id-la.Fe));b&&(a.preventDefault&&a.preventDefault(),d.Oc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.He&&(b=la.Ge);d.Oc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Oc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;var e=this;this.P=nd(this.f,this.M?-1:48,4,1048576);this.R=kd(this.f,function(){var a;a=-1;e.i.length&&(a=e.i.shift()&255,C(e,"receiveByte("+F(a,2,!0)+")"),e.L&&97<=a&&122>a&&(a-=32),md(e.f,e.R,1E3/Math.round(e.S/10)));0<=a&&(e.C=a,e.b&128?e.C|=49152:e.b|=128,e.b&64&&ld(c,e.P))});this.N=nd(this.f,this.M?-1:52,4,1048576);this.X=kd(this.f,function(){e.g|=128;e.g&64&&ld(c,e.N)});Vb(b,this,Jh,this.M?64832+8*(this.M-1)-65392:0);Xb(b,this.reset.bind(this));
y(this)};h.ue=function(a){if(!this.j){var b=ee(this.J,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Xa(c[0]);if(d!=this.Mb)return;c=Xa(c[1]);if(this.j=ua(c)){var e=this.j.exports;if(e){var f=e.connect;f&&f.call(this.j,this.I);if(this.G=e.receiveData){this.I=a;this.O=e.receiveStatus;this.status("Connected "+this.wb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
h.Da=function(a,b){if(!b)if(this.ue(this.I),!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){Kh(this)};h.save=function(){var a=new G(this);a.set(0,[this.C,this.b,this.g,this.i]);return a.data()};h.restore=function(a){return Kh(this,a[0])};function Kh(a,b){b||(b=[0,8192,128,a.i]);b=ia(b);a.C=b.next().value;a.b=b.next().value;a.g=b.next().value;a.i=b.next().value;return!0}
h.Oc=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);md(this.f,this.R,1E3/Math.round(this.S/10));return!0};h.eh=function(a){var b=this.b;this.b&=-12289;a&32&&(this.b|=8192);a&256&&(this.b|=4096);b!=this.b&&(this.b|=32768,this.b&32&&ld(this.f,this.P))};h.hh=function(a,b){return this.j?!1:(this.j=a,this.G=b,!0)};
h.vg=function(){var a=this.b&65534;this.b&=-32769;return a};h.Jh=function(a){var b=a^this.b;this.b=this.b&-112|a&111;this.O&&b&6&&(b=0,b=this.I?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.O.call(this.j,b))};h.ug=function(){this.b&=-129;return this.C};h.Ih=function(){};h.dh=function(){return this.g};h.ri=function(a){this.g&128&&(a&64?ld(this.f,this.N):rd(this.f,this.N));this.g=this.g&-70|a&69};h.bh=function(){return 0};
h.pi=function(a){a&=255;this.G&&this.G.call(this.j,a);a&=127;if(this.u)if(13==a)this.B=0;else if(8==a)this.u.value=this.u.value.slice(0,-1),0<this.B&&this.B--;else{if(a){var b;13!=a&&10!=a&&(b=Ya[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.W||8,c=a-this.B%a,this.W&&(b=Wa("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.u.value+=b;this.u.scrollTop=this.u.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==a||1024<=this.w.length)this.v(this.w),
this.w="";10!=a&&(this.w+=String.fromCharCode(a))}md(this.f,this.X,1E3/Math.round(this.Y/10));this.g&=-129};var Ih="buffer",Lh={},Jh=(Lh[65392]=[null,null,Hh.prototype.vg,Hh.prototype.Jh,"RCSR"],Lh[65394]=[null,null,Hh.prototype.ug,Hh.prototype.Ih,"RBUF"],Lh[65396]=[null,null,Hh.prototype.dh,Hh.prototype.ri,"XCSR"],Lh[65398]=[null,null,Hh.prototype.bh,Hh.prototype.pi,"XBUF"],Lh);qb(function(){for(var a=x(document,w,"serial"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Hh(d);xa(d,c)}});
h.Oc=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);md(this.f,this.R,1E3/Math.round(this.S/10));return!0};h.fh=function(a){var b=this.b;this.b&=-12289;a&32&&(this.b|=8192);a&256&&(this.b|=4096);b!=this.b&&(this.b|=32768,this.b&32&&ld(this.f,this.P))};h.jh=function(a,b){return this.j?!1:(this.j=a,this.G=b,!0)};
h.wg=function(){var a=this.b&65534;this.b&=-32769;return a};h.Mh=function(a){var b=a^this.b;this.b=this.b&-112|a&111;this.O&&b&6&&(b=0,b=this.I?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.O.call(this.j,b))};h.vg=function(){this.b&=-129;return this.C};h.Lh=function(){};h.eh=function(){return this.g};h.ui=function(a){this.g&128&&(a&64?ld(this.f,this.N):rd(this.f,this.N));this.g=this.g&-70|a&69};h.dh=function(){return 0};
h.ti=function(a){a&=255;this.G&&this.G.call(this.j,a);a&=127;if(this.u)if(13==a)this.B=0;else if(8==a)this.u.value=this.u.value.slice(0,-1),0<this.B&&this.B--;else{if(a){var b;13!=a&&10!=a&&(b=Ya[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.W||8,c=a-this.B%a,this.W&&(b=Wa("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.u.value+=b;this.u.scrollTop=this.u.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==a||1024<=this.w.length)this.v(this.w),
this.w="";10!=a&&(this.w+=String.fromCharCode(a))}md(this.f,this.X,1E3/Math.round(this.Y/10));this.g&=-129};var Ih="buffer",Lh={},Jh=(Lh[65392]=[null,null,Hh.prototype.wg,Hh.prototype.Mh,"RCSR"],Lh[65394]=[null,null,Hh.prototype.vg,Hh.prototype.Lh,"RBUF"],Lh[65396]=[null,null,Hh.prototype.eh,Hh.prototype.ui,"XCSR"],Lh[65398]=[null,null,Hh.prototype.dh,Hh.prototype.ti,"XBUF"],Lh);qb(function(){for(var a=x(document,w,"serial"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Hh(d);xa(d,c)}});
function Ad(a){r.call(this,"PC11",a,4096);this.N=Mh(this,a.autoMount);this.g=0;this.U=+a.baudReceive||3600;this.w=this.b=0;this.L=32768;this.i=this.R=0;this.C=[];this.B=Nh;this.j=Oh;this.M=this.u="";this.ca=this.za=this.ya=null;this.P=-1;this.O=!hb("Mobi")&&window&&"FileReader"in window;this.G=null;this.S=-1;this.I=null}p(Ad,r);function Mh(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){v(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=Ad.prototype;
h.va=function(a,b,c){var d=this,e=Oh;switch(b){case "listTapes":return this.H[b]=c,c.onchange=function(){var a=d.H.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){v("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.H[b]=c,!0;case "readTape":e=Ph;case "loadTape":return e||(e=Qh),this.H[b]=c,c.onclick=
function(){var a=d.H.listTapes;a&&Rh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.H[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Rh(d,Na(b,!0),b,Qh,a)}return!1};return!0;case Sh:return this.H[b]=c,!0}return!1};
@ -222,24 +222,24 @@ function $h(a,b,c,d,e,f){var g=-1;if(a.u.toLowerCase()!=c.toLowerCase()||a.j!=d)
function ci(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),di(a,b,c,d,e),a.B=Xh);a.A.gb=!1;ai(a)};g.readAsArrayBuffer(e);return!1}0>c.indexOf("/api/v1/dump")&&(e=Oa(c),f="json"==e||"gz"==e?encodeURI(c):cb()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!ab(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.aa;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(oa(a.wb,e,f),(e=bb(e,f))&&di(a,b,c,d,
e.ca,e.za,e.ya));a.A.gb=!1;a.g&&(a.g--,a.g||y(a));ai(a)})}function Wh(a,b,c,d){if((a=a.H.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
function ai(a){var b=a.H.listTapes;if(b&&b.options){a=a.B||a.u;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function Uh(a,b){b|=0;if(b!==a.P){var c=a.H[Sh];c&&(c=(c=x(c,ei))&&c[0])&&c.style&&(c.style.width=b+"%");a.P=b}}
function di(a,b,c,d,e,f,g){a.M=b;a.u=c;a.j=d;a.ca=e;a.za=f;a.ya=g;d==Ph?a.I&&Fh(a.I,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.T('No valid memory address for tape "'+b+'"'):(a.i=0,a.C=e,a.b&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Uh(a,0))}function bi(a,b){if(a.u||!1===b)a.M="",a.u="",b||(a.j&&a.status(a.j==Qh?"tape detached":"tape unloaded"),a.B=Nh,a.j=Oh,ai(a))}h.save=function(){return(new G(this)).data()};h.restore=function(){return!0};h.og=function(){return this.b&65534};
h.Ch=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&ld(this.f,this.G)):(this.b&=-129,this.b|=2048,this.w=0,md(this.f,this.S,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.ng=function(){this.b&=-129;this.b|=2048;return this.w};h.Bh=function(){};h.mg=function(){return this.L};h.Ah=function(a){this.L=this.L&-65|a&64};h.lg=function(){return this.R};h.zh=function(a){this.R=a&255};
var Nh="",Xh="?",Yh="??",Oh=0,Qh=1,Ph=2,Sh="readProgress",ei="pcjs-progress-bar",fi={},Vh=(fi[65384]=[null,null,Ad.prototype.og,Ad.prototype.Ch,"PRS"],fi[65386]=[null,null,Ad.prototype.ng,Ad.prototype.Bh,"PRB"],fi[65388]=[null,null,Ad.prototype.mg,Ad.prototype.Ah,"PPS"],fi[65390]=[null,null,Ad.prototype.lg,Ad.prototype.zh,"PPB"],fi);
function di(a,b,c,d,e,f,g){a.M=b;a.u=c;a.j=d;a.ca=e;a.za=f;a.ya=g;d==Ph?a.I&&Fh(a.I,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.T('No valid memory address for tape "'+b+'"'):(a.i=0,a.C=e,a.b&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Uh(a,0))}function bi(a,b){if(a.u||!1===b)a.M="",a.u="",b||(a.j&&a.status(a.j==Qh?"tape detached":"tape unloaded"),a.B=Nh,a.j=Oh,ai(a))}h.save=function(){return(new G(this)).data()};h.restore=function(){return!0};h.pg=function(){return this.b&65534};
h.Fh=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&ld(this.f,this.G)):(this.b&=-129,this.b|=2048,this.w=0,md(this.f,this.S,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.og=function(){this.b&=-129;this.b|=2048;return this.w};h.Eh=function(){};h.ng=function(){return this.L};h.Dh=function(a){this.L=this.L&-65|a&64};h.mg=function(){return this.R};h.Ch=function(a){this.R=a&255};
var Nh="",Xh="?",Yh="??",Oh=0,Qh=1,Ph=2,Sh="readProgress",ei="pcjs-progress-bar",fi={},Vh=(fi[65384]=[null,null,Ad.prototype.pg,Ad.prototype.Fh,"PRS"],fi[65386]=[null,null,Ad.prototype.og,Ad.prototype.Eh,"PRB"],fi[65388]=[null,null,Ad.prototype.ng,Ad.prototype.Dh,"PPS"],fi[65390]=[null,null,Ad.prototype.mg,Ad.prototype.Ch,"PPB"],fi);
function gi(a,b,c){r.call(this,"Disk",{id:a.wb+".disk"+F(++hi,4)},8192);this.controller=a;this.J=a.J;this.F=a.F;this.u=b;this.Ya=b.name;this.Oa=this.Ed="";this.zd=b.zd;this.Z=this.ja=this.ea=this.ua=this.mode=0;this.b=[];this.i=null;this.j=!1;ii(this,c,b.Z,b.ja,b.ea,b.ua);this.g=this.w=null;y(this)}p(gi,r);h=gi.prototype;h.Aa=function(a,b,c,d){this.F=d};
function ii(a,b,c,d,e,f){a.mode=b;a.Z=c;a.ja=d;a.ea=e;a.ua=f;a.b=[];if("preload"!=a.mode){b=Array(a.Z);for(c=0;c<b.length;c++){d=Array(a.ja);for(e=0;e<d.length;e++){f=Array(a.ea);for(var g=1;g<=f.length;g++)f[g-1]=ji(null,c,e,g,a.ua,0);d[e]=f}b[c]=d}a.b=b}a.i=null}
function ki(a,b,c,d,e){var f=c;if(a.g)return!0;a.Ya=b;a.Oa=c;a.Ed=Na(c);a.g=e;a.w=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.Z=e[0];a.ja=e[1];a.ea=e[2];a.ua=e[3]||512;c=a.ua>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Z);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ja),u=0;u<t.length;u++)for(var D=t[u]=Array(a.ea),A=0;A<D.length;A++){for(var B=ji(null,d,u,A+1,a.ua,0),J=B.data,vb=0;vb<c;vb++,f+=4)var Bd=J[vb]=b.getInt32(f,
!0),e=e+Bd&-1;B.La=c;D[A]=B}a.i=e;c=a}else a.T("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.u,c,a.Ya,a.Oa),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=Oa(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"):Pa(c,"/")&&(d="dir"),f=cb()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.zd?"":e)+"&format=json"));return!!ab(f,
function ki(a,b,c,d,e){var f=c;if(a.g)return!0;a.Ya=b;a.Oa=c;a.Ed=Na(c);a.g=e;a.w=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.Z=e[0];a.ja=e[1];a.ea=e[2];a.ua=e[3]||512;c=a.ua>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Z);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ja),u=0;u<t.length;u++)for(var D=t[u]=Array(a.ea),A=0;A<D.length;A++){for(var B=ji(null,d,u,A+1,a.ua,0),J=B.data,vb=0;vb<c;vb++,f+=4)var Dd=J[vb]=b.getInt32(f,
!0),e=e+Dd&-1;B.La=c;D[A]=B}a.i=e;c=a}else a.T("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.u,c,a.Ya,a.Oa),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=Oa(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"):Pa(c,"/")&&(d="dir"),f=cb()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.zd?"":e)+"&format=json"));return!!ab(f,
null,!0,function(b,c,d){li(a,b,c,d)})}
function li(a,b,c,d){var e=null,f=0>d&&!!a.J&&!a.J.A.aa;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Ya+'" (error '+d+": "+b+")",f);else{oa(a.controller.wb,b,c);try{if(0<Na(a.Ed,!0).toLowerCase().indexOf("-readonly"))a.j=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.j=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.Ya]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
c+")");if(k.length)if(1==k.length)v(k[0]);else{a.Z=k.length;a.ja=k[0].length;a.ea=k[0][0].length;var l=k[0][0][0];a.ua=l&&l.length||512;for(d=c=0;d<a.Z;d++)for(f=0;f<a.ja;f++)for(g=0;g<a.ea;g++)if(l=k[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var q=l.data;if(void 0===q){var t=l.bytes;if(void 0!==t&&t.length){for(var u=m<<2,D=t.length;D<u;D++)t[D]=n;mi(l,t)}else q=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=q;delete l.bytes}ji(l,d,f);for(u=
0;u<q.length;u++)c=c+q[u]&-1}a.b=k;a.i=c;e=a}else v("Empty disk image: "+a.Ya)}catch(A){v("Disk image error ("+b+"): "+A.message)}}a.g&&(a.g.call(a.w,a.u,e,a.Ya,a.Oa),a.g=null)}function ji(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.uk=b;a.vk=c;a.Va=a.La=0;a.hb=!1;return a}
0;u<q.length;u++)c=c+q[u]&-1}a.b=k;a.i=c;e=a}else v("Empty disk image: "+a.Ya)}catch(A){v("Disk image error ("+b+"): "+A.message)}}a.g&&(a.g.call(a.w,a.u,e,a.Ya,a.Oa),a.g=null)}function ji(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.xk=b;a.yk=c;a.Va=a.La=0;a.hb=!1;return a}
h.seek=function(a,b,c,d,e){d=null;var f=this.u,g=this.b[a];if(g){var k=g[b];if(!k&&f.zf&&b<f.ja)for(k=g[b]=Array(f.Af),g=0;g<k.length;g++)k[g]=ji(null,a,b,g+1,f.ve,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.zf&&9==f.ie&&(d=k[g]=ji(null,a,b,f.ie,f.ve,0))}}e&&e(d,!1);return d};function mi(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.La?f<a.Va?(a.La+=a.Va-f,a.Va=f):f>=a.Va+a.La&&(a.La+=f-(a.Va+a.La)+1):(a.Va=f,a.La=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
function ni(a,b){var c=a.ja*a.ea,d=b/c|0;return d<a.Z?(b%=c,a.seek(d,b/a.ea|0,b%a.ea+1)):null}function oi(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}h.save=function(){var a=0,b=[];b[a++]=[this.Oa,this.i,this.Z,this.ja,this.ea,this.ua];if(!this.j)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.La){for(var k=[],l=0,m=g.Va,n=g.Va+g.La;m<n;)k[l++]=g.data[m++];b[a++]=[d,e,f,g.Va,k]}}return b};
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?ii(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.i&&e[1]!=this.i&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.i+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],m=g[f++];if(k>=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;l<e;)k.data[l++]=k.pattern;l=0;k.Va=e;for(k.La=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.T("Unable to restore disk '"+this.Ya+": "+c);return b};
h.toJSON=function(){var a;a=0;for(var b;b=ni(this,a++);)pi(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function pi(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var hi=0;function qi(a,b,c,d,e,f){r.call(this,a,b,c);this.N=ri(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Zc;this.g=Array(this.P);this.O=!hb("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={bootDisk:this.ke,loadDisk:this.Ad,selectDrive:this.gh,wait:this.ih}}p(qi,r);
function pi(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var hi=0;function qi(a,b,c,d,e,f){r.call(this,a,b,c);this.N=ri(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Zc;this.g=Array(this.P);this.O=!hb("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={bootDisk:this.ke,loadDisk:this.Ad,selectDrive:this.ih,wait:this.lh}}p(qi,r);
function ri(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){v(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=qi.prototype;
h.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.H[b]=c,c.onchange=function(){si(d)},!0;case "descDisk":case "listDrives":return this.H[b]=c,c.onchange=function(){var a=Ja(c.value,10);null!=a&&Mi(d,a)},!0;case "loadDisk":return this.H[b]=c,c.onclick=function(){d.Ad()},!0;case "bootDisk":return this.H[b]=c,c.onclick=function(){d.ke()},!0;case "saveDisk":if(!this.O){c.parentNode.removeChild(c);break}this.H[b]=c;c.onclick=function(){var a=d.H.listDrives;if(a&&a.options&&d.g)if(a=
d.g[Ja(a.value,10)||0])if(a=a.da){var b;b="";for(var c=0,k;k=ni(a,c++);)for(var l=0,m=k.length;l<m;l++)b+=String.fromCharCode(oi(a,k,l));b=btoa(b);a=a.Ed.replace(".json",".img");c=null;b="data:application/octet-stream;base64,"+b;a&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=b,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),a="Check your Downloads folder for "+a+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+
@ -247,43 +247,43 @@ d.g[Ja(a.value,10)||0])if(a=a.da){var b;b="";for(var c=0,k;k=ni(a,c++);)for(var
h.Aa=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;if(a=ri(this,ee(this.J,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.N[e]=a[e]);this.reset();this.Qa=nd(this.f,this.R.ud,this.R.qd,this.ha);Vb(b,this,this.U);Xb(b,this.reset.bind(this));Oi(this,"None",Pi,!0);this.O&&Oi(this,"Local Disk",Qi);Oi(this,"Remote Disk",Ri);Si(this)||y(this)};
h.Da=function(a,b){if(!b){if(!a){if(this.reset(),this.J.M){this.B=[];for(a=0;a<this.g.length;a++)Ti(this,a,!0);Si(this,!0)}}else if(!this.restore(a))return!1;if(a=this.H.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.P;b++){var c=document.createElement("option");c.value=b;c.text=this.g[b].Qc||"---";a.appendChild(c)}0<this.P&&(a.value="0",Mi(this,0))}}return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.Db();Ui(this)};
h.save=function(){var a=new G(this);a.set(0,this.Rc());a.set(1,Vi(this));a.set(2,Wi(this));return a.data()};h.restore=function(a){var b=!0;this.Db(a[0])||(b=!1);var c=a[1];c&&(this.B=c);Ui(this,a[2])||(b=!1);return b};h.Db=function(){return!0};h.Rc=function(){return[]};
function Ui(a,b){for(var c=0;c<a.g.length;c++){var d=a.g[c];void 0===d&&(d=a.g[c]={});var e=a,f=d,d=c,g=a.S,k=b&&b[c],l=0;f.Tb=d;f.name=e.Mb;f.Mc=f.Pb=!1;f.ic=null;f.zd=!0;f.Qc=g[l++]+d;f.Z=g[l++];f.ja=g[l++];f.ea=g[l++];f.ua=g[l++];f.Hf=g[l++];f.If=g[l++];f.Jf=g[l++];f.Bf=g[l++];f.status=g[l++];f.nk=0;f.mk=0;f.ie=1;f.Af=f.ea;f.ve=f.ua;f.wk=0;f.Dk=null;f.da||(f.Oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.g[d],Ti(e,d,!0),g.Pb=!0,d=new gi(e,g,"preload"),e.ne(g,d,f,k,!0)):Xi(e,d,l,g,!0)?f.da&&g&&Yi(e,
function Ui(a,b){for(var c=0;c<a.g.length;c++){var d=a.g[c];void 0===d&&(d=a.g[c]={});var e=a,f=d,d=c,g=a.S,k=b&&b[c],l=0;f.Tb=d;f.name=e.Mb;f.Mc=f.Pb=!1;f.ic=null;f.zd=!0;f.Qc=g[l++]+d;f.Z=g[l++];f.ja=g[l++];f.ea=g[l++];f.ua=g[l++];f.If=g[l++];f.Jf=g[l++];f.Kf=g[l++];f.Bf=g[l++];f.status=g[l++];f.rk=0;f.qk=0;f.ie=1;f.Af=f.ea;f.ve=f.ua;f.zk=0;f.Gk=null;f.da||(f.Oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.g[d],Ti(e,d,!0),g.Pb=!0,d=new gi(e,g,"preload"),e.ne(g,d,f,k,!0)):Xi(e,d,l,g,!0)?f.da&&g&&Yi(e,
l,g,f.da):y(e,!1))}return!0}function Wi(a){for(var b=[],c=0;c<a.g.length;c++){var d=a.g[c];b.push([d.Pb,d.Ya,d.Oa])}return b}function Vi(a){for(var b=0;b<a.g.length;b++){var c=a.g[b];c.da&&Zi(a,c.Oa,c.da)}return a.B}
function Si(a,b){b||(a.M=0);for(var c in a.N){var d=a.N[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.H.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=Na(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!Xi(a,g,f,e,!0)&&b&&y(a,!1);continue}a.T("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.M}
h.Ad=function(a,b,c){if(!a&&!b){var d=this.H.listDisks;d&&d.options&&(a=d.options[d.selectedIndex].text,b=d.value)}d=(d=this.H.listDrives)&&Ja(d.value,10);if(void 0===d||0>d||d>=this.g.length)return this.T("Unable to load the selected drive"),!1;if(!b)return Ti(this,d),!0;if(b==Qi)return this.T('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Ri){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=Na(b);this.status("Attempting to load "+b+' as "'+
a+'"')}Xi(this,d,a,b,!1,c);return!0};h.ke=function(){var a,b=this.H.listDrives,b=b&&Ja(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;xe(this.f,0,!0,b);return(a=this.Ub(a,a.Hf,a.If,a.Jf,a.Bf,0,2))?(this.T("Unable to read the boot sector ("+a+")"),!1):!0};
a+'"')}Xi(this,d,a,b,!1,c);return!0};h.ke=function(){var a,b=this.H.listDrives,b=b&&Ja(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;xe(this.f,0,!0,b);return(a=this.Ub(a,a.If,a.Jf,a.Kf,a.Bf,0,2))?(this.T("Unable to read the boot sector ("+a+")"),!1):!0};
function Xi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Oa.toLowerCase()!=d.toLowerCase()&&(g++,Ti(a,b,!0),k.Mc?a.T(a.type+" busy"):(k.Mc=!0,e&&(k.yd=!0,a.M++,z(a)&&C(a,"auto-loading disk: "+c)),k.Pb=!!f,ki(new gi(a,k,"preload"),c,d,f,a.ne)&&g++));return g}
h.ne=function(a,b,c,d,e){a.Mc=!1;b&&(b.Z>a.Z||b.ja>a.ja)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Qc||"---")),b=null);b?(a.da=b,a.Ya=c,a.Oa=d,this.we(a.Tb),Yi(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Qc||"---"),a.yd||e),this.J&&oe(this.J)):a.Pb=!1;a.yd&&(a.yd=!1,--this.M||y(this));Mi(this,a.Tb);a.ic&&(a.ic(),a.ic=null)};
function Oi(a,b,c,d){if((a=a.H.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
function Mi(a,b,c){var d=!1;if(0<=b&&b<a.g.length){var e=a.g[b],f=a.H.listDisks;a=a.H.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(Ja(a.options[c].value,10)==e.Tb){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=Ja(a.value,10);e=e.Pb?Qi:e.Oa;if(!isNaN(c)&&c==b){for(c=0;c<f.options.length;c++)if(f.options[c].value==e){f.selectedIndex!=c&&(f.selectedIndex=c);d=!0;break}c==f.options.length&&(f.selectedIndex=0)}}}return d}
h.gh=function(a){var b=this.H.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=Ja(b.options[d].value,10);if(0<=e)return Mi(this,e,!0)}return!1};
function si(a){var b=a.H.listDisks,c=a.H.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){v(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.ih=function(a){for(var b=0;b<this.g.length;b++){var c=this.g[b];if(c&&c.Mc)return c.ic||(c.ic=a),!1}return!0};
h.ih=function(a){var b=this.H.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=Ja(b.options[d].value,10);if(0<=e)return Mi(this,e,!0)}return!1};
function si(a){var b=a.H.listDisks,c=a.H.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){v(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.lh=function(a){for(var b=0;b<this.g.length;b++){var c=this.g[b];if(c&&c.Mc)return c.ic||(c.ic=a),!1}return!0};
function Ti(a,b,c){var d=a.g[b];if(d.da||!1===c)Zi(a,d.Oa,d.da),d.Ya="",d.Oa="",d.da=null,d.Pb=!1,c||(a.T("Drive "+(a.g[b].Qc||"---")+" unloaded",c),Mi(a,b))}function Yi(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function Zi(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}h.we=function(){};h.Ub=function(){return-1};h.Uc=function(){return-1};var Pi="",Qi="?",Ri="??";
function N(a){qi.call(this,"RK11",a,65536,Lb,Lb.Gc,$i);this.G=this.i=this.b=this.w=this.u=this.j=this.C=0}p(N,qi);h=N.prototype;h.Db=function(a){a||(a=[aj.Gc|aj.ce|aj.Zd,0,R.$a,0,0,0,0]);a=ia(a);this.G=a.next().value;this.i=a.next().value;this.b=a.next().value;this.w=a.next().value;this.u=a.next().value;this.j=a.next().value;this.C=a.next().value;return!0};h.Rc=function(){return[this.G,this.i,this.b,this.w,this.u,this.j,this.C]};
h.Ub=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Td,e=0);for(;e;){if(!n){if(b>=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1);if(!n){m=S.be;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}var t,u;if(0>(t=a.read(n,q++))||0>(u=a.read(n,q++))){m=S.Fc;break}if(!k&&(wc(this.D,Ne(this.f,f),t|u<<8),jd(this.D))){m=S.ec;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
h.Uc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Td,e=0);for(;e;){var t=yc(this.D,Ne(this.f,f));if(jd(this.D)){m=S.ec;break}if(!n){if(b>=a.Z){m=S.Ec;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.be;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}if(k){var u,D;if(0>(u=a.read(n,q++))||0>(D=a.read(n,q++))){m=S.Fc;break}if(t!=(u|D<<8)){m=S.fe;break}}else if(!a.write(n,q++,t&255)||!a.write(n,q++,t>>8)){m=S.Fc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
h.Ze=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Jb|f>>16-R.ma.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~bj.rd|d&bj.rd;this.i|=a;cj(this);return!0};function cj(a){a.b&=~R.jb;a.i&&(a.i|=S.Je,a.b|=R.jb,a.i&S.ed&&(a.b|=R.ed),z(a)&&C(a,a.type+": ERROR: "+E(a.i)))}h.Ag=function(){return this.G};h.Oh=function(){};h.Bg=function(){return this.i};h.Ph=function(){};h.xg=function(){return this.b&R.fc};
h.Lh=function(a){this.b=this.b&~R.Sa|a&R.Sa;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&bj.tb)>>bj.ma.tb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.$a|R.sd);this.i&=~S.qf;switch(c=this.b&R.wa){case dj.Ee:z(this)&&C(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.$a;break;case dj.Ue:d="RCHK";case dj.ub:d||(d="READ"),b=this.Ub;case dj.vd:d||(d="WCHK");case dj.hc:d||(d="WRITE");b||(b=this.Uc);g=(this.j&bj.bc)>>bj.ma.bc;k=(this.j&bj.hd)>>bj.ma.hd;l=this.j&bj.rd;m=65536-this.w&65535;n=(this.b&R.Jb)<<
h.Ze=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Jb|f>>16-R.ma.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~bj.rd|d&bj.rd;this.i|=a;cj(this);return!0};function cj(a){a.b&=~R.jb;a.i&&(a.i|=S.Je,a.b|=R.jb,a.i&S.ed&&(a.b|=R.ed),z(a)&&C(a,a.type+": ERROR: "+E(a.i)))}h.Bg=function(){return this.G};h.Rh=function(){};h.Cg=function(){return this.i};h.Sh=function(){};h.yg=function(){return this.b&R.fc};
h.Oh=function(a){this.b=this.b&~R.Sa|a&R.Sa;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&bj.tb)>>bj.ma.tb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.$a|R.sd);this.i&=~S.qf;switch(c=this.b&R.wa){case dj.Ee:z(this)&&C(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.$a;break;case dj.Ue:d="RCHK";case dj.ub:d||(d="READ"),b=this.Ub;case dj.vd:d||(d="WCHK");case dj.hc:d||(d="WRITE");b||(b=this.Uc);g=(this.j&bj.bc)>>bj.ma.bc;k=(this.j&bj.hd)>>bj.ma.hd;l=this.j&bj.rd;m=65536-this.w&65535;n=(this.b&R.Jb)<<
16-R.ma.Jb|this.u;q=this.b&R.Qe?0:2;z(this)&&C(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+E(n)+"--"+E(n+(m<<1)),!0,!0);if(g>=f.Z){this.i|=S.Ec;break}if(l>=f.ea){this.i|=S.Fc;break}a=b.call(this,f,g,k,l,m,n,q,c>=dj.vd,this.Ze.bind(this));break;case dj.Kc:g=(this.j&bj.bc)>>bj.ma.bc;z(this)&&C(this,this.type+": SEEK("+g+")",!0);g<f.Z?this.b|=R.sd:this.i|=S.Ec;break;case dj.Ke:z(this)&&C(this,this.type+": DRESET("+e+")");this.i=this.j=0;this.b=R.$a|R.sd;break;default:z(this)&&C(this,this.type+": UNSUPPORTED("+
c+")")}this.G=f.status|(f.da?aj.Fa:0)|e<<aj.ma.kd|this.j&aj.pf;cj(this);a&&(this.b&=~R.dc,this.b|=R.$a,this.b&R.Ib&&ld(this.f,this.Qa))}};h.Cg=function(){return this.w};h.Qh=function(a){this.w=a};h.wg=function(){return this.u};h.Kh=function(a){this.u=a};h.yg=function(){return this.j};h.Mh=function(a){this.j=a};h.zg=function(){return this.C};h.Nh=function(a){this.C=a};
var aj=Lb.Hc,S=Lb.bf,R=Lb.$e,bj=Lb.af,dj=Lb.wa,ej={},$i=(ej[65280]=[null,null,N.prototype.Ag,N.prototype.Oh,"RKDS"],ej[65282]=[null,null,N.prototype.Bg,N.prototype.Ph,"RKER"],ej[65284]=[null,null,N.prototype.xg,N.prototype.Lh,"RKCS"],ej[65286]=[null,null,N.prototype.Cg,N.prototype.Qh,"RKWC"],ej[65288]=[null,null,N.prototype.wg,N.prototype.Kh,"RKBA"],ej[65290]=[null,null,N.prototype.yg,N.prototype.Mh,"RKDA"],ej[65294]=[null,null,N.prototype.zg,N.prototype.Nh,"RKDB"],ej);
function Cd(a){qi.call(this,"RL11",a,131072,Mb,Mb.cf,fj);this.b=this.C=this.i=this.j=this.w=this.u=0}p(Cd,qi);h=Cd.prototype;h.Db=function(a){a||(a=[U.Fa|U.$a,0,0,0,0,0]);a=ia(a);this.b=a.next().value;this.C=a.next().value;this.i=a.next().value;this.j=a.next().value;this.w=a.next().value;this.u=a.next().value;return!0};h.Rc=function(){return[this.b,this.C,this.i,this.j,this.w,this.u]};
c+")")}this.G=f.status|(f.da?aj.Fa:0)|e<<aj.ma.kd|this.j&aj.pf;cj(this);a&&(this.b&=~R.dc,this.b|=R.$a,this.b&R.Ib&&ld(this.f,this.Qa))}};h.Dg=function(){return this.w};h.Th=function(a){this.w=a};h.xg=function(){return this.u};h.Nh=function(a){this.u=a};h.zg=function(){return this.j};h.Ph=function(a){this.j=a};h.Ag=function(){return this.C};h.Qh=function(a){this.C=a};
var aj=Lb.Hc,S=Lb.bf,R=Lb.$e,bj=Lb.af,dj=Lb.wa,ej={},$i=(ej[65280]=[null,null,N.prototype.Bg,N.prototype.Rh,"RKDS"],ej[65282]=[null,null,N.prototype.Cg,N.prototype.Sh,"RKER"],ej[65284]=[null,null,N.prototype.yg,N.prototype.Oh,"RKCS"],ej[65286]=[null,null,N.prototype.Dg,N.prototype.Th,"RKWC"],ej[65288]=[null,null,N.prototype.xg,N.prototype.Nh,"RKBA"],ej[65290]=[null,null,N.prototype.zg,N.prototype.Ph,"RKDA"],ej[65294]=[null,null,N.prototype.Ag,N.prototype.Qh,"RKDB"],ej);
function Bd(a){qi.call(this,"RL11",a,131072,Mb,Mb.cf,fj);this.b=this.C=this.i=this.j=this.w=this.u=0}p(Bd,qi);h=Bd.prototype;h.Db=function(a){a||(a=[U.Fa|U.$a,0,0,0,0,0]);a=ia(a);this.b=a.next().value;this.C=a.next().value;this.i=a.next().value;this.j=a.next().value;this.w=a.next().value;this.u=a.next().value;return!0};h.Rc=function(){return[this.b,this.C,this.i,this.j,this.w,this.u]};
h.Ub=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=gj.ab,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=gj.ab;break}m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=gj.ab;break}wc(this.D,Ne(this.f,f),n|q<<8);if(jd(this.D)){g=gj.ec;break}f+=2;e--;if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.ab;break}}return l?l(g,b,c,d,e,f):g};
h.Uc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=gj.ab,e=0);for(;e;){var n=yc(this.D,Ne(this.f,f));if(jd(this.D)){g=gj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=gj.ab;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=gj.ab;break}if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=gj.ab;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.Za|f>>16-U.ma.Za&U.Za;this.u=f>>16&hj.bb;this.j=this.i=b<<ij.ma.gc|(c?ij.Jc:0)|d&ij.$d;this.w=65536-e&65535;a&&(this.b=this.b|a|U.jb);return!0};h.Fg=function(){return this.b&U.fc};
h.Th=function(a){this.b=this.b&~U.Sa|a&U.Sa;this.u=this.u&60|(a&U.Za)>>U.ma.Za;if(!(this.b&U.$a)){a=!0;var b,c="",d=this.g[(this.b&U.tb)>>U.ma.tb],e=d.da,f,g,k;this.b&=~U.Fa;switch(this.b&U.wa){case jj.uf:this.w&kj.Qd&&(this.b&=U.Fa|U.wa|U.Za);this.w=d.status|this.j&ij.Jc|(e&&512==e.Z?kj.Ne:0);break;case jj.Kc:(this.i&ij.Me)==ij.rf&&(b=this.i&ij.gc,c=(this.i&ij.tf)<<2,this.j=this.i&ij.sf?this.j+b:this.j-b,this.i=this.j=this.j&ij.gc|c);break;case jj.Ye:this.w=this.j;break;case jj.Ve:c="READ",b=this.Ub;
case jj.wf:c||(c="WRITE"),b||(b=this.Uc),f=this.i>>ij.ma.gc,g=this.i&ij.Jc?1:0,k=this.i&ij.$d,!e||f>=e.Z||k>=e.ea?this.b=this.b|gj.ab|U.jb:(a=65536-this.w&65535,e=(this.u&hj.bb)<<16|this.C,z(this)&&C(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.df.bind(this)))}a&&(this.b=this.b|U.Fa|U.$a,this.b&U.Ib&&ld(this.f,this.Qa))}};h.Dg=function(){return this.C};h.Rh=function(a){this.C=a&lj.Sa};h.Gg=function(){return this.i};
h.Uh=function(a){this.i=a};h.Hg=function(){return this.w};h.Vh=function(a){this.w=a};h.Eg=function(){return this.u};h.Sh=function(a){this.u=a&hj.bb;this.b=this.b&~U.Za|(this.u&3)<<U.ma.Za};
var U=Mb.gf,lj=Mb.ef,ij=Mb.hf,kj=Mb.Ic,hj=Mb.ff,gj=Mb.Pd,jj=Mb.wa,mj={},fj=(mj[63744]=[null,null,Cd.prototype.Fg,Cd.prototype.Th,"RLCS"],mj[63746]=[null,null,Cd.prototype.Dg,Cd.prototype.Rh,"RLBA"],mj[63748]=[null,null,Cd.prototype.Gg,Cd.prototype.Uh,"RLDA"],mj[63750]=[null,null,Cd.prototype.Hg,Cd.prototype.Vh,"RLMP"],mj[63752]=[null,null,Cd.prototype.Eg,Cd.prototype.Sh,"RLBE"],mj);
function Dd(a){qi.call(this,"RX11",a,262144,Nb,Nb.jf,nj);this.I=this.G=this.i=this.L=this.b=this.C=0;this.j=V.Kb;this.u=0;this.w=Array(128).fill(0)}p(Dd,qi);h=Dd.prototype;h.Db=function(a){a?(a=ia(a),this.b=a.next().value,this.C=a.next().value,this.I=a.next().value,this.G=a.next().value,this.i=a.next().value,this.L=a.next().value,this.j=a.next().value,this.u=a.next().value,this.w=a.next().value):(this.C=this.b=0,this.G=this.I=1,this.L=this.i=0,this.j=V.ub,this.u=0,rd(this.f,this.Qa),oj(this));return!0};
h.df=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&~U.Za|f>>16-U.ma.Za&U.Za;this.u=f>>16&hj.bb;this.j=this.i=b<<ij.ma.gc|(c?ij.Jc:0)|d&ij.$d;this.w=65536-e&65535;a&&(this.b=this.b|a|U.jb);return!0};h.Gg=function(){return this.b&U.fc};
h.Wh=function(a){this.b=this.b&~U.Sa|a&U.Sa;this.u=this.u&60|(a&U.Za)>>U.ma.Za;if(!(this.b&U.$a)){a=!0;var b,c="",d=this.g[(this.b&U.tb)>>U.ma.tb],e=d.da,f,g,k;this.b&=~U.Fa;switch(this.b&U.wa){case jj.uf:this.w&kj.Qd&&(this.b&=U.Fa|U.wa|U.Za);this.w=d.status|this.j&ij.Jc|(e&&512==e.Z?kj.Ne:0);break;case jj.Kc:(this.i&ij.Me)==ij.rf&&(b=this.i&ij.gc,c=(this.i&ij.tf)<<2,this.j=this.i&ij.sf?this.j+b:this.j-b,this.i=this.j=this.j&ij.gc|c);break;case jj.Ye:this.w=this.j;break;case jj.Ve:c="READ",b=this.Ub;
case jj.wf:c||(c="WRITE"),b||(b=this.Uc),f=this.i>>ij.ma.gc,g=this.i&ij.Jc?1:0,k=this.i&ij.$d,!e||f>=e.Z||k>=e.ea?this.b=this.b|gj.ab|U.jb:(a=65536-this.w&65535,e=(this.u&hj.bb)<<16|this.C,z(this)&&C(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.df.bind(this)))}a&&(this.b=this.b|U.Fa|U.$a,this.b&U.Ib&&ld(this.f,this.Qa))}};h.Eg=function(){return this.C};h.Uh=function(a){this.C=a&lj.Sa};h.Hg=function(){return this.i};
h.Xh=function(a){this.i=a};h.Ig=function(){return this.w};h.Yh=function(a){this.w=a};h.Fg=function(){return this.u};h.Vh=function(a){this.u=a&hj.bb;this.b=this.b&~U.Za|(this.u&3)<<U.ma.Za};
var U=Mb.gf,lj=Mb.ef,ij=Mb.hf,kj=Mb.Ic,hj=Mb.ff,gj=Mb.Pd,jj=Mb.wa,mj={},fj=(mj[63744]=[null,null,Bd.prototype.Gg,Bd.prototype.Wh,"RLCS"],mj[63746]=[null,null,Bd.prototype.Eg,Bd.prototype.Uh,"RLBA"],mj[63748]=[null,null,Bd.prototype.Hg,Bd.prototype.Xh,"RLDA"],mj[63750]=[null,null,Bd.prototype.Ig,Bd.prototype.Yh,"RLMP"],mj[63752]=[null,null,Bd.prototype.Fg,Bd.prototype.Vh,"RLBE"],mj);
function Cd(a){qi.call(this,"RX11",a,262144,Nb,Nb.jf,nj);this.I=this.G=this.i=this.L=this.b=this.C=0;this.j=V.Kb;this.u=0;this.w=Array(128).fill(0)}p(Cd,qi);h=Cd.prototype;h.Db=function(a){a?(a=ia(a),this.b=a.next().value,this.C=a.next().value,this.I=a.next().value,this.G=a.next().value,this.i=a.next().value,this.L=a.next().value,this.j=a.next().value,this.u=a.next().value,this.w=a.next().value):(this.C=this.b=0,this.G=this.I=1,this.L=this.i=0,this.j=V.ub,this.u=0,rd(this.f,this.Qa),oj(this));return!0};
h.Rc=function(){return[this.b,this.C,this.I,this.G,this.i,this.L,this.j,this.u,this.w]};h.we=function(a){a||this.Db()};function pj(a,b){b&&(a.L=b,a.C=a.i,a.b|=W.jb);a.j=V.Kb;a.b|=W.DONE;a.b&W.Ib&&ld(a.f,a.Qa)}
h.Ub=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.da,n=null,q;z(this)&&C(this,this.type+".readData("+b+":"+c+":"+d+") "+E(f)+"--"+E(f+(e<<1)),!0,!0);m||(k=a.Tb?qj.gd:qj.fd,e=0);for(;e;){if(!n){if(b>=m.Z){k=qj.Se;break}n=m.seek(b,c,d+1);if(!n){k=qj.pd;break}q=0;++d>=m.ea&&(d=0,++c>=m.ja&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=qj.od;break}wc(this.D,Ne(this.f,f),a|t<<8);q>=m.ua&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
function oj(a){var b=0,c=a.b&W.td?1:0,d=a.g[c],d=d&&d.da,e=a.I&rj.bb,f=a.G&sj.bb;a.i&=~(tj.Ld|tj.Wd|tj.cc|tj.Fa);if(d)if(a.i|=tj.Fa,z(a)&&C(a,a.type+".readSector("+e+":0:"+f+")",!0,!0),c=d.seek(e,0,f,!0)){e=0;for(f=a.w.length;e<f;){var g=d.read(c,e);if(0>g){b=qj.od;break}a.w[e++]=g}c.Ef&&(a.i|=tj.cc)}else b=qj.pd;else b=c?qj.gd:qj.fd;pj(a,b)}
h.Jg=function(a,b){a=this.b;if(!b)switch(a&=W.fc,this.j){case V.bd:case V.EMPTY:this.u<this.w.length&&(this.b|=W.fb);break;case V.ub:case V.hc:case V.Lc:2>this.u&&(this.b|=W.fb)}return a};
h.Xh=function(a){this.b=this.b&~W.Sa|a&W.Sa;if(this.b&W.INIT)this.Db();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.wa,this.b&=~(W.dc|W.fb|W.DONE|W.jb),rd(this.f,this.Qa),z(this)&&C(this,this.type+".processCommand("+uj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.ub:case V.hc:case V.Lc:this.u=0;break;case V.Xe:a=this.g[this.b&W.td?1:0];this.i&=~tj.Fa;a&&a.da&&(this.i|=tj.Fa);this.C=this.i;pj(this);break;case V.We:this.C=this.L,pj(this)}else this.b&W.Ib?this.b&W.DONE&&ld(this.f,
this.Qa):rd(this.f,this.Qa)};h.Kg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.fb&&(this.b&=~W.fb,this.C=this.w[this.u]&255,z(this)&&C(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&pj(this))}return this.C};
h.Yh=function(a){switch(this.j){case V.bd:this.b&W.fb&&(this.b&=~W.fb,this.w[this.u]=a&255,z(this)&&C(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&pj(this));break;case V.ub:case V.hc:case V.Lc:if(this.b&W.fb)switch(this.b&=~W.fb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.ub)oj(this);else{var b=this.j==V.Lc,c=0,d=this.b&W.td?1:0,e=this.g[d],e=e&&e.da,f=this.I&rj.bb,g=this.G&sj.bb;this.i&=~(tj.Ld|tj.Wd|tj.cc|tj.Fa);if(e)if(this.i|=tj.Fa,z(this)&&
C(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Ef=!0),b=0,f=this.w.length;b<f;){if(!e.write(d,b,this.w[b]&255)){c=qj.od;break}b++}else c=qj.pd;else c=d?qj.gd:qj.fd;pj(this,c)}}}this.C=a};var W=Nb.kf,rj=Nb.nf,sj=Nb.mf,tj=Nb.lf,V=Nb.wa,qj=Nb.ERROR,uj="FILL EMPTY WRITE READ UNUSED RDSTAT WRDEL RDERR".split(" "),vj={},nj=(vj[65144]=[null,null,Dd.prototype.Jg,Dd.prototype.Xh,"RXCS"],vj[65146]=[null,null,Dd.prototype.Kg,Dd.prototype.Yh,"RXDB"],vj);
h.Kg=function(a,b){a=this.b;if(!b)switch(a&=W.fc,this.j){case V.bd:case V.EMPTY:this.u<this.w.length&&(this.b|=W.fb);break;case V.ub:case V.hc:case V.Lc:2>this.u&&(this.b|=W.fb)}return a};
h.$h=function(a){this.b=this.b&~W.Sa|a&W.Sa;if(this.b&W.INIT)this.Db();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.wa,this.b&=~(W.dc|W.fb|W.DONE|W.jb),rd(this.f,this.Qa),z(this)&&C(this,this.type+".processCommand("+uj[this.j>>1]+")",!0,!0),this.j){case V.bd:case V.EMPTY:case V.ub:case V.hc:case V.Lc:this.u=0;break;case V.Xe:a=this.g[this.b&W.td?1:0];this.i&=~tj.Fa;a&&a.da&&(this.i|=tj.Fa);this.C=this.i;pj(this);break;case V.We:this.C=this.L,pj(this)}else this.b&W.Ib?this.b&W.DONE&&ld(this.f,
this.Qa):rd(this.f,this.Qa)};h.Lg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.fb&&(this.b&=~W.fb,this.C=this.w[this.u]&255,z(this)&&C(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&pj(this))}return this.C};
h.ai=function(a){switch(this.j){case V.bd:this.b&W.fb&&(this.b&=~W.fb,this.w[this.u]=a&255,z(this)&&C(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&pj(this));break;case V.ub:case V.hc:case V.Lc:if(this.b&W.fb)switch(this.b&=~W.fb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.ub)oj(this);else{var b=this.j==V.Lc,c=0,d=this.b&W.td?1:0,e=this.g[d],e=e&&e.da,f=this.I&rj.bb,g=this.G&sj.bb;this.i&=~(tj.Ld|tj.Wd|tj.cc|tj.Fa);if(e)if(this.i|=tj.Fa,z(this)&&
C(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Ef=!0),b=0,f=this.w.length;b<f;){if(!e.write(d,b,this.w[b]&255)){c=qj.od;break}b++}else c=qj.pd;else c=d?qj.gd:qj.fd;pj(this,c)}}}this.C=a};var W=Nb.kf,rj=Nb.nf,sj=Nb.mf,tj=Nb.lf,V=Nb.wa,qj=Nb.ERROR,uj="FILL EMPTY WRITE READ UNUSED RDSTAT WRDEL RDERR".split(" "),vj={},nj=(vj[65144]=[null,null,Cd.prototype.Kg,Cd.prototype.$h,"RXCS"],vj[65146]=[null,null,Cd.prototype.Lg,Cd.prototype.ai,"RXDB"],vj);
function wj(a){r.call(this,"Debugger",a);this.Ba=+a.base||16;this.ia=!1;this.w=0;this.O=!1;this.u=-1;this.j=[];this.S={}}p(wj,r);wj.prototype.qe=function(){return-1};wj.prototype.re=function(){};
function xj(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(Xa(b.substring(c,f))),c=f+1}}return a}
function yj(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;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?1:0;break;case "&":d=f&e;break;
@ -305,13 +305,13 @@ function Ij(a,b){a.F=a;a.ha=a.je=536870912;a.R=null;a.M=[];b=xj(a,b.replace("key
h.qe=function(a){a=a.toUpperCase();var b=Tj[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function Uj(a){return 6>a?"R"+a:6==a?"SP":"PC"}
h.re=function(a){var b;if(0<=a)if(8>a)b=this.f.g[a];else if(16>a)b=this.f.qa[a-8];else if(20>a)b=this.f.W[a-16];else{var c=this.f,d=this.b;switch(a){case Vj:b=yd(this.f);break;case Wj:b=c.eb;break;case Xj:b=c.P;break;case Yj:b=c.xa&65280;break;case Zj:b=sd(c);break;case ak:b=ud(c);break;case bk:b=vd(c);break;case ck:b=c.U;break;case dk:d&&(b=d.fa);break;case ek:d&&(b=d.Wa);break;case fk:d&&Bc(d)&&(b=d.Xa)}}return b};
h.message=function(a,b){b&&(a+=" @"+Sj(this,X(this.f.O&65535)));if(!this.R||a!=this.R)if(this.R=a,this.ha&1073741824)this.M.push(a);else{var c;if(this.ha&-2147483648&&this.f&&(c=this.f.A.V)||Ga(this,!0))this.ba(),c&&(a+=" (cpu halted)");this.v(a);this.f&&(a=this.f,pe(a),a.Bb=0,a.J&&H(a.J,void 0))}};
function Hj(a){var b;if(!wf(a))a.i&&a.i.length&&a.v("instruction history buffer freed"),a.P=0,a.i=[];else if(!a.i||!a.i.length){a.i=Array(gk);for(b=0;b<a.i.length;b++)a.i[b]=X();a.P=0;a.v("instruction history buffer allocated")}}function hk(a,b,c){if(!ik(a,c))return!1;qc(a.f,b);return!0}
function rc(a,b,c,d){if(!ik(a))return!1;var e="";null===c&&(e=(c=!a.qa||"tr"==a.qa)?"tr":"t");a.w=0;b||wf(a)&&xf(a,a.f.g[7],0);try{b=qe(a.f,b);var f=a.f.Cc(b);0<f&&(sc(a.f,f),a.w+=f,tc(a.f,f,!0),uc(a.f,f),a.X++)}catch(g){"number"!=typeof g&&(a.w=0,Da(a.f,g.stack||g.message))}!1!==d&&(a.b&&a.b.stop(),H(a.J,-1));he(a,c||!1,e);return 0<a.w}h.ba=function(a){this.f&&this.f.ba(a)};
function Hj(a){var b;if(!af(a))a.i&&a.i.length&&a.v("instruction history buffer freed"),a.P=0,a.i=[];else if(!a.i||!a.i.length){a.i=Array(gk);for(b=0;b<a.i.length;b++)a.i[b]=X();a.P=0;a.v("instruction history buffer allocated")}}function hk(a,b,c){if(!ik(a,c))return!1;qc(a.f,b);return!0}
function rc(a,b,c,d){if(!ik(a))return!1;var e="";null===c&&(e=(c=!a.qa||"tr"==a.qa)?"tr":"t");a.w=0;b||af(a)&&bf(a,a.f.g[7],0);try{b=qe(a.f,b);var f=a.f.Cc(b);0<f&&(sc(a.f,f),a.w+=f,tc(a.f,f,!0),uc(a.f,f),a.X++)}catch(g){"number"!=typeof g&&(a.w=0,Da(a.f,g.stack||g.message))}!1!==d&&(a.b&&a.b.stop(),H(a.J,-1));he(a,c||!1,e);return 0<a.w}h.ba=function(a){this.f&&this.f.ba(a)};
function he(a,b,c){if(a.Ga){void 0===b&&(b=!0);c&&a.v(jk+c);c=a.f;if(c=c.i&128?c.Dc|c.Ac<<8:0){var d=c>>8;a.v("trapped to "+K(a,c&255,1)+" ("+(0>d?Kb[-d]:K(a,d))+")")}a.G=X(a.f.g[7]);b&&1!=a.I?kk(a):lk(a)}}function ik(a,b){var c;(c=!a.f||!Fa(a.f))||(c=a.f,c.A.aa?c=!0:(c.v(c.toString()+" not powered"),c=!1),c=!c);return c||a.f.A.V?(b||a.v("cpu busy or unavailable, command ignored"),!1):!Ea(a.f)}h.Da=function(a,b){return!b&&(this.reset(!0),a)?this.restore(a):!0};
h.Ca=function(a,b){b&&this.v(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){Hj(this);this.X=0;this.R=null;this.w=0;this.G=X(this.f.g[7]);this.A.V=!1;mk(this);a||he(this)};h.save=function(){var a=new G(this);a.set(0,Lj(this.G));a.set(1,Lj(this.N));a.set(2,[this.j,this.O,this.ha]);a.set(3,this.B);return a.data()};
h.restore=function(a){var b=0;void 0!==a[2]&&(this.G=Mj(this,a[b++]),this.N=Mj(this,a[b++]),this.j=a[b][0],"string"==typeof this.j&&(this.j=[this.j]),this.O=a[b][1],this.ha|=a[b][2]);a[3]&&(this.B=a[3]);return!0};h.start=function(a,b){this.I||this.v("running");this.A.V=!0;this.Ha=a;this.Ia=b};
h.stop=function(a,b){if(this.A.V){this.A.V=!1;this.w=b-this.Ia;if(!this.I){b="stopped";if(this.w){a-=this.Ha;var c=0<a?Math.round(1E3*this.w/a):0;b+=" (";wf(this)&&(b+=this.X+" instructions, ",this.X=0);b+=this.w+" cycles, "+a+" ms, "+c+" hz)"}else z(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.v(b)}he(this,!0);ie(this);mk(this,this.f.g[7]);this.R=null}};function wf(a){return 1<a.g.length||!!a.Y}
function xf(a,b,c){var d=-1;c||(d=zc(a.f,b))||(a.f.O&65535)!=b||(b=Ee(a.f,2));if(0<c&&(a.Y&&!--a.Y||nk(a,b,1,a.g)))return!0;0<=c&&a.i.length&&(a.X++,0>d&&(d=zc(a.f,b)),65535!=(d&65535)&&(a.Fd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Cg(a){var b=a.f;if(b.A.V)throw ye(b,a.f.O&65535),a.ba(),-1;return!1}function Rd(a,b,c){nk(a,b,c||1,a.L)&&a.ba(!1)}function Sd(a,b,c){nk(a,b,c||1,a.C)&&a.ba(!1)}
h.stop=function(a,b){if(this.A.V){this.A.V=!1;this.w=b-this.Ia;if(!this.I){b="stopped";if(this.w){a-=this.Ha;var c=0<a?Math.round(1E3*this.w/a):0;b+=" (";af(this)&&(b+=this.X+" instructions, ",this.X=0);b+=this.w+" cycles, "+a+" ms, "+c+" hz)"}else z(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.v(b)}he(this,!0);ie(this);mk(this,this.f.g[7]);this.R=null}};function af(a){return 1<a.g.length||!!a.Y}
function bf(a,b,c){var d=-1;c||(d=zc(a.f,b))||(a.f.O&65535)!=b||(b=Ee(a.f,2));if(0<c&&(a.Y&&!--a.Y||nk(a,b,1,a.g)))return!0;0<=c&&a.i.length&&(a.X++,0>d&&(d=zc(a.f,b)),65535!=(d&65535)&&(a.Fd(a.i[a.P],b),++a.P==a.i.length&&(a.P=0)));return!1}function Cg(a){var b=a.f;if(b.A.V)throw ye(b,a.f.O&65535),a.ba(),-1;return!1}function Rd(a,b,c){nk(a,b,c||1,a.L)&&a.ba(!1)}function Sd(a,b,c){nk(a,b,c||1,a.C)&&a.ba(!1)}
function Gj(a){var b,c,d;a.g=["bp"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],d=Kj(c),c.Ma?(c=a.D,Qd(c.b[d>>>c.g],!1)):Qe(a.f,!1);a.L=["br"];if(a.C)for(b=1;b<a.C.length;b++)c=a.C[b],d=Kj(c),c.Ma?(c=a.D,Qd(c.b[d>>>c.g],!0)):Qe(a.f,!0);a.C=["bw"];a.la=0;a.Y=0}
h.Cb=function(a,b,c){var d=!0;c||ok(this,a,b,!1,!0);if(a!=this.g){var e=Kj(b);if(-1===e)this.v("invalid address: "+Sj(this,b)),d=!1;else{var f=a==this.C;65535<e&&(b.Ma=!0);if(b.Ma){var g=this.D;g.b[e>>>g.g].Cb(e&g.i,f)}else e=this.f,(f?e.tc++:e.sc++)||we(e)}}d&&(a.push(b),c?b.Ua=!0:(pk(this,a,a.length-1,"set"),Hj(this)));return d};
function ok(a,b,c,d,e){var f=!1;c=Kj(c);for(var g=1;g<b.length;g++){var k=b[g];if(c==Kj(k)&&(!d||k.Ua)){f=!0;k.Ua||e||pk(a,b,g,"cleared");b.splice(g,1);b!=a.g&&(b=b==a.C,k.Ma?(d=a.D,Qd(d.b[c>>>d.g],b)):Qe(a.f,b));k.Ua||Hj(a);break}}return f}function qk(a,b){for(var c=1;c<b.length;c++)pk(a,b,c);return b.length-1}function pk(a,b,c,d){c=b[c];a.v(b[0]+" "+Sj(a,c)+(d?" "+d:c.Pc?' "'+c.Pc+'"':""))}
@ -323,7 +323,7 @@ Bk;switch(B&Ck){case 0:A=Uj(J);break;case 8:A="@"+Uj(J);D=Dk(u,u.f.g[J]);break;c
function Dk(a,b){b=Oe(a.f,b)[0];b>=a.f.vb&&b<a.D.B&&(b=b-a.f.vb+a.D.B);var c=a.D;a=null;b>=c.B&&(b=c.Pa[b&id])&&(a=b[4]);return a}function Ek(a,b){switch(b){case "N":a=De(a.f);break;case "Z":a=Ce(a.f);break;case "V":a=Be(a.f);break;case "C":a=Ae(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
function Fk(a,b){var c="",d=a.f;if(8>b)c=Uj(b),c+="="+K(a,d.g[b]);else if(13>b)c="A"+(b-8)+"="+K(a,d.qa[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+K(a,d.W[b-16]);else switch(b){case Vj:c="PS="+K(a,yd(d));break;case Wj:c="PI="+K(a,d.eb);break;case Xj:c="ER="+K(a,d.P);break;case Yj:c="SL="+K(a,d.xa&65280);break;case Zj:c="M0="+K(a,sd(d));break;case ak:c="M1="+K(a,ud(d));break;case bk:c="M2="+K(a,vd(d));break;case ck:c="M3="+K(a,d.U);break;case dk:a.b&&(c="AR="+K(a,a.b.fa,3));break;case ek:a.b&&(c="DR="+
K(a,a.b.Wa));break;case fk:a.b&&Bc(a.b)&&(c="SR="+K(a,a.b.Xa,3))}c&&(c+=" ");return c}function Gk(a,b){var c,d="";for(c=0;6>c;c++)d+=Fk(a,c);d=d+"\n"+(Fk(a,6)+Fk(a,7));d+=Fk(a,Vj)+Fk(a,Wj)+Fk(a,Yj);d+=Ek(a,"T")+Ek(a,"N")+Ek(a,"Z")+Ek(a,"V")+Ek(a,"C");b&&(b=d,c=""+(Fk(a,Zj)+Fk(a,ak)),c+=Fk(a,bk)+Fk(a,ck)+Fk(a,Xj),c=c+"\n"+(Fk(a,fk)+Fk(a,dk)+Fk(a,ek)),d=b+("\n"+c));return d}h.le=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
function Ch(a,b,c,d,e){var f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var l=k.o,m=k.a;if(void 0!==l){var n=f,l=[l>>>0,g],q=Za(n,l,a.le);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({Ck:b,K:c,Kf:d,ga:e,he:f})}function Hk(a,b,c){var d=[],e=Kj(b)>>>0;for(b=0;b<a.B.length;b++){var f=a.B[b],g=f.K>>>0,k=f.Kf;if(e>=g&&e<g+k){e=Za(f.he,[e-g],a.le);0<=e?Ik(a,b,e,d):c&&(e=~e,Ik(a,b,e-1,d),Ik(a,b,e,d));break}}return d}
function Ch(a,b,c,d,e){var f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var l=k.o,m=k.a;if(void 0!==l){var n=f,l=[l>>>0,g],q=Za(n,l,a.le);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({Fk:b,K:c,Lf:d,ga:e,he:f})}function Hk(a,b,c){var d=[],e=Kj(b)>>>0;for(b=0;b<a.B.length;b++){var f=a.B[b],g=f.K>>>0,k=f.Lf;if(e>=g&&e<g+k){e=Za(f.he,[e-g],a.le);0<=e?Ik(a,b,e,d):c&&(e=~e,Ik(a,b,e-1,d),Ik(a,b,e,d));break}}return d}
function Ik(a,b,c,d){var e={},f=a.B[b].he,g=0,k=null;0<=c&&c<f.length&&(g=f[c][0],k=f[c][1]);k&&(e=a.B[b].ga[k],k="."==k.charAt(0)?null:e.l||k);d.push(k);d.push(g);d.push(e.a);d.push(e.c)}function Jk(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Ej(a)||a.v("no variables"),!0;if(!c[2])return Ej(a,c[1]);if(!c[3])return delete a.S[c[1]],!0;b=zj(a,c[3]);return void 0!==b?(a.S[c[1]]=b,!0):!1}a.v("invalid assignment:"+b);return!1}
function Kk(a,b,c){var d=null;if(b=Pj(a,b,!0)){var e=Hk(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.K-e[1])&&(g=" + "+Ma(f)),f=e[0]+" ("+K(a,e[1])+")"+g,c&&a.v(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.K)&&(g=" - "+Ma(f)),f=e[4]+" ("+K(a,e[5])+")"+g,c&&a.v(f),d||(d=f))}else c&&a.v("no symbols")}return d}
function kk(a,b){var c;if(b&&"?"==b[1])a.v("register commands:"),a.v("\tr\tdump registers"),a.v("\trm\tdump misc registers"),a.v("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.f;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.v("missing value for "+b[1]);return}g=zj(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.g[6]=g&65535;break;case "PC":case "R7":ye(e,
@ -333,22 +333,22 @@ function Mk(a,b,c){if("?"==c)a.v("trace commands:"),a.v("\tt [#]\ttrace # instr
function lk(a,b,c,d){if(b=Pj(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=Bj(a,c.substr(1)),null!=c&&(d=c);else{d=Pj(a,c,!0);if(!d||d.K<b.K)return;e=d.K-b.K;if(256<e){a.v("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=Ga(a,!1)||a.I?a.w:null;var g=null!=f?"cycles":null,k=Hk(a,b),l=b.K;if(k[0]&&d&&(!c&&d||0>k[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.v(m)}k[3]&&(g=k[3],f=null);f=sk(a,b,g,f);a.v(f);a.G=b;e-=b.K-l;c++}}}
function rk(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.v(jk+b):(a.O&&(a.v("ended assemble at "+Sj(a,a.N)),a.G=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.R=null;if(Fa(a)&&0<b.length){a.O&&(b="a "+Sj(a,a.N)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var k=g[0],l=k.charAt(0),m=1;m<k.length;m++){var n=k.charAt(m);if("?"==l||"r"==l||"a">n||"z"<n){g[0]=k.substr(m);g.unshift(k.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var q=
Pj(a,g[1],!0);if(q)if(a.N=q,void 0===g[2])a.v("begin assemble at "+Sj(a,q)),a.O=!0,H(a.J);else{var t;a.v("not supported yet");t=[];if(t.length){for(var u=0;u<t.length;u++)a.Od(q,t[u],1);a.v(sk(a,a.N))}}break;case "b":a:{var D=g[0],A=g[1],B=b;if("?"==A)a.v("breakpoint commands:"),a.v("\tbp #\tset exec breakpoint"),a.v("\tbr #\tset read breakpoint"),a.v("\tbw #\tset write breakpoint"),a.v("\tbc #\tclear breakpoint (* to clear all)"),a.v("\tbl\tlist all breakpoints"),a.v("\tbn [#]\tbreak after # instruction(s)");
else{var J=D.charAt(1);if("l"==J){var vb;vb=0+qk(a,a.g);vb+=qk(a,a.L);(vb+=qk(a,a.C))||a.v("no breakpoints")}else if("n"==J){var Bd=+A||0;A&&(a.Y=Bd);a.v("break after "+Bd+" instruction(s)")}else if(void 0===A)a.v("missing breakpoint address");else{var sa=X();if("*"!=A&&(sa=Pj(a,A,!0),!sa))break a;"c"==J?null==sa.K?(Gj(a),a.v("all breakpoints cleared")):ok(a,a.g,sa)||ok(a,a.L,sa)||ok(a,a.C,sa)||a.v("breakpoint missing: "+Sj(a,sa)):null!=sa.K&&(Rj(a,sa,B),"p"==J?a.Cb(a.g,sa):"r"==J?a.Cb(a.L,sa):"w"==
else{var J=D.charAt(1);if("l"==J){var vb;vb=0+qk(a,a.g);vb+=qk(a,a.L);(vb+=qk(a,a.C))||a.v("no breakpoints")}else if("n"==J){var Dd=+A||0;A&&(a.Y=Dd);a.v("break after "+Dd+" instruction(s)")}else if(void 0===A)a.v("missing breakpoint address");else{var sa=X();if("*"!=A&&(sa=Pj(a,A,!0),!sa))break a;"c"==J?null==sa.K?(Gj(a),a.v("all breakpoints cleared")):ok(a,a.g,sa)||ok(a,a.L,sa)||ok(a,a.C,sa)||a.v("breakpoint missing: "+Sj(a,sa)):null!=sa.K&&(Rj(a,sa,B),"p"==J?a.Cb(a.g,sa):"r"==J?a.Cb(a.L,sa):"w"==
J?a.Cb(a.C,sa):a.v("unknown breakpoint command: "+J))}}}break;case "c":a.Ta&&(a.Ta.value="");break;case "d":a:{var Zb,jb=g[0],Sa=g[1],kb=g[2],kl=g[3];if("?"==Sa){var $b="";for(Zb in Pb)a.ka[Zb]&&($b&&($b+=","),$b+=Zb);$b+=",state,symbols";a.v("dump memory commands:");a.v("\tda [a] dump info for address a");a.v("\tdb [a] [n] dump n bytes at address a");a.v("\tdw [a] [n] dump n words at address a");a.v("\tdd [a] [n] dump n dwords at address a");a.v("\tds [a] [n] dump n words at address a as JSON");
a.v("\tdh [p] [n] dump n instructions from history position p");$b.length&&a.v("dump extension commands:\n\t"+$b)}else if("state"==Sa){var $e=Nk(a.J,!0);"console"==kb?console.log($e):(a.Ta&&(a.Ta.value=""),$e&&a.v($e))}else if("symbols"==Sa)for(var af=0;af<a.B.length;af++){var bf=a.B[af],ac;for(ac in bf.ga)if("."!=ac.charAt(0)){var ti=bf.ga[ac].o;if(void 0!==ti){var ui=bf.ga[ac].l;ui&&(ac=ui);a.v(K(a,ti)+" "+ac)}}}else{if("d"==jb){for(Zb in Pb)if(g[1]==Zb){var vi=a.ka[Zb];vi?(g.shift(),g.shift(),
vi(g)):a.v("no dump registered for "+Sa);break a}Sa||(jb=a.Ka||"dw")}else a.Ka=jb;if("dh"==jb){var wi=Sa,xi=kb,yi="",zi=0,Ia=a.P,Ta=a.i;if(Ta.length){var Ca=+wi||a.pa,Kc=+xi||10;isNaN(Ca)?Ca=Kc:yi="more ";Ca>Ta.length&&(a.v("note: only "+Ta.length+" available"),Ca=Ta.length);Ia-=Ca;0>Ia&&(null==Ta[Ta.length-1].K?(Ca=Ia+Ca,Ia=0):Ia+=Ta.length);var cf=[];"call"==xi&&(Kc=1E5,cf=["CALL"]);for(void 0!==wi&&a.v(Ca+" instructions earlier:");0<Kc&&Ia!=a.P;){var Ai=Ta[Ia++];if(null==Ai.K)break;var Lc=X(Ai.K),
ll=Ca--,Bi=sk(a,Lc,"history",ll);(!cf.length||0<=Bi.indexOf(cf[0]))&&a.v(Bi);Lc.xd&&(Ia+=Lc.xd,Kc-=Lc.xd,Ca-=Lc.xd);Ia>=Ta.length&&(Ia=0);a.pa=Ca;zi++;Kc--}}zi||(a.v("no "+yi+"history available"),a.pa=void 0)}else{var na=Pj(a,Sa);if(na)if("da"==jb){var df=na.Ma||65535<na.K,O=Oe(a.f,na.K||0,df);a.v(Wa("",df?12:19)+Ka(na.K,df?22:17,3)+" "+E(na.K,8));6>O.length?(2<O.length&&(a.v(" OFFSET: "+Ka(O[3],13,3)+" "+E(O[3],8)),a.v("UNIMAP["+La(O[1])+"]: "+Ka(O[2],22,3)+" "+E(O[2],8))),a.v(" PHYSICAL: "+
Ka(O[0],22,3)+" "+E(O[0],8))):(a.v(" OFFSET: "+Ka(O[1],13,3)+" "+E(O[1],8)),a.v("+ "+Ok[O[2]]+"PAR"+O[3]+": "+Ka(O[4],22,3)+" "+E(O[4],8)),a.v("& MMUMASK: "+Ka(O[5],22,3)+" "+E(O[5],8)),a.v("= PHYSICAL: "+Ka(O[0],22,3)+" "+E(O[0],8)))}else{var xb=0,ef="ds"==jb;if(kb){if("l"==kb.charAt(0))kb=kb.substr(1)||kl,xb=Bj(a,kb);else{var Ci=Pj(a,kb);Ci&&(xb=Ci.K-na.K)}0>xb&&(xb=0);65536<xb&&(xb=65536)}var nl=a.Ba;na.Ba&&(a.Ba=na.Ba);for(var yb="dd"==jb?4:"db"==jb?1:2,Ud=yb*xb||128,ff=
ef?16:a.Ba,ol=(Ud+ff-1)/ff|0||1,zb="";ol--&&0<Ud;){for(var Ab="",gf="",Sa=Sj(a,na),Vd=ff,Mc=0,Nc=0;0<Vd&&0<Ud;){var bc=1,Wd=1==yb?a.Nd(na,bc):a.Ra(na,bc=2),Mc=Mc|Wd<<(Nc<<3),Nc=Nc+bc;Nc==yb&&(ef?(Ab&&(Ab+=","),Ab+="0x"+F(Mc,2*yb)):(Ab+=K(a,Mc,yb),Ab+=1==yb?9==Vd?"-":" ":" "),Mc=Nc=0);Vd-=bc;for(Ud-=bc;1==yb&&bc--;)var hf=Wd&255,gf=gf+(32<=hf&&128>hf?String.fromCharCode(hf):"."),Wd=Wd>>8}zb&&(zb+="\n");zb=ef?zb+(Ab+","):zb+(Sa+": "+Ab+(Vd?"":" "+gf))}zb&&a.v(zb);a.xa=na;a.Ba=nl}}}}break;case "e":if("else"==
g[0])break;var cc,jf,kf,lf,mf=g[0],nf=g[1];"eb"==mf?(cc=1,jf=255,kf=a.Nd,lf=a.Od):"e"==mf||"ew"==mf?(cc=2,jf=65535,kf=a.Ra,lf=a.Le):nf=null;if(null==nf)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 Xd=Pj(a,nf);if(Xd)for(var Yd=2;Yd<g.length;Yd++){var Oc=zj(a,g[Yd]);if(void 0===Oc){a.v("unrecognized value: "+g[Yd]);break}Oc&~jf&&a.v("warning: "+F(Oc)+" exceeds "+cc+"-byte value");a.v("changing "+Sj(a,Xd)+(z(a,16)?
"":" from "+K(a,kf.call(a,Xd),cc))+" to "+K(a,Oc,cc));lf.call(a,Xd,Oc,cc)}}break;case "g":a:{var Di=g[1],pl=b;if(void 0!==Di){var of=Pj(a,Di,!0);if(!of)break a;Rj(a,of,pl);a.Cb(a.g,of,!0)}hk(a,!0,c)}break;case "h":a.A.V?(c||a.v("halting"),a.ba()):Ga(a,!0)||c||a.v("already halted");break;case "i":if("if"==g[0]){var pf;var Pc=b.substr(2),Pc=Xa(Pc);zj(a,Pc)?(c||a.v("true: "+Pc),pf=!0):(c||a.v("false: "+Pc),pf=!1);pf||(d=!1);break}f=!0;break;case "k":var ql=g[0];if("?"==g[1])a.v("stack trace commands:"),
a.v("\tk\tshow frame addresses"),a.v("\tks\tshow symbol information");else{var qf=0,rf=X(),Qc=X(a.f.g[6]);for(a.v("stack trace for "+Sj(a,Qc));10>qf;){for(var Bb=null,rl=256;65536>Qc.K>>>0;){rf.K=a.Ra(Qc,2);if(null==Qc.K||!rl--)break;if(!(rf.K&1)){for(var sl=a,Zd=rf,Ei=null,Rc=Zd.K,Fi=Rc,sf=1;6>=sf&&Rc;sf++){if(2<sf){Zd.K=Rc;var $d=sk(sl,Zd);if(0<=$d.indexOf("JSR")){var Gi=$d.indexOf(" ");if(Rc+($d.indexOf(" ",Gi+1)-Gi-1)/2==Fi){Ei=$d;break}}}Rc-=2}Zd.K=Fi;if(Bb=Ei)break}}if(!Bb||null==Bb)break;var Hi=
null;if("ks"==ql){var Ii=Bb.match(/[0-9A-F]+$/);Ii&&(Hi=Kk(a,Ii[0]))}Bb=Wa(Bb,50)+" ;"+(Hi||"stack="+Sj(a,Qc));a.v(Bb);qf++}qf||a.v("no return addresses found")}break;case "l":if("ln"==g[0]){Kk(a,g[1],!0);break}f=!0;break;case "m":a:{var Ua,Va=null,T=g[1];"?"==T&&(T=void 0);if(void 0!==T){var lb=0;if("all"==T)lb=1879046143,T=null;else if("on"==T)Va=!0,T=null;else if("off"==T)Va=!1,T=null;else{"keys"==T&&(T="key");"kbd"==T&&(T="keyboard");for(Ua in Pb)if(T==Ua){lb=Pb[Ua];Va=!!(a.ha&lb);break}if(!lb){a.v("unknown message category: "+
T);break a}}if(lb)if("on"==g[2])a.ha|=lb,Va=!0;else if("off"==g[2]&&(a.ha&=~lb,Va=!1,1073741824==lb)){for(var Ji=1E3<=a.M.length?a.M.length-1E3:0;Ji<a.M.length;)a.v(a.M[Ji++]);a.M=[]}}var tl=0,Sc="";for(Ua in Pb)if(!T||T==Ua){var ul=!!(a.ha&Pb[Ua]);if(null===Va||Va==ul)Sc&&(Sc+=","),++tl%10||(Sc+="\n\t"),"key"==Ua&&(Ua="keys"),Sc+=Ua}void 0===T&&a.v("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.v((null!==Va?Va?"messages on: ":"messages off: ":"message categories:\n\t")+
(Sc||"none"));Hj(a)}break;case "p":if("print"==g[0]){Lk(a,b.substr(5));break}var vl=g[0];if("?"==g[1])a.v("step commands:"),a.v("\tp\tstep over instruction"),a.v("\tpr\tstep over instruction with register update");else{var Ki="pr"==vl?1:0,Li=1+Ki;if(a.I)a.v("step in progress");else{var ae=X(a.f.g[7]),dc=a.Ra(ae);3==dc||4==dc||34816==(dc&65280)||32256==(dc&65024)||35072==(dc&65280)?(a.I=Li,Qj(ae,2)):2048==(dc&65024)&&(sk(a,ae),a.I=Li);a.I?(a.Cb(a.g,ae,!0),hk(a)||(a.J&&oe(a.J),a.I=0)):Mk(a,Ki?"tr":
"t")}}break;case "r":if("reset"==b){a.J&&a.J.reset();break}kk(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Tc=+g[2];if(8==Tc||10==Tc||16==Tc)a.Ba=Tc;else{a.v("invalid base: "+Tc);break}}a.v("default base: "+a.Ba);break;case "cs":var Uc;void 0!==g[3]&&(Uc=+g[3]);switch(g[2]){case "int":a.f.Ob=Uc;break;case "start":a.f.pc=Uc;break;case "stop":a.f.Rb=Uc;break;default:a.v("unknown cs option");break a}void 0!==Uc&&ge(a.f);a.v("checksums "+(a.f.A.Nb?"enabled":"disabled"));break;case "sp":void 0!==
a.v("\tdh [p] [n] dump n instructions from history position p");$b.length&&a.v("dump extension commands:\n\t"+$b)}else if("state"==Sa){var cf=Nk(a.J,!0);"console"==kb?console.log(cf):(a.Ta&&(a.Ta.value=""),cf&&a.v(cf))}else if("symbols"==Sa)for(var df=0;df<a.B.length;df++){var ef=a.B[df],ac;for(ac in ef.ga)if("."!=ac.charAt(0)){var ti=ef.ga[ac].o;if(void 0!==ti){var ui=ef.ga[ac].l;ui&&(ac=ui);a.v(K(a,ti)+" "+ac)}}}else{if("d"==jb){for(Zb in Pb)if(g[1]==Zb){var vi=a.ka[Zb];vi?(g.shift(),g.shift(),
vi(g)):a.v("no dump registered for "+Sa);break a}Sa||(jb=a.Ka||"dw")}else a.Ka=jb;if("dh"==jb){var wi=Sa,xi=kb,yi="",zi=0,Ia=a.P,Ta=a.i;if(Ta.length){var Ca=+wi||a.pa,Lc=+xi||10;isNaN(Ca)?Ca=Lc:yi="more ";Ca>Ta.length&&(a.v("note: only "+Ta.length+" available"),Ca=Ta.length);Ia-=Ca;0>Ia&&(null==Ta[Ta.length-1].K?(Ca=Ia+Ca,Ia=0):Ia+=Ta.length);var ff=[];"call"==xi&&(Lc=1E5,ff=["CALL"]);for(void 0!==wi&&a.v(Ca+" instructions earlier:");0<Lc&&Ia!=a.P;){var Ai=Ta[Ia++];if(null==Ai.K)break;var Mc=X(Ai.K),
ll=Ca--,Bi=sk(a,Mc,"history",ll);(!ff.length||0<=Bi.indexOf(ff[0]))&&a.v(Bi);Mc.xd&&(Ia+=Mc.xd,Lc-=Mc.xd,Ca-=Mc.xd);Ia>=Ta.length&&(Ia=0);a.pa=Ca;zi++;Lc--}}zi||(a.v("no "+yi+"history available"),a.pa=void 0)}else{var na=Pj(a,Sa);if(na)if("da"==jb){var gf=na.Ma||65535<na.K,O=Oe(a.f,na.K||0,gf);a.v(Wa("",gf?12:19)+Ka(na.K,gf?22:17,3)+" "+E(na.K,8));6>O.length?(2<O.length&&(a.v(" OFFSET: "+Ka(O[3],13,3)+" "+E(O[3],8)),a.v("UNIMAP["+La(O[1])+"]: "+Ka(O[2],22,3)+" "+E(O[2],8))),a.v(" PHYSICAL: "+
Ka(O[0],22,3)+" "+E(O[0],8))):(a.v(" OFFSET: "+Ka(O[1],13,3)+" "+E(O[1],8)),a.v("+ "+Ok[O[2]]+"PAR"+O[3]+": "+Ka(O[4],22,3)+" "+E(O[4],8)),a.v("& MMUMASK: "+Ka(O[5],22,3)+" "+E(O[5],8)),a.v("= PHYSICAL: "+Ka(O[0],22,3)+" "+E(O[0],8)))}else{var xb=0,hf="ds"==jb;if(kb){if("l"==kb.charAt(0))kb=kb.substr(1)||kl,xb=Bj(a,kb);else{var Ci=Pj(a,kb);Ci&&(xb=Ci.K-na.K)}0>xb&&(xb=0);65536<xb&&(xb=65536)}var nl=a.Ba;na.Ba&&(a.Ba=na.Ba);for(var yb="dd"==jb?4:"db"==jb?1:2,Wd=yb*xb||128,jf=
hf?16:a.Ba,ol=(Wd+jf-1)/jf|0||1,zb="";ol--&&0<Wd;){for(var Ab="",kf="",Sa=Sj(a,na),Xd=jf,Nc=0,Oc=0;0<Xd&&0<Wd;){var bc=1,Yd=1==yb?a.Nd(na,bc):a.Ra(na,bc=2),Nc=Nc|Yd<<(Oc<<3),Oc=Oc+bc;Oc==yb&&(hf?(Ab&&(Ab+=","),Ab+="0x"+F(Nc,2*yb)):(Ab+=K(a,Nc,yb),Ab+=1==yb?9==Xd?"-":" ":" "),Nc=Oc=0);Xd-=bc;for(Wd-=bc;1==yb&&bc--;)var lf=Yd&255,kf=kf+(32<=lf&&128>lf?String.fromCharCode(lf):"."),Yd=Yd>>8}zb&&(zb+="\n");zb=hf?zb+(Ab+","):zb+(Sa+": "+Ab+(Xd?"":" "+kf))}zb&&a.v(zb);a.xa=na;a.Ba=nl}}}}break;case "e":if("else"==
g[0])break;var cc,mf,nf,of,pf=g[0],qf=g[1];"eb"==pf?(cc=1,mf=255,nf=a.Nd,of=a.Od):"e"==pf||"ew"==pf?(cc=2,mf=65535,nf=a.Ra,of=a.Le):qf=null;if(null==qf)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Zd=Pj(a,qf);if(Zd)for(var $d=2;$d<g.length;$d++){var Pc=zj(a,g[$d]);if(void 0===Pc){a.v("unrecognized value: "+g[$d]);break}Pc&~mf&&a.v("warning: "+F(Pc)+" exceeds "+cc+"-byte value");a.v("changing "+Sj(a,Zd)+(z(a,16)?
"":" from "+K(a,nf.call(a,Zd),cc))+" to "+K(a,Pc,cc));of.call(a,Zd,Pc,cc)}}break;case "g":a:{var Di=g[1],pl=b;if(void 0!==Di){var rf=Pj(a,Di,!0);if(!rf)break a;Rj(a,rf,pl);a.Cb(a.g,rf,!0)}hk(a,!0,c)}break;case "h":a.A.V?(c||a.v("halting"),a.ba()):Ga(a,!0)||c||a.v("already halted");break;case "i":if("if"==g[0]){var sf;var Qc=b.substr(2),Qc=Xa(Qc);zj(a,Qc)?(c||a.v("true: "+Qc),sf=!0):(c||a.v("false: "+Qc),sf=!1);sf||(d=!1);break}f=!0;break;case "k":var ql=g[0];if("?"==g[1])a.v("stack trace commands:"),
a.v("\tk\tshow frame addresses"),a.v("\tks\tshow symbol information");else{var tf=0,uf=X(),Rc=X(a.f.g[6]);for(a.v("stack trace for "+Sj(a,Rc));10>tf;){for(var Bb=null,rl=256;65536>Rc.K>>>0;){uf.K=a.Ra(Rc,2);if(null==Rc.K||!rl--)break;if(!(uf.K&1)){for(var sl=a,ae=uf,Ei=null,Sc=ae.K,Fi=Sc,vf=1;6>=vf&&Sc;vf++){if(2<vf){ae.K=Sc;var be=sk(sl,ae);if(0<=be.indexOf("JSR")){var Gi=be.indexOf(" ");if(Sc+(be.indexOf(" ",Gi+1)-Gi-1)/2==Fi){Ei=be;break}}}Sc-=2}ae.K=Fi;if(Bb=Ei)break}}if(!Bb||null==Bb)break;var Hi=
null;if("ks"==ql){var Ii=Bb.match(/[0-9A-F]+$/);Ii&&(Hi=Kk(a,Ii[0]))}Bb=Wa(Bb,50)+" ;"+(Hi||"stack="+Sj(a,Rc));a.v(Bb);tf++}tf||a.v("no return addresses found")}break;case "l":if("ln"==g[0]){Kk(a,g[1],!0);break}f=!0;break;case "m":a:{var Ua,Va=null,T=g[1];"?"==T&&(T=void 0);if(void 0!==T){var lb=0;if("all"==T)lb=1879046143,T=null;else if("on"==T)Va=!0,T=null;else if("off"==T)Va=!1,T=null;else{"keys"==T&&(T="key");"kbd"==T&&(T="keyboard");for(Ua in Pb)if(T==Ua){lb=Pb[Ua];Va=!!(a.ha&lb);break}if(!lb){a.v("unknown message category: "+
T);break a}}if(lb)if("on"==g[2])a.ha|=lb,Va=!0;else if("off"==g[2]&&(a.ha&=~lb,Va=!1,1073741824==lb)){for(var Ji=1E3<=a.M.length?a.M.length-1E3:0;Ji<a.M.length;)a.v(a.M[Ji++]);a.M=[]}}var tl=0,Tc="";for(Ua in Pb)if(!T||T==Ua){var ul=!!(a.ha&Pb[Ua]);if(null===Va||Va==ul)Tc&&(Tc+=","),++tl%10||(Tc+="\n\t"),"key"==Ua&&(Ua="keys"),Tc+=Ua}void 0===T&&a.v("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.v((null!==Va?Va?"messages on: ":"messages off: ":"message categories:\n\t")+
(Tc||"none"));Hj(a)}break;case "p":if("print"==g[0]){Lk(a,b.substr(5));break}var vl=g[0];if("?"==g[1])a.v("step commands:"),a.v("\tp\tstep over instruction"),a.v("\tpr\tstep over instruction with register update");else{var Ki="pr"==vl?1:0,Li=1+Ki;if(a.I)a.v("step in progress");else{var ce=X(a.f.g[7]),dc=a.Ra(ce);3==dc||4==dc||34816==(dc&65280)||32256==(dc&65024)||35072==(dc&65280)?(a.I=Li,Qj(ce,2)):2048==(dc&65024)&&(sk(a,ce),a.I=Li);a.I?(a.Cb(a.g,ce,!0),hk(a)||(a.J&&oe(a.J),a.I=0)):Mk(a,Ki?"tr":
"t")}}break;case "r":if("reset"==b){a.J&&a.J.reset();break}kk(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Uc=+g[2];if(8==Uc||10==Uc||16==Uc)a.Ba=Uc;else{a.v("invalid base: "+Uc);break}}a.v("default base: "+a.Ba);break;case "cs":var Vc;void 0!==g[3]&&(Vc=+g[3]);switch(g[2]){case "int":a.f.Ob=Vc;break;case "start":a.f.pc=Vc;break;case "stop":a.f.Rb=Vc;break;default:a.v("unknown cs option");break a}void 0!==Vc&&ge(a.f);a.v("checksums "+(a.f.A.Nb?"enabled":"disabled"));break;case "sp":void 0!==
g[2]&&(le(a.f,+g[2])||a.v("warning: using 1x multiplier, previous target not reached"));a.v("target speed: "+(a.f.yb.toFixed(2)+"Mhz")+" ("+a.f.ob+"x)");break;default:if(g[1]){a.v("unknown option: "+g[1]);break}case "?":a.v("debugger options:"),a.v("\tbase #\t\tset default base to #"),a.v("\tcs int #\tset checksum cycle interval to #"),a.v("\tcs start #\tset checksum cycle start count to #"),a.v("\tcs stop #\tset checksum cycle stop count to #"),a.v("\tsp #\t\tset speed multiplier to #")}break;case "t":Mk(a,
g[0],g[1]);break;case "u":lk(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Jk(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.v((Fb||"PDP11")+" version 1.34.0 ("+a.f.ka+",RELEASE"+(Hb?",TYPEDARRAYS":Gb?",BYTEARRAYS":",LONGARRAYS")+")");a.v(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Lk(a,b.substr(1));break}var tf="commands:",uf;for(uf in Pk)tf+="\n"+Wa(uf,9)+Pk[uf];wf(a)||(tf+="\nnote: history disabled if no exec breakpoints");a.v(tf);break;default:f=!0}f&&(a.v("unknown command: "+
g[0],g[1]);break;case "u":lk(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Jk(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.v((Fb||"PDP11")+" version 1.34.0 ("+a.f.ka+",RELEASE"+(Hb?",TYPEDARRAYS":Gb?",BYTEARRAYS":",LONGARRAYS")+")");a.v(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Lk(a,b.substr(1));break}var wf="commands:",xf;for(xf in Pk)wf+="\n"+Wa(xf,9)+Pk[xf];af(a)||(wf+="\nnote: history disabled if no exec breakpoints");a.v(wf);break;default:f=!0}f&&(a.v("unknown command: "+
b),d=!1)}}catch(Ni){a.v("debugger error: "+(Ni.stack||Ni.message)),d=!1}return d}function je(a,b,c){b=xj(a,b,c);for(var d in b)if(!rk(a,b[+d]))return!1;return!0}
var Pk={"?":"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"},uk=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
Vj=20,Wj=21,Xj=22,Yj=23,Zj=24,ak=25,bk=26,ck=27,dk=28,ek=29,fk=30,Tj={SP:6,PC:7,PS:Vj,PI:Wj,ER:Xj,SL:Yj,M0:Zj,M1:ak,M2:bk,M3:ck,AR:dk,DR:ek,SR:fk},Ok="KI KD SI SD ?? ?? UI UD".split(" "),Bk=7,Ck=56,Z=Ck|Bk,Ak=4032,Y=4096,wk=8192,xk=12288,yk=24576,zk=32768,vk=61440,Jj={61440:{4096:[62,Ak,Z],8192:[47,Ak,Z],12288:[18,Ak,Z],16384:[14,Ak,Z],20480:[16,Ak,Z],24576:[3,Ak,Z],36864:[63,Ak,Z],40960:[48,Ak,Z],45056:[19,Ak,Z],49152:[15,Ak,Z],53248:[17,Ak,Z],57344:[94,Ak,Z]},65024:{2048:[57,448,Z],28672:[100,Z,

View file

@ -7,7 +7,6 @@
http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2017
@ -24,6 +23,7 @@
http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2017
http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2017
@ -38,8 +38,8 @@ var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:functi
function fa(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ga(this)}});fa=function(){}}function ga(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){fa();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}function ia(a){fa();ca();fa();var b=a[Symbol.iterator];return b?b.call(a):ga(a)}
function n(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 ja(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}
ja("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}});ja("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c<d;c++)this[c]=a;return this}});
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Lh:0,Ud:1,Sh:2,Th:3,Uh:4,Vh:5,Wh:6,Xh:7,kd:8,Yh:9,Vd:10,Zh:11,$h:12,Wd:13,ai:14,bi:15,ci:16,di:17,ei:18,fi:19,gi:20,hi:21,ii:22,ji:23,ki:24,li:25,mi: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,hd:65,Hh:66,Nh:67,ni:68,E:69,ui:70,xi:71,Ji:72,Li:73,Mi:74,Ni:75,Oi:76,Ri:77,Ti:78,Zi:79,bj:80,Q:81,dj:82,gj:83,pj:84,rj:85,tj:86,uj:87,yj:88,zj:89,Ke:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Aj:97,Bj:98,Ej:99,d:100,e:101,Fj:102,Gj:103,Hj:104,Ij:105,Mj:106,k:107,Nj:108,Oj:109,n:110,Pj:111,p:112,q:113,r:114,Qj:115,t:116,Sj:117,Tj:118,Uj:119,x:120,
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Oh:0,Ud:1,Vh:2,Wh:3,Xh:4,Yh:5,Zh:6,$h:7,kd:8,ai:9,Vd:10,bi:11,ci:12,Wd:13,di:14,ei:15,fi:16,gi:17,hi:18,ii:19,ji:20,ki:21,li:22,mi:23,ni:24,oi:25,pi: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,hd:65,Kh:66,Qh:67,ri:68,E:69,xi:70,Ai:71,Mi:72,Oi:73,Pi:74,Qi:75,Ri:76,Ui:77,Wi:78,bj:79,ej:80,Q:81,gj:82,jj:83,sj:84,uj:85,wj:86,xj:87,Bj:88,Cj:89,Ke:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Dj:97,Ej:98,Hj:99,d:100,e:101,Ij:102,Jj:103,Kj:104,Lj:105,Pj:106,k:107,Qj:108,Rj:109,n:110,Sj:111,p:112,q:113,r:114,Tj:115,t:116,Vj:117,Wj:118,Xj:119,x:120,
y:121,z:122,"{":123,"|":124,"}":125,"~":126,Cb:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.sd=b.comment;this.Ie=b;this.exports={};this.o=this.bindings={};a=this.id.indexOf(".");0>a?this.ib=this.id:(this.Ua=this.id.substr(0,a),this.ib=this.id.substr(a+1));this.j={ready:!1,Ra:!1,Wc:!1,R:!1,error:!1};this.ic=null;this.j.error=!1;this.qd=c||0;this.D=this.c=this.u=this.A=this.ob=null;t.push(this)}function na(a,b,c){oa[a]&&b&&(oa[a][b]=c)}
function pa(){return Date.now()||+new Date}function u(a){window&&window.alert(a)}function qa(a){var b=!1;window&&(b=window.confirm(a));return b}function ra(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<t.length;b++){var d=t[b];a&&d.id.indexOf(a)||c.push(d)}return c}function sa(a){if(void 0!==a){var b;for(b=0;b<t.length;b++)if(t[b].id===a)return t[b]}return null}
function ta(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<t.length;d++)if(c)c==t[d]&&(c=null);else if(!(a!=t[d].type||b&&t[d].id.indexOf(b)))return t[d]}return null}function v(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){u(c.message+" ("+a+")")}return b}
@ -49,7 +49,7 @@ function ua(a,b,c){for(var d=!0;c<b.length;){var e=b[c],f=e[0],g=null;0<=va.inde
h.toString=function(){return this.name?this.name:this.id||this.type};
h.ma=function(a,b,c){switch(b){case "clear":return this.o[b]||(this.o[b]=c,c.onclick=function(a){return function(){a.o.print&&(a.o.print.value="")}}(this)),!0;case "print":return this.o[b]||(this.ob=this.o[b]=c,c.value="",this.aa=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.G=function(a){this.aa(a,this.ib)}),!0;default:return!1}};h.log=function(){};h.aa=function(){};
h.status=function(a){this.aa(this.ib+": "+a)};h.G=function(a,b,c){c=c||this.type;b||u((c?c+": ":"")+a)};function ya(a,b){b&&(a.j.ready?b():a.ic=b);return a.j.ready}function B(a,b){a.j.error||(a.j.ready=!1!==b,a.j.ready&&(b=a.ic,a.ic=null,b&&b()))}function za(a,b){a.j.Wc?(a.j.Ra=!1,a.j.Wc=!1):a.j.error?a.aa(a.toString()+" error"):a.j.Ra=b}h.la=function(){return this.j.R=!0};h.ka=function(a,b){b&&(this.j.R=!1);return!0};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var oa=window?window.PCjs.Machines:{},t=window?window.PCjs.Components:[],va=["sleep","wait"],wa={alert:function(a){u(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},xa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var oa=window?window.PCjs.Machines:{},t=window?window.PCjs.Components:[],va=["hold","sleep","wait"],wa={alert:function(a){u(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},xa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function Aa(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
@ -65,21 +65,22 @@ function Na(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct
function Ra(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ta(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}
function Ua(a){if(!Va){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Va=c}return Va[a]}function Wa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Xa(a){Ya.init.push(a)}
function Za(a){if($a)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){u(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function ab(a){!$a&&a?($a=!0,bb&&cb("init"),db&&cb("show")):$a=a}function cb(a){Ya[a]&&Za(Ya[a])}var Va=null,Ya={init:[],show:[],exit:[]},bb=!1,db=!1,$a=!0,Pa=null;Wa("onload",function(){bb=!0;Za(Ya.init)});Wa("onpageshow",function(){db=!0;Za(Ya.show)});Wa(Ta("Opera")||Ta("iOS")?"onunload":"onbeforeunload",function(){Za(Ya.exit)});
var eb="undefined"!==typeof ArrayBuffer,y="pdp11",fb="PDPjs",gb=!0,hb=!0,C={Qc:5,Uc:144,Bc:8,bc:{Be:15,hj:16,xj:32,xd:64,ha:128,Bd:256,lj:512,si:1024,ac:2048,ri:4096,Mc:57344,U:{Mc:13}},pe:{Cd:1,Rh:2,Ce:3,gb:28,$b:32,Zb:64,rd:128,qj:256,Xd:512,Eb:1024,cj:2048,Ad:4096,vj:8192,aj:16384,Yd:32768,Hc:32736},ne:{Db:1,ca:14,fb:48,eb:64,za:128,oj:256,ti:512,vi:1024,de:2048,Sc:8192,Hc:16384,Ja:32768,gb:4608,Fb:61438,va:3967,U:{ca:1,fb:4}},oe:{Rc:15,Kc:16,Bb:8160,Ta:57344,U:{Kc:4,Bb:5,Ta:13}},ca:{Td:0,Hb:2,
Va:4,Vc:6,ec:8,he:10,Zd:12,wj:14}},D={Qc:5,Uc:112,Bc:4,ge:"DY",ue:{ha:1,ca:14,ya:48,eb:64,za:128,Ta:768,ld:15360,pi:16384,Ja:32768,Oh:16254,kj:128,Fb:65535,va:1022,U:{ca:1,ya:4,Ta:8}},se:{va:65534},ve:{De:1,Ee:4,Fe:16,ij:65408,yd:63,dc:64,Gb:65408,$d:3,Ci:8,U:{dc:6,Gb:7}},cc:{ce:{Pi:0,nj:1,Mh:2,Qi:3,ec:4,ee:5,sj:6,mj:7},md:8,be:16,zi:32,Bi:64,ae:128,Ai:256,Fi:512,Hi:1024,Ei:2048,Di:4096,Ii:8192,yi:16384,Gi:32768},te:{Fa:63},ld:{$i:1024,oi:2048,Cd:2048,Ki:3072,Xd:4096,Ba:5120,Eb:8192,Si:9216},ca:{Ui:0,
Vc:2,Ge:4,ec:6,le:8,Je:10,ie:12,ej:14}},ib={Qc:5,Uc:180,Bc:2,ge:"DX",xe:{Db:1,ca:14,Tc:16,DONE:32,eb:64,Ga:128,INIT:16384,Ja:32768,gb:16128,Fb:32992,va:16479},fj:{},Ae:{Fa:127},ze:{Fa:31},ye:{jd:1,ud:2,Mc:4,Cb:64,ha:128},ca:{Ec:0,EMPTY:2,Hb:4,Va:6,gb:8,ke:10,fc:12,je:14},ERROR:{Ic:8,Jc:16,Ih:24,fe:32,wi:40,jj:48,Pc:56,Yi:72,Xi:80,Wi:88,Qh:96,Kh:104,Vi:112,Oc:120,Ph:128,Jh:136}},jb={48:"DL11R",52:"DL11X",56:"PC11R",60:"PC11X",64:"KW11",112:"RL11",144:"RK11",180:"RX11"};
var eb="undefined"!==typeof ArrayBuffer,y="pdp11",fb="PDPjs",gb=!0,hb=!0,C={Qc:5,Uc:144,Bc:8,bc:{Be:15,kj:16,Aj:32,xd:64,ha:128,Bd:256,oj:512,vi:1024,ac:2048,ui:4096,Mc:57344,U:{Mc:13}},pe:{Cd:1,Uh:2,Ce:3,gb:28,$b:32,Zb:64,rd:128,tj:256,Xd:512,Eb:1024,fj:2048,Ad:4096,yj:8192,dj:16384,Yd:32768,Hc:32736},ne:{Db:1,ca:14,fb:48,eb:64,za:128,rj:256,wi:512,yi:1024,de:2048,Sc:8192,Hc:16384,Ja:32768,gb:4608,Fb:61438,va:3967,U:{ca:1,fb:4}},oe:{Rc:15,Kc:16,Bb:8160,Ta:57344,U:{Kc:4,Bb:5,Ta:13}},ca:{Td:0,Hb:2,
Va:4,Vc:6,ec:8,he:10,Zd:12,zj:14}},D={Qc:5,Uc:112,Bc:4,ge:"DY",ue:{ha:1,ca:14,ya:48,eb:64,za:128,Ta:768,ld:15360,ti:16384,Ja:32768,Rh:16254,nj:128,Fb:65535,va:1022,U:{ca:1,ya:4,Ta:8}},se:{va:65534},ve:{De:1,Ee:4,Fe:16,lj:65408,yd:63,dc:64,Gb:65408,$d:3,Fi:8,U:{dc:6,Gb:7}},cc:{ce:{Si:0,qj:1,Ph:2,Ti:3,ec:4,ee:5,vj:6,pj:7},md:8,be:16,Ci:32,Ei:64,ae:128,Di:256,Ii:512,Ki:1024,Hi:2048,Gi:4096,Li:8192,Bi:16384,Ji:32768},te:{Fa:63},ld:{cj:1024,si:2048,Cd:2048,Ni:3072,Xd:4096,Ba:5120,Eb:8192,Vi:9216},ca:{Xi:0,
Vc:2,Ge:4,ec:6,le:8,Je:10,ie:12,hj:14}},ib={Qc:5,Uc:180,Bc:2,ge:"DX",xe:{Db:1,ca:14,Tc:16,DONE:32,eb:64,Ga:128,INIT:16384,Ja:32768,gb:16128,Fb:32992,va:16479},ij:{},Ae:{Fa:127},ze:{Fa:31},ye:{jd:1,ud:2,Mc:4,Cb:64,ha:128},ca:{Ec:0,EMPTY:2,Hb:4,Va:6,gb:8,ke:10,fc:12,je:14},ERROR:{Ic:8,Jc:16,Lh:24,fe:32,zi:40,mj:48,Pc:56,aj:72,$i:80,Zi:88,Th:96,Nh:104,Yi:112,Oc:120,Sh:128,Mh:136}},jb={48:"DL11R",52:"DL11X",56:"PC11R",60:"PC11X",64:"KW11",112:"RL11",144:"RK11",180:"RX11"};
ib.we=["DX",77,1,26,128,1,0,0,128,0];C.ac=["RK",203,2,12,512,0,0,0,512,C.bc.ac|C.bc.Bd|C.bc.xd];D.qe=["RL",512,2,40,256,0,0,0,256,D.cc.ce.ee|D.cc.md|D.cc.be];y="pdp11";fb="PDPjs";hb=gb=!0;
function kb(a,b){r.call(this,"Panel",a,512);this.i=this.m=0;this.F=b;this.V=this.g=this.b=this.f=0;this.s=this.v=-1;this.w=this.B=this.l=!1;this.C=lb;this.h={};this.a={START:[1,1,!0,!1,this.ef],STEP:[1,1,!1,!1,this.ff],ENABLE:[1,1,!1,!1,this.af],CONT:[1,1,!0,!1,this.Ze],DEP:[0,0,!0,!1,this.$e],EXAM:[1,1,!0,!1,this.bf],LOAD:[1,1,!0,!1,this.df],TEST:[0,0,!0,!1,this.cf]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.gf,a];this.D=this.c=this.u=this.A=null;B(this)}n(kb,r);h=kb.prototype;
h.reset=function(a){this.stop();a&&mb(this,this.f=0)};
function kb(a,b){r.call(this,"Panel",a,512);this.i=this.m=0;this.F=b;this.V=this.g=this.b=this.f=0;this.s=this.v=-1;this.w=this.B=this.l=!1;this.C=lb;this.h={};this.a={START:[1,1,!0,!1,this.ff],STEP:[1,1,!1,!1,this.gf],ENABLE:[1,1,!1,!1,this.bf],CONT:[1,1,!0,!1,this.$e],DEP:[0,0,!0,!1,this.af],EXAM:[1,1,!0,!1,this.cf],LOAD:[1,1,!0,!1,this.ef],TEST:[0,0,!0,!1,this.df]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.hf,a];this.D=this.c=this.u=this.A=null;this.exports={hold:this.We,toggle:this.Ag,reset:this.ug};
B(this)}n(kb,r);h=kb.prototype;h.reset=function(a){this.stop();a&&mb(this,this.f=0)};
h.ma=function(a,b,c,d){if(this.A&&this.A.ma(a,b,c,d)||this.c&&this.c.ma(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.h[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){nb(a,
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ob(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){nb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ob(a,b)}}(this,b),!0):r.prototype.ma.call(this,a,b,c,d)}};h.ja=function(a,b,c,d){this.A=a;this.u=b;this.c=c;this.D=d;pb(b,this,qb);rb(b,this.reset.bind(this));sb(this);tb(this)};h.la=function(a,b){if(!b)if(this.F&&ub(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};
h.ka=function(a){return a?this.save():!0};h.save=function(){var a=new E(this);a.set(0,[this.V,this.f,this.b]);return a.data()};h.restore=function(a){if(a=a[0])vb(this,this.V=a[0]),mb(this,this.f=a[1]),wb(this,a[2]);return!0};function xb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function sb(a,b){for(var c in a.h)xb(a,c,null!=b?b:a.h[c])}function yb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}
function tb(a){for(var b in a.a)yb(a,b,a.a[b][1])}function zb(a,b,c,d){if(a.o[b]){var e=a.D&&a.D.h||8;c=c||0;c=8==e?Ba(c,d):Ca(c,d);a.o[b].textContent!=c&&(a.o[b].textContent=c)}}function nb(a,b){var c=a.a[b];yb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=Ab&&(a.w=b==Bb,a.B=b==Cb)}function ob(a,b){var c=a.a[b];c[2]&&c[3]&&(yb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.ef=function(a){a||this.c.j.M||(a=this.c,a.u.reset(),Db(a),this.a[Eb]&&this.a[Eb][1]&&Fb(this.c))};h.ff=function(){};
h.af=function(a){a||F(this.c)};h.Ze=function(a){if(!a&&!this.c.j.M)if(this.a[Eb]&&this.a[Eb][1])Fb(this.c);else{a=this.D;var b;if(b=a)a.j.Ra&&(a.j.Wc=!0),b=!a.j.Ra;if(b)za(a,!0),a.f(0,null),za(a,!1);else try{var c=this.c.zc(1);0<c&&(Gb(this.c,c),Hb(this.c,c,!0),Ib(this.c,c))}catch(d){"number"!=typeof d&&(c=this.c,a=d.stack||d.message,c.j.error=!0,c.G(a))}this.stop();this.A&&Jb(this.A)}};
h.$e=function(a){if(a&&!this.c.j.M)if(this.w&&Kb(this),a=mb(this,this.b),this.C==lb)Lb(this.u,this.V,a);else{var b=this.c,c=this.V;b.pb++;b.u.Yb(Mb(b,c,4),a);b.pb--}};h.bf=function(a){if(!a&&!this.c.j.M){this.B&&Kb(this);if(this.C==lb)a=Nb(this.u,this.V);else{a=this.c;var b=this.V;a.pb++;b=a.u.Xb(Mb(a,b,2));a.pb--;a=b}mb(this,a)}};h.df=function(a){a||this.c.j.M||vb(this,this.b)};h.cf=function(a){a?(this.l=!0,sb(this,!0)):(this.l=!1,sb(this),wb(this,0))};
h.gf=function(a,b){this.b=a?this.b|1<<b:this.b&~(1<<b)};function Kb(a){var b=1140>=a.c.sa?8:16,c=65472<=a.V&&a.V<65472+b,b=c?1:2,c=c?15:a.u.v;a.a[Ab]&&a.a[Ab][1]||(b=-b);vb(a,a.V&~c|a.V+b&c)}function vb(a,b){a.V=b&a.u.v;if(a.s!==a.V){a.s=a.V;b=a.s;for(var c=0;22>c;c++)Ob(a,"A"+c,b&1<<c)}}function mb(a,b){a.g=b&65535;if(a.v!==a.g){a.v=a.g;b=a.v;for(var c=0;16>c;c++)Ob(a,"D"+c,b&1<<c)}return a.g}function Ob(a,b,c){a.h[b]=c;a.l||xb(a,b,c)}
function wb(a,b){if(void 0!==a.o[Pb]){a.b=b;for(var c=0;22>c;c++)a.a["S"+c][1]=b&1<<c?1:0;tb(a)}}h.stop=function(){vb(this,this.c.b[7])};h.setData=function(a,b){b?this.f=a:this.g=a};h.mf=function(a,b){return(b?this.f:this.b)&65535};h.Dg=function(a){this.f=a};function ub(){for(var a=z(document,y,"panel"),b=0;b<a.length;b++){var c=a[b],d=v(c),e=sa(d.id);e||(e=new kb(d,!0));w(e,c)}}
var lb=7,Pb="S0",Bb="DEP",Eb="ENABLE",Cb="EXAM",Ab="STEP",Qb={},qb=(Qb[65400]=[null,null,kb.prototype.mf,kb.prototype.Dg,"CNSW"],Qb);Xa(ub);
h.ka=function(a){return a?this.save():!0};h.save=function(){var a=new E(this);a.set(0,[this.V,this.f,this.b]);return a.data()};h.restore=function(a){if(a=a[0])vb(this,this.V=a[0]),mb(this,this.f=a[1]),wb(this,a[2]);return!0};h.ug=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}tb(this);return!0};function xb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function sb(a,b){for(var c in a.h)xb(a,c,null!=b?b:a.h[c])}
function yb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function tb(a){for(var b in a.a)yb(a,b,a.a[b][1])}function zb(a,b,c,d){if(a.o[b]){var e=a.D&&a.D.h||8;c=c||0;c=8==e?Ba(c,d):Ca(c,d);a.o[b].textContent!=c&&(a.o[b].textContent=c)}}h.We=function(a,b,c){if(nb(this,b)){if(c){var d=this;setTimeout(function(){ob(d,b);a&&a()},+c);return!1}ob(this,b)}return!0};h.Ag=function(a){return nb(this,a)?(ob(this,a),!0):!1};
function nb(a,b){var c=a.a[b];return c?(yb(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=Ab&&(a.w=b==Bb,a.B=b==Cb),!0):!1}function ob(a,b){var c=a.a[b];c&&(c[2]&&c[3]&&(yb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}h.ff=function(a){a||this.c.j.M||(a=this.c,a.u.reset(),Db(a),this.a[Eb]&&this.a[Eb][1]&&Fb(this.c))};h.gf=function(){};h.bf=function(a){a||F(this.c)};
h.$e=function(a){if(!a&&!this.c.j.M)if(this.a[Eb]&&this.a[Eb][1])Fb(this.c);else{a=this.D;var b;if(b=a)a.j.Ra&&(a.j.Wc=!0),b=!a.j.Ra;if(b)za(a,!0),a.f(0,null),za(a,!1);else try{var c=this.c.zc(1);0<c&&(Gb(this.c,c),Hb(this.c,c,!0),Ib(this.c,c))}catch(d){"number"!=typeof d&&(c=this.c,a=d.stack||d.message,c.j.error=!0,c.G(a))}this.stop();this.A&&Jb(this.A)}};
h.af=function(a){if(a&&!this.c.j.M)if(this.w&&Kb(this),a=mb(this,this.b),this.C==lb)Lb(this.u,this.V,a);else{var b=this.c,c=this.V;b.pb++;b.u.Yb(Mb(b,c,4),a);b.pb--}};h.cf=function(a){if(!a&&!this.c.j.M){this.B&&Kb(this);if(this.C==lb)a=Nb(this.u,this.V);else{a=this.c;var b=this.V;a.pb++;b=a.u.Xb(Mb(a,b,2));a.pb--;a=b}mb(this,a)}};h.ef=function(a){a||this.c.j.M||vb(this,this.b)};h.df=function(a){a?(this.l=!0,sb(this,!0)):(this.l=!1,sb(this),wb(this,0))};
h.hf=function(a,b){this.b=a?this.b|1<<b:this.b&~(1<<b)};function Kb(a){var b=1140>=a.c.sa?8:16,c=65472<=a.V&&a.V<65472+b,b=c?1:2,c=c?15:a.u.v;a.a[Ab]&&a.a[Ab][1]||(b=-b);vb(a,a.V&~c|a.V+b&c)}function vb(a,b){a.V=b&a.u.v;if(a.s!==a.V){a.s=a.V;b=a.s;for(var c=0;22>c;c++)Ob(a,"A"+c,b&1<<c)}}function mb(a,b){a.g=b&65535;if(a.v!==a.g){a.v=a.g;b=a.v;for(var c=0;16>c;c++)Ob(a,"D"+c,b&1<<c)}return a.g}function Ob(a,b,c){a.h[b]=c;a.l||xb(a,b,c)}
function wb(a,b){if(void 0!==a.o[Pb]){a.b=b;for(var c=0;22>c;c++)a.a["S"+c][1]=b&1<<c?1:0;tb(a)}}h.stop=function(){vb(this,this.c.b[7])};h.setData=function(a,b){b?this.f=a:this.g=a};h.nf=function(a,b){return(b?this.f:this.b)&65535};h.Gg=function(a){this.f=a};function ub(){for(var a=z(document,y,"panel"),b=0;b<a.length;b++){var c=a[b],d=v(c),e=sa(d.id);e||(e=new kb(d,!0));w(e,c)}}
var lb=7,Pb="S0",Bb="DEP",Eb="ENABLE",Cb="EXAM",Ab="STEP",Qb={},qb=(Qb[65400]=[null,null,kb.prototype.nf,kb.prototype.Gg,"CNSW"],Qb);Xa(ub);
function Rb(a,b,c){r.call(this,"Bus",a,16);this.c=b;this.D=c;this.S=+a.busWidth||16;this.C=1<<this.S;this.v=this.C-1;this.g=Sb;this.h=Math.log2(this.g);this.J=this.g>>2;this.f=this.g-1;this.s=this.C/this.g|0;this.K=this.s-1;this.Qa=[];this.m=0;this.l=!1;this.F=[];this.Le=[Tb,Ub,Vb,Wb];this.a=this.b=[];this.B=this.w=this.i=this.H=this.I=0;a=new G(this);Xb(a);this.a=Array(this.s);this.b=Array(this.s);for(b=0;b<this.s;b++)this.a[b]=this.b[b]=a;this.B=this.C-Sb;Yb(this,this.B,Sb,Zb,this);this.I=this.H=
(this.B&this.v)>>>this.h;this.w=0;this.i=this.v;B(this)}n(Rb,r);function $b(a,b){if(b!=a.w){for(var c=0;c<a.s;c++)a.b[c]=a.a[c];a.w=0;a.i=a.v;b&&(a.w=b,b=1<<b,a.i=b-1,b-=Sb,a.I=(b&a.i)>>>a.h,a.b[a.I]=a.a[a.H])}}h=Rb.prototype;h.reset=function(){for(var a=0;a<this.F.length;a++)this.F[a]();$b(this,16)};h.la=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};h.ka=function(a){return a?this.save():!0};h.save=function(){var a=new E(this);a.set(0,ac(this));return a.data()};
h.restore=function(a){a:{a=a[0];var b;for(b=0;b<a.length-1;b+=2){var c=a[b],d=a[b+1];if(d&&d.length<this.J){for(var e=0,f=Array(this.J),g=0;g<d.length-1;)for(var k=d[g++],l=d[g++];k--;)f[e++]=l;d=f}e=this.a[c];if(!e||!e.restore(d)){u("Unable to restore memory block "+c);a=!1;break a}}a=!0}return a};
@ -92,29 +93,29 @@ function pb(a,b,c,d){for(var e in c){var f=+e+(d||0),g=c[e];if(!(g[6]&&g[6]>a.c.
function rb(a,b){a.F.push(b)}function H(a,b,c){a.l=!0;a.m||(c&&(a.c.F|=c),I(a.c,4,0,b))}function lc(a){var b=a.l;a.l=!1;return b}function bc(a,b,c){u("Memory block error ("+a+": "+Ca(b)+","+Ca(c)+")");return!1}var Sb=8192,kc=Sb-1,cc=1,ec=2;function Tb(a,b){var c=-1,d=this.controller,e=d.Qa[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Qa[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;H(d,b,16);return 255}
function Ub(a,b,c){var d=!1,e=this.controller,f=e.Qa[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Qa[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||H(e,c,16)}function Vb(a,b){var c=-1,d=this.controller;a=d.Qa[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;H(d,b,16);return 65535}
function Wb(a,b,c){var d=!1,e=this.controller;a=e.Qa[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||H(e,c,16)}function J(a){r.call(this,"Device",a,256);this.a={Ia:128,dd:-1}}n(J,r);h=J.prototype;h.ja=function(a,b,c,d){this.u=b;this.A=a;this.c=c;this.D=d;var e=this;this.a.dd=mc(c,function(){e.a.Ia|=128;e.a.Ia&64&&K(e.c,e.a.qa);e.A&&Jb(e.A,1);nc(e.c,e.a.dd,1E3/60)});this.a.qa=oc(c,64,6,2097152);pb(b,this,pc);rb(b,this.reset.bind(this));B(this)};
h.la=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){this.a.Ia=128;nc(this.c,this.a.dd,1E3/60,!0)};h.save=function(){var a=new E(this);a.set(0,[this.a.Ia]);return a.data()};h.restore=function(a){a=ia(a[0]);this.a.Ia=a.next().value;return!0};h.uf=function(){return this.a.Ia};h.Kg=function(a){this.a.Ia=a&192;this.a.Ia&64||(a=this.a.qa)&&qc(this.c,a)};h.wf=function(){return rc(this.c)};
h.Mg=function(a){sc(this.c,a&-129|this.c.J&128)};h.xf=function(){return uc(this.c)};h.yf=function(){return vc(this.c)};h.zf=function(){return this.c.ta};h.Ng=function(a){wc(this.c,a)};h.kg=function(a){a=a>>1&63;var b=this.c.Pa[a>>1];return a&1?b>>16:b&65535};h.zh=function(a,b){b=b>>1&63;var c=b>>1;this.c.Pa[c]=b&1?this.c.Pa[c]&65535|(a&63)<<16:this.c.Pa[c]&-65536|a&65534};h.dg=function(a){return this.c.s[1][a>>1&7]};h.sh=function(a,b){this.c.s[1][b>>1&7]=a&65295};
h.bg=function(a){return this.c.s[1][(a>>1&7)+8]};h.qh=function(a,b){this.c.s[1][(b>>1&7)+8]=a&65295};h.cg=function(a){return this.c.H[1][a>>1&7]};h.rh=function(a,b){b=b>>1&7;this.c.H[1][b]=a;this.c.s[1][b]&=65295};h.ag=function(a){return this.c.H[1][(a>>1&7)+8]};h.ph=function(a,b){b=(b>>1&7)+8;this.c.H[1][b]=a;this.c.s[1][b]&=65295};h.tf=function(a){return this.c.s[0][a>>1&7]};h.Jg=function(a,b){this.c.s[0][b>>1&7]=a&65295};h.rf=function(a){return this.c.s[0][(a>>1&7)+8]};
h.Hg=function(a,b){this.c.s[0][(b>>1&7)+8]=a&65295};h.sf=function(a){return this.c.H[0][a>>1&7]};h.Ig=function(a,b){b=b>>1&7;this.c.H[0][b]=a;this.c.s[0][b]&=65295};h.qf=function(a){return this.c.H[0][(a>>1&7)+8]};h.Gg=function(a,b){b=(b>>1&7)+8;this.c.H[0][b]=a;this.c.s[0][b]&=65295};h.jg=function(a){return this.c.s[3][a>>1&7]};h.yh=function(a,b){this.c.s[3][b>>1&7]=a&65295};h.hg=function(a){return this.c.s[3][(a>>1&7)+8]};h.wh=function(a,b){this.c.s[3][(b>>1&7)+8]=a&65295};
h.ig=function(a){return this.c.H[3][a>>1&7]};h.xh=function(a,b){b=b>>1&7;this.c.H[3][b]=a;this.c.s[3][b]&=65295};h.gg=function(a){return this.c.H[3][(a>>1&7)+8]};h.vh=function(a,b){b=(b>>1&7)+8;this.c.H[3][b]=a;this.c.s[3][b]&=65295};h.vb=function(a){a&=7;return this.c.i&2048?this.c.ua[a]:this.c.b[a]};h.yb=function(a,b){b&=7;this.c.i&2048?this.c.ua[b]=a:this.c.b[b]=a};h.Gf=function(){return this.c.i&49152?this.c.ga[0]:this.c.b[6]};h.Ug=function(a){this.c.i&49152?this.c.ga[0]=a:this.c.b[6]=a};
h.Jf=function(){return this.c.b[7]};h.Xg=function(a){this.c.b[7]=a};h.wb=function(a){a&=7;return this.c.i&2048?this.c.b[a]:this.c.ua[a]};h.zb=function(a,b){b&=7;this.c.i&2048?this.c.b[b]=a:this.c.ua[b]=a};h.Hf=function(){return 1==(this.c.i&49152)>>14?this.c.b[6]:this.c.ga[1]};h.Vg=function(a){1==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.ga[1]=a};h.If=function(){return 3==(this.c.i&49152)>>14?this.c.b[6]:this.c.ga[3]};h.Wg=function(a){3==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.ga[3]=a};
h.pf=function(a){return this.c.Rb[a-65504>>1]};h.Fg=function(a,b){this.c.Rb[b-65504>>1]=a};h.Md=function(a){return 65520==a?(hc(this.u)>>6)-1:0};h.Pd=function(){};h.fg=function(){return 1};h.uh=function(){};h.nf=function(){return this.c.F};h.Eg=function(){this.c.F=0};h.vf=function(){return this.c.Ob};h.Lg=function(a,b){b&1||(a&=255);this.c.Ob=a};h.Af=function(a,b){return b?0:this.c.$a};h.Og=function(a){var b=this.c;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.g|=1}b.$a=a};
h.eg=function(a,b){return b?0:this.c.Oa&65280};h.th=function(a){this.c.Oa=a|255};h.Ff=function(){return xc(this.c)};h.Tg=function(a){yc(this.c,a)};h.Od=function(){};
var L={},pc=(L[61568]=[null,null,J.prototype.kg,J.prototype.zh,"UNIMAP",64,1170],L[62592]=[null,null,J.prototype.dg,J.prototype.sh,"SIPDR",8,1145,64],L[62608]=[null,null,J.prototype.bg,J.prototype.qh,"SDPDR",8,1145,64],L[62624]=[null,null,J.prototype.cg,J.prototype.rh,"SIPAR",8,1145,64],L[62640]=[null,null,J.prototype.ag,J.prototype.ph,"SDPAR",8,1145,64],L[62656]=[null,null,J.prototype.tf,J.prototype.Jg,"KIPDR",8,1140,64],L[62672]=[null,null,J.prototype.rf,J.prototype.Hg,"KDPDR",8,1145,64],L[62688]=
[null,null,J.prototype.sf,J.prototype.Ig,"KIPAR",8,1140,64],L[62704]=[null,null,J.prototype.qf,J.prototype.Gg,"KDPAR",8,1145,64],L[62798]=[null,null,J.prototype.zf,J.prototype.Ng,"MMR3",1,1145,64],L[65382]=[null,null,J.prototype.uf,J.prototype.Kg,"LKS"],L[65402]=[null,null,J.prototype.wf,J.prototype.Mg,"MMR0",1,1140,64],L[65404]=[null,null,J.prototype.xf,J.prototype.Od,"MMR1",1,1145,64],L[65406]=[null,null,J.prototype.yf,J.prototype.Od,"MMR2",1,1140,64],L[65408]=[null,null,J.prototype.jg,J.prototype.yh,
"UIPDR",8,1140,64],L[65424]=[null,null,J.prototype.hg,J.prototype.wh,"UDPDR",8,1145,64],L[65440]=[null,null,J.prototype.ig,J.prototype.xh,"UIPAR",8,1140,64],L[65456]=[null,null,J.prototype.gg,J.prototype.vh,"UDPAR",8,1145,64],L[65472]=[null,null,J.prototype.vb,J.prototype.yb,"R0SET0"],L[65473]=[null,null,J.prototype.vb,J.prototype.yb,"R1SET0"],L[65474]=[null,null,J.prototype.vb,J.prototype.yb,"R2SET0"],L[65475]=[null,null,J.prototype.vb,J.prototype.yb,"R3SET0"],L[65476]=[null,null,J.prototype.vb,
J.prototype.yb,"R4SET0"],L[65477]=[null,null,J.prototype.vb,J.prototype.yb,"R5SET0"],L[65478]=[null,null,J.prototype.Gf,J.prototype.Ug,"R6KERNEL"],L[65479]=[null,null,J.prototype.Jf,J.prototype.Xg,"R7KERNEL"],L[65480]=[null,null,J.prototype.wb,J.prototype.zb,"R0SET1",1,1145],L[65481]=[null,null,J.prototype.wb,J.prototype.zb,"R1SET1",1,1145],L[65482]=[null,null,J.prototype.wb,J.prototype.zb,"R2SET1",1,1145],L[65483]=[null,null,J.prototype.wb,J.prototype.zb,"R3SET1",1,1145],L[65484]=[null,null,J.prototype.wb,
J.prototype.zb,"R4SET1",1,1145],L[65485]=[null,null,J.prototype.wb,J.prototype.zb,"R5SET1",1,1145],L[65486]=[null,null,J.prototype.Hf,J.prototype.Vg,"R6SUPER",1,1145],L[65487]=[null,null,J.prototype.If,J.prototype.Wg,"R6USER",1,1145],L[65504]=[null,null,J.prototype.pf,J.prototype.Fg,"CTRL",8,1170],L[65520]=[null,null,J.prototype.Md,J.prototype.Pd,"LSIZE",1,1170],L[65522]=[null,null,J.prototype.Md,J.prototype.Pd,"HSIZE",1,1170],L[65524]=[null,null,J.prototype.fg,J.prototype.uh,"SYSID",1,1170],L[65526]=
[null,null,J.prototype.nf,J.prototype.Eg,"ERR",1,1170],L[65528]=[null,null,J.prototype.vf,J.prototype.Lg,"MBR",1,1170],L[65530]=[null,null,J.prototype.Af,J.prototype.Og,"PIR"],L[65532]=[null,null,J.prototype.eg,J.prototype.th,"SLR"],L[65534]=[null,null,J.prototype.Ff,J.prototype.Tg,"PSW"],L);
h.la=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){this.a.Ia=128;nc(this.c,this.a.dd,1E3/60,!0)};h.save=function(){var a=new E(this);a.set(0,[this.a.Ia]);return a.data()};h.restore=function(a){a=ia(a[0]);this.a.Ia=a.next().value;return!0};h.vf=function(){return this.a.Ia};h.Ng=function(a){this.a.Ia=a&192;this.a.Ia&64||(a=this.a.qa)&&qc(this.c,a)};h.xf=function(){return rc(this.c)};
h.Pg=function(a){sc(this.c,a&-129|this.c.J&128)};h.yf=function(){return tc(this.c)};h.zf=function(){return uc(this.c)};h.Af=function(){return this.c.ta};h.Qg=function(a){vc(this.c,a)};h.lg=function(a){a=a>>1&63;var b=this.c.Pa[a>>1];return a&1?b>>16:b&65535};h.Ch=function(a,b){b=b>>1&63;var c=b>>1;this.c.Pa[c]=b&1?this.c.Pa[c]&65535|(a&63)<<16:this.c.Pa[c]&-65536|a&65534};h.eg=function(a){return this.c.s[1][a>>1&7]};h.vh=function(a,b){this.c.s[1][b>>1&7]=a&65295};
h.cg=function(a){return this.c.s[1][(a>>1&7)+8]};h.th=function(a,b){this.c.s[1][(b>>1&7)+8]=a&65295};h.dg=function(a){return this.c.H[1][a>>1&7]};h.uh=function(a,b){b=b>>1&7;this.c.H[1][b]=a;this.c.s[1][b]&=65295};h.bg=function(a){return this.c.H[1][(a>>1&7)+8]};h.sh=function(a,b){b=(b>>1&7)+8;this.c.H[1][b]=a;this.c.s[1][b]&=65295};h.uf=function(a){return this.c.s[0][a>>1&7]};h.Mg=function(a,b){this.c.s[0][b>>1&7]=a&65295};h.sf=function(a){return this.c.s[0][(a>>1&7)+8]};
h.Kg=function(a,b){this.c.s[0][(b>>1&7)+8]=a&65295};h.tf=function(a){return this.c.H[0][a>>1&7]};h.Lg=function(a,b){b=b>>1&7;this.c.H[0][b]=a;this.c.s[0][b]&=65295};h.rf=function(a){return this.c.H[0][(a>>1&7)+8]};h.Jg=function(a,b){b=(b>>1&7)+8;this.c.H[0][b]=a;this.c.s[0][b]&=65295};h.kg=function(a){return this.c.s[3][a>>1&7]};h.Bh=function(a,b){this.c.s[3][b>>1&7]=a&65295};h.ig=function(a){return this.c.s[3][(a>>1&7)+8]};h.zh=function(a,b){this.c.s[3][(b>>1&7)+8]=a&65295};
h.jg=function(a){return this.c.H[3][a>>1&7]};h.Ah=function(a,b){b=b>>1&7;this.c.H[3][b]=a;this.c.s[3][b]&=65295};h.hg=function(a){return this.c.H[3][(a>>1&7)+8]};h.yh=function(a,b){b=(b>>1&7)+8;this.c.H[3][b]=a;this.c.s[3][b]&=65295};h.vb=function(a){a&=7;return this.c.i&2048?this.c.ua[a]:this.c.b[a]};h.yb=function(a,b){b&=7;this.c.i&2048?this.c.ua[b]=a:this.c.b[b]=a};h.Hf=function(){return this.c.i&49152?this.c.ga[0]:this.c.b[6]};h.Xg=function(a){this.c.i&49152?this.c.ga[0]=a:this.c.b[6]=a};
h.Kf=function(){return this.c.b[7]};h.$g=function(a){this.c.b[7]=a};h.wb=function(a){a&=7;return this.c.i&2048?this.c.b[a]:this.c.ua[a]};h.zb=function(a,b){b&=7;this.c.i&2048?this.c.b[b]=a:this.c.ua[b]=a};h.If=function(){return 1==(this.c.i&49152)>>14?this.c.b[6]:this.c.ga[1]};h.Yg=function(a){1==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.ga[1]=a};h.Jf=function(){return 3==(this.c.i&49152)>>14?this.c.b[6]:this.c.ga[3]};h.Zg=function(a){3==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.ga[3]=a};
h.qf=function(a){return this.c.Rb[a-65504>>1]};h.Ig=function(a,b){this.c.Rb[b-65504>>1]=a};h.Md=function(a){return 65520==a?(hc(this.u)>>6)-1:0};h.Pd=function(){};h.gg=function(){return 1};h.xh=function(){};h.pf=function(){return this.c.F};h.Hg=function(){this.c.F=0};h.wf=function(){return this.c.Ob};h.Og=function(a,b){b&1||(a&=255);this.c.Ob=a};h.Bf=function(a,b){return b?0:this.c.$a};h.Rg=function(a){var b=this.c;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.g|=1}b.$a=a};
h.fg=function(a,b){return b?0:this.c.Oa&65280};h.wh=function(a){this.c.Oa=a|255};h.Gf=function(){return xc(this.c)};h.Wg=function(a){yc(this.c,a)};h.Od=function(){};
var L={},pc=(L[61568]=[null,null,J.prototype.lg,J.prototype.Ch,"UNIMAP",64,1170],L[62592]=[null,null,J.prototype.eg,J.prototype.vh,"SIPDR",8,1145,64],L[62608]=[null,null,J.prototype.cg,J.prototype.th,"SDPDR",8,1145,64],L[62624]=[null,null,J.prototype.dg,J.prototype.uh,"SIPAR",8,1145,64],L[62640]=[null,null,J.prototype.bg,J.prototype.sh,"SDPAR",8,1145,64],L[62656]=[null,null,J.prototype.uf,J.prototype.Mg,"KIPDR",8,1140,64],L[62672]=[null,null,J.prototype.sf,J.prototype.Kg,"KDPDR",8,1145,64],L[62688]=
[null,null,J.prototype.tf,J.prototype.Lg,"KIPAR",8,1140,64],L[62704]=[null,null,J.prototype.rf,J.prototype.Jg,"KDPAR",8,1145,64],L[62798]=[null,null,J.prototype.Af,J.prototype.Qg,"MMR3",1,1145,64],L[65382]=[null,null,J.prototype.vf,J.prototype.Ng,"LKS"],L[65402]=[null,null,J.prototype.xf,J.prototype.Pg,"MMR0",1,1140,64],L[65404]=[null,null,J.prototype.yf,J.prototype.Od,"MMR1",1,1145,64],L[65406]=[null,null,J.prototype.zf,J.prototype.Od,"MMR2",1,1140,64],L[65408]=[null,null,J.prototype.kg,J.prototype.Bh,
"UIPDR",8,1140,64],L[65424]=[null,null,J.prototype.ig,J.prototype.zh,"UDPDR",8,1145,64],L[65440]=[null,null,J.prototype.jg,J.prototype.Ah,"UIPAR",8,1140,64],L[65456]=[null,null,J.prototype.hg,J.prototype.yh,"UDPAR",8,1145,64],L[65472]=[null,null,J.prototype.vb,J.prototype.yb,"R0SET0"],L[65473]=[null,null,J.prototype.vb,J.prototype.yb,"R1SET0"],L[65474]=[null,null,J.prototype.vb,J.prototype.yb,"R2SET0"],L[65475]=[null,null,J.prototype.vb,J.prototype.yb,"R3SET0"],L[65476]=[null,null,J.prototype.vb,
J.prototype.yb,"R4SET0"],L[65477]=[null,null,J.prototype.vb,J.prototype.yb,"R5SET0"],L[65478]=[null,null,J.prototype.Hf,J.prototype.Xg,"R6KERNEL"],L[65479]=[null,null,J.prototype.Kf,J.prototype.$g,"R7KERNEL"],L[65480]=[null,null,J.prototype.wb,J.prototype.zb,"R0SET1",1,1145],L[65481]=[null,null,J.prototype.wb,J.prototype.zb,"R1SET1",1,1145],L[65482]=[null,null,J.prototype.wb,J.prototype.zb,"R2SET1",1,1145],L[65483]=[null,null,J.prototype.wb,J.prototype.zb,"R3SET1",1,1145],L[65484]=[null,null,J.prototype.wb,
J.prototype.zb,"R4SET1",1,1145],L[65485]=[null,null,J.prototype.wb,J.prototype.zb,"R5SET1",1,1145],L[65486]=[null,null,J.prototype.If,J.prototype.Yg,"R6SUPER",1,1145],L[65487]=[null,null,J.prototype.Jf,J.prototype.Zg,"R6USER",1,1145],L[65504]=[null,null,J.prototype.qf,J.prototype.Ig,"CTRL",8,1170],L[65520]=[null,null,J.prototype.Md,J.prototype.Pd,"LSIZE",1,1170],L[65522]=[null,null,J.prototype.Md,J.prototype.Pd,"HSIZE",1,1170],L[65524]=[null,null,J.prototype.gg,J.prototype.xh,"SYSID",1,1170],L[65526]=
[null,null,J.prototype.pf,J.prototype.Hg,"ERR",1,1170],L[65528]=[null,null,J.prototype.wf,J.prototype.Og,"MBR",1,1170],L[65530]=[null,null,J.prototype.Bf,J.prototype.Rg,"PIR"],L[65532]=[null,null,J.prototype.fg,J.prototype.wh,"SLR"],L[65534]=[null,null,J.prototype.Gf,J.prototype.Wg,"PSW"],L);
Xa(function(){for(var a=z(document,y,"device"),b=0;b<a.length;b++){var c,d=a[b];c=v(d);switch(c.type){case "default":c=new J(c);w(c,d);break;case "pc11":c=new zc(c);w(c,d);break;case "rl11":c=new M(c);w(c,d);break;case "rk11":c=new N(c);w(c,d);break;case "rx11":c=new Ac(c),w(c,d)}}});
function G(a,b,c,d,e,f){this.b=a;this.id=Bc+=2;this.c=null;this.ab=b;this.Tb=c;this.size=d||0;this.type=e||Cc;this.A=e==Dc;this.controller=null;this.tb=this.i=this.$c;this.W=this.D=this.ad;this.xb=this.o=this.Wb;this.Ab=this.m=this.ed;this.g=this.h=0;Xb(this);this.Ha=this.Se=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.c=a[0],Ec(this,f.Le);else if(eb)this.f=new ArrayBuffer(this.size),this.u=new DataView(this.f,0,this.size),this.a=new Uint8Array(this.f,0,this.size),this.l=new Uint16Array(this.f,
0,this.size>>1),this.c=new Int32Array(this.f,0,this.size>>2),Ec(this,Fc?Gc:Hc);else{a=this.c=Array(this.size>>2);for(f=0;f<a.length;f++)a[f]=0;Ec(this,Ic)}else Ec(this)}h=G.prototype;h.save=function(){var a,b;if(this.controller)a=null;else if(eb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.u.getInt32(b<<2,!0);else a=this.c;return a};
h.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(eb)for(b=0;b<a.length;b++)this.u.setInt32(b<<2,a[b],!0);else this.c=a;return this.Ha=!0}return!1};function Ec(a,b){b||(b=Jc);Lc(a,b,void 0);Mc(a,b,void 0)}function Lc(a,b,c){c&&a.g||(a.tb=b[0]||a.$c,a.W=b[2]||a.ad);if(c||void 0===c)a.i=b[0]||a.$c,a.D=b[2]||a.ad}function Mc(a,b,c){c&&a.h||(a.xb=!a.A&&b[1]||a.Wb,a.Ab=!a.A&&b[3]||a.ed);if(c||void 0===c)a.o=b[1]||a.Wb,a.m=b[3]||a.ed}
function Xb(a,b){a.g=a.h=0;b&&((a.g=b.g)&&Lc(a,Nc,!1),(a.h=b.h)&&Mc(a,Nc,!1))}h.$c=function(a,b){H(this.b,b,32);return 255};h.Wb=function(a,b,c){H(this.b,c,32)};h.ad=function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8};h.ed=function(a,b,c){this.xb(a++,b&255,c++);this.xb(a,b>>8,c)};h.lf=function(a){return this.c[a>>2]>>>((a&3)<<3)&255};h.pg=function(a,b){gb&&a&1&&H(this.b,b,64);b=a>>2;a=(a&3)<<3;var c=this.c[b]>>a;return 24>a?c&65535:c&255|(this.c[b+1]&255)<<8};
h.Cg=function(a,b){var c=a>>2;a=(a&3)<<3;this.c[c]=this.c[c]&~(255<<a)|b<<a;this.Ha=!0};h.Dh=function(a,b,c){gb&&a&1&&H(this.b,c,64);c=a>>2;a=(a&3)<<3;24>a?this.c[c]=this.c[c]&~(65535<<a)|b<<a:(this.c[c]=this.c[c]&16777215|b<<24,c++,this.c[c]=this.c[c]&-256|b>>8);this.Ha=!0};h.jf=function(a,b){return this.i(a,b)};h.mg=function(a,b){return this.D(a,b)};h.Ag=function(a,b,c){this.A?this.Wb(0,0,c):this.o(a,b,c)};h.Bh=function(a,b,c){this.A?this.Wb(0,0,c):this.m(a,b,c)};h.hf=function(a){return this.a[a]};
h.kf=function(a){return this.a[a]};h.lg=function(a,b){gb&&a&1&&H(this.b,b,64);return this.u.getUint16(a,!0)};h.og=function(a,b){gb&&a&1&&H(this.b,b,64);return!hb&&a&1?this.a[a]|this.a[a+1]<<8:this.l[a>>1]};h.zg=function(a,b){this.a[a]=b;this.Ha=!0};h.Bg=function(a,b){this.a[a]=b;this.Ha=!0};h.Ah=function(a,b,c){gb&&a&1&&H(this.b,c,64);this.u.setUint16(a,b,!0);this.Ha=!0};h.Ch=function(a,b,c){gb&&a&1&&H(this.b,c,64);!hb&&a&1?(this.a[a]=b,this.a[a+1]=b>>8):this.l[a>>1]=b;this.Ha=!0};
var Cc=0,ic=1,Dc=2,Zb=4,dc=["NONE","RAM","ROM","VID","H/W"],Bc=0,Jc=[],Ic=[G.prototype.lf,G.prototype.Cg,G.prototype.pg,G.prototype.Dh],Nc=[G.prototype.jf,G.prototype.Ag,G.prototype.mg,G.prototype.Bh];if(eb)var Hc=[G.prototype.hf,G.prototype.zg,G.prototype.lg,G.prototype.Ah],Gc=[G.prototype.kf,G.prototype.Bg,G.prototype.og,G.prototype.Ch];var Oc;if(eb){var Pc=new ArrayBuffer(2);(new DataView(Pc)).setUint16(0,256,!0);Oc=256===(new Uint16Array(Pc))[0]}else Oc=!1;var Fc=Oc;
function Qc(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.fd=0;this.tc=b;this.Za=c;this.Dc=Math.round(this.tc/1E4)/100;this.jb=this.Dc*this.Za;this.Fc=this.Nb=this.mb=this.uc=0;this.j.M=this.j.cd=!1;this.j.Y=a.autoStart;"string"==typeof this.j.Y&&(this.j.Y="true"==this.j.Y);this.j.gc=!1;this.rc=this.lb=0;this.sc=+a.csStart;this.Lb=+a.csInterval;this.Mb=+a.csStop;this.X=[];this.vd=this.tg.bind(this);this.Na=this.Da=this.Ma=this.a=this.ba=this.Ca=this.Kb=this.La=this.nb=this.Gc=
h.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(eb)for(b=0;b<a.length;b++)this.u.setInt32(b<<2,a[b],!0);else this.c=a;return this.Ha=!0}return!1};function Ec(a,b){b||(b=Jc);Kc(a,b,void 0);Lc(a,b,void 0)}function Kc(a,b,c){c&&a.g||(a.tb=b[0]||a.$c,a.W=b[2]||a.ad);if(c||void 0===c)a.i=b[0]||a.$c,a.D=b[2]||a.ad}function Lc(a,b,c){c&&a.h||(a.xb=!a.A&&b[1]||a.Wb,a.Ab=!a.A&&b[3]||a.ed);if(c||void 0===c)a.o=b[1]||a.Wb,a.m=b[3]||a.ed}
function Xb(a,b){a.g=a.h=0;b&&((a.g=b.g)&&Kc(a,Mc,!1),(a.h=b.h)&&Lc(a,Mc,!1))}h.$c=function(a,b){H(this.b,b,32);return 255};h.Wb=function(a,b,c){H(this.b,c,32)};h.ad=function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8};h.ed=function(a,b,c){this.xb(a++,b&255,c++);this.xb(a,b>>8,c)};h.mf=function(a){return this.c[a>>2]>>>((a&3)<<3)&255};h.qg=function(a,b){gb&&a&1&&H(this.b,b,64);b=a>>2;a=(a&3)<<3;var c=this.c[b]>>a;return 24>a?c&65535:c&255|(this.c[b+1]&255)<<8};
h.Fg=function(a,b){var c=a>>2;a=(a&3)<<3;this.c[c]=this.c[c]&~(255<<a)|b<<a;this.Ha=!0};h.Gh=function(a,b,c){gb&&a&1&&H(this.b,c,64);c=a>>2;a=(a&3)<<3;24>a?this.c[c]=this.c[c]&~(65535<<a)|b<<a:(this.c[c]=this.c[c]&16777215|b<<24,c++,this.c[c]=this.c[c]&-256|b>>8);this.Ha=!0};h.kf=function(a,b){return this.i(a,b)};h.ng=function(a,b){return this.D(a,b)};h.Dg=function(a,b,c){this.A?this.Wb(0,0,c):this.o(a,b,c)};h.Eh=function(a,b,c){this.A?this.Wb(0,0,c):this.m(a,b,c)};h.jf=function(a){return this.a[a]};
h.lf=function(a){return this.a[a]};h.mg=function(a,b){gb&&a&1&&H(this.b,b,64);return this.u.getUint16(a,!0)};h.pg=function(a,b){gb&&a&1&&H(this.b,b,64);return!hb&&a&1?this.a[a]|this.a[a+1]<<8:this.l[a>>1]};h.Cg=function(a,b){this.a[a]=b;this.Ha=!0};h.Eg=function(a,b){this.a[a]=b;this.Ha=!0};h.Dh=function(a,b,c){gb&&a&1&&H(this.b,c,64);this.u.setUint16(a,b,!0);this.Ha=!0};h.Fh=function(a,b,c){gb&&a&1&&H(this.b,c,64);!hb&&a&1?(this.a[a]=b,this.a[a+1]=b>>8):this.l[a>>1]=b;this.Ha=!0};
var Cc=0,ic=1,Dc=2,Zb=4,dc=["NONE","RAM","ROM","VID","H/W"],Bc=0,Jc=[],Ic=[G.prototype.mf,G.prototype.Fg,G.prototype.qg,G.prototype.Gh],Mc=[G.prototype.kf,G.prototype.Dg,G.prototype.ng,G.prototype.Eh];if(eb)var Hc=[G.prototype.jf,G.prototype.Cg,G.prototype.mg,G.prototype.Dh],Gc=[G.prototype.lf,G.prototype.Eg,G.prototype.pg,G.prototype.Fh];var Oc;if(eb){var Pc=new ArrayBuffer(2);(new DataView(Pc)).setUint16(0,256,!0);Oc=256===(new Uint16Array(Pc))[0]}else Oc=!1;var Fc=Oc;
function Qc(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.fd=0;this.tc=b;this.Za=c;this.Dc=Math.round(this.tc/1E4)/100;this.jb=this.Dc*this.Za;this.Fc=this.Nb=this.mb=this.uc=0;this.j.M=this.j.cd=!1;this.j.Y=a.autoStart;"string"==typeof this.j.Y&&(this.j.Y="true"==this.j.Y);this.j.gc=!1;this.rc=this.lb=0;this.sc=+a.csStart;this.Lb=+a.csInterval;this.Mb=+a.csStop;this.X=[];this.vd=this.vg.bind(this);this.Na=this.Da=this.Ma=this.a=this.ba=this.Ca=this.Kb=this.La=this.nb=this.Gc=
this.Wa=0;this.pa=null;B(this)}n(Qc,r);h=Qc.prototype;h.ja=function(a,b,c,d){this.A=a;this.u=b;this.D=d;this.pa=a.f;for(a=0;a<Rc.length;a++)(b=this.o[Rc[a]])&&this.A.ma(null,Rc[a],b);B(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
h.la=function(a,b){var c=Sc(this.A,"autoStart");null!=c?this.j.Y="true"==c?!0:"false"==c?!1:!!c:null==this.j.Y&&(this.j.Y=void 0===this.o.run);if(!b){if(a){Tc(this);if(!this.restore(a))return!1;Uc(this)}else this.reset();this.status("No debugger detected");this.j.Y||this.aa("CPU will not be auto-started "+(this.pa?"(click Run to start)":"(type 'go' to start)"))}return!0};h.ka=function(a){return a?this.save():!0};h.Y=function(){return this.j.M?!0:this.j.Y?(Fb(this),!0):!1};h.Hd=function(){return 0};
function Uc(a){void 0===a.sc&&(a.sc=0);void 0===a.Lb&&(a.Lb=-1);void 0===a.Mb&&(a.Mb=-1);a.j.gc=0<=a.sc&&0<a.Lb;a.j.gc&&(a.rc=0,a.lb=a.sc-a.Na)}function Ib(a,b){if(a.j.gc){var c=!1;a.rc=a.rc+a.Hd()|0;a.lb-=b;0>=a.lb&&(a.lb+=a.Lb,c=!0);0<=a.Mb&&a.Mb<=Vc(a)&&(a.Lb=a.Mb=-1,Uc(a),F(a),c=!0);c&&a.aa(Vc(a)+" cycles: checksum="+Ca(a.rc))}}
@ -122,19 +123,19 @@ h.ma=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.
c,!0;case "setSpeed":return this.o[b]=c,c.onclick=function(){Wc(d,d.Za<<1,!0)},c.textContent=this.jb.toFixed(2)+"Mhz",!0}return!1};function Hb(a,b,c){a.Na+=b;c&&(a.Ma=a.a=a.ba=0)}function Xc(a,b){var c=1;b&&1<a.Za&&a.Wa&&(c=a.Wa/a.Dc);a.Fc=Math.round(1E3/Yc);a.Nb=Math.floor(a.tc/Yc*c);b||(a.mb=a.Nb);a.uc=0}function Vc(a){return a.Na+a.Da+a.Ma-a.a}function Tc(a){a.Wa=0;a.Gc=0;a.Na=a.Da=a.Ma=a.a=a.ba=0;Uc(a);Wc(a,1)}
function Wc(a,b,c){if(void 0!==b){.8>a.Wa/a.jb&&(b=1);a.Za=b;b=a.Dc*a.Za;if(a.jb!=b){a.jb=b;b=a.jb.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.aa("target speed: "+b)}c&&a.A&&Zc(a.A)}Hb(a,a.Da);a.Da=0;a.Ca=pa();a.La=0;Xc(a)}function mc(a,b){var c=a.X.length;a.X.push([-1,b]);return c}function nc(a,b,c,d){0<=b&&b<a.X.length&&(d||0>a.X[b][0])&&(c=a.tc*a.Za/1E3*c|0,a.j.M&&(c+=$c(a)),a.X[b][0]=c)}function ad(a){for(var b=[],c=0;c<a.X.length;c++)b.push(a.X[c][0]);return b}
function Gb(a,b){for(var c=a.X.length-1;0<=c;c--){var d=a.X[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function $c(a,b){var c=a.Ma-=a.a;a.a=a.ba=0;b&&(a.Ma=0);return c}
h.tg=function(){if(this.j.M){this.uc>=this.tc&&Xc(this,!0);this.nb=0;this.Kb=pa();if(this.La){var a=this.Kb-this.La;a>this.Fc&&(this.Ca+=a,this.Ca>this.Kb&&(this.Ca=this.Kb))}try{do{for(var b,c=this.j.gc?1:this.Nb,d=this.X.length-1;0<=d;d--){var e=this.X[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zc(b)}catch(f){if("number"!=typeof f)throw f;}b=$c(this,!0);this.nb+=b;this.Da+=b;Ib(this,b);Gb(this,b);this.mb-=b;if(0>=this.mb){this.mb+=this.Nb;++this.Gc>=bd&&(this.A&&Jb(this.A,void 0),this.Gc=0);break}}while(this.j.M)}catch(f){F(this);
h.vg=function(){if(this.j.M){this.uc>=this.tc&&Xc(this,!0);this.nb=0;this.Kb=pa();if(this.La){var a=this.Kb-this.La;a>this.Fc&&(this.Ca+=a,this.Ca>this.Kb&&(this.Ca=this.Kb))}try{do{for(var b,c=this.j.gc?1:this.Nb,d=this.X.length-1;0<=d;d--){var e=this.X[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zc(b)}catch(f){if("number"!=typeof f)throw f;}b=$c(this,!0);this.nb+=b;this.Da+=b;Ib(this,b);Gb(this,b);this.mb-=b;if(0>=this.mb){this.mb+=this.Nb;++this.Gc>=bd&&(this.A&&Jb(this.A,void 0),this.Gc=0);break}}while(this.j.M)}catch(f){F(this);
this.A&&this.A.stop(pa(),Vc(this));a=f.stack||f.message;this.j.error=!0;this.G(a);return}if(this.j.M){a=setTimeout;b=this.vd;this.La=pa();c=this.Fc;this.nb&&(c=Math.round(c*this.nb/this.Nb));c-=this.La-this.Kb;if(d=this.La-this.Ca)this.Wa=Math.round(this.Da/(10*d))/100,864E5<=d&&(this.Na=0,Wc(this));if(0>c||this.Wa<this.jb)-1E3>c&&(this.Ca-=c),c=0;this.uc+=this.nb;this.La+=c;a(b,c)}}};
function Fb(a){var b;a.j.error?(a.aa(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.M)a.aa(a.toString()+" busy");else{Wc(a);a.j.M=!0;a.j.cd=!0;if(b=a.o.run)b.textContent="Halt";a.A&&a.A.start(a.Ca,Vc(a));a.D||a.status("Started");setTimeout(a.vd,0)}}h.zc=function(){return 0};function F(a){var b=!1;if(a.j.M){$c(a);Hb(a,a.Da);a.Da=0;a.j.M=!1;if(b=a.o.run)b.textContent="Run";a.A&&a.A.stop(pa(),Vc(a));b=!0;a.D||a.status("Stopped")}a.j.complete=void 0;return b}var Yc=30,bd=15,Rc=["power","reset"];
function cd(a){var b=+a.model||1170;Qc.call(this,a,6666667);this.sa=b;this.pd=+a.addrReset||0;this.Ea=this.i=this.B=this.v=this.m=this.l=this.w=0;this.b=this.ua=this.ga=[];this.H=this.s=this.Pa=this.Rb=[];this.Ka=this.C=this.od=this.kb=this.Xa=this.Ya=this.cb=this.F=this.Ob=this.$a=this.Oa=this.J=this.Pb=this.Qb=this.ta=this.g=0;this.He=[4,2,0,1];this.wc=0;this.td=255;1120>=this.sa?(this.nd=dd.bind(this),this.hb=this.Pe,this.wc=8,this.td=-1,this.zd=255,this.wd=0):(this.nd=ed.bind(this),this.hb=this.Qe,
this.zd=~(1792|(1140>=this.sa?2048:0))&65535,this.wd=1140<this.sa?2048:0);this.Nc=this.Lc=this.pb=0;this.I=null;this.Ib=[];this.kc=this.gd=this.Te;this.lc=this.xc=this.Ve;this.yc=this.Ac=this.vg;this.mc=this.Cc=this.xg;this.Aa=this.jc=0;this.ra=this.Id;this.W=this.Nd;this.Ab=this.Qd;this.h=this.f=this.qc=this.K=this.S=0;this.j.complete=!1}n(cd,Qc);h=cd.prototype;h.ja=function(a,b,c,d){Qc.prototype.ja.call(this,a,b,c,d);this.gd=b.Rd.bind(b);this.xc=b.Xb.bind(b);this.Ac=b.Sd.bind(b);this.Cc=b.Yb.bind(b)};
this.zd=~(1792|(1140>=this.sa?2048:0))&65535,this.wd=1140<this.sa?2048:0);this.Nc=this.Lc=this.pb=0;this.I=null;this.Ib=[];this.kc=this.gd=this.Te;this.lc=this.xc=this.Ve;this.yc=this.Ac=this.xg;this.mc=this.Cc=this.zg;this.Aa=this.jc=0;this.ra=this.Id;this.W=this.Nd;this.Ab=this.Qd;this.h=this.f=this.qc=this.K=this.S=0;this.j.complete=!1}n(cd,Qc);h=cd.prototype;h.ja=function(a,b,c,d){Qc.prototype.ja.call(this,a,b,c,d);this.gd=b.Rd.bind(b);this.xc=b.Xb.bind(b);this.Ac=b.Sd.bind(b);this.Cc=b.Yb.bind(b)};
h.la=function(a,b){for(var c=192,d=0;d<this.Ib.length;d++){var e=this.Ib[d];0>e.Ub&&(e.Ub=c,c+=4)}return Qc.prototype.la.call(this,a,b)};
h.reset=function(){this.status("Model "+this.sa);this.j.M&&F(this);this.v=65536;this.m=32768;this.l=65535;this.w=32768;this.i=15;this.b=[0,0,0,0,0,0,0,this.pd,-1,-2,-3,-4,-5,-6,-7,-8];this.ua=[0,0,0,0,0,0];this.ga=[0,0,0,0];this.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.s=[[0,0,0,0,0,0,0,0,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.Pa=[0,0,0,0,0,0,0,0,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.Rb=[0,0,0,0,0,0,0,0];this.B=0;this.Ea=-1;this.h=this.f=this.qc=this.K=this.S=this.g=this.Ob=0;Db(this);Tc(this);this.j.error=!1;Qc.prototype.reset.call(this)};function Db(a){a.J=0;a.Pb=0;a.Qb=0;a.ta=0;a.F=0;a.$a=0;a.Oa=255;a.kb=0;a.Xa=0;a.Ya=0;a.cb=262143;a.Ka=a.b[7];a.C=0;a.I=null;a.u&&(fd(a),a.od=hc(a.u))}
function fd(a){a.kc=a.gd;a.lc=a.xc;a.yc=a.Ac;a.mc=a.Cc;a.kb?(a.Aa=65536,a.jc=a.ta&16?4186112:253952,a.ra=a.Id,a.W=a.Nd,a.Ab=a.Qd,$b(a.u,a.ta&16?22:18)):(a.Aa=0,a.jc=57344,a.ra=a.Ue,a.W=a.ng,a.Ab=a.Eh,$b(a.u,16))}function rc(a){var b=a.J;b&57344||(b=b&-3199|a.Xa<<5|a.Ya<<1);return b}function sc(a,b){b&=-3073;if(a.J!=b){b&57344&&!(a.J&57344)&&(a.Pb=a.C>>16&65535,a.Qb=a.C&65535);a.J=b;a.Xa=(b&96)>>5;a.Ya=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.kb!=c&&(a.kb=c,fd(a))}}
function uc(a){a.J&57344||(a.Pb=a.C>>16&65535);a=a.Pb;a&65280&&(a=(a<<8|a>>8)&65535);return a}function vc(a){a.J&57344||(a.Qb=a.C&65535);return a.Qb}function wc(a,b){1170>a.sa&&(b&=-49);a.ta!=b&&(a.ta=b,a.cb=b&16?4194303:262143,fd(a))}function gd(a,b,c,d){a.pd=b;hd(a,b);yc(a,0);a.u.reset();Db(a);if(c){a.b[0]=d||0;for(b=1;5>=b;b++)a.b[b]=0;a.b[6]=1024;a.j.R?a.j.M||Fb(a):a.j.Y=!0}else a.D&&a.j.R?F(a)||a.A.j.reset||(a.D.g(),Jb(a.A,-1)):!1===c&&F(a);!a.j.M&&a.pa&&a.pa.stop()}h.Hd=function(){return 0};
h.save=function(){var a=new E(this);a.set(0,[this.b,this.ua,this.ga,this.H,this.s,this.Pa,this.Rb,this.F,this.Ob,this.$a,this.Oa,this.Xa,this.Ya,this.Ka,this.g,this.C,this.Ea,this.Lc,this.Nc]);a.set(1,[xc(this),rc(this),uc(this),vc(this),this.ta]);a.set(2,[this.Na,this.Za,this.j.Y]);a.set(3,id(this));a.set(4,ad(this));return a.data()};
function fd(a){a.kc=a.gd;a.lc=a.xc;a.yc=a.Ac;a.mc=a.Cc;a.kb?(a.Aa=65536,a.jc=a.ta&16?4186112:253952,a.ra=a.Id,a.W=a.Nd,a.Ab=a.Qd,$b(a.u,a.ta&16?22:18)):(a.Aa=0,a.jc=57344,a.ra=a.Ue,a.W=a.og,a.Ab=a.Hh,$b(a.u,16))}function rc(a){var b=a.J;b&57344||(b=b&-3199|a.Xa<<5|a.Ya<<1);return b}function sc(a,b){b&=-3073;if(a.J!=b){b&57344&&!(a.J&57344)&&(a.Pb=a.C>>16&65535,a.Qb=a.C&65535);a.J=b;a.Xa=(b&96)>>5;a.Ya=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.kb!=c&&(a.kb=c,fd(a))}}
function tc(a){a.J&57344||(a.Pb=a.C>>16&65535);a=a.Pb;a&65280&&(a=(a<<8|a>>8)&65535);return a}function uc(a){a.J&57344||(a.Qb=a.C&65535);return a.Qb}function vc(a,b){1170>a.sa&&(b&=-49);a.ta!=b&&(a.ta=b,a.cb=b&16?4194303:262143,fd(a))}function gd(a,b,c,d){a.pd=b;hd(a,b);yc(a,0);a.u.reset();Db(a);if(c){a.b[0]=d||0;for(b=1;5>=b;b++)a.b[b]=0;a.b[6]=1024;a.j.R?a.j.M||Fb(a):a.j.Y=!0}else a.D&&a.j.R?F(a)||a.A.j.reset||(a.D.g(),Jb(a.A,-1)):!1===c&&F(a);!a.j.M&&a.pa&&a.pa.stop()}h.Hd=function(){return 0};
h.save=function(){var a=new E(this);a.set(0,[this.b,this.ua,this.ga,this.H,this.s,this.Pa,this.Rb,this.F,this.Ob,this.$a,this.Oa,this.Xa,this.Ya,this.Ka,this.g,this.C,this.Ea,this.Lc,this.Nc]);a.set(1,[xc(this),rc(this),tc(this),uc(this),this.ta]);a.set(2,[this.Na,this.Za,this.j.Y]);a.set(3,id(this));a.set(4,ad(this));return a.data()};
h.restore=function(a){var b=ia(a[0]);this.b=b.next().value;this.ua=b.next().value;this.ga=b.next().value;this.H=b.next().value;this.s=b.next().value;this.Pa=b.next().value;this.Rb=b.next().value;this.F=b.next().value;this.Ob=b.next().value;this.$a=b.next().value;this.Oa=b.next().value;this.Xa=b.next().value;this.Ya=b.next().value;this.Ka=b.next().value;this.g=b.next().value;this.C=b.next().value;this.Ea=b.next().value;this.Lc=b.next().value;this.Nc=b.next().value;b=a[1];yc(this,b[0]);sc(this,b[1]);
this.Pb=b[2];this.Qb=b[3];wc(this,b[4]);b=a[2];this.Na=b[0];Wc(this,b[1]);this.j.Y=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d<this.Ib.length;d++){var e=this.Ib[d];if(e.Ub===b[c]){d=e;break a}}d=null}d&&(d.next=this.I,this.I=d)}a=a[4];for(b=0;b<this.X.length&&b<a.length;b++)this.X[b][0]=a[b];return!0};function jd(a){return a.v&65536?1:0}function kd(a){return a.w&32768?8:0}function ld(a,b){var c=a.b[7];a.b[7]=c+b&65535;return c}
this.Pb=b[2];this.Qb=b[3];vc(this,b[4]);b=a[2];this.Na=b[0];Wc(this,b[1]);this.j.Y=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d<this.Ib.length;d++){var e=this.Ib[d];if(e.Ub===b[c]){d=e;break a}}d=null}d&&(d.next=this.I,this.I=d)}a=a[4];for(b=0;b<this.X.length&&b<a.length;b++)this.X[b][0]=a[b];return!0};function jd(a){return a.v&65536?1:0}function kd(a){return a.w&32768?8:0}function ld(a,b){var c=a.b[7];a.b[7]=c+b&65535;return c}
function O(a,b,c){c&&(hd(a,a.b[7]+(b<<24>>23)),a.a-=2);a.a-=3}function hd(a,b){a.b[7]=b&65535}function oc(a,b,c,d){b={Ub:b,sb:c,message:d||0,name:jb[b],next:null};a.Ib.push(b);return b}function qc(a,b){var c=a.I;if(c==b)a.I=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.I&&(a.g|=1)}function K(a,b){if(b){if(b!=a.I){var c=a.I;if(!c||c.sb<=b.sb)b.next=c,a.I=b;else{do{var d=c.next;if(!d||d.sb<=b.sb){b.next=d;c.next=b;break}c=d}while(c)}}a.g|=1}}
function id(a){var b=[];for(a=a.I;a;)b.push(a.Ub),a=a.next;return b}function md(a){return a.g&64?(I(a,168,64,-6),!0):a.g&32?(I(a,4,32,-5),!0):a.g&16?(I(a,12,16,-7),!0):!1}function xc(a){return a.i=a.i&63728|kd(a)|(a.l&65535?0:4)|(a.m&32768?2:0)|jd(a)}function yc(a,b){b&=a.zd;a.w=b<<12;a.l=~b&4;a.m=b<<14;a.v=b<<16;if((b^a.i)&a.wd)for(var c=a.ua.length;0<=--c;){var d=a.b[c];a.b[c]=a.ua[c];a.ua[c]=d}a.B=b>>14&3;c=a.i>>14&3;a.B!=c&&(a.ga[c]=a.b[6],a.b[6]=a.ga[a.B]);a.i=b;a.g&=-3;a.g|=a.I?2:1}
h.fa=function(a){this.w=this.l=a;this.m=0};h.Sa=function(a,b){this.w=this.l=this.v=a;this.m=b||0};function nd(a,b){a.w=a.l=a.v=b;a.m=a.w^a.v>>1}function od(a,b,c,d){a.w=a.l=a.v=b;a.m=(c^d)&(d^b)}
@ -143,8 +144,8 @@ function sd(a,b){var c=b>>13&31;31>c&&(b=a.ta&32?a.Pa[c]+(b&8191)&4194303:b&-393
function Mb(a,b,c){var d,e,f;if(!(c&a.kb))return f=b&65535,57344<=f&&(f|=a.jc),f;d=b>>13;a.ta&a.He[a.B]||(d&=7);e=a.s[a.B][d];f=(a.H[a.B][d]<<6)+(b&8191)&a.cb;3932160<=f&&(f=sd(a,f));if(a.pb)return f;f>=a.od&&f<a.jc?(a.F|=32,I(a,4,0,f)):f&1&&!(c&1)&&(a.F|=64,I(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&
(g|=16384));a.s[a.B][d]=e;if(f!=(4194170&a.cb)||a.B)a.Xa=a.B,a.Ya=d;g&&(g&57344&&(0<=a.Ea&&(g|=128),a.J&57344||(g|=a.J&4096|a.Xa<<5|a.Ya<<1,sc(a,a.J&-61695|g&61694)),I(a,168,64,-2)),a.J&61440||!(f<(4191360&a.cb)||f>(4194239&a.cb))||(a.J|=4096,a.J&512&&(a.g|=64)));return f}function rd(a){var b=a.W(a.b[6]|a.Aa);a.b[6]=a.b[6]+2&65535;return b}function pd(a,b){var c=a.b[6]-2&65535;a.b[6]=c;a.C=a.C&65535|(a.C&-65536)<<8|16121856;a.g&256||a.hb(4,-2,c);a.Ab(c,b)}
function td(a,b,c,d){var e,f,g=d&8?0:a.Aa;switch(b){case 0:return I(a,4,0,-3),0;case 1:return 6==c&&a.hb(d,0,a.b[6]),a.a-=3,7==c?a.b[c]:a.b[c]|g;case 2:f=2;e=a.b[c];6==c&&a.hb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.b[c];7!=c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.b[c]+f&65535;6==c&&a.hb(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.b[c]-2&65535;7!=c&&(e|=g);e=a.W(e)|g;a.a-=8;break;case 6:return e=a.W(ld(a,2)),e=e+a.b[c]&65535,6==c&&a.hb(d,0,
e),a.a-=6,e|g;case 7:return e=a.W(ld(a,2)),e=e+a.b[c]&65535,e=a.W(e|a.Aa),a.a-=10,e|g}a.b[c]=a.b[c]+f&65535;a.C=a.C&65535|(a.C&-65536)<<8|(f<<3&248|c)<<16;return e}h.Pe=function(a,b,c){!this.B&&0>=b&&c<=this.Oa&&(this.g|=32)};h.Qe=function(a,b,c){this.B||(65534<=c&&(c|=-65536),a&4&&c<=this.Oa&&(c<=this.Oa-32?I(this,4,0,-4):(this.F|=8,this.g|=32)))};h.Te=function(a){return this.gd(a)};h.Ve=function(a){return this.xc(a)};h.vg=function(a,b){this.Ac(a,b)};h.xg=function(a,b){this.Cc(a,b)};
h.Ue=function(a,b,c){return td(this,a,b,c)};h.Id=function(a,b,c){return Mb(this,td(this,a,b,c),c)};h.ng=function(a){return this.u.Xb(this.Ka=a)};h.Nd=function(a){return this.u.Xb(this.Ka=Mb(this,a,2))};h.Eh=function(a,b){this.u.Yb(this.Ka=a,b)};h.Qd=function(a,b){this.u.Yb(this.Ka=Mb(this,a,4),b)};
e),a.a-=6,e|g;case 7:return e=a.W(ld(a,2)),e=e+a.b[c]&65535,e=a.W(e|a.Aa),a.a-=10,e|g}a.b[c]=a.b[c]+f&65535;a.C=a.C&65535|(a.C&-65536)<<8|(f<<3&248|c)<<16;return e}h.Pe=function(a,b,c){!this.B&&0>=b&&c<=this.Oa&&(this.g|=32)};h.Qe=function(a,b,c){this.B||(65534<=c&&(c|=-65536),a&4&&c<=this.Oa&&(c<=this.Oa-32?I(this,4,0,-4):(this.F|=8,this.g|=32)))};h.Te=function(a){return this.gd(a)};h.Ve=function(a){return this.xc(a)};h.xg=function(a,b){this.Ac(a,b)};h.zg=function(a,b){this.Cc(a,b)};
h.Ue=function(a,b,c){return td(this,a,b,c)};h.Id=function(a,b,c){return Mb(this,td(this,a,b,c),c)};h.og=function(a){return this.u.Xb(this.Ka=a)};h.Nd=function(a){return this.u.Xb(this.Ka=Mb(this,a,2))};h.Hh=function(a,b){this.u.Yb(this.Ka=a,b)};h.Qd=function(a,b){this.u.Yb(this.Ka=Mb(this,a,4),b)};
function ud(a,b,c){var d=a.f=b&7;(b=a.h=(b&56)>>3)?(d=td(a,b,d,2),c&65536||61440!==(a.i&61440)&&(d&=65535),a.B=a.i>>12&3,c=a.W(d|c&a.Aa),a.B=a.i>>14&3):c=6!=d||(a.i>>2&12288)===(a.i&12288)?a.b[d]:a.ga[a.i>>12&3];return c}function vd(a,b,c,d){a.C=a.C&65535|1441792;var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=td(a,b,e,4),c&65536||(e&=65535),a.B=a.i>>12&3,e=Mb(a,e|c&65536,4),a.B=a.i>>14&3,a.mc(e,d)):6!=e||(a.i>>2&12288)===(a.i&12288)?a.b[e]=d:a.ga[a.i>>12&3]=d}
function wd(a,b){b>>=6;var c=a.S=b&7;return(b=a.K=(b&56)>>3)?a.kc(a.ra(b,c,3)):a.b[c+a.wc]&a.td}function xd(a,b){var c;b>>=6;var d=a.S=b&7;(b=a.K=(b&56)>>3)?c=a.lc(a.ra(b,d,2)):c=a.b[d+a.wc];return c}function yd(a,b){var c=a.f=b&7;b=a.h=(b&56)>>3;return td(a,b,c,8)}function zd(a,b){var c=a.f=b&7;return(b=a.h=(b&56)>>3)?a.kc(a.ra(b,c,3)):a.b[c]&255}function Ad(a,b){var c,d=a.f=b&7;(b=a.h=(b&56)>>3)?c=a.lc(a.ra(b,d,2)):c=a.b[d];return c}
function P(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.qc=a.ra(b,e,7),c=0>c?a.b[-c-1]&255:c,a.yc(e,d.call(a,c,a.kc(e))),e&1&&a.a--):(b=a.b[e],c=0>c?a.b[-c-1]&255:c,a.b[e]=b&65280|d.call(a,c,b&255))}function Q(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.ra(b,e,6),a.mc(e,d.call(a,0>c?a.b[-c-1]:c,a.lc(e)))):a.b[e]=d.call(a,0>c?a.b[-c-1]:c,a.b[e])}
@ -178,8 +179,8 @@ this.ba=this.a;this.fa(b);vd(this,a,0,b);this.a=this.ba-Pe[this.h]},function(a){
af,af,R,R,R,R,We,We],Af=[we,ue,qe,se,ze,Ae,fe,ge,Fe,Ze,nf,pf,rf,function(a){1145>this.sa?I(this,8,0,-9):Ef[a>>6&3].call(this,a)},R,R],Ef=[function(){I(this,8,0,-9)},function(a){a=ud(this,a,65536);this.fa(a);pd(this,a);this.a-=11},function(a){var b=rd(this);this.ba=this.a;this.fa(b);vd(this,a,65536,b);this.a=this.ba-Pe[this.h]},function(){I(this,8,0,-9)}];
function Ff(a){r.call(this,"ROM",a,128);this.ia=this.b=null;this.h=+a.addr;this.a=+a.size;this.i=!1;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.g=a.file;this.m=Da(this.g);if(this.g){a=this.g;var b=Ea(this.m);"json"!=b&&"hex"!=b&&(a=Na()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;La(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(na(c.Ua,a,b),(a=Ma(a,b))?(c.b=a.N,c.ia=a.ia):c.g=null);Gf(c)})}}n(Ff,r);
h=Ff.prototype;h.ja=function(a,b,c,d){this.u=b;this.c=c;this.D=d;Gf(this)};h.la=function(){this.ia&&(this.D&&this.D.a(this.id,this.h,this.a,this.ia),delete this.ia);return!0};h.ka=function(){return!0};
function Gf(a){if(!ya(a)){if(a.g){if(!a.b||!a.u)return;a.a||(a.a=a.b.length);if(a.b.length!=a.a){var b="ROM size ("+Ca(a.b.length,8,!0)+") does not match specified size ("+Ca(a.a,8,!0)+")";a.j.error=!0;a.G(b)}else{a:{b=a.h;if(57344<=b&&b<57344+Sb){var c={},c=(c[b]=[Ff.prototype.Yf,Ff.prototype.mh,null,null,null,a.a>>1],c);if(pb(a.u,a,c)){a.status("Added "+a.a+"-byte ROM at "+Ba(b));b=a.i=!0;break a}}else if(Yb(a.u,b,a.a,Dc)){for(c=0;c<a.b.length;c++)gc(a.u,b+c,a.b[c]);b=!0;break a}b=!1}if(b){b=[];
"number"==typeof a.f?b.push(a.f):null!=a.f&&a.f.length&&(b=a.f);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.u,g=d.a,k=[],l=d.h>>>f.h;0<g&&l<f.a.length;)k.push(f.a[l++]),g-=f.g;f=d.u;d=d.a;g=0;for(e>>>=f.h;0<d&&e<f.a.length;){l=k[g++];if(!l)break;f.a[e++]=l;d-=f.g}}a.i||delete a.b}}}B(a)}}h.Yf=function(a){return this.b[a-this.h]};h.mh=function(){};Xa(function(){for(var a=z(document,y,"rom"),b=0;b<a.length;b++){var c=a[b],d=v(c),d=new Ff(d);w(d,c)}});
function Gf(a){if(!ya(a)){if(a.g){if(!a.b||!a.u)return;a.a||(a.a=a.b.length);if(a.b.length!=a.a){var b="ROM size ("+Ca(a.b.length,8,!0)+") does not match specified size ("+Ca(a.a,8,!0)+")";a.j.error=!0;a.G(b)}else{a:{b=a.h;if(57344<=b&&b<57344+Sb){var c={},c=(c[b]=[Ff.prototype.Zf,Ff.prototype.ph,null,null,null,a.a>>1],c);if(pb(a.u,a,c)){a.status("Added "+a.a+"-byte ROM at "+Ba(b));b=a.i=!0;break a}}else if(Yb(a.u,b,a.a,Dc)){for(c=0;c<a.b.length;c++)gc(a.u,b+c,a.b[c]);b=!0;break a}b=!1}if(b){b=[];
"number"==typeof a.f?b.push(a.f):null!=a.f&&a.f.length&&(b=a.f);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.u,g=d.a,k=[],l=d.h>>>f.h;0<g&&l<f.a.length;)k.push(f.a[l++]),g-=f.g;f=d.u;d=d.a;g=0;for(e>>>=f.h;0<d&&e<f.a.length;){l=k[g++];if(!l)break;f.a[e++]=l;d-=f.g}}a.i||delete a.b}}}B(a)}}h.Zf=function(a){return this.b[a-this.h]};h.ph=function(){};Xa(function(){for(var a=z(document,y,"rom"),b=0;b<a.length;b++){var c=a[b],d=v(c),d=new Ff(d);w(d,c)}});
function Hf(a){r.call(this,"RAM",a);this.ia=this.b=null;this.f=+a.addr;this.g=+a.size;this.ea=a.load;this.da=a.exec;null!=this.ea&&(this.ea=+this.ea);null!=this.da&&(this.da=+this.da);this.h=!1;this.a=a.file;this.i=Da(this.a);if(this.a){a=this.a;var b=Ea(this.i);"json"!=b&&"hex"!=b&&(a=Na()+"/api/v1/dump?file="+this.a+"&format=bytes&decimal=true");var c=this;La(a,null,!0,function(a,b,f){f?(c.G("Unable to load RAM resource (error "+f+": "+a+")"),c.a=null):(na(c.Ua,a,b),(a=Ma(a,b))?(c.b=a.N,c.ia=a.ia,
null==c.ea&&(c.ea=a.ea),null==c.da&&(c.da=a.da)):c.a=null);If(c)})}}n(Hf,r);Hf.prototype.ja=function(a,b,c,d){this.u=b;this.c=c;this.D=d;If(this)};Hf.prototype.la=function(a,b){this.ia&&(this.D&&this.D.a(this.id,this.f,this.g,this.ia),delete this.ia);b||this.reset();return!0};Hf.prototype.ka=function(){return!0};
function If(a){if(a.u&&(!a.h&&a.g&&(Yb(a.u,a.f,a.g,ic)?a.h=!0:a.g=0),!ya(a))){if(!a.h)u("No RAM allocated");else if(a.a){if(!a.b||!a.u)return;Jf(a,a.b,a.ea,a.da,a.f)?a.status('Loaded image "'+a.i+'"'):a.G('Error loading image "'+a.i+'"')}B(a)}}
@ -187,16 +188,16 @@ Hf.prototype.reset=function(){if(this.h){for(var a=this.u,b=this.f,c=this.g,d=b&
function Jf(a,b,c,d,e,f){var g=!1,k=!1;if(null==c)for(var l=0;l<b.length-1;){var m=b[l]&255|(b[l+1]&255)<<8;if(m)if(m&255){if(1!=m)break;if(l+6>=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,q=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),x=l,A=p-=6;0<p&&l<b.length;)m+=b[l++]&255,p--;if(p||l>=b.length)break;m+=b[l++]&255;if(m&255)break;if(A)for(;A--;)gc(a.u,q++,b[x++]&255);else q&1?g=!0:null==d&&(d=q);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e<
b.length;e++)gc(a.u,c+e,b[e]);k=!0}if(k){if(null==d||g)F(a.c),f=!1;null!=d&&gd(a.c,d,f)}return k}Xa(function(){for(var a=z(document,y,"ram"),b=0;b<a.length;b++){var c=a[b],d=v(c),d=new Hf(d);w(d,c)}});function Kf(a){r.call(this,"Keyboard",a,1024);B(this)}n(Kf,r);Kf.prototype.ma=function(){return!1};Kf.prototype.ja=function(a,b,c,d){this.A=a;this.c=c;this.D=d};Xa(function(){for(var a=z(document,y,"keyboard"),b=0;b<a.length;b++){var c=a[b],d=v(c),d=new Kf(d);w(d,c)}});
function Lf(a){r.call(this,"SerialPort",a,1048576);this.B=+a.adapter;this.J=+a.baudReceive||9600;this.ba=+a.baudTransmit||9600;this.w=a.upperCase;"string"==typeof this.w&&(this.w="true"==this.w);this.h=this.i=null;this.S=+a.tabSize;this.K=+a.charBOL;this.m=0;this.v=!0;this.H=this.C=null;this.I=this.X=-1;this.l=this.a=this.b=0;this.f=[];var b=a.binding;if("console"==b)this.i="";else{var c;a=Mf;b&&(void 0===c&&(c="Panel"),(c=ta(c,this.id))&&(b=c.o[b])&&this.ma(null,a,b))}this.g=this.s=this.F=null;this.exports=
{connect:this.Jd,receiveData:this.nc,receiveStatus:this.sg,setConnection:this.wg}}n(Lf,r);h=Lf.prototype;
{connect:this.Jd,receiveData:this.nc,receiveStatus:this.tg,setConnection:this.yg}}n(Lf,r);h=Lf.prototype;
h.ma=function(a,b,c){var d=this;switch(b){case Mf:return this.o[b]=this.h=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.kd:la.Cb:46==c?b=la.kd:a.ctrlKey&&c>=la.hd&&c<=la.Ke&&(b=c-(la.hd-la.Ud));b&&(a.preventDefault&&a.preventDefault(),d.nc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.Wd&&(b=la.Vd);d.nc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.nc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
h.ja=function(a,b,c,d){this.A=a;this.u=b;this.c=c;this.D=d;var e=this;this.H=oc(this.c,this.B?-1:48,4,1048576);this.I=mc(this.c,function(){var a;a=-1;e.f.length&&(a=e.f.shift()&255,e.w&&97<=a&&122>a&&(a-=32),nc(e.c,e.I,1E3/Math.round(e.J/10)));0<=a&&(e.l=a,e.a&128?e.l|=49152:e.a|=128,e.a&64&&K(c,e.H))});this.C=oc(this.c,this.B?-1:52,4,1048576);this.X=mc(this.c,function(){e.b|=128;e.b&64&&K(c,e.C)});pb(b,this,Nf,this.B?64832+8*(this.B-1)-65392:0);rb(b,this.reset.bind(this));B(this)};
h.Jd=function(a){if(!this.g){var b=Sc(this.A,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ia(c[0]);if(d!=this.ib)return;c=Ia(c[1]);if(this.g=sa(c)){var e=this.g.exports;if(e){var f=e.connect;f&&f.call(this.g,this.v);if(this.s=e.receiveData){this.v=a;this.F=e.receiveStatus;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};h.la=function(a,b){if(!b)if(this.Jd(this.v),!a)this.reset();else if(!this.restore(a))return!1;return!0};
h.ka=function(a){return a?this.save():!0};h.reset=function(){Of(this)};h.save=function(){var a=new E(this);a.set(0,[this.l,this.a,this.b,this.f]);return a.data()};h.restore=function(a){return Of(this,a[0])};function Of(a,b){b||(b=[0,8192,128,a.f]);b=ia(b);a.l=b.next().value;a.a=b.next().value;a.b=b.next().value;a.f=b.next().value;return!0}
h.nc=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.f.push(b)}else this.f=this.f.concat(a);nc(this.c,this.I,1E3/Math.round(this.J/10));return!0};h.sg=function(a){var b=this.a;this.a&=-12289;a&32&&(this.a|=8192);a&256&&(this.a|=4096);b!=this.a&&(this.a|=32768,this.a&32&&K(this.c,this.H))};h.wg=function(a,b){return this.g?!1:(this.g=a,this.s=b,!0)};
h.Lf=function(){var a=this.a&65534;this.a&=-32769;return a};h.Zg=function(a){var b=a^this.a;this.a=this.a&-112|a&111;this.F&&b&6&&(b=0,b=this.v?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.F.call(this.g,b))};h.Kf=function(){this.a&=-129;return this.l};h.Yg=function(){};h.rg=function(){return this.b};h.Gh=function(a){if(this.b&128)if(a&64)K(this.c,this.C);else{var b=this.C;b&&qc(this.c,b)}this.b=this.b&-70|a&69};h.qg=function(){return 0};
h.Fh=function(a){a&=255;this.s&&this.s.call(this.g,a);a&=127;if(this.h)if(13==a)this.m=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.m&&this.m--;else{if(a){var b;13!=a&&10!=a&&(b=Ja[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.m%a,this.S&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=
this.i){if(10==a||1024<=this.i.length)this.aa(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}nc(this.c,this.X,1E3/Math.round(this.ba/10));this.b&=-129};var Mf="buffer",Pf={},Nf=(Pf[65392]=[null,null,Lf.prototype.Lf,Lf.prototype.Zg,"RCSR"],Pf[65394]=[null,null,Lf.prototype.Kf,Lf.prototype.Yg,"RBUF"],Pf[65396]=[null,null,Lf.prototype.rg,Lf.prototype.Gh,"XCSR"],Pf[65398]=[null,null,Lf.prototype.qg,Lf.prototype.Fh,"XBUF"],Pf);
h.nc=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.f.push(b)}else this.f=this.f.concat(a);nc(this.c,this.I,1E3/Math.round(this.J/10));return!0};h.tg=function(a){var b=this.a;this.a&=-12289;a&32&&(this.a|=8192);a&256&&(this.a|=4096);b!=this.a&&(this.a|=32768,this.a&32&&K(this.c,this.H))};h.yg=function(a,b){return this.g?!1:(this.g=a,this.s=b,!0)};
h.Mf=function(){var a=this.a&65534;this.a&=-32769;return a};h.bh=function(a){var b=a^this.a;this.a=this.a&-112|a&111;this.F&&b&6&&(b=0,b=this.v?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.F.call(this.g,b))};h.Lf=function(){this.a&=-129;return this.l};h.ah=function(){};h.sg=function(){return this.b};h.Jh=function(a){if(this.b&128)if(a&64)K(this.c,this.C);else{var b=this.C;b&&qc(this.c,b)}this.b=this.b&-70|a&69};h.rg=function(){return 0};
h.Ih=function(a){a&=255;this.s&&this.s.call(this.g,a);a&=127;if(this.h)if(13==a)this.m=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.m&&this.m--;else{if(a){var b;13!=a&&10!=a&&(b=Ja[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.m%a,this.S&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=
this.i){if(10==a||1024<=this.i.length)this.aa(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}nc(this.c,this.X,1E3/Math.round(this.ba/10));this.b&=-129};var Mf="buffer",Pf={},Nf=(Pf[65392]=[null,null,Lf.prototype.Mf,Lf.prototype.bh,"RCSR"],Pf[65394]=[null,null,Lf.prototype.Lf,Lf.prototype.ah,"RBUF"],Pf[65396]=[null,null,Lf.prototype.sg,Lf.prototype.Jh,"XCSR"],Pf[65398]=[null,null,Lf.prototype.rg,Lf.prototype.Ih,"XBUF"],Pf);
Xa(function(){for(var a=z(document,y,"serial"),b=0;b<a.length;b++){var c=a[b],d=v(c),d=new Lf(d);w(d,c)}});function zc(a){r.call(this,"PC11",a,4096);this.C=Qf(this,a.autoMount);this.b=0;this.K=+a.baudReceive||3600;this.l=this.a=0;this.w=32768;this.h=this.I=0;this.m=[];this.i=Rf;this.f=Sf;this.B=this.g="";this.N=this.ea=this.da=null;this.H=-1;this.F=!Ta("Mobi")&&window&&"FileReader"in window;this.s=null;this.J=-1;this.v=null}n(zc,r);
function Qf(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){u(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=zc.prototype;
h.ma=function(a,b,c){var d=this,e=Sf;switch(b){case "listTapes":return this.o[b]=c,c.onchange=function(){var a=d.o.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){u("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "readTape":e=Tf;case "loadTape":return e||(e=Uf),this.o[b]=c,c.onclick=
@ -207,24 +208,24 @@ function Vf(a,b,c,d,e){if(c)if(c==ag)a.G('Use "Choose File" and "Mount" to selec
function gg(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),hg(a,b,c,d,e),a.i=ag);a.j.Ra=!1;eg(a)};g.readAsArrayBuffer(e);return!1}0>c.indexOf("/api/v1/dump")&&(e=Ea(c),f="json"==e||"gz"==e?encodeURI(c):Na()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!La(f,null,!0,function(e,f,g){var k=0>g&&!!a.A&&!a.A.j.R;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(na(a.Ua,e,f),(e=Ma(e,f))&&hg(a,b,c,d,
e.N,e.ea,e.da));a.j.Ra=!1;a.b&&(a.b--,a.b||B(a));eg(a)})}function $f(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
function eg(a){var b=a.o.listTapes;if(b&&b.options){a=a.i||a.g;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function Yf(a,b){b|=0;if(b!==a.H){var c=a.o[Wf];c&&(c=(c=z(c,ig))&&c[0])&&c.style&&(c.style.width=b+"%");a.H=b}}
function hg(a,b,c,d,e,f,g){a.B=b;a.g=c;a.f=d;a.N=e;a.ea=f;a.da=g;d==Tf?a.v&&Jf(a.v,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.G('No valid memory address for tape "'+b+'"'):(a.h=0,a.m=e,a.a&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Yf(a,0))}function fg(a,b){if(a.g||!1===b)a.B="",a.g="",b||(a.f&&a.status(a.f==Uf?"tape detached":"tape unloaded"),a.i=Rf,a.f=Sf,eg(a))}h.save=function(){return(new E(this)).data()};h.restore=function(){return!0};h.Ef=function(){return this.a&65534};
h.Sg=function(a){a&1&&(this.a&32768?(a&=-2,this.a&64&&K(this.c,this.s)):(this.a&=-129,this.a|=2048,this.l=0,nc(this.c,this.J,1E3/Math.round(this.K/10))));this.a=this.a&-66|a&65};h.Df=function(){this.a&=-129;this.a|=2048;return this.l};h.Rg=function(){};h.Cf=function(){return this.w};h.Qg=function(a){this.w=this.w&-65|a&64};h.Bf=function(){return this.I};h.Pg=function(a){this.I=a&255};
var Rf="",ag="?",bg="??",Sf=0,Uf=1,Tf=2,Wf="readProgress",ig="pcjs-progress-bar",jg={},Zf=(jg[65384]=[null,null,zc.prototype.Ef,zc.prototype.Sg,"PRS"],jg[65386]=[null,null,zc.prototype.Df,zc.prototype.Rg,"PRB"],jg[65388]=[null,null,zc.prototype.Cf,zc.prototype.Qg,"PPS"],jg[65390]=[null,null,zc.prototype.Bf,zc.prototype.Pg,"PPB"],jg);
function hg(a,b,c,d,e,f,g){a.B=b;a.g=c;a.f=d;a.N=e;a.ea=f;a.da=g;d==Tf?a.v&&Jf(a.v,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.G('No valid memory address for tape "'+b+'"'):(a.h=0,a.m=e,a.a&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Yf(a,0))}function fg(a,b){if(a.g||!1===b)a.B="",a.g="",b||(a.f&&a.status(a.f==Uf?"tape detached":"tape unloaded"),a.i=Rf,a.f=Sf,eg(a))}h.save=function(){return(new E(this)).data()};h.restore=function(){return!0};h.Ff=function(){return this.a&65534};
h.Vg=function(a){a&1&&(this.a&32768?(a&=-2,this.a&64&&K(this.c,this.s)):(this.a&=-129,this.a|=2048,this.l=0,nc(this.c,this.J,1E3/Math.round(this.K/10))));this.a=this.a&-66|a&65};h.Ef=function(){this.a&=-129;this.a|=2048;return this.l};h.Ug=function(){};h.Df=function(){return this.w};h.Tg=function(a){this.w=this.w&-65|a&64};h.Cf=function(){return this.I};h.Sg=function(a){this.I=a&255};
var Rf="",ag="?",bg="??",Sf=0,Uf=1,Tf=2,Wf="readProgress",ig="pcjs-progress-bar",jg={},Zf=(jg[65384]=[null,null,zc.prototype.Ff,zc.prototype.Vg,"PRS"],jg[65386]=[null,null,zc.prototype.Ef,zc.prototype.Ug,"PRB"],jg[65388]=[null,null,zc.prototype.Df,zc.prototype.Tg,"PPS"],jg[65390]=[null,null,zc.prototype.Cf,zc.prototype.Sg,"PPB"],jg);
function kg(a,b,c){r.call(this,"Disk",{id:a.Ua+".disk"+Ca(++lg,4)},8192);this.controller=a;this.A=a.A;this.D=a.D;this.h=b;this.xa=b.name;this.oa=this.bd="";this.Yc=b.Yc;this.L=this.T=this.P=this.Z=this.mode=0;this.a=[];this.f=null;this.g=!1;mg(this,c,b.L,b.T,b.P,b.Z);this.b=this.i=null;B(this)}n(kg,r);h=kg.prototype;h.ja=function(a,b,c,d){this.D=d};
function mg(a,b,c,d,e,f){a.mode=b;a.L=c;a.T=d;a.P=e;a.Z=f;a.a=[];if("preload"!=a.mode){b=Array(a.L);for(c=0;c<b.length;c++){d=Array(a.T);for(e=0;e<d.length;e++){f=Array(a.P);for(var g=1;g<=f.length;g++)f[g-1]=ng(null,c,e,g,a.Z,0);d[e]=f}b[c]=d}a.a=b}a.f=null}
function og(a,b,c,d,e){var f=c;if(a.b)return!0;a.xa=b;a.oa=c;a.bd=Da(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.L=e[0];a.T=e[1];a.P=e[2];a.Z=e[3]||512;c=a.Z>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.L);for(d=0;d<a.a.length;d++)for(var x=a.a[d]=Array(a.T),A=0;A<x.length;A++)for(var ma=x[A]=Array(a.P),Sa=0;Sa<ma.length;Sa++){for(var tc=ng(null,d,A,Sa+1,a.Z,0),nh=tc.data,Kc=0;Kc<c;Kc++,f+=4)var oh=nh[Kc]=b.getInt32(f,
!0),e=e+oh&-1;tc.na=c;ma[Sa]=tc}a.f=e;c=a}else a.G("Unrecognized disk format ("+d+" bytes)");a.b&&(a.b.call(a.controller,a.h,c,a.xa,a.oa),a.b=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=Ea(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"):Fa(c,"/")&&(d="dir"),f=Na()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Yc?"":e)+"&format=json"));return!!La(f,
function og(a,b,c,d,e){var f=c;if(a.b)return!0;a.xa=b;a.oa=c;a.bd=Da(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.L=e[0];a.T=e[1];a.P=e[2];a.Z=e[3]||512;c=a.Z>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.L);for(d=0;d<a.a.length;d++)for(var x=a.a[d]=Array(a.T),A=0;A<x.length;A++)for(var ma=x[A]=Array(a.P),Sa=0;Sa<ma.length;Sa++){for(var wc=ng(null,d,A,Sa+1,a.Z,0),nh=wc.data,Nc=0;Nc<c;Nc++,f+=4)var oh=nh[Nc]=b.getInt32(f,
!0),e=e+oh&-1;wc.na=c;ma[Sa]=wc}a.f=e;c=a}else a.G("Unrecognized disk format ("+d+" bytes)");a.b&&(a.b.call(a.controller,a.h,c,a.xa,a.oa),a.b=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=Ea(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"):Fa(c,"/")&&(d="dir"),f=Na()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Yc?"":e)+"&format=json"));return!!La(f,
null,!0,function(b,c,d){pg(a,b,c,d)})}
function pg(a,b,c,d){var e=null,f=0>d&&!!a.A&&!a.A.j.R;a.g=!1;if(d)a.controller.G('Unable to load disk "'+a.xa+'" (error '+d+": "+b+")",f);else{na(a.controller.Ua,b,c);try{if(0<Da(a.bd,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.xa]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
c+")");if(k.length)if(1==k.length)u(k[0]);else{a.L=k.length;a.T=k[0].length;a.P=k[0][0].length;var l=k[0][0][0];a.Z=l&&l.length||512;for(d=c=0;d<a.L;d++)for(f=0;f<a.T;f++)for(g=0;g<a.P;g++)if(l=k[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var q=l.data;if(void 0===q){var x=l.bytes;if(void 0!==x&&x.length){for(var A=m<<2,ma=x.length;ma<A;ma++)x[ma]=p;qg(l,x)}else q=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=q;delete l.bytes}ng(l,d,f);for(A=
0;A<q.length;A++)c=c+q[A]&-1}a.a=k;a.f=c;e=a}else u("Empty disk image: "+a.xa)}catch(Sa){u("Disk image error ("+b+"): "+Sa.message)}}a.b&&(a.b.call(a.i,a.h,e,a.xa,a.oa),a.b=null)}function ng(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Jj=b;a.Kj=c;a.wa=a.na=0;a.Ha=!1;return a}
0;A<q.length;A++)c=c+q[A]&-1}a.a=k;a.f=c;e=a}else u("Empty disk image: "+a.xa)}catch(Sa){u("Disk image error ("+b+"): "+Sa.message)}}a.b&&(a.b.call(a.i,a.h,e,a.xa,a.oa),a.b=null)}function ng(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Mj=b;a.Nj=c;a.wa=a.na=0;a.Ha=!1;return a}
h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!k&&f.Me&&b<f.T)for(k=g[b]=Array(f.Ne),g=0;g<k.length;g++)k[g]=ng(null,a,b,g+1,f.Kd,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.Me&&9==f.Dd&&(d=k[g]=ng(null,a,b,f.Dd,f.Kd,0))}}e&&e(d,!1);return d};function qg(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.g)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.na?f<a.wa?(a.na+=a.wa-f,a.wa=f):f>=a.wa+a.na&&(a.na+=f-(a.wa+a.na)+1):(a.wa=f,a.na=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
function rg(a,b){var c=a.T*a.P,d=b/c|0;return d<a.L?(b%=c,a.seek(d,b/a.P|0,b%a.P+1)):null}function sg(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}h.save=function(){var a=0,b=[];b[a++]=[this.oa,this.f,this.L,this.T,this.P,this.Z];if(!this.g)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.na){for(var k=[],l=0,m=g.wa,p=g.wa+g.na;m<p;)k[l++]=g.data[m++];b[a++]=[d,e,f,g.wa,k]}}return b};
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.a.length&&6<=e.length?mg(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.a.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],m=g[f++];if(k>=this.a.length||l>=this.a[k].length||m>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+m+") out of range ("+
b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][m]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.wa=e;for(k.na=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.G("Unable to restore disk '"+this.xa+": "+c);return b};
h.toJSON=function(){var a;a=0;for(var b;b=rg(this,a++);)tg(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function tg(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 lg=0;function ug(a,b,c,d,e,f){r.call(this,a,b,c);this.C=vg(this,b.autoMount);this.B=0;this.I=d;this.J=e;this.K=f;this.H=d.Bc;this.b=Array(this.H);this.F=!Ta("Mobi")&&window&&"FileReader"in window;this.m=[];this.qa=null;this.exports={bootDisk:this.Ed,loadDisk:this.Zc,selectDrive:this.ug,wait:this.yg}}n(ug,r);
function tg(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 lg=0;function ug(a,b,c,d,e,f){r.call(this,a,b,c);this.C=vg(this,b.autoMount);this.B=0;this.I=d;this.J=e;this.K=f;this.H=d.Bc;this.b=Array(this.H);this.F=!Ta("Mobi")&&window&&"FileReader"in window;this.m=[];this.qa=null;this.exports={bootDisk:this.Ed,loadDisk:this.Zc,selectDrive:this.wg,wait:this.Bg}}n(ug,r);
function vg(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){u(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=ug.prototype;
h.ma=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){wg(d)},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=Aa(c.value);null!=a&&xg(d,a)},!0;case "loadDisk":return this.o[b]=c,c.onclick=function(){d.Zc()},!0;case "bootDisk":return this.o[b]=c,c.onclick=function(){d.Ed()},!0;case "saveDisk":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[Aa(a.value)||
0])if(a=a.O){var b;b="";for(var c=0,k;k=rg(a,c++);)for(var l=0,m=k.length;l<m;l++)b+=String.fromCharCode(sg(a,k,l));b=btoa(b);a=a.bd.replace(".json",".img");c=null;b="data:application/octet-stream;base64,"+b;a&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=b,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),a="Check your Downloads folder for "+a+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+
@ -232,40 +233,40 @@ h.ma=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.
h.ja=function(a,b,c,d){this.A=a;this.u=b;this.c=c;this.D=d;if(a=vg(this,Sc(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.C[e]=a[e]);this.reset();this.qa=oc(this.c,this.I.Uc,this.I.Qc,this.qd);pb(b,this,this.K);rb(b,this.reset.bind(this));yg(this,"None",zg,!0);this.F&&yg(this,"Local Disk",Ag);yg(this,"Remote Disk",Bg);Cg(this)||B(this)};
h.la=function(a,b){if(!b){if(!a){if(this.reset(),this.A.B){this.m=[];for(a=0;a<this.b.length;a++)Dg(this,a,!0);Cg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.o.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.H;b++){var c=document.createElement("option");c.value=b;c.text=this.b[b].oc||"---";a.appendChild(c)}0<this.H&&(a.value="0",xg(this,0))}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){this.bb();Eg(this)};
h.save=function(){var a=new E(this);a.set(0,this.pc());a.set(1,Fg(this));a.set(2,Gg(this));return a.data()};h.restore=function(a){var b=!0;this.bb(a[0])||(b=!1);var c=a[1];c&&(this.m=c);Eg(this,a[2])||(b=!1);return b};h.bb=function(){return!0};h.pc=function(){return[]};
function Eg(a,b){for(var c=0;c<a.b.length;c++){var d=a.b[c];void 0===d&&(d=a.b[c]={});var e=a,f=d,d=c,g=a.J,k=b&&b[c],l=0;f.rb=d;f.name=e.ib;f.hc=f.qb=!1;f.Jb=null;f.Yc=!0;f.oc=g[l++]+d;f.L=g[l++];f.T=g[l++];f.P=g[l++];f.Z=g[l++];f.We=g[l++];f.Xe=g[l++];f.Ye=g[l++];f.Oe=g[l++];f.status=g[l++];f.Dj=0;f.Cj=0;f.Dd=1;f.Ne=f.P;f.Kd=f.Z;f.Lj=0;f.Rj=null;f.O||(f.oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.b[d],Dg(e,d,!0),g.qb=!0,d=new kg(e,g,"preload"),e.Gd(g,d,f,k,!0)):Hg(e,d,l,g,!0)?f.O&&g&&Ig(e,l,g,f.O):
function Eg(a,b){for(var c=0;c<a.b.length;c++){var d=a.b[c];void 0===d&&(d=a.b[c]={});var e=a,f=d,d=c,g=a.J,k=b&&b[c],l=0;f.rb=d;f.name=e.ib;f.hc=f.qb=!1;f.Jb=null;f.Yc=!0;f.oc=g[l++]+d;f.L=g[l++];f.T=g[l++];f.P=g[l++];f.Z=g[l++];f.Xe=g[l++];f.Ye=g[l++];f.Ze=g[l++];f.Oe=g[l++];f.status=g[l++];f.Gj=0;f.Fj=0;f.Dd=1;f.Ne=f.P;f.Kd=f.Z;f.Oj=0;f.Uj=null;f.O||(f.oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.b[d],Dg(e,d,!0),g.qb=!0,d=new kg(e,g,"preload"),e.Gd(g,d,f,k,!0)):Hg(e,d,l,g,!0)?f.O&&g&&Ig(e,l,g,f.O):
B(e,!1))}return!0}function Gg(a){for(var b=[],c=0;c<a.b.length;c++){var d=a.b[c];b.push([d.qb,d.xa,d.oa])}return b}function Fg(a){for(var b=0;b<a.b.length;b++){var c=a.b[b];c.O&&Jg(a,c.oa,c.O)}return a.m}
function Cg(a,b){b||(a.B=0);for(var c in a.C){var d=a.C[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=Da(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.b.length)){!Hg(a,g,f,e,!0)&&b&&B(a,!1);continue}a.G("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.B}
h.Zc=function(a,b,c){if(!a&&!b){var d=this.o.listDisks;d&&d.options&&(a=d.options[d.selectedIndex].text,b=d.value)}d=(d=this.o.listDrives)&&Aa(d.value);if(void 0===d||0>d||d>=this.b.length)return this.G("Unable to load the selected drive"),!1;if(!b)return Dg(this,d),!0;if(b==Ag)return this.G('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Bg){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=Da(b);this.status("Attempting to load "+b+' as "'+
a+'"')}Hg(this,d,a,b,!1,c);return!0};h.Ed=function(){var a,b=this.o.listDrives,b=b&&Aa(b.value);if(null==b||0>b||b>=this.b.length||!(a=this.b[b]))return this.G("Unable to boot the selected drive"),!1;if(!a.O)return this.G("Load a disk into the drive first"),!1;gd(this.c,0,!0,b);return(a=this.ub(a,a.We,a.Xe,a.Ye,a.Oe,0,2))?(this.G("Unable to read the boot sector ("+a+")"),!1):!0};
a+'"')}Hg(this,d,a,b,!1,c);return!0};h.Ed=function(){var a,b=this.o.listDrives,b=b&&Aa(b.value);if(null==b||0>b||b>=this.b.length||!(a=this.b[b]))return this.G("Unable to boot the selected drive"),!1;if(!a.O)return this.G("Load a disk into the drive first"),!1;gd(this.c,0,!0,b);return(a=this.ub(a,a.Xe,a.Ye,a.Ze,a.Oe,0,2))?(this.G("Unable to read the boot sector ("+a+")"),!1):!0};
function Hg(a,b,c,d,e,f){var g=-1,k=a.b[b];k.oa.toLowerCase()!=d.toLowerCase()&&(g++,Dg(a,b,!0),k.hc?a.G(a.type+" busy"):(k.hc=!0,e&&(k.Xc=!0,a.B++),k.qb=!!f,og(new kg(a,k,"preload"),c,d,f,a.Gd)&&g++));return g}
h.Gd=function(a,b,c,d,e){a.hc=!1;b&&(b.L>a.L||b.T>a.T)&&(this.G('Disk "'+c+'" too large for drive '+(this.b[a.rb].oc||"---")),b=null);b?(a.O=b,a.xa=c,a.oa=d,this.Ld(a.rb),Ig(this,c,d,b),this.G('Loaded disk "'+c+'" in drive '+(this.b[a.rb].oc||"---"),a.Xc||e),this.A&&Zc(this.A)):a.qb=!1;a.Xc&&(a.Xc=!1,--this.B||B(this));xg(this,a.rb);a.Jb&&(a.Jb(),a.Jb=null)};
function yg(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
function xg(a,b,c){var d=!1;if(0<=b&&b<a.b.length){var e=a.b[b],f=a.o.listDisks;a=a.o.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(Aa(a.options[c].value)==e.rb){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=Aa(a.value);e=e.qb?Ag:e.oa;if(!isNaN(c)&&c==b){for(c=0;c<f.options.length;c++)if(f.options[c].value==e){f.selectedIndex!=c&&(f.selectedIndex=c);d=!0;break}c==f.options.length&&(f.selectedIndex=0)}}}return d}
h.ug=function(a){var b=this.o.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=Aa(b.options[d].value);if(0<=e)return xg(this,e,!0)}return!1};
function wg(a){var b=a.o.listDisks,c=a.o.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){u(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.yg=function(a){for(var b=0;b<this.b.length;b++){var c=this.b[b];if(c&&c.hc)return c.Jb||(c.Jb=a),!1}return!0};
h.wg=function(a){var b=this.o.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=Aa(b.options[d].value);if(0<=e)return xg(this,e,!0)}return!1};
function wg(a){var b=a.o.listDisks,c=a.o.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){u(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.Bg=function(a){for(var b=0;b<this.b.length;b++){var c=this.b[b];if(c&&c.hc)return c.Jb||(c.Jb=a),!1}return!0};
function Dg(a,b,c){var d=a.b[b];if(d.O||!1===c)Jg(a,d.oa,d.O),d.xa="",d.oa="",d.O=null,d.qb=!1,c||(a.G("Drive "+(a.b[b].oc||"---")+" unloaded",c),xg(a,b))}function Ig(a,b,c,d){var e;for(e=0;e<a.m.length;e++)if(a.m[e][1]==c){d.restore(a.m[e][2]);return}a.m[e]=[b,c,[]]}function Jg(a,b,c){var d;for(d=0;d<a.m.length;d++)if(a.m[d][1]==b){a.m[d][2]=c.save();break}}h.Ld=function(){};h.ub=function(){return-1};h.vc=function(){return-1};var zg="",Ag="?",Bg="??";
function N(a){ug.call(this,"RK11",a,65536,C,C.ac,Kg);this.s=this.f=this.a=this.i=this.h=this.g=this.l=0}n(N,ug);h=N.prototype;h.bb=function(a){a||(a=[Lg.ac|Lg.Bd|Lg.xd,0,S.za,0,0,0,0]);a=ia(a);this.s=a.next().value;this.f=a.next().value;this.a=a.next().value;this.i=a.next().value;this.h=a.next().value;this.g=a.next().value;this.l=a.next().value;return!0};h.pc=function(){return[this.s,this.f,this.a,this.i,this.h,this.g,this.l]};
h.ub=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.O;var p=null,q;a||(m=T.rd,e=0);for(;e;){if(!p){if(b>=a.L){m=T.Zb;break}p=a.seek(b,c,d+1);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}var x,A;if(0>(x=a.read(p,q++))||0>(A=a.read(p,q++))){m=T.$b;break}if(!k&&(Lb(this.u,sd(this.c,f),x|A<<8),lc(this.u))){m=T.Eb;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
h.vc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.O;var p=null,q;a||(m=T.rd,e=0);for(;e;){var x=Nb(this.u,sd(this.c,f));if(lc(this.u)){m=T.Eb;break}if(!p){if(b>=a.L){m=T.Zb;break}p=a.seek(b,c,d+1,!0);if(!p){m=T.Ad;break}q=0;++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b))}if(k){var A,ma;if(0>(A=a.read(p,q++))||0>(ma=a.read(p,q++))){m=T.$b;break}if(x!=(A|ma<<8)){m=T.Cd;break}}else if(!a.write(p,q++,x&255)||!a.write(p,q++,x>>8)){m=T.$b;break}q>=a.Z&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
h.me=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&~S.fb|f>>16-S.U.fb&S.fb;this.i=65536-e&65535;this.g=this.g&~Mg.Rc|d&Mg.Rc;this.f|=a;Ng(this);return!0};function Ng(a){a.a&=~S.Ja;a.f&&(a.f|=T.Yd,a.a|=S.Ja,a.f&T.Hc&&(a.a|=S.Hc))}h.Qf=function(){return this.s};h.eh=function(){};h.Rf=function(){return this.f};h.fh=function(){};h.Nf=function(){return this.a&S.Fb};
h.ah=function(a){this.a=this.a&~S.va|a&S.va;if(this.a&S.Db){a=!0;var b,c,d=(this.g&Mg.Ta)>>Mg.U.Ta,e=this.b[d],f,g,k,l,m,p;this.a&=~(S.za|S.Sc);this.f&=~T.Ce;switch(c=this.a&S.ca){case Og.Td:this.f=this.g=0;this.a=S.za;break;case Og.he:case Og.Va:b=this.ub;case Og.Vc:case Og.Hb:b||(b=this.vc);f=(this.g&Mg.Bb)>>Mg.U.Bb;g=(this.g&Mg.Kc)>>Mg.U.Kc;k=this.g&Mg.Rc;l=65536-this.i&65535;m=(this.a&S.fb)<<16-S.U.fb|this.h;p=this.a&S.de?0:2;if(f>=e.L){this.f|=T.Zb;break}if(k>=e.P){this.f|=T.$b;break}a=b.call(this,
e,f,g,k,l,m,p,c>=Og.Vc,this.me.bind(this));break;case Og.ec:f=(this.g&Mg.Bb)>>Mg.U.Bb;f<e.L?this.a|=S.Sc:this.f|=T.Zb;break;case Og.Zd:this.f=this.g=0,this.a=S.za|S.Sc}this.s=e.status|(e.O?Lg.ha:0)|d<<Lg.U.Mc|this.g&Lg.Be;Ng(this);a&&(this.a&=~S.Db,this.a|=S.za,this.a&S.eb&&K(this.c,this.qa))}};h.Sf=function(){return this.i};h.gh=function(a){this.i=a};h.Mf=function(){return this.h};h.$g=function(a){this.h=a};h.Of=function(){return this.g};h.bh=function(a){this.g=a};h.Pf=function(){return this.l};
h.dh=function(a){this.l=a};var Lg=C.bc,T=C.pe,S=C.ne,Mg=C.oe,Og=C.ca,Pg={},Kg=(Pg[65280]=[null,null,N.prototype.Qf,N.prototype.eh,"RKDS"],Pg[65282]=[null,null,N.prototype.Rf,N.prototype.fh,"RKER"],Pg[65284]=[null,null,N.prototype.Nf,N.prototype.ah,"RKCS"],Pg[65286]=[null,null,N.prototype.Sf,N.prototype.gh,"RKWC"],Pg[65288]=[null,null,N.prototype.Mf,N.prototype.$g,"RKBA"],Pg[65290]=[null,null,N.prototype.Of,N.prototype.bh,"RKDA"],Pg[65294]=[null,null,N.prototype.Pf,N.prototype.dh,"RKDB"],Pg);
h.me=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&~S.fb|f>>16-S.U.fb&S.fb;this.i=65536-e&65535;this.g=this.g&~Mg.Rc|d&Mg.Rc;this.f|=a;Ng(this);return!0};function Ng(a){a.a&=~S.Ja;a.f&&(a.f|=T.Yd,a.a|=S.Ja,a.f&T.Hc&&(a.a|=S.Hc))}h.Rf=function(){return this.s};h.hh=function(){};h.Sf=function(){return this.f};h.ih=function(){};h.Of=function(){return this.a&S.Fb};
h.eh=function(a){this.a=this.a&~S.va|a&S.va;if(this.a&S.Db){a=!0;var b,c,d=(this.g&Mg.Ta)>>Mg.U.Ta,e=this.b[d],f,g,k,l,m,p;this.a&=~(S.za|S.Sc);this.f&=~T.Ce;switch(c=this.a&S.ca){case Og.Td:this.f=this.g=0;this.a=S.za;break;case Og.he:case Og.Va:b=this.ub;case Og.Vc:case Og.Hb:b||(b=this.vc);f=(this.g&Mg.Bb)>>Mg.U.Bb;g=(this.g&Mg.Kc)>>Mg.U.Kc;k=this.g&Mg.Rc;l=65536-this.i&65535;m=(this.a&S.fb)<<16-S.U.fb|this.h;p=this.a&S.de?0:2;if(f>=e.L){this.f|=T.Zb;break}if(k>=e.P){this.f|=T.$b;break}a=b.call(this,
e,f,g,k,l,m,p,c>=Og.Vc,this.me.bind(this));break;case Og.ec:f=(this.g&Mg.Bb)>>Mg.U.Bb;f<e.L?this.a|=S.Sc:this.f|=T.Zb;break;case Og.Zd:this.f=this.g=0,this.a=S.za|S.Sc}this.s=e.status|(e.O?Lg.ha:0)|d<<Lg.U.Mc|this.g&Lg.Be;Ng(this);a&&(this.a&=~S.Db,this.a|=S.za,this.a&S.eb&&K(this.c,this.qa))}};h.Tf=function(){return this.i};h.jh=function(a){this.i=a};h.Nf=function(){return this.h};h.dh=function(a){this.h=a};h.Pf=function(){return this.g};h.fh=function(a){this.g=a};h.Qf=function(){return this.l};
h.gh=function(a){this.l=a};var Lg=C.bc,T=C.pe,S=C.ne,Mg=C.oe,Og=C.ca,Pg={},Kg=(Pg[65280]=[null,null,N.prototype.Rf,N.prototype.hh,"RKDS"],Pg[65282]=[null,null,N.prototype.Sf,N.prototype.ih,"RKER"],Pg[65284]=[null,null,N.prototype.Of,N.prototype.eh,"RKCS"],Pg[65286]=[null,null,N.prototype.Tf,N.prototype.jh,"RKWC"],Pg[65288]=[null,null,N.prototype.Nf,N.prototype.dh,"RKBA"],Pg[65290]=[null,null,N.prototype.Pf,N.prototype.fh,"RKDA"],Pg[65294]=[null,null,N.prototype.Qf,N.prototype.gh,"RKDB"],Pg);
function M(a){ug.call(this,"RL11",a,131072,D,D.qe,Qg);this.a=this.l=this.f=this.g=this.i=this.h=0}n(M,ug);h=M.prototype;h.bb=function(a){a||(a=[U.ha|U.za,0,0,0,0,0]);a=ia(a);this.a=a.next().value;this.l=a.next().value;this.f=a.next().value;this.g=a.next().value;this.i=a.next().value;this.h=a.next().value;return!0};h.pc=function(){return[this.a,this.l,this.f,this.g,this.i,this.h]};
h.ub=function(a,b,c,d,e,f,g,k,l){g=0;a=a.O;k=null;var m;a||(g=Rg.Ba,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=Rg.Ba;break}m=0}var p,q;if(0>(p=a.read(k,m++))||0>(q=a.read(k,m++))){g=Rg.Ba;break}Lb(this.u,sd(this.c,f),p|q<<8);if(lc(this.u)){g=Rg.Eb;break}f+=2;e--;if(m>=a.Z&&(k=null,++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b>=a.L)))){g=Rg.Ba;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.O;k=null;var m;a||(g=Rg.Ba,e=0);for(;e;){var p=Nb(this.u,sd(this.c,f));if(lc(this.u)){g=Rg.Eb;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=Rg.Ba;break}m=0}if(!a.write(k,m++,p&255)||!a.write(k,m++,p>>8)){g=Rg.Ba;break}if(m>=a.Z&&(k=null,++d>=a.P&&(d=0,++c>=a.T&&(c=0,++b>=a.L)))){g=Rg.Ba;break}}return l?l(g,b,c,d,e,f):g};
h.re=function(a,b,c,d,e,f){this.l=f&65535;this.a=this.a&~U.ya|f>>16-U.U.ya&U.ya;this.h=f>>16&Sg.Fa;this.g=this.f=b<<V.U.Gb|(c?V.dc:0)|d&V.yd;this.i=65536-e&65535;a&&(this.a=this.a|a|U.Ja);return!0};h.Vf=function(){return this.a&U.Fb};
h.jh=function(a){this.a=this.a&~U.va|a&U.va;this.h=this.h&60|(a&U.ya)>>U.U.ya;if(!(this.a&U.za)){a=!0;var b,c=this.b[(this.a&U.Ta)>>U.U.Ta],d=c.O,e,f,g;this.a&=~U.ha;switch(this.a&U.ca){case Tg.Ge:this.i&Ug.md&&(this.a&=U.ha|U.ca|U.ya);this.i=c.status|this.g&V.dc|(d&&512==d.L?Ug.ae:0);break;case Tg.ec:(this.f&V.$d)==V.De&&(b=this.f&V.Gb,c=(this.f&V.Fe)<<2,this.g=this.f&V.Ee?this.g+b:this.g-b,this.f=this.g=this.g&V.Gb|c);break;case Tg.le:this.i=this.g;break;case Tg.ie:b=this.ub;case Tg.Je:b||(b=this.vc),
e=this.f>>V.U.Gb,f=this.f&V.dc?1:0,g=this.f&V.yd,!d||e>=d.L||g>=d.P?this.a=this.a|Rg.Ba|U.Ja:(a=65536-this.i&65535,d=(this.h&Sg.Fa)<<16|this.l,a=b.call(this,c,e,f,g,a,d,2,!1,this.re.bind(this)))}a&&(this.a=this.a|U.ha|U.za,this.a&U.eb&&K(this.c,this.qa))}};h.Tf=function(){return this.l};h.hh=function(a){this.l=a&Vg.va};h.Wf=function(){return this.f};h.kh=function(a){this.f=a};h.Xf=function(){return this.i};h.lh=function(a){this.i=a};h.Uf=function(){return this.h};
h.ih=function(a){this.h=a&Sg.Fa;this.a=this.a&~U.ya|(this.h&3)<<U.U.ya};var U=D.ue,Vg=D.se,V=D.ve,Ug=D.cc,Sg=D.te,Rg=D.ld,Tg=D.ca,Wg={},Qg=(Wg[63744]=[null,null,M.prototype.Vf,M.prototype.jh,"RLCS"],Wg[63746]=[null,null,M.prototype.Tf,M.prototype.hh,"RLBA"],Wg[63748]=[null,null,M.prototype.Wf,M.prototype.kh,"RLDA"],Wg[63750]=[null,null,M.prototype.Xf,M.prototype.lh,"RLMP"],Wg[63752]=[null,null,M.prototype.Uf,M.prototype.ih,"RLBE"],Wg);
h.re=function(a,b,c,d,e,f){this.l=f&65535;this.a=this.a&~U.ya|f>>16-U.U.ya&U.ya;this.h=f>>16&Sg.Fa;this.g=this.f=b<<V.U.Gb|(c?V.dc:0)|d&V.yd;this.i=65536-e&65535;a&&(this.a=this.a|a|U.Ja);return!0};h.Wf=function(){return this.a&U.Fb};
h.mh=function(a){this.a=this.a&~U.va|a&U.va;this.h=this.h&60|(a&U.ya)>>U.U.ya;if(!(this.a&U.za)){a=!0;var b,c=this.b[(this.a&U.Ta)>>U.U.Ta],d=c.O,e,f,g;this.a&=~U.ha;switch(this.a&U.ca){case Tg.Ge:this.i&Ug.md&&(this.a&=U.ha|U.ca|U.ya);this.i=c.status|this.g&V.dc|(d&&512==d.L?Ug.ae:0);break;case Tg.ec:(this.f&V.$d)==V.De&&(b=this.f&V.Gb,c=(this.f&V.Fe)<<2,this.g=this.f&V.Ee?this.g+b:this.g-b,this.f=this.g=this.g&V.Gb|c);break;case Tg.le:this.i=this.g;break;case Tg.ie:b=this.ub;case Tg.Je:b||(b=this.vc),
e=this.f>>V.U.Gb,f=this.f&V.dc?1:0,g=this.f&V.yd,!d||e>=d.L||g>=d.P?this.a=this.a|Rg.Ba|U.Ja:(a=65536-this.i&65535,d=(this.h&Sg.Fa)<<16|this.l,a=b.call(this,c,e,f,g,a,d,2,!1,this.re.bind(this)))}a&&(this.a=this.a|U.ha|U.za,this.a&U.eb&&K(this.c,this.qa))}};h.Uf=function(){return this.l};h.kh=function(a){this.l=a&Vg.va};h.Xf=function(){return this.f};h.nh=function(a){this.f=a};h.Yf=function(){return this.i};h.oh=function(a){this.i=a};h.Vf=function(){return this.h};
h.lh=function(a){this.h=a&Sg.Fa;this.a=this.a&~U.ya|(this.h&3)<<U.U.ya};var U=D.ue,Vg=D.se,V=D.ve,Ug=D.cc,Sg=D.te,Rg=D.ld,Tg=D.ca,Wg={},Qg=(Wg[63744]=[null,null,M.prototype.Wf,M.prototype.mh,"RLCS"],Wg[63746]=[null,null,M.prototype.Uf,M.prototype.kh,"RLBA"],Wg[63748]=[null,null,M.prototype.Xf,M.prototype.nh,"RLDA"],Wg[63750]=[null,null,M.prototype.Yf,M.prototype.oh,"RLMP"],Wg[63752]=[null,null,M.prototype.Vf,M.prototype.lh,"RLBE"],Wg);
function Ac(a){ug.call(this,"RX11",a,262144,ib,ib.we,Xg);this.v=this.s=this.f=this.w=this.a=this.l=0;this.g=W.gb;this.i=0;this.h=Array(128).fill(0)}n(Ac,ug);h=Ac.prototype;
h.bb=function(a){a?(a=ia(a),this.a=a.next().value,this.l=a.next().value,this.v=a.next().value,this.s=a.next().value,this.f=a.next().value,this.w=a.next().value,this.g=a.next().value,this.i=a.next().value,this.h=a.next().value):(this.l=this.a=0,this.s=this.v=1,this.w=this.f=0,this.g=W.Va,this.i=0,(a=this.qa)&&qc(this.c,a),Yg(this));return!0};h.pc=function(){return[this.a,this.l,this.v,this.s,this.f,this.w,this.g,this.i,this.h]};h.Ld=function(a){a||this.bb()};
function Zg(a,b){b&&(a.w=b,a.l=a.f,a.a|=X.Ja);a.g=W.gb;a.a|=X.DONE;a.a&X.eb&&K(a.c,a.qa)}h.ub=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.O,p=null,q;m||(k=a.rb?Y.Jc:Y.Ic,e=0);for(;e;){if(!p){if(b>=m.L){k=Y.fe;break}p=m.seek(b,c,d+1);if(!p){k=Y.Pc;break}q=0;++d>=m.P&&(d=0,++c>=m.T&&(c=0,++b))}var x;if(0>(a=m.read(p,q++))||0>(x=m.read(p,q++))){k=Y.Oc;break}Lb(this.u,sd(this.c,f),a|x<<8);q>=m.Z&&(p=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
function Yg(a){var b=0,c=a.a&X.Tc?1:0,d=a.b[c],d=d&&d.O,e=a.v&$g.Fa,f=a.s&ah.Fa;a.f&=~(Z.jd|Z.ud|Z.Cb|Z.ha);if(d)if(a.f|=Z.ha,c=d.seek(e,0,f,!0)){e=0;for(f=a.h.length;e<f;){var g=d.read(c,e);if(0>g){b=Y.Oc;break}a.h[e++]=g}c.Re&&(a.f|=Z.Cb)}else b=Y.Pc;else b=c?Y.Jc:Y.Ic;Zg(a,b)}h.Zf=function(a,b){a=this.a;if(!b)switch(a&=X.Fb,this.g){case W.Ec:case W.EMPTY:this.i<this.h.length&&(this.a|=X.Ga);break;case W.Va:case W.Hb:case W.fc:2>this.i&&(this.a|=X.Ga)}return a};
h.nh=function(a){this.a=this.a&~X.va|a&X.va;if(this.a&X.INIT)this.bb();else if(this.a&X.Db&&this.g==W.gb)switch(this.g=this.a&X.ca,this.a&=~(X.Db|X.Ga|X.DONE|X.Ja),(a=this.qa)&&qc(this.c,a),this.g){case W.Ec:case W.EMPTY:case W.Va:case W.Hb:case W.fc:this.i=0;break;case W.ke:a=this.b[this.a&X.Tc?1:0];this.f&=~Z.ha;a&&a.O&&(this.f|=Z.ha);this.l=this.f;Zg(this);break;case W.je:this.l=this.w,Zg(this)}else this.a&X.eb?this.a&X.DONE&&K(this.c,this.qa):(a=this.qa)&&qc(this.c,a)};
h.$f=function(a,b){if(!b)switch(this.g){case W.EMPTY:this.a&X.Ga&&(this.a&=~X.Ga,this.l=this.h[this.i]&255,++this.i>=this.h.length&&Zg(this))}return this.l};
h.oh=function(a){switch(this.g){case W.Ec:this.a&X.Ga&&(this.a&=~X.Ga,this.h[this.i]=a&255,++this.i>=this.h.length&&Zg(this));break;case W.Va:case W.Hb:case W.fc:if(this.a&X.Ga)switch(this.a&=~X.Ga,this.i++){case 0:this.s=a;break;case 1:if(this.v=a,this.g==W.Va)Yg(this);else{var b=this.g==W.fc,c=0,d=this.a&X.Tc?1:0,e=this.b[d],e=e&&e.O,f=this.v&$g.Fa,g=this.s&ah.Fa;this.f&=~(Z.jd|Z.ud|Z.Cb|Z.ha);if(e)if(this.f|=Z.ha,d=e.seek(f,0,g,!0))for(b&&(d.Re=!0),b=0,f=this.h.length;b<f;){if(!e.write(d,b,this.h[b]&
255)){c=Y.Oc;break}b++}else c=Y.Pc;else c=d?Y.Jc:Y.Ic;Zg(this,c)}}}this.l=a};var X=ib.xe,$g=ib.Ae,ah=ib.ze,Z=ib.ye,W=ib.ca,Y=ib.ERROR,bh={},Xg=(bh[65144]=[null,null,Ac.prototype.Zf,Ac.prototype.nh,"RXCS"],bh[65146]=[null,null,Ac.prototype.$f,Ac.prototype.oh,"RXDB"],bh);
function Yg(a){var b=0,c=a.a&X.Tc?1:0,d=a.b[c],d=d&&d.O,e=a.v&$g.Fa,f=a.s&ah.Fa;a.f&=~(Z.jd|Z.ud|Z.Cb|Z.ha);if(d)if(a.f|=Z.ha,c=d.seek(e,0,f,!0)){e=0;for(f=a.h.length;e<f;){var g=d.read(c,e);if(0>g){b=Y.Oc;break}a.h[e++]=g}c.Re&&(a.f|=Z.Cb)}else b=Y.Pc;else b=c?Y.Jc:Y.Ic;Zg(a,b)}h.$f=function(a,b){a=this.a;if(!b)switch(a&=X.Fb,this.g){case W.Ec:case W.EMPTY:this.i<this.h.length&&(this.a|=X.Ga);break;case W.Va:case W.Hb:case W.fc:2>this.i&&(this.a|=X.Ga)}return a};
h.qh=function(a){this.a=this.a&~X.va|a&X.va;if(this.a&X.INIT)this.bb();else if(this.a&X.Db&&this.g==W.gb)switch(this.g=this.a&X.ca,this.a&=~(X.Db|X.Ga|X.DONE|X.Ja),(a=this.qa)&&qc(this.c,a),this.g){case W.Ec:case W.EMPTY:case W.Va:case W.Hb:case W.fc:this.i=0;break;case W.ke:a=this.b[this.a&X.Tc?1:0];this.f&=~Z.ha;a&&a.O&&(this.f|=Z.ha);this.l=this.f;Zg(this);break;case W.je:this.l=this.w,Zg(this)}else this.a&X.eb?this.a&X.DONE&&K(this.c,this.qa):(a=this.qa)&&qc(this.c,a)};
h.ag=function(a,b){if(!b)switch(this.g){case W.EMPTY:this.a&X.Ga&&(this.a&=~X.Ga,this.l=this.h[this.i]&255,++this.i>=this.h.length&&Zg(this))}return this.l};
h.rh=function(a){switch(this.g){case W.Ec:this.a&X.Ga&&(this.a&=~X.Ga,this.h[this.i]=a&255,++this.i>=this.h.length&&Zg(this));break;case W.Va:case W.Hb:case W.fc:if(this.a&X.Ga)switch(this.a&=~X.Ga,this.i++){case 0:this.s=a;break;case 1:if(this.v=a,this.g==W.Va)Yg(this);else{var b=this.g==W.fc,c=0,d=this.a&X.Tc?1:0,e=this.b[d],e=e&&e.O,f=this.v&$g.Fa,g=this.s&ah.Fa;this.f&=~(Z.jd|Z.ud|Z.Cb|Z.ha);if(e)if(this.f|=Z.ha,d=e.seek(f,0,g,!0))for(b&&(d.Re=!0),b=0,f=this.h.length;b<f;){if(!e.write(d,b,this.h[b]&
255)){c=Y.Oc;break}b++}else c=Y.Pc;else c=d?Y.Jc:Y.Ic;Zg(this,c)}}}this.l=a};var X=ib.xe,$g=ib.Ae,ah=ib.ze,Z=ib.ye,W=ib.ca,Y=ib.ERROR,bh={},Xg=(bh[65144]=[null,null,Ac.prototype.$f,Ac.prototype.qh,"RXCS"],bh[65146]=[null,null,Ac.prototype.ag,Ac.prototype.rh,"RXDB"],bh);
function ch(a,b,c){r.call(this,"Computer",a,33554432);this.j.R=!1;this.F=null;dh(this,b);this.w=Sc(this,"autoPower",a,6);this.g=0;this.J=+a.busWidth||+a.buswidth;this.s=this.i=this.v=null;this.l=this.I=!1;this.m=this.h=null;this.H=this.B=this.C=!1;this.K=Sc(this,"url")||"";(Math.random()+.1).toString(36);this.b=eh(this);if(this.c=ta("CPU",this.id)){this.D=ta("Debugger",this.id);this.u=new Rb({id:this.Ua+".bus",busWidth:this.J},this.c,this.D);var d,e=ra(this.id);if((this.f=ta("Panel",this.id))&&this.f.ob)for(b=
0;b<e.length;b++)d=e[b],d.G=this.f.G,d.aa=this.f.aa,d.ob=this.f.ob;this.aa(fb+" v1.34.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.aa("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis <http://skn.noip.me/pdp11/pdp11.html>");for(b=0;b<e.length;b++)d=e[b],d.ja&&d.ja(this,this.u,this.c,this.D);b=null;d=Sc(this,"resume",a);void 0!==d&&(1<d.length?b=this.i=d:this.a=parseInt(d,10));var f;if(a=Sc(this,
"state")||(f=!0,a.state))this.v=b=a,f||(this.l=!0,this.a=fh),this.a&&(this.m=new E(this,"1.34.0"),gh(this.m)?b=null:delete this.m);!b&&this.a&&(b=hh(this))&&(this.l=!0);if(b){var g=this;La(b,null,!0,function(a,b,c){c?(g.i=null,g.l=!1,g.G("Unable to load machine state from server (error "+c+(b?": "+Ia(b):"")+")")):(g.s=b,g.I=!0);B(g)})}else B(this);this.o.power||(this.w=!0);!c&&this.w&&this.Vb(this.Sb)}else u("Unable to find CPU component")}n(ch,r);