(function(){/* http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ for(var g,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function ja(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function ka(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function pa(a){return a.replace(/[&<>"']/g,function(a){return oa[a]})}function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ra={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},sa=Date.now||function(){return+new Date}; function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function h(a,b,c,d){var e=0,f=null,k=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),k;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var n="",r;for(r in b)b.hasOwnProperty(r)&&(n&&(n+="&"),n+=r+"="+encodeURIComponent(b[r]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),k=[f,e]);return k} function ua(a,b){var c,d={K:null,Y:null,bb:null,ab:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,k=eval("("+b+")");d.bb=k.load;d.ab=k.exec;if(e=k.bytes)d.K=e;else if(e=k.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=k.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=k;d.Y=k.symbols;d.K.length?1==d.K.length&&(m(d.K[0]),d=null):(m("Empty resource: "+ a),d=null)}catch(l){m("Resource data error: "+l.message),d=null}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),d.K=Array(a.length),c=0;cb?this.Ga=this.id:(this.Ha=this.id.substr(0,b),this.Ga=this.id.substr(b+1));this[a]=c;this.i={ready:!1,fd:!1,gd:!1,M:!1,error:!1};this.Ra=null;this.i.error=!1;this.v={};this.G=null;v.push(this)}var Ia=void 0,Ja={}; if(window){Ia||(Ia=window.location.search.substr(1));for(var Ka,La=/\+/g,Ma=/([^&=]+)=?([^&]*)/g;Ka=Ma.exec(Ia);)Ja[decodeURIComponent(Ka[1].replace(La," "))]=decodeURIComponent(Ka[2].replace(La," "))}function Na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function w(a,b){b||(b=u);a.prototype=Na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Oa=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Oa={},v=[];function Pa(a,b,c){Oa[a]&&b&&(Oa[a][b]=c)}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ka=[];this.S=0;this.o=[];this.Ab=[ab,bb,cb,db];a=new E(this);eb(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=gb(d,b)}function bb(a,b,c){var d=!1,e=this.controller,f=e.ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||gb(e,c)} function cb(a,b){var c=-1,d=this.controller;(a=d.ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=gb(d,b)}function db(a,b,c){var d=!1,e=this.controller;if(a=e.ka[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||gb(e,c)}function hb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.m;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.Ba)return n.Ua+=n.Ba-f,n.Ba=f,!0;if(f>=n.Ba+n.Ua){t=n.size-(f-r);t>k&&(t=k);n.Ua=f-n.Ba+t;f=r+a.c;k-=t;l++;continue}}return mb(1,f,k)}f=new E(a,f,t,a.c,d,e);eb(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var C;e="";C?10>>=a.m;0>>=a.m;0>>a.m].cb(b&a.g,b)}function pb(a,b){return a.b[(b&a.h)>>>a.m].T(b&a.g,b)}$a.prototype.Ta=function(a,b){this.S++;this.b[(a&this.h)>>>this.m].xb(a&this.g,b&255,a);this.S--}; function qb(a,b,c){a.b[(b&a.h)>>>a.m].Va(b&a.g,c&65535,b)}function rb(a){for(var b=0,c=[],d=0;da.a.Fa)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,r=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));sb(a,e,e,k,l,n,r,f[4])}}}function ub(a,b){a.o.push(b)}function vb(a,b){a.S||F(a.a,4,b)} function mb(a,b,c){m("Memory block error ("+a+": "+ja(b)+","+ja(c)+")");return!1}function G(a){u.call(this,"Device",a,G);this.c={data:0,ed:0,Sa:20,tc:0};this.b={hd:0,hb:-1}}w(G);g=G.prototype;g.ea=function(a,b,c,d){this.m=b;this.a=c;this.G=d;var e=this;this.b.hb=wb(c,function(){e.b.na|=128;e.b.na&64&&(xb(e.a,e.b.uc),yb(e.a,e.b.hb,1E3/60))});this.b.uc=zb(64,6);tb(b,this,H);ub(b,this.reset.bind(this));B(this)};g.reset=function(){this.c.Sa=this.c.Sa&-120|20;this.b.na=0}; g.Pb=function(){var a=this.b.na;this.b.na&=-129;return a};g.Dc=function(a){this.b.na=a;a&64&&yb(this.a,this.b.hb,1E3/60);this.b.na=a&-129};g.Ib=function(a){return(a?this.c.tc:this.c.data)&65535};g.wc=function(a){this.c.data=a};g.Rb=function(){var a=this.a;return a.A&62337|a.Ia<<5|a.Ja<<1};g.Fc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Ia=a>>5&3;b.Ja=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Da!=c&&(b.Da=c,Ab(b))}Bb(this)}; g.Sb=function(){var a=this.a.oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Tb=function(){return this.a.fb};g.Ub=function(){return this.a.pa};g.Gc=function(a){var b=this.a;1170>b.Fa&&(a&=-49);b.pa!=a&&(b.pa=a,a&16?(b.Za=4194303,b.Ka=3915776):(b.Za=262143,b.Ka=253952),Ab(b));Bb(this)};function Bb(a){a.c.Sa=a.c.Sa&-8|(a.a.Da?a.a.pa&16?1:2:4)}g.hc=function(a){return this.a.C[1][a>>1&7]};g.Uc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[1][(a>>1&7)+8]}; g.Sc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.R[1][a>>1&7]};g.Tc=function(a,b){b=b>>1&7;this.a.R[1][b]=a;this.a.C[1][b]&=65295};g.ec=function(a){return this.a.R[1][(a>>1&7)+8]};g.Rc=function(a,b){b=(b>>1&7)+8;this.a.R[1][b]=a;this.a.C[1][b]&=65295};g.Ob=function(a){return this.a.C[0][a>>1&7]};g.Cc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Mb=function(a){return this.a.C[0][(a>>1&7)+8]};g.Ac=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295}; g.Nb=function(a){return this.a.R[0][a>>1&7]};g.Bc=function(a,b){b=b>>1&7;this.a.R[0][b]=a;this.a.C[0][b]&=65295};g.Lb=function(a){return this.a.R[0][(a>>1&7)+8]};g.zc=function(a,b){b=(b>>1&7)+8;this.a.R[0][b]=a;this.a.C[0][b]&=65295};g.nc=function(a){return this.a.C[3][a>>1&7]};g.$c=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.lc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Yc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.mc=function(a){return this.a.R[3][a>>1&7]}; g.Zc=function(a,b){b=b>>1&7;this.a.R[3][b]=a;this.a.C[3][b]&=65295};g.kc=function(a){return this.a.R[3][(a>>1&7)+8]};g.Xc=function(a,b){b=(b>>1&7)+8;this.a.R[3][b]=a;this.a.C[3][b]&=65295};g.wa=function(a){a&=7;return this.a.u&2048?this.a.ua[a]:this.a.f[a]};g.ya=function(a,b){b&=7;this.a.u&2048?this.a.ua[b]=a:this.a.f[b]=a};g.Zb=function(){return this.a.u&49152?this.a.aa[0]:this.a.f[6]};g.Lc=function(a){this.a.u&49152?this.a.aa[0]=a:this.a.f[6]=a};g.bc=function(){return this.a.f[7]}; g.Oc=function(a){this.a.f[7]=a};g.xa=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ua[a]};g.za=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ua[b]=a};g.$b=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.aa[1]};g.Mc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.aa[1]=a};g.ac=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.aa[3]};g.Nc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.aa[3]=a};g.Kb=function(a){return this.a.ub[a-65504>>1]}; g.yc=function(a,b){this.a.ub[b-65504>>1]=a};g.sb=function(a){return 65520==a?61183:0};g.zb=function(){};g.jc=function(){return 1};g.Wc=function(){};g.Jb=function(){return this.a.F};g.xc=function(){this.a.F=0};g.Qb=function(){return this.a.tb};g.Ec=function(a,b){b&1||(a&=255);this.a.tb=a};g.Vb=function(a){return a?this.a.gb:0};g.Hc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.gb=a;b.l|=2};g.ic=function(a){return a?this.a.qa&65280:0};g.Vc=function(a){this.a.qa=a|255}; g.Yb=function(){return Za(this.a)};g.Kc=function(a){Cb(this.a,a&-1809|Za(this.a)&1808);this.a.l|=128};g.yb=function(){}; var I={},H=(I[62592]=[null,null,G.prototype.hc,G.prototype.Uc,"SISDR",1145],I[62608]=[null,null,G.prototype.fc,G.prototype.Sc,"SDSDR",1145],I[62624]=[null,null,G.prototype.gc,G.prototype.Tc,"SISAR",1145],I[62640]=[null,null,G.prototype.ec,G.prototype.Rc,"SDSAR",1145],I[62656]=[null,null,G.prototype.Ob,G.prototype.Cc,"KISDR",1145],I[62672]=[null,null,G.prototype.Mb,G.prototype.Ac,"KDSDR",1145],I[62688]=[null,null,G.prototype.Nb,G.prototype.Bc,"KISAR",1145],I[62704]=[null,null,G.prototype.Lb,G.prototype.zc, "KDSAR",1145],I[62798]=[null,null,G.prototype.Ub,G.prototype.Gc,"MMR3",1145],I[65382]=[null,null,G.prototype.Pb,G.prototype.Dc,"LKS"],I[65400]=[null,null,G.prototype.Ib,G.prototype.wc,"CNSL"],I[65402]=[null,null,G.prototype.Rb,G.prototype.Fc,"MMR0",1145],I[65404]=[null,null,G.prototype.Sb,G.prototype.yb,"MMR1",1145],I[65406]=[null,null,G.prototype.Tb,G.prototype.yb,"MMR2",1145],I[65408]=[null,null,G.prototype.nc,G.prototype.$c,"UISDR",1145],I[65424]=[null,null,G.prototype.lc,G.prototype.Yc,"UDSDR", 1145],I[65440]=[null,null,G.prototype.mc,G.prototype.Zc,"UISAR",1145],I[65456]=[null,null,G.prototype.kc,G.prototype.Xc,"UDSAR",1145],I[65472]=[null,null,G.prototype.wa,G.prototype.ya,"R0SET0"],I[65473]=[null,null,G.prototype.wa,G.prototype.ya,"R1SET0"],I[65474]=[null,null,G.prototype.wa,G.prototype.ya,"R2SET0"],I[65475]=[null,null,G.prototype.wa,G.prototype.ya,"R3SET0"],I[65476]=[null,null,G.prototype.wa,G.prototype.ya,"R4SET0"],I[65477]=[null,null,G.prototype.wa,G.prototype.ya,"R5SET0"],I[65478]= [null,null,G.prototype.Zb,G.prototype.Lc,"R6KERNEL"],I[65479]=[null,null,G.prototype.bc,G.prototype.Oc,"R7KERNEL"],I[65480]=[null,null,G.prototype.xa,G.prototype.za,"R0SET1",1145],I[65481]=[null,null,G.prototype.xa,G.prototype.za,"R1SET1",1145],I[65482]=[null,null,G.prototype.xa,G.prototype.za,"R2SET1",1145],I[65483]=[null,null,G.prototype.xa,G.prototype.za,"R3SET1",1145],I[65484]=[null,null,G.prototype.xa,G.prototype.za,"R4SET1",1145],I[65485]=[null,null,G.prototype.xa,G.prototype.za,"R5SET1",1145], I[65486]=[null,null,G.prototype.$b,G.prototype.Mc,"R6SUPER",1145],I[65487]=[null,null,G.prototype.ac,G.prototype.Nc,"R6USER",1145],I[65504]=[null,null,G.prototype.Kb,G.prototype.yc,"CTRL",1170],I[65520]=[null,null,G.prototype.sb,G.prototype.zb,"LSIZE",1170],I[65522]=[null,null,G.prototype.sb,G.prototype.zb,"HSIZE",1170],I[65524]=[null,null,G.prototype.jc,G.prototype.Wc,"SYSID",1170],I[65526]=[null,null,G.prototype.Jb,G.prototype.xc,"CPUERR",1170],I[65528]=[null,null,G.prototype.Qb,G.prototype.Ec, "MB",1170],I[65530]=[null,null,G.prototype.Vb,G.prototype.Hc,"PIR"],I[65532]=[null,null,G.prototype.ic,G.prototype.Vc,"SL"],I[65534]=[null,null,G.prototype.Yb,G.prototype.Kc,"PSW"],I);H[62594]=H[62592];H[62596]=H[62592];H[62598]=H[62592];H[62600]=H[62592];H[62602]=H[62592];H[62604]=H[62592];H[62606]=H[62592];H[62610]=H[62608];H[62612]=H[62608];H[62614]=H[62608];H[62616]=H[62608];H[62618]=H[62608];H[62620]=H[62608];H[62622]=H[62608];H[62626]=H[62624];H[62628]=H[62624];H[62630]=H[62624];H[62632]=H[62624]; H[62634]=H[62624];H[62636]=H[62624];H[62638]=H[62624];H[62642]=H[62640];H[62644]=H[62640];H[62646]=H[62640];H[62648]=H[62640];H[62650]=H[62640];H[62652]=H[62640];H[62654]=H[62640];H[62658]=H[62656];H[62660]=H[62656];H[62662]=H[62656];H[62664]=H[62656];H[62666]=H[62656];H[62668]=H[62656];H[62670]=H[62656];H[62674]=H[62672];H[62676]=H[62672];H[62678]=H[62672];H[62680]=H[62672];H[62682]=H[62672];H[62684]=H[62672];H[62686]=H[62672];H[62690]=H[62688];H[62692]=H[62688];H[62694]=H[62688];H[62696]=H[62688]; H[62698]=H[62688];H[62700]=H[62688];H[62702]=H[62688];H[62706]=H[62704];H[62708]=H[62704];H[62710]=H[62704];H[62712]=H[62704];H[62714]=H[62704];H[62716]=H[62704];H[62718]=H[62704];H[65410]=H[65408];H[65412]=H[65408];H[65414]=H[65408];H[65416]=H[65408];H[65418]=H[65408];H[65420]=H[65408];H[65422]=H[65408];H[65426]=H[65424];H[65428]=H[65424];H[65430]=H[65424];H[65432]=H[65424];H[65434]=H[65424];H[65436]=H[65424];H[65438]=H[65424];H[65442]=H[65440];H[65444]=H[65440];H[65446]=H[65440];H[65448]=H[65440]; H[65450]=H[65440];H[65452]=H[65440];H[65454]=H[65440];H[65458]=H[65456];H[65460]=H[65456];H[65462]=H[65456];H[65464]=H[65456];H[65466]=H[65456];H[65468]=H[65456];H[65470]=H[65456];H[65506]=H[65504];H[65508]=H[65504];H[65510]=H[65504];H[65512]=H[65504];H[65514]=H[65504];H[65516]=H[65504];H[65518]=H[65504];q(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),Jb(this,Fb?Kb:Lb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&vb(this.m,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ha:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.la=!0},H:function(a,b){return this.I(a,b)}, S:function(a,b){return this.W(a,b)},da:function(a,b,c){this.v||this.xb(a,b,c)},ja:function(a,b,c){this.v||this.ra(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},O:function(a,b){a&1&&vb(this.m,b);return this.g.getUint16(a,!0)},X:function(a,b){a&1&&vb(this.m,b);return this.o[a>>1]},ca:function(a,b){this.c[a]=b;this.la=!0},ga:function(a,b){this.c[a]=b;this.la=!0},ia:function(a,b,c){a&1&&vb(this.m,c);this.g.setUint16(a,b,!0);this.la=!0},sa:function(a,b,c){a&1&&vb(this.m,c);this.o[a>> 1]=b;this.la=!0}};function eb(a,b,c){a.G=b;a.h=a.j=0;c&&((a.h=c.h)&&Nb(a,Ob,!1),(a.j=c.j)&&Pb(a,Ob,!1))}function Pb(a,b,c){c&&a.j||(a.ib=!a.v&&b[1]||a.A,a.Va=!a.v&&b[3]||a.B);if(c||void 0===c)a.xb=b[1]||a.A,a.ra=b[3]||a.B}function Nb(a,b,c){c&&a.h||(a.cb=b[0]||a.w,a.T=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.W=b[2]||a.s}function Jb(a,b){b||(b=Qb);Nb(a,b,void 0);Pb(a,b,void 0)} var Qb=[],Mb=[E.prototype.N,E.prototype.ha,E.prototype.ba,E.prototype.ta],Ob=[E.prototype.H,E.prototype.da,E.prototype.S,E.prototype.ja];if(Ta)var Lb=[E.prototype.D,E.prototype.ca,E.prototype.O,E.prototype.ia],Kb=[E.prototype.J,E.prototype.ga,E.prototype.X,E.prototype.sa]; function Rb(a,b){u.call(this,"CPU",a,Rb);var c=a.multiplier||1;this.Pa=a.cycles||b;this.da=c;this.Ya=Math.round(this.Pa/1E4)/100;this.ga=this.Ya*this.da;this.i.U=!1;this.i.vb=!1;this.i.Ca=a.autoStart;this.i.Oa=!1;this.Ma=this.ia=0;this.Na=a.csStart;this.ra=a.csInterval;this.sa=a.csStop;this.H=[];this.rb=this.sc.bind(this);B(this)}w(Rb);var Sb=["power","reset"];g=Rb.prototype; g.ea=function(a,b,c,d){this.w=a;this.m=b;this.G=d;for(b=0;ba.ba/a.ga&&(b=1),a.da=b,b=a.Ya*a.da,a.ga!=b)){a.ga=b;b=a.ga.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.P("target speed: "+b)}a.J+=a.W;a.W=0;a.O=sa();a.ca=0;Yb(a)}function wb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function yb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.Pa*a.da/1E3*c|0,a.H[b][0]=c+$b(a))}function $b(a,b){var c=a.ha-=a.a;a.a=0;b&&(a.ha=0);return c} g.sc=function(){if(this.i.U){this.$a>=this.Pa&&Yb(this,!0);this.Aa=0;this.La=sa();if(this.ca){var a=this.La-this.ca;a>this.pb&&(this.O+=a,this.O>this.La&&(this.O=this.La))}try{do{for(var b,c=this.i.Oa?1:this.Qa,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.wb(b)}catch(n){if("number"!=typeof n)throw n;}b=$b(this,!0);this.Aa+=b;this.W+=b;a=b;if(this.i.Oa){var f=!1;this.Ma=this.Ma+this.lb()|0;this.ia-=a;0>=this.ia&&(this.ia+=this.ra,f=!0);0<=this.sa&&this.sa<=Zb(this)&& (this.ra=this.sa=-1,Vb(this),Xa(this),f=!0);f&&this.P(Zb(this)+" cycles: checksum="+ja(this.Ma))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ta-=b;if(0>=this.ta){this.ta+=this.Qa;15<=++this.qb&&(this.w&&this.w.fa(),this.qb=0);break}}while(this.i.U)}catch(n){Xa(this);this.w&&this.w.stop(sa(),Zb(this));b=n.stack||n.message;this.i.error=!0;this.L(b);return}if(this.i.U){b=setTimeout;c=this.rb;this.ca=sa();d=this.pb;this.Aa&&(d=Math.round(d* this.Aa/this.Qa));d-=this.ca-this.La;if(e=this.ca-this.O)this.ba=Math.round(this.W/(10*e))/100,864E5<=e&&(this.J=0,Xb(this));if(0>d||this.bad&&(this.O-=d),d=0;this.$a+=this.Aa;this.ca+=d;b(c,d)}}};function Wb(a){var b;a.i.error?(a.P(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.U)a.P(a.toString()+" busy");else{Xb(a);a.i.U=!0;a.i.vb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.O,Zb(a));setTimeout(a.rb,0)}}g.wb=function(){return 0}; function Xa(a){if(a.i.U){$b(a);a.J+=a.W;a.W=0;a.i.U=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Zb(a))}a.i.complete=void 0}function ac(a){this.Fa=+a.model||1170;this.nb=a.addrReset||0;Rb.call(this,a,6666667);this.decode=1120==this.Fa?bc.bind(this):cc.bind(this);dc(this);this.S=0;this.X=null;this.i.complete=this.i.Bb=!1}w(ac,Rb);g=ac.prototype;g.reset=function(){this.status("model "+this.Fa);this.i.U&&Xa(this);dc(this);Ub(this);this.i.error=!1;this.parent.reset.call(this)}; function dc(a){a.j=65536;a.g=32768;a.h=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.nb];a.ua=[0,0,0,0,0,0];a.aa=[0,0,0,0];a.s=0;a.Ja=0;a.Fb=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,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],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Hb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.ub=[0,0,0,0,0,0,0,0];a.tb=0;a.l=0;a.B=a.D=0;a.c=a.b=a.Xa=0;a.ja=-1;ec(a)}function ec(a){a.qa=255;a.F=0;a.gb=0;a.A=0;a.oa=0;a.fb=0;a.pa=0;a.Da=0;a.Ia=0;a.Za=262143;a.Ka=253952;a.l|=2;a.m&&Ab(a)}function Ab(a){a.Da?(a.N=65536,a.I=a.Eb,a.T=a.pc,a.Va=a.bd,hb(a.m,a.pa&16?22:18)):(a.N=0,a.I=a.Db,a.T=a.oc,a.Va=a.ad,hb(a.m,16))}g.lb=function(){return 0}; g.save=function(){var a=new K(this);a.set(0,[]);a.set(1,[this.J,this.da]);a.set(2,rb(this.m));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Xb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.aa[c]=a.f[6],a.f[6]=a.aa[a.s]);a.u=b;a.l|=2}function N(a,b){a.l&128||(a.o=a.h=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.h=a.j=b,a.g=c||0)}function gc(a,b,c,d){a.l&128||(a.o=a.h=a.j=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.h=a.j=b,a.g=a.o^a.j>>1)}function hc(a,b,c,d){a.l&128||(a.o=a.h=a.j=b,a.g=(c^d)&(d^b))} function F(a,b,c){if(!a.S){var d=!1;0>a.ja?a.ja=Za(a):a.s||(b=4,d=!0);a.A&57344||(a.oa=63222,a.fb=b);a.s=0;var e=a.T(b|a.N),f=a.T(b+2&65535|a.N);Cb(a,f&-12289|a.ja>>2&12288);d&&(a.F|=4,a.f[6]=4);ic(a,a.ja);ic(a,a.f[7]);M(a,e);a.l&=-113;a.ja=-1;if(26!=c)throw b;}}function jc(a){var b=kc(a),c=kc(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);M(a,b);Cb(a,c);a.l&=-17} function lc(a,b,c){var d,e,f,k=0;d=b>>13;a.pa&a.Fb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.R[a.s][d]<<6)+(b&8191)&a.Za;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.pa&32&&(f=a.Hb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ka&&4186112>f&&(a.F|=32,F(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: 128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Ia=a.s,a.Ja=d;k&&(k&57344&&(0<=a.ja&&(k|=128),a.A&57344||(a.A=a.A|k|a.Ia<<5|a.Ja<<1),F(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.m].ib(b&a.g,c&255,b)}function kc(a){var b=a.T(a.f[6]|a.N);a.f[6]=a.f[6]+2&65535;return b} function ic(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.oa=a.oa<<8|246);!a.s&&c<=a.qa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.T(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.T(e)|k;a.a-= 8;break;case 6:return e=fc(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=fc(a),e=e+a.f[c]&65535,e=a.T(e|a.N)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.oa=a.oa<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.qa||65534<=a.f[6])&&(a.f[6]<=a.qa-32?(a.F|=4,a.f[6]=4,F(a,4,24)):(a.F|=8,a.l|=64));return e}g.Ta=function(a,b){this.Da?(this.S++,mc(this,lc(this,a,5),b),this.S--):this.m.Ta(a,b)};g.Db=function(a,b,c){return nc(this,a,b,c)};g.Eb=function(a,b,c){return lc(this,nc(this,a,b,c),c)}; g.oc=function(a){return pb(this.m,a)};g.pc=function(a){return pb(this.m,lc(this,a,2))};g.ad=function(a,b){qb(this.m,a,b&65535)};g.bd=function(a,b){qb(this.m,lc(this,a,4),b)};function oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=nc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.T(d|c&a.N),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.aa[a.u>>12&3];return c} function pc(a,b,c,d){a.A&57344||(a.oa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=nc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=lc(a,e|c&65536,4),a.s=a.u>>14&3,qb(a.m,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.aa[a.u>>12&3]=d}function qc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=ob(a.m,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?pb(a.m,a.I(b,c,2)):a.f[c]}function rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return nc(a,b,c,8)} function sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=ob(a.m,c)):a=a.f[c]&255;return a}function tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?pb(a.m,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Xa=a.I(b,e,7),mc(a,e,d.call(a,c,ob(a.m,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),qb(a.m,e,d.call(a,c,pb(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} function uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?mc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?qb(a.m,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(M(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} g.wb=function(a){this.i.complete=!0;this.i.Bb=!1;this.i.vb=!1;this.ha=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?F(this,168,28):this.l&64?F(this,4,30):this.l&16&&F(this,12,32),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;var b=160,c=(this.gb&224)>>5;if(a=this.X&&this.X.va>c?this.X:null)b=a.vc,c=a.va;c>(this.u&224)>>5?(this.l&4&&(this.f[7]=this.f[7]+2&65535,this.l&=-5),F(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.X,c==a)this.X=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.l& 1&&this.l++;this.A&57344||(this.oa=0,this.fb=this.f[7]);this.l=this.l&7|this.u&16;this.decode(fc(this))}while(0>1|b<<16;P(this,a);return a&65535}function Bc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function Cc(a,b){a=b&~a;N(this,a);return a}function Dc(a,b){a=b&~a;N(this,a<<8);return a}function Ec(a,b){a|=b;N(this,a);return a}function Fc(a,b){a|=b;N(this,a<<8);return a}function Gc(a,b){a=~b|65536;O(this,a);return a&65535}function Hc(a,b){a=~b|256;O(this,a<<8);return a&255} function Ic(a,b){a=b-a;this.l&128||(this.o=this.h=a,this.g=b&(b^a));return a&65535}function Jc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.h=c,this.g=b&(b^c));return a&255}function Kc(a,b){a=b+a;this.l&128||(this.o=this.h=a,this.g=a&(b^a));return a&65535}function Lc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.h=c,this.g=c&(b<<8^c));return a&255}function Mc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function Nc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} function Oc(a,b){a=b<<1|this.j>>16&1;P(this,a);return a&65535}function Pc(a,b){a=b<<1|this.j>>16&1;P(this,a<<8);return a&255}function Qc(a,b){a=(this.j&65536|b)>>1|b<<16;P(this,a);return a&65535}function Rc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Sc(a,b){var c=b-a;hc(this,c,a,b);return c&65535}function Tc(a,b){var c=b-a;hc(this,c<<8,a<<8,b<<8);return c&255}function Uc(a,b){this.l&128||(this.o=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535} function Vc(a,b){a^=b;N(this,a);return a&65535}function Wc(a){S(this,a,Q(this,a),wc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Xc(a){var b=tc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.h=c;this.a-=(this.c?6:7)+b} function Yc(a){var b=tc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.j=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.o=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function Zc(a){T(this,a,!L(this))}function $c(a){T(this,a,L(this))} function ad(a){S(this,a,Q(this,a),Cc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function bd(a){R(this,a,qc(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function cd(a){S(this,a,Q(this,a),Ec);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function dd(a){R(this,a,qc(this,a),Fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} function ed(a){N(this,Q(this,a)&tc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function fd(a){N(this,(qc(this,a)&sc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function gd(a){T(this,a,this.h&65535?0:4)}function hd(a){T(this,a,!this.ma()==!(this.g&32768))}function id(a){T(this,a,!!(this.h&65535)&&!this.ma()==!(this.g&32768))}function jd(a){T(this,a,!L(this)&&!!(this.h&65535))} function kd(a){T(this,a,(this.h&65535?0:4)||!this.ma()!=!(this.g&32768))}function ld(a){T(this,a,L(this)||(this.h&65535?0:4))}function md(a){T(this,a,!this.ma()!=!(this.g&32768))}function nd(a){T(this,a,this.ma())}function od(a){T(this,a,!!(this.h&65535))}function pd(a){T(this,a,!this.ma())}function qd(){F(this,12,1);this.a-=5}function rd(a){T(this,a,!0)}function sd(a){T(this,a,!(this.g&32768))}function td(a){T(this,a,this.g&32768?2:0)} function U(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.o=0);this.a-=5}function ud(a){var b=Q(this,a);a=tc(this,a);hc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function vd(a){var b=qc(this,a)<<8;a=sc(this,a)<<8;hc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} function wd(a){var b=tc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.o=d>>16):(this.g=32768,this.h=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.o=0,this.g=32768,this.j=65536,this.a-=7}function xd(){F(this,24,2);this.a-=25}function yd(){this.u&49152?(this.F|=128,F(this,4,3)):Xa(this);this.a-=7} function zd(){F(this,16,4);this.a-=25}var Ad=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;M(this,rc(this,a));this.a=b-Ad[this.c]}var Bd=[0,14,14,17,14,18,16,20];function Cd(a){var b=this.a,c=rc(this,a);a=a>>6&7;ic(this,this.f[a]);this.f[a]=this.f[7];M(this,c);this.a=b-Bd[this.c]}var Dd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Ed(a){var b=Q(this,a),c=this.a;N(this,vc(this,a,b));this.a=c-Dd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} function Fd(a){var b=qc(this,a);N(this,uc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Gd=[7,13,13,17,14,18,17,21];function Hd(a){var b=tc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.h=this.o|b,this.g=0,this.j=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)M(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Nd(a){S(this,a,Q(this,a),Sc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} function X(a){S(this,a,0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)}function Od(){F(this,28,5);this.a-=5}function Qd(){this.l&4||this.w.fa();this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Rd(a){S(this,a,Q(this,a),Vc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){F(this,8,6)}function bc(a){Sd[a>>12].call(this,a)}function Td(a){Ud[a>>6&3].call(this,a)}function Vd(a){Wd[a>>6&3].call(this,a)}function Xd(a){Yd[a>>6&3].call(this,a)}function Zd(a){$d[a&15].call(this,a)} function ae(a){be[a&15].call(this,a)}function ce(a){de[a>>6&3].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)} var Sd=[function(a){ie[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Wc,Y,function(a){je[a>>8&15].call(this,a)},Fd,vd,fd,bd,dd,Nd,Y],ie=[function(a){ke[a>>4&15].call(this,a)},rd,od,gd,hd,md,id,kd,Cd,Cd,Td,Vd,Xd,Y,Y,Y],Ud=[function(a){O(this,vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Ic);this.a-=this.c?9:3+(7==this.b?2:0)}],Wd=[function(a){S(this,a,0,Mc); this.a-=this.c?11:6},function(a){S(this,a,L(this)?1:0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,L(this)?1:0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=tc(this,a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Yd=[function(a){S(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)}],ke=[function(a){le[a& 15].call(this,a)},Y,Y,Y,V,V,V,V,Ld,Y,Zd,ae,X,X,X,X],le=[yd,Qd,Kd,qd,zd,Jd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],$d=[Id,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},U,function(){this.h=1;this.a-=5},U,U,U,function(){this.o=0;this.a-=5},U,U,U,U,U,U,U],be=[Id,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.h=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],je=[pd,nd,jd,ld,sd,td,Zc,$c,xd,Od,ce,ee,ge,Y,Y,Y],de=[function(a){O(this,uc(this,a,0)); this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}],fe=[function(a){R(this,a,0,Nc);this.a-=this.c?11:6},function(a){R(this,a,L(this)?1:0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,L(this)?1:0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=sc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],he= [function(a){R(this,a,0,Rc);this.a-=this.c?9+(this.Xa&1):3+(7==this.b?2:0)},function(a){R(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Bc);this.a-=this.c?9+(this.Xa&1):3+(7==this.b?2:0)},function(a){R(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)}];function cc(a){me[a>>12].call(this,a)} var me=[function(a){ne[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Wc,function(a){oe[a>>8&15].call(this,a)},function(a){pe[a>>8&15].call(this,a)},Fd,vd,fd,bd,dd,Nd,Y],ne=[function(a){qe[a>>4&15].call(this,a)},rd,od,gd,hd,md,id,kd,Cd,Cd,Td,Vd,Xd,function(a){re[a>>6&3].call(this,a)},Y,Y],re=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.T(a|this.N);M(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=oc(this,a,0);ic(this,a);N(this,a);this.a-=11},function(a){var b=kc(this),c=this.a; pc(this,a,0,b);N(this,b);this.a=c-Gd[this.c]},function(a){N(this,vc(this,a,this.ma?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],qe=[function(a){se[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Ld,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.l|=1),this.a-=5):F(this,8,6)},Zd,ae,X,X,X,X],se=[yd,Qd,Kd,qd,zd,Jd,function(){jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],oe=[Hd,Hd,wd,wd,Xc,Xc,Yc,Yc,Rd,Rd,Y,Y,Y,Y,Md,Md],pe=[pd,nd,jd,ld,sd,td,Zc,$c,xd,Od,ce,ee,ge,function(a){te[a>>6&3].call(this,a)},Y, Y],te=[Y,function(a){a=oc(this,a,65536);ic(this,a);N(this,a);this.a-=11},function(a){var b=kc(this),c=this.a;pc(this,a,65536,b);N(this,b);this.a=c-Gd[this.c]},Y]; function ue(a){u.call(this,"ROM",a,ue);this.Y=this.b=null;this.j=a.addr;this.c=a.size;this.h=a.alias;this.g=a.file;this.o=ka(this.g);if(this.g){a=this.g;var b=la(this.o);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;h(a,null,!0,function(a,b,f){f?c.L("Unable to load ROM resource (error "+f+": "+a+")"):(Pa(c.Ha,a,b),(a=ua(a,b))?(c.b=a.K,c.Y=a.Y):c.g=null,ve(c))})}}w(ue);ue.prototype.ea=function(a,b,c,d){this.m=b;this.a=c;this.G=d;ve(this)}; ue.prototype.$=function(){this.Y&&(this.G&&this.G.a(this.id,this.j,this.c,this.Y),delete this.Y);return!0};ue.prototype.Z=function(){return!0}; function ve(a){if(!Sa(a)){if(a.g){if(!a.b||!a.m)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+ja(a.b.length,8,!0)+") does not match specified size ("+ja(a.c,8,!0)+")";a.i.error=!0;a.L(b)}else{b=a.j;if(kb(a.m,b,a.c,Ib)){var c;for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.Ga)return;b=qa(b[1]);if(this.s=Qa(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ha+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.$=function(a,b){if(!b)if(this.mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; g.Z=function(a){return a?this.save():!0};g.reset=function(){Be(this)};g.save=function(){var a=new K(this);a.set(0,[]);return a.data()};g.restore=function(){return Be(this)};function Be(a){a.D=0;a.b=0;a.c=128;a.h=[];return!0}g.eb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.P(this.j), this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;yb(this.a,this.J,1)}};var Ce={},Ae=(Ce[65392]=[null,null,Z.prototype.dc,Z.prototype.Qc,"RCSR"],Ce[65394]=[null,null,Z.prototype.cc,Z.prototype.Pc,"RBUF"],Ce[65396]=[null,null,Z.prototype.rc,Z.prototype.dd,"XCSR"],Ce[65398]=[null,null,Z.prototype.qc,Z.prototype.cd,"XBUF"],Ce);q(function(){for(var a=A(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.P("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bHe){if(Je(d,this.s)){this.j=new K(this,"1.30.1","failsafe");Je(this.j)&&(Oe(this,d),a=2,Pe(this.j));this.j.set("timestamp",ta());Qe(this.j);var e=this.b&&!this.o;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ne(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Je(d,k):("error"== f&&"no machine state"!=k?(this.L("Error: "+k),"unable to verify user"==k&&(za("user",""),this.c=null)):this.P(f+": "+k),Pe(d),Je(d)?(c=Ne(d),e=!0):c=!1))}e&&Me(this,c?d:null)}else 2==a&&d.clear()}else Me(this);delete this.s;delete this.A}e=x(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.i.M=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Re(this,this.a,b,c,a),this.a.Ca());this.H&&(Oe(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; function Oe(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.O;d.user=c;d.type="bug";d.data=b;h("http://www.pcjs.org/api/v1/report",d,!0)}} function Se(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new K(a,"1.30.1"),k=new K(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.Z&&(c&&Xa(a.a),d=a.a.Z(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.M=!1,!1===d&&(e=null)));for(var l=x(a.id),n=0;nf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");h(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],k);Ze(a,b,c)}})}else c(a,null)} function $e(a,b,c,d){function e(a){if(void 0===l){var b=k&&A(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--We||Ga(!0));n=!1}var k,l,n=!0;We++;Oa[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");C.type="text/css";C.styleSheet?C.styleSheet.cssText=r:C.appendChild(document.createTextNode(r));t.appendChild(C)}c|| (c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?Xe(c,null,null,!1,e,function(d,n){n?(Pa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--We||Ga(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--We||Ga(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Xe(b,a,d,!0,e,r):Ye(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Pd){f(Pd.message)}return n}window.embedPDP11=function(a,b,c,d){Ga(!1);return $e(a,b,c,d)};window.enableEvents=Ga;window.sendEvent=Ha;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map