(function(){/* http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 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/disk.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/rl11.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 k,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,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)} function oa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} function Ea(a,b){var c,d={ea:null,ga:null,Oa:null,Na:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Oa=g.load;d.Na=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ga=g.symbols;d.ea.length?1==d.ea.length&&(u(d.ea[0]),d=null):(u("Empty resource: "+a),d=null)}catch(h){u("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.bb=this.id:(this.Ua=this.id.substr(0,b),this.bb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,eb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.A.error=!1;this.G={};this.j=null;this.la=d||0;y.push(this)}var db=void 0,eb={}; if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function A(a,b){b||(b=w);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var jb=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else jb={},y=[];function kb(a,b,c){jb[a]&&b&&(jb[a][b]=c)}function sb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,0,!1,!1,this.nd,a]}A(Db);var Eb=7;function Fb(a,b){return a.f[b]&&a.f[b][1]}k=Db.prototype;k.reset=function(){this.stop()}; k.wa=function(a,b,c,d){if(this.C&&this.C.wa(a,b,c,d)||this.b&&this.b.wa(a,b,c,d)||this.j&&this.j.wa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.g[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, b){return function(){Gb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Hb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Gb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Hb(a,b)}}(this,b),!0):this.parent.wa.call(this,a,b,c,d)}};k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.j=d;Ib(b,this,Jb);Kb(b,this.reset.bind(this));Lb(this);Mb(this)};k.Ka=function(a,b){b||(Nb(),this.reset());return!0};k.Ja=function(){return!0}; function Ob(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Lb(a,b){for(var c in a.g)Ob(a,c,null!=b?b:a.g[c])}function Pb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Mb(a){for(var b in a.f)Pb(a,b,a.f[b][1])}function Qb(a,b,c,d){a.G[b]&&(void 0===c&&(zb(a,"Value for "+b+" is invalid"),a.b.da()),c=8==(a.j&&a.j.ca||8)?na(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} function Gb(a,b){var c=a.f[b];Pb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Hb(a,b){var c=a.f[b];c[2]&&c[3]&&(Pb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.ld=function(a){a||this.b.A.W||(a=this.b,a.v.reset(),Rb(a),Fb(this,"ENABLE")&&this.b.jb())};k.md=function(){};k.gd=function(a){a||this.b.da()}; k.ed=function(a){if(!a&&!this.b.A.W)if(Fb(this,"ENABLE"))this.b.jb();else{if((a=this.j)&&!wb(a,!0))vb(a,!0),a.kb(0,null),vb(a,!1);else try{var b=this.b.kb(1);0a.b.fb?8:16,c=65472<=a.ua&&a.ua<65472+b,b=c?1:2,c=c?15:a.v.Qa;Fb(a,"STEP")||(b=-b);jc(a,a.ua&~c|a.ua+b&c)} function jc(a,b){a.ua=b&a.v.Qa;b=a.ua;for(var c=0;22>c;c++)lc(a,"A"+c,b&1<c;c++)lc(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.v=this.Da-1;this.D=this.H/this.Da|0;this.cb=[];this.ma=0;this.f=!1;this.gc=0;this.B=[];this.Tc=[qc,rc,sc,tc];a=new J(this);uc(a,this.j);this.Y=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.cb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&H(this.j,e[5])&&F(this.j,e[4]+".readByte("+K(this.j,b)+"): "+K(this.j,c),!0,!d.ma),c;d.Ha(b,16,3);c=255;this.j&&H(this.j,64)&&F(this.j,"warning: unconverted read access to byte @"+K(this.j,b)+": "+K(this.j,c),!0,!d.ma);return c} function rc(a,b,c){var d=!1,e=this.controller,f=e.cb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.cb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&H(this.j,f[5])&&F(this.j,f[4]+".writeByte("+K(this.j,c)+","+K(this.j,b)+")",!0,!e.ma):(e.Ha(c,16,5),this.j&&H(this.j,64)&&F(this.j,"warning: unconverted write access to byte @"+K(this.j,c)+": "+K(this.j, b),!0,!e.ma))}function sc(a,b){var c=-1,d=this.controller;a=d.cb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&H(this.j,a[5])&&F(this.j,a[4]+".readWord("+K(this.j,b)+"): "+K(this.j,c),!0,!d.ma),c;d.Ha(b,16,2);c=65535;this.j&&H(this.j,64)&&F(this.j,"warning: unconverted read access to word @"+K(this.j,b)+": "+K(this.j,c),!0,!d.ma);return c} function tc(a,b,c){var d=!1,e=this.controller;a=e.cb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&H(this.j,a[5])&&F(this.j,a[4]+".writeWord("+K(this.j,c)+","+K(this.j,b)+")",!0,!e.ma):(e.Ha(c,16,4),this.j&&H(this.j,64)&&F(this.j,"warning: unconverted write access to word @"+K(this.j,c)+": "+K(this.j,b),!0,!e.ma))} function wc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Tb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Tb){n=l.size-(f-m);n>g&&(n=g);l.Tb=f-l.F+n;f=m+a.Da;g-=n;h++;continue}}return Bc(1,f,g)}f=new J(a,f,n,a.Da,d,e);uc(f,a.j,l);a.Y[h++]=f;f=m+a.Da;g-=n}return 0>=g?(d==Cc&&(a.gc+=c),a.status((c>>10)+"Kb "+Dc[d]+" at "+na(b)),!0):Bc(2,b,c)} function yc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].$b(a&this.v,a)};k.Zb=function(a){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;a=this.Y[(a&this.Qa)>>>this.ka].nc(a&this.v,a);this.ma--;return a}; k.oa=function(a){3932160<=a&&(a=Ec(this.b,a));return this.Y[(a&this.Qa)>>>this.ka].ta(a&this.v,a)};k.Ya=function(a){3932160<=a&&(a=Ec(this.b,a));var b=a&this.v,c=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;a=this.Y[c].oc(b,a);this.ma--;return a};k.Fb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].cc(a&this.v,b&255,a)};k.ub=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.ma++;this.Y[(a&this.Qa)>>>this.ka].dc(a&this.v,b&255,a);this.ma--}; k.wb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].Ub(a&this.v,b&65535,a)};k.xb=function(a,b){3932160<=a&&(a=Ec(this.b,a));var c=a&this.v,d=(a&this.Qa)>>>this.ka;this.f=!1;this.ma++;this.Y[d].rc(c,b&65535,a);this.ma--}; function Fc(a){for(var b=0,c=[],d=0;da.b.fb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;tb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+K(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Nb=128;Kc(this.b,this.f.qc,1E3/60,!0)};k.xd=function(){return this.f.Nb};k.ue=function(a){this.f.Nb=a&192};k.zd=function(){return Wc(this.b)};k.we=function(a){Xc(this.b,a&-129|this.b.za&128)};k.Ad=function(){return Yc(this.b)}; k.Bd=function(){return Zc(this.b)};k.Cd=function(){return this.b.Ta};k.xe=function(a){$c(this.b,a)};k.ce=function(a){a=a>>1&63;var b=this.b.Sb[a>>1];return a&1?b>>16:b&65535};k.Ye=function(a,b){b=b>>1&63;var c=b>>1;this.b.Sb[c]=b&1?this.b.Sb[c]&65535|(a&63)<<16:this.b.Sb[c]&-65536|a&65534};k.Wd=function(a){return this.b.P[1][a>>1&7]};k.Re=function(a,b){this.b.P[1][b>>1&7]=a&65295};k.Ud=function(a){return this.b.P[1][(a>>1&7)+8]};k.Pe=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295}; k.Vd=function(a){return this.b.ha[1][a>>1&7]};k.Qe=function(a,b){b=b>>1&7;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.Td=function(a){return this.b.ha[1][(a>>1&7)+8]};k.Oe=function(a,b){b=(b>>1&7)+8;this.b.ha[1][b]=a;this.b.P[1][b]&=65295};k.wd=function(a){return this.b.P[0][a>>1&7]};k.te=function(a,b){b=b>>1&7;this.b.P[0][b]=a&=65295;H(this,256)&&F(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.ud=function(a){return this.b.P[0][(a>>1&7)+8]};k.re=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295}; k.vd=function(a){return this.b.ha[0][a>>1&7]};k.se=function(a,b){b=b>>1&7;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.td=function(a){return this.b.ha[0][(a>>1&7)+8]};k.qe=function(a,b){b=(b>>1&7)+8;this.b.ha[0][b]=a;this.b.P[0][b]&=65295};k.be=function(a){return this.b.P[3][a>>1&7]};k.Xe=function(a,b){this.b.P[3][b>>1&7]=a&65295};k.$d=function(a){return this.b.P[3][(a>>1&7)+8]};k.Ve=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};k.ae=function(a){return this.b.ha[3][a>>1&7]}; k.We=function(a,b){b=b>>1&7;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Zd=function(a){return this.b.ha[3][(a>>1&7)+8]};k.Ue=function(a,b){b=(b>>1&7)+8;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Db=function(a){a&=7;return this.b.N&2048?this.b.$a[a]:this.b.u[a]};k.Gb=function(a,b){b&=7;this.b.N&2048?this.b.$a[b]=a:this.b.u[b]=a};k.Hd=function(){return this.b.N&49152?this.b.La[0]:this.b.u[6]};k.Ce=function(a){this.b.N&49152?this.b.La[0]=a:this.b.u[6]=a};k.Kd=function(){return this.b.u[7]}; k.Fe=function(a){this.b.u[7]=a};k.Eb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.$a[a]};k.Hb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.$a[b]=a};k.Id=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[1]};k.De=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[1]=a};k.Jd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[3]};k.Ee=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[3]=a};k.rd=function(a){return this.b.Mc[a-65504>>1]}; k.oe=function(a,b){this.b.Mc[b-65504>>1]=a};k.Jc=function(a){if(65520==a){a=0;switch(Cc){case Cc:a=this.v.gc}a=(a>>6)-1}else a=0;return a};k.Qc=function(){};k.Yd=function(){return 1};k.Te=function(){};k.qd=function(){return this.b.va};k.ne=function(){this.b.va=0};k.yd=function(){return this.b.Lc};k.ve=function(a,b){b&1||(a&=255);this.b.Lc=a};k.Dd=function(a,b){return b?0:this.b.Rb};k.ye=function(a){ad(this.b,a)};k.Xd=function(a,b){return b?0:this.b.hb&65280};k.Se=function(a){this.b.hb=a|255}; k.Gd=function(){return bd(this.b)};k.Be=function(a){cd(this.b,a&-1793|bd(this.b)&1792);this.b.J|=128};k.Pc=function(a,b){H(this)&&F(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; var N={},Uc=(N[61568]=[null,null,L.prototype.ce,L.prototype.Ye,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Wd,L.prototype.Re,"SIPDR",8,1145,256],N[62608]=[null,null,L.prototype.Ud,L.prototype.Pe,"SDPDR",8,1145,256],N[62624]=[null,null,L.prototype.Vd,L.prototype.Qe,"SIPAR",8,1145,256],N[62640]=[null,null,L.prototype.Td,L.prototype.Oe,"SDPAR",8,1145,256],N[62656]=[null,null,L.prototype.wd,L.prototype.te,"KIPDR",8,1145,256],N[62672]=[null,null,L.prototype.ud,L.prototype.re,"KDPDR",8,1145,256], N[62688]=[null,null,L.prototype.vd,L.prototype.se,"KIPAR",8,1145,256],N[62704]=[null,null,L.prototype.td,L.prototype.qe,"KDPAR",8,1145,256],N[62798]=[null,null,L.prototype.Cd,L.prototype.xe,"MMR3",1,1145,256],N[65382]=[null,null,L.prototype.xd,L.prototype.ue,"LKS"],N[65402]=[null,null,L.prototype.zd,L.prototype.we,"MMR0",1,1145,256],N[65404]=[null,null,L.prototype.Ad,L.prototype.Pc,"MMR1",1,1145,256],N[65406]=[null,null,L.prototype.Bd,L.prototype.Pc,"MMR2",1,1145,256],N[65408]=[null,null,L.prototype.be, L.prototype.Xe,"UIPDR",8,1145,256],N[65424]=[null,null,L.prototype.$d,L.prototype.Ve,"UDPDR",8,1145,256],N[65440]=[null,null,L.prototype.ae,L.prototype.We,"UIPAR",8,1145,256],N[65456]=[null,null,L.prototype.Zd,L.prototype.Ue,"UDPAR",8,1145,256],N[65472]=[null,null,L.prototype.Db,L.prototype.Gb,"R0SET0"],N[65473]=[null,null,L.prototype.Db,L.prototype.Gb,"R1SET0"],N[65474]=[null,null,L.prototype.Db,L.prototype.Gb,"R2SET0"],N[65475]=[null,null,L.prototype.Db,L.prototype.Gb,"R3SET0"],N[65476]=[null,null, L.prototype.Db,L.prototype.Gb,"R4SET0"],N[65477]=[null,null,L.prototype.Db,L.prototype.Gb,"R5SET0"],N[65478]=[null,null,L.prototype.Hd,L.prototype.Ce,"R6KERNEL"],N[65479]=[null,null,L.prototype.Kd,L.prototype.Fe,"R7KERNEL"],N[65480]=[null,null,L.prototype.Eb,L.prototype.Hb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Eb,L.prototype.Hb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Eb,L.prototype.Hb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Eb,L.prototype.Hb,"R3SET1",1,1145],N[65484]= [null,null,L.prototype.Eb,L.prototype.Hb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Eb,L.prototype.Hb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Id,L.prototype.De,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Jd,L.prototype.Ee,"R6USER",1,1145],N[65504]=[null,null,L.prototype.rd,L.prototype.oe,"CTRL",8,1170],N[65520]=[null,null,L.prototype.Jc,L.prototype.Qc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Jc,L.prototype.Qc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Yd,L.prototype.Te, "SYSID",1,1170],N[65526]=[null,null,L.prototype.qd,L.prototype.ne,"CPUERR",1,1170],N[65528]=[null,null,L.prototype.yd,L.prototype.ve,"MB",1,1170],N[65530]=[null,null,L.prototype.Dd,L.prototype.ye,"PIR"],N[65532]=[null,null,L.prototype.Xd,L.prototype.Se,"SL"],N[65534]=[null,null,L.prototype.Gd,L.prototype.Be,"PSW"],N); $a(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,this.size>>2),kd(this,gd?ld:md);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},T:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.v.Ha(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ 1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},O:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,1,c.M)&&c.da(!0)}return this.nc(a,b)},Ua:function(a,b){if(this.j&&null!=this.F){var c=this.j;rd(c,this.F+a,2,c.M)&&c.da(!0)}return this.oc(a,b)},na:function(a, b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,1,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.dc(a,b,c)},Ba:function(a,b,c){if(this.j&&null!=this.F){var d=this.j;rd(d,this.F+a,2,d.D)&&d.da(!0)}this.f?this.w(a,b,c):this.rc(a,b,c)},M:function(a){return this.G[a]},S:function(a,b){a=this.G[a];this.j&&H(this.j,128)&&F(this.j,"Memory.readByte("+K(this.j,b)+"): "+K(this.j,a),!0);return a},X:function(a,b){a&1&&this.v.Ha(b,64,2);return this.D.getUint16(a,!0)},ba:function(a,b){a&1&&this.v.Ha(b,64,2); a=this.I[a>>1];this.j&&H(this.j,128)&&F(this.j,"Memory.readWord("+K(this.j,b)+"): "+K(this.j,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Xa=!0},bb:function(a,b,c){this.G[a]=b;this.Xa=!0;this.j&&H(this.j,128)&&F(this.j,"Memory.writeByte("+K(this.j,c)+","+K(this.j,b)+")",!0)},Aa:function(a,b,c){a&1&&this.v.Ha(c,64,4);this.D.setUint16(a,b,!0);this.Xa=!0},Ca:function(a,b,c){a&1&&this.v.Ha(c,64,4);this.I[a>>1]=b;this.Xa=!0;this.j&&H(this.j,128)&&F(this.j,"Memory.writeWord("+K(this.j,c)+","+K(this.j, b)+")",!0)}};function uc(a,b,c){a.j=b;a.g=a.C=0;c&&((a.g=c.g)&&qd(a,pd,!1),(a.C=c.C)&&od(a,pd,!1))}function sd(a,b){b?--a.C||(a.cc=a.f?a.w:a.dc,a.Ub=a.f?a.H:a.rc):--a.g||(a.$b=a.nc,a.ta=a.oc)}function od(a,b,c){c&&a.C||(a.cc=!a.f&&b[1]||a.w,a.Ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.dc=b[1]||a.w,a.rc=b[3]||a.H}function qd(a,b,c){c&&a.g||(a.$b=b[0]||a.K,a.ta=b[2]||a.L);if(c||void 0===c)a.nc=b[0]||a.K,a.oc=b[2]||a.L}function kd(a,b){b||(b=td);qd(a,b,void 0);od(a,b,void 0)} var td=[],nd=[J.prototype.T,J.prototype.xa,J.prototype.ca,J.prototype.Ma],pd=[J.prototype.O,J.prototype.na,J.prototype.Ua,J.prototype.Ba];if(Ab)var md=[J.prototype.M,J.prototype.ja,J.prototype.X,J.prototype.Aa],ld=[J.prototype.S,J.prototype.bb,J.prototype.ba,J.prototype.Ca]; function ud(a,b){w.call(this,"CPU",a,ud,1);b=a.cycles||b;var c=a.multiplier||1;this.Ib=0;this.pb=b;this.gb=c;this.Kb=Math.round(this.pb/1E4)/100;this.sb=this.Kb*this.gb;this.A.W=!1;this.A.bc=!1;this.A.yb=a.autoStart;this.A.zb=!1;this.Ob=this.Aa=0;this.Pb=a.csStart;this.Ab=a.csInterval;this.Bb=a.csStop;this.L=[];this.Ic=this.ge.bind(this);I(this)}A(ud);var vd=["power","reset"];k=ud.prototype; k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Aa&&(a.Aa+=a.Ab,c=!0);0<=a.Bb&&a.Bb<=Bd(a)&&(a.Ab=a.Bb=-1,yd(a),a.da(),c=!0);c&&a.i(Bd(a)+" cycles: checksum="+p(a.Ob))}} k.wa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.A.ia)a=!0;else{var b=null,c,h=sb(a.id);for(c=0;ca.xa/a.sb?b=1:d=!0;a.gb=b;b=a.Kb*a.gb;if(a.sb!=b){a.sb=b;b=a.sb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.vb()}Tb(a,a.X);a.X=0;a.T=Ba();a.ba=0;Dd(a);return d}function Ic(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Kc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.pb*a.gb/1E3*c|0,a.A.W&&(c+=Ed(a)),a.L[b][0]=c)} function Fd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Sb(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ed(a,b){var c=a.ca-=a.b;a.b=a.I=0;b&&(a.ca=0);return c} k.ge=function(){if(this.A.W){this.Lb>=this.pb&&Dd(this,!0);this.Va=0;this.nb=Ba();if(this.ba){var a=this.nb-this.ba;a>this.Gc&&(this.T+=a,this.T>this.nb&&(this.T=this.nb))}try{do{var b=Fd(this,this.A.zb?1:this.qb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=Ed(this,!0);this.Va+=b;this.X+=b;Ub(this,b);Sb(this,b);this.Ba-=b;if(0>=this.Ba){this.Ba+=this.qb;15<=++this.Hc&&(this.ra(),this.Hc=0);break}}while(this.A.W)}catch(e){this.da();this.C&&this.C.stop(Ba(),Bd(this));zb(this,e.stack||e.message); return}if(this.A.W){a=setTimeout;b=this.Ic;this.ba=Ba();var c=this.Gc;this.Va&&(c=Math.round(c*this.Va/this.qb));var c=c-(this.ba-this.nb),d=this.ba-this.T;d&&(this.xa=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ja=0,Cd(this)));if(0>c||this.xac&&(this.T-=c),c=0;this.Lb+=this.Va;this.ba+=c;a(b,c)}}}; k.jb=function(a){if(yb(this))return!1;if(this.A.W)return this.i(this.toString()+" busy"),!1;Cd(this);this.A.W=!0;this.A.bc=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.vb(!0),this.C.start(this.T,Bd(this)));setTimeout(this.Ic,0);return!0};k.kb=function(){return 0};k.da=function(a){var b=!1;if(this.A.W){Ed(this);Tb(this,this.X);this.X=0;this.A.W=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Ba(),Bd(this));b=!0}this.A.complete=a;return b}; function Gd(a){this.fb=+a.model||1170;this.Cc=a.addrReset||0;ud.call(this,a,6666667);this.rb=0;this.Fc=255;1120==this.fb?(this.decode=Hd.bind(this),this.na=this.Xc,this.rb=8,this.Fc=-1):(this.decode=Id.bind(this),this.na=this.Yc);Jd(this);this.K=0;this.O=null;this.A.complete=!1}A(Gd,ud);k=Gd.prototype;k.reset=function(){this.status("model "+this.fb);this.A.W&&this.da();Jd(this);xd(this);this.A.error=!1;this.parent.reset.call(this)}; function Jd(a){a.U=65536;a.V=32768;a.$=65535;a.Z=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Cc,-1,-2,-3,-4,-5,-6,-7,-8];a.$a=[0,0,0,0,0,0];a.La=[0,0,0,0];a.B=0;a.lb=0;a.od=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ha=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0]];a.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Mc=[0,0,0,0,0,0,0,0];a.Lc=0;a.J=0;a.D=a.H=0;a.g=a.f=a.Jb=0;a.Ca=-1;Rb(a)}function Rb(a){a.za=0;a.lc=0;a.mc=0;a.Ta=0;a.va=0;a.Rb=0;a.hb=255;a.M=0;a.mb=0;a.Ma=262143;a.Mb=0;a.pa=0;a.O=null;a.v&&Kd(a)}function Kd(a){a.M?(a.S=65536,a.Bc=a.Ta&16?4186112:253952,a.aa=a.cd,a.ta=a.de,a.Ub=a.Ze,wc(a.v,a.Ta&16?22:18)):(a.S=0,a.Bc=57344,a.aa=a.bd,a.ta=a.Kc,a.Ub=a.Rc,wc(a.v,16))} function Wc(a){var b=a.za;b&57344||(b=b&-3199|a.mb<<5|a.lb<<1);return b}function Xc(a,b){b&=-3073;if(a.za!=b){b&57344&&!(a.za&57344)&&(a.lc=a.pa>>16&65535,a.mc=a.pa&65535);a.za=b;a.mb=b>>5&3;a.lb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.M!=c&&(a.M=c,Kd(a))}}function Yc(a){a.za&57344||(a.lc=a.pa>>16&65535);a=a.lc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function Zc(a){a.za&57344||(a.mc=a.pa&65535);return a.mc}function $c(a,b){1170>a.fb&&(b&=-49);a.Ta!=b&&(a.Ta=b,a.Ma=b&16?4194303:262143,Kd(a))} k.xc=function(){return 0};k.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ja,this.gb]);a.set(2,Fc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];Cd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.B!=c&&(a.La[c]=a.u[6],a.u[6]=a.La[a.B]);a.N=b;a.J|=2}function ad(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1)}a.Rb=b;a.J|=2}function S(a,b){a.J&128||(a.Z=a.$=b,a.V=0)}function ne(a,b,c){a.J&128||(a.Z=a.$=a.U=b,a.V=c||0)}function oe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^b)&(d^b))} function pe(a,b){a.J&128||(a.Z=a.$=a.U=b,a.V=a.Z^a.U>>1)}function qe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^d)&(d^b))}k.qa=function(a,b,c){if(!this.K){0>this.Ca?this.Ca=bd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.va|=4,this.u[6]=4,d=!0);this.pa=a|4143316992;this.B=0;var e=this.ta(a|this.S),f=this.ta(a+2&65535|this.S);cd(this,f&-12289|this.Ca>>2&12288);re(this,this.Ca,d);re(this,this.u[7],d);R(this,e);this.J&=~(b|18);this.J|=9;this.Ca=-1;this.ke=a;this.ie=c;if(-3<=c)throw a;}}; function se(a){var b=te(a),c=te(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);R(a,b);cd(a,c);a.J&=-17}function Ec(a,b){var c=b>>13&31;31>c&&(b=a.Ta&32?a.Sb[c]+(b&8190)&4194302:b&-3932161);return b} function ue(a,b,c){var d,e,f;if(!(c&a.M))return f=b&65535,57344<=f&&(f|=a.Bc),f;d=b>>13;a.Ta&a.od[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ha[a.B][d]<<6)+(b&8191)&a.Ma;if(a.K)return f;f&1&&!(c&1)&&(a.va|=64,a.qa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.B][d]=e;if(f!=(4194170&a.Ma)||a.B)a.mb= a.B,a.lb=d;g&&(g&57344&&(0<=a.Ca&&(g|=128),a.za&57344||(g|=a.za&4096|a.mb<<5|a.lb<<1,Xc(a,a.za&-61695|g&61694)),a.qa(168,64,-1)),a.za&61440||!(f<(4191360&a.Ma)||f>(4194239&a.Ma))||(a.za|=4096,a.za&512&&(a.J|=64)));return f}function ve(a,b){return a.v.Yb(b)}function te(a){var b=a.ta(a.u[6]|a.S);a.u[6]=a.u[6]+2&65535;return b}function re(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.pa=a.pa&65535|(a.pa&-65536)<<8|16121856;c||a.na(4,-2,d);a.Ub(d,b)} function we(a,b,c,d){var e,f,g=d&8?0:a.S;switch(b){case 0:return a.qa(4,0,-2),0;case 1:return 6==c&&a.na(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.na(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.ta(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.na(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.ta(e)|g;a.b-=8;break;case 6:return e=a.ta(Qd(a,2)),e=e+a.u[c]&65535,6==c&&a.na(d, 0,e),a.b-=6,e|g;case 7:return e=a.ta(Qd(a,2)),e=e+a.u[c]&65535,e=a.ta(e|a.S),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.pa=a.pa&65535|(a.pa&-65536)<<8|(f<<3&248|c)<<16;return e}k.Xc=function(a,b,c){!this.B&&0>=b&&c<=this.hb&&(this.J|=32)};k.Yc=function(a,b,c){!this.B&&a&4&&c<=this.hb&&(c<=this.hb-32?this.qa(4,0,-3):(this.va|=8,this.J|=32))};k.Zb=function(a){if(!this.M)return this.v.Zb(a);this.K++;a=ve(this,ue(this,a,3));this.K--;return a}; k.Ya=function(a){if(!this.M)return this.v.Ya(a);this.K++;a=this.Kc(ue(this,a,2));this.K--;return a};k.ub=function(a,b){this.M?(this.K++,a=ue(this,a,5),a&1&&this.b--,this.v.Fb(a,b),this.K--):this.v.ub(a,b)};k.xb=function(a,b){this.M?(this.K++,this.Rc(ue(this,a,4),b),this.K--):this.v.xb(a,b)};k.bd=function(a,b,c){return we(this,a,b,c)};k.cd=function(a,b,c){return ue(this,we(this,a,b,c),c)};k.Kc=function(a){return this.v.oa(this.Mb=a)};k.de=function(a){return this.v.oa(this.Mb=ue(this,a,2))}; k.Rc=function(a,b){this.v.wb(this.Mb=a,b&65535)};k.Ze=function(a,b){this.v.wb(this.Mb=ue(this,a,4),b)};function xe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=we(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.B=a.N>>12&3,c=a.ta(d|c&a.S),a.B=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.La[a.N>>12&3];return c} function ye(a,b,c,d){a.pa=a.pa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=we(a,b,e,4),c&65536||(e&=65535),a.B=a.N>>12&3,e=ue(a,e|c&65536,4),a.B=a.N>>14&3,a.v.wb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.La[a.N>>12&3]=d}function ze(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ve(a,a.aa(b,c,3)):a.u[c+a.rb]&a.Fc}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.v.oa(a.aa(b,c,2)):a.u[c+a.rb]}function Be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return we(a,b,c,8)} function Ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ve(a,a.aa(b,c,3)):a.u[c]&255}function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.oa(a.aa(b,c,2)):a.u[c]}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Jb=a.aa(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ve(a,e)),e&1&&a.b--,a.v.Fb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))} function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.v.wb(e,d.call(a,0>c?a.u[-c-1]:c,a.v.oa(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Fb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Fe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,d,4),a.v.wb(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c} function V(a,b,c){c&&(R(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} k.kb=function(a){this.A.complete=!0;var b=this.j?Ge(this.j)?1:this.A.bc?-1:0:0,c=a?this.A.bc?0:1:-1;this.A.bc=!1;this.ca=this.b=a;do{if(b){if(He(this.j,this.u[7],c)){this.da();break}c||c++;b++}if(this.J){if(a=this.J&7)if(a=!1,this.J&2){this.J&=-3;var d=160,e=(this.Rb&224)>>5,f=this.O&&this.O.Cb>e?this.O:null;f&&(d=f.le,e=f.Cb);e>(this.N&224)>>5?(this.J&4&&(Qd(this,2),this.J&=-5),this.qa(d,0,-9),e=!0):e=!1;e&&(f&&Rd(this,f),a=!0)}else this.J&1&&this.J++;if(a){if(b&&He(this.j,this.u[7],c)){this.da(); break}if(0>c)break}if(this.J&112&&me(this)){if(b&&He(this.j,this.u[7],c)){this.da();break}if(0>c)break}}this.J=this.J&7|this.N&16;this.decode(Pd(this))}while(0>1|b<<16;pe(this,a);return a&65535}function Ne(a,b){a=b&128|b>>1|b<<8;pe(this,a<<8);return a&255}function Oe(a,b){a=b&~a;S(this,a);return a}function Pe(a,b){a=b&~a;S(this,a<<8);return a}function Qe(a,b){a|=b;S(this,a);return a}function Re(a,b){a|=b;S(this,a<<8);return a}function Se(a,b){a=~b|65536;ne(this,a);return a&65535} function Te(a,b){a=~b|256;ne(this,a<<8);return a&255}function Ue(a,b){a=b-a;this.J&128||(this.Z=this.$=a,this.V=b&(b^a));return a&65535}function Ve(a,b){a=b-a;var c=a<<8;b<<=8;this.J&128||(this.Z=this.$=c,this.V=b&(b^c));return a&255}function We(a,b){a=b+a;this.J&128||(this.Z=this.$=a,this.V=a&(b^a));return a&65535}function Xe(a,b){a=b+a;var c=a<<8;this.J&128||(this.Z=this.$=c,this.V=c&(b<<8^c));return a&255}function Ye(a,b){a=-b;ne(this,a,a&b&32768);return a&65535} function Ze(a,b){a=-b;ne(this,a<<8,(a&b&128)<<8);return a&255}function $e(a,b){a=b<<1|this.U>>16&1;pe(this,a);return a&65535}function af(a,b){a=b<<1|this.U>>16&1;pe(this,a<<8);return a&255}function bf(a,b){a=(this.U&65536|b)>>1|b<<16;pe(this,a);return a&65535}function cf(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;pe(this,a<<8);return a&255}function df(a,b){var c=b-a;qe(this,c,a,b);return c&65535}function ef(a,b){var c=b-a;qe(this,c<<8,a<<8,b<<8);return c&255} function ff(a,b){this.J&128||(this.Z=this.$=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function gf(a,b){a^=b;S(this,a);return a&65535}function hf(a){U(this,a,Ae(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} function jf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.Z=this.$=c;this.b-=(this.g?6:7)+b} function kf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=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.u[a|1]=d&65535;this.Z=d>>16;this.$=d>>16|d;this.b-=(this.g?6:7)+b}function lf(a){V(this,a,!Ld(this))}function mf(a){V(this,a,Ld(this))} function nf(a){U(this,a,Ae(this,a),Oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function of(a){T(this,a,ze(this,a),Pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function pf(a){U(this,a,Ae(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function qf(a){T(this,a,ze(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} function rf(a){var b=Ae(this,a);a=De(this,a);S(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function sf(a){var b=ze(this,a);a=Ce(this,a);S(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function tf(a){V(this,a,Nd(this))}function uf(a){V(this,a,!Od(this)==!Md(this))}function vf(a){V(this,a,!Nd(this)&&!Od(this)==!Md(this))}function wf(a){V(this,a,!Ld(this)&&!Nd(this))} function xf(a){V(this,a,Nd(this)||!Od(this)!=!Md(this))}function yf(a){V(this,a,Ld(this)||Nd(this))}function zf(a){V(this,a,!Od(this)!=!Md(this))}function Af(a){V(this,a,Od(this))}function Bf(a){V(this,a,!Nd(this))}function Cf(a){V(this,a,!Od(this))}function Df(){this.qa(12,0,-8);this.b-=5}function Ef(a){V(this,a,!0)}function Ff(a){V(this,a,!Md(this))}function Gf(a){V(this,a,Md(this))}function Hf(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.$=1);a&8&&(this.Z=0);this.b-=5} function If(a){var b=Ae(this,a);a=De(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;qe(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Jf(a){var b=ze(this,a);a=Ce(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);qe(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} function Kf(a){var b=De(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.$=d>>16|d,this.Z=d>>16):(this.V=32768,this.$=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.$=this.Z=0,this.V=32768,this.U=65536,this.b-=7}function Lf(){this.qa(24,0,-8);this.b-=25} function Mf(){this.N&49152?(this.va|=128,this.qa(4,0,-7)):(this.w&&1120==this.fb&&this.w.setData(this.u[0],!0),this.j?Nf(this.j):this.da());this.b-=7}function Of(){this.qa(16,0,-8);this.b-=25}var Pf=[0,7,7,10,7,11,9,13];function Qf(a){this.I=this.b;R(this,Be(this,a));this.b=this.I-Pf[this.g]}var Rf=[0,14,14,17,14,18,16,20];function Sf(a){this.I=this.b;var b=Be(this,a);a=a>>6&7;re(this,this.u[a]);this.u[a]=this.u[7];R(this,b);this.b=this.I-Rf[this.g]} var Tf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Uf(a){var b=Ae(this,a);this.I=this.b;S(this,Fe(this,a,b));this.b=this.I-Tf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Vf(a){var b=ze(this,a);S(this,Ee(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Wf=[7,13,13,17,14,18,17,21]; function Xf(a){var b=De(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&128||(this.Z=b>>16,this.$=this.Z|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)R(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function dg(a){U(this,a,Ae(this,a),df);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function eg(a){U(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)}function fg(){this.qa(28,0,-8);this.b-=5} function gg(){this.w&&(this.w.pc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=4;Qd(this,-2);this.b-=3}function hg(a){U(this,a,this.u[(a>>6&7)+this.rb],gf);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.j)b=this.j,H(b,1)?(F(b,"undefined opcode "+K(b,a),!0,!0),b=Nf(b)):b=!1;b||this.qa(8,0,-8)}function Hd(a){ig[a>>12].call(this,a)}function jg(a){kg[a>>6&3].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)} function pg(a){qg[a&15].call(this,a)}function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a>>6&3].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)} var ig=[function(a){zg[a>>8&15].call(this,a)},Uf,If,rf,nf,pf,hf,W,function(a){Ag[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,dg,W],zg=[function(a){Bg[a>>4&15].call(this,a)},Ef,Bf,tf,uf,zf,vf,xf,Sf,Sf,jg,lg,ng,W,W,W],kg=[function(a){ne(this,Fe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,Ue);this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){U(this,a,0, Ye);this.b-=this.g?11:6},function(a){U(this,a,Ld(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,Ld(this)?1:0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=De(this,a);ne(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],og=[function(a){U(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,$e);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}], Bg=[function(a){Cg[a&15].call(this,a)},W,W,W,Qf,Qf,Qf,Qf,$f,W,pg,rg,eg,eg,eg,eg],Cg=[Mf,gg,ag,Df,Of,Zf,W,W,W,W,W,W,W,W,W,W],qg=[Yf,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},Hf,function(){this.$=1;this.b-=5},Hf,Hf,Hf,function(){this.Z=0;this.b-=5},Hf,Hf,Hf,Hf,Hf,Hf,Hf],sg=[Yf,function(){this.U=65536;this.b-=5},function(){this.V=32768;this.b-=5},bg,function(){this.$=0;this.b-=5},bg,bg,bg,function(){this.Z=32768;this.b-=5},bg,bg,bg,bg,bg,bg,bg],Ag=[Cf,Af,wf,yf,Ff,Gf,lf,mf,Lf,fg,tg, vg,xg,W,W,W],ug=[function(a){ne(this,Ee(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ve);this.b-=this.g?9:3+(7==this.f?2:0)}],wg=[function(a){T(this,a,0,Ze);this.b-=this.g?11:6},function(a){T(this,a,Ld(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,Ld(this)?1:0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ce(this, a);ne(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],yg=[function(a){T(this,a,0,cf);this.b-=this.g?9+(this.Jb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ne);this.b-=this.g?9+(this.Jb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}];function Id(a){Dg[a>>12].call(this,a)} var Dg=[function(a){Eg[a>>8&15].call(this,a)},Uf,If,rf,nf,pf,hf,function(a){Fg[a>>8&15].call(this,a)},function(a){Gg[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,dg,W],Eg=[function(a){Hg[a>>4&15].call(this,a)},Ef,Bf,tf,uf,zf,vf,xf,Sf,Sf,jg,lg,ng,function(a){Ig[a>>6&3].call(this,a)},W,W],Ig=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ta(a|this.S);R(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xe(this,a,0);re(this,a);S(this,a);this.b-=11},function(a){var b=te(this);this.I= this.b;ye(this,a,0,b);S(this,b);this.b=this.I-Wf[this.g]},function(a){S(this,Fe(this,a,Od(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Hg=[function(a){Jg[a&15].call(this,a)},W,W,W,Qf,Qf,Qf,Qf,$f,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.J|=1),this.b-=5):W.call(this,a)},pg,rg,eg,eg,eg,eg],Jg=[Mf,gg,function(){se(this);this.J|=this.N&16;this.b-=13},Df,Of,Zf,ag,function(){this.qa(8,0,-8)},W,W,W,W,W,W,W,W],Fg=[Xf,Xf,Kf,Kf,jf,jf,kf,kf,hg,hg,W,W,W,W,cg,cg],Gg=[Cf,Af,wf,yf, Ff,Gf,lf,mf,Lf,fg,tg,vg,xg,function(a){Kg[a>>6&3].call(this,a)},W,W],Kg=[W,function(a){a=xe(this,a,65536);re(this,a);S(this,a);this.b-=11},function(a){var b=te(this);this.I=this.b;ye(this,a,65536,b);S(this,b);this.b=this.I-Wf[this.g]},W]; function Lg(a){w.call(this,"ROM",a,Lg,512);this.ga=this.g=null;this.B=a.addr;this.f=a.size;this.D=!1;this.w=a.alias;this.C=a.file;this.H=oa(this.C);if(this.C){a=this.C;var b=ta(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.R("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(kb(c.Ua,a,b),(a=Ea(a,b))?(c.g=a.ea,c.ga=a.ga):c.C=null);eh(c)})}}A(Lg);k=Lg.prototype; k.Ia=function(a,b,c,d){this.v=b;this.b=c;this.j=d;eh(this)};k.Ka=function(){this.ga&&(this.j&&fh(this.j,this.id,this.B,this.f,this.ga),delete this.ga);return!0};k.Ja=function(){return!0}; function eh(a){if(!xb(a)){if(a.C){if(!a.g||!a.v)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)zb(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.B;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+pc){var c={};b=(c[b]=[Lg.prototype.Sd,Lg.prototype.Ne,null,null,null,a.f>>1],c);if(Ib(a.v,a,b)){b=a.D=!0;break a}}else if(zc(a.v,b,a.f,jd)){for(c=0;c>>a.ka;0=b.length){F(a,"invalid block at offset "+q(m),1048576);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0=b.length){F(a,"insufficient data for block at offset "+q(m),1048576); break}l+=b[h++]&255;if(l&255){F(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),1048576);break}if(v)for(F(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),1048576);v--;)a.b.ub(r++,b[t++]&255);else r&1?a.b.da():null==d&&(d=r),null!=d&&F(a,"starting address: "+q(d),1048576);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.na))});this.M=Lc(52,4);this.ja=Ic(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.M)});Ib(b,this,lh);Kb(b,this.reset.bind(this));I(this)}; k.Ac=function(){if(!this.I){var a=wd(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.bb)return;b=ya(b[1]);if(this.I=tb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Ac(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ja=function(a){return a?this.save():!0};k.reset=function(){mh(this)};k.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};k.restore=function(){return mh(this)};function mh(a){a.K=0;a.f=0;a.g=128;a.B=[];return!0}k.ac=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.H%a,this.T&&(b=xa("",c)));this.S&&!this.H&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.i(this.D), this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.ja,1E3/Math.round(this.ca/10))}};var nh={},lh=(nh[65392]=[null,null,X.prototype.Md,X.prototype.He,"RCSR"],nh[65394]=[null,null,X.prototype.Ld,X.prototype.Ge,"RBUF"],nh[65396]=[null,null,X.prototype.fe,X.prototype.af,"XCSR"],nh[65398]=[null,null,X.prototype.ee,X.prototype.$e,"XBUF"],nh);$a(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&qh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;qh(d,oa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; k.Ia=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.j=d;this.T=rh(a);var e=this;if((this.g=wd(this.C,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.X=Lc(56,4);this.ca=Ic(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.C&&!a.C.A.ia;g?a.R('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(kb(a.Ua,e,f),(e=Ea(e,f))&&Ah(a,b,c,d,e.ea,e.Oa, e.Na));a.A.eb=!1;a.D&&(a.D--,a.D||I(a));xh(a)})}function uh(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ya);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.jc?"":e)+"&format=json"));return!!Da(f, null,!0,function(b,c,d){Hh(a,b,c,d)})} function Hh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ia;if(d)a.controller.R('Unable to load disk "'+a.ab+'" (error '+d+": "+b+")",f);else{kb(a.controller.Ua,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(h.length)if(1==h.length)u(h[0]);else{a.ya=h.length;a.Ea=h[0].length;a.sa=h[0][0].length;var l=h[0][0][0];a.Pa=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,z=t.length;z>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Fa?f=a.Sa+a.Fa&&(a.Fa+=f-(a.Sa+a.Fa)+1):(a.Sa=f,a.Fa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+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(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.R("Unable to restore disk '"+this.ab+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=Jh(this,a++);)Lh(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 Lh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){w.call(this,"RL11",a,O,8388608);this.w=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}A(O);k=O.prototype; k.wa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){u("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=la(c.value,10);null!=a&&Mh(d,a)},!0;case "loadDrive":return this.G[b]= c,c.onclick=function(){var a=d.G.listDisks;a&&Nh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[la(a.value,10)||0])if(a=a.Ga){var b;b="";for(var c=0,h;h=Jh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Mh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Oh(this)};k.save=function(){return(new Q(this)).data()}; k.restore=function(a){return Oh(this,a[0])};function Rh(a,b){b||(a.H=0);if(a.w)for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.R("Unable to load the selected drive");else if(c)if("?"==c)a.R('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=oa(c);a.status("Attempting to load "+c+' as "'+b+'"')}Th(a,e,b,c,!1,d)}else Sh(a,e)} function Th(a,b,c,d,e,f){var g=-1,h=a.f[b];h.ib.toLowerCase()!=d.toLowerCase()&&(g++,Sh(a,b,!0),h.ic?a.R("RL11 busy"):(h.ic=!0,e&&(h.hc=!0,a.H++,H(a)&&F(a,"auto-loading disk: "+c)),h.Vb=!!f,Gh(new Ch(a,h,"preload"),c,d,f,a.ad)&&g++));return g} k.ad=function(a,b,c,d,e){var f;a.ic=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ya||f[1]>a.Ea)&&(this.R('Disk "'+c+'" too large for drive '+("RL"+a.kc)),b=null);b?(a.Ga=b,a.ab=c,a.ib=d,this.R('Mounted disk "'+c+'" in drive '+("RL"+a.kc),a.hc||e),this.C&&this.C.vb()):a.Vb=!1;a.hc&&(a.hc=!1,--this.H||I(this));Mh(this,a.kc)}; function Qh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.B=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; k.sd=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Ga.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ga.read(m,n++))||0>(t=a.Ga.read(m,n++))){h=5120;break}this.v.xb(f,r|t<<8);if(Hc(this.v)){h=8192;break}f+=2;if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)}; k.pe=function(a,b,c,d,e,f,g){var h=0,l=a.Ga,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Ya(f);if(Hc(this.v)){h=8192;break}f+=2;if(!m){m=a.Ga.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ga.write(m,n++,r&255)||!a.Ga.write(m,n++,r>>8)){h=5120;break}if(n>=l.Pa&&(m=null,++d>=l.sa&&(d=0,++c>=l.Ea&&(c=0,++b>=l.ya)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Pd=function(){return this.fa&65535}; k.Ke=function(a){this.fa=this.fa&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.B&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.B=this.g&4?this.B+b:this.B-b,this.g=this.B=this.B&65408|c);break;case 8:this.D=this.B;break;case 12:b=this.sd;case 10:b||(b=this.pe),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.ya||f>=c.sa?this.fa|=37888: (g=(this.K&63)<<16|this.I,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Zc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.O))}};k.Nd=function(){return this.I};k.Ie=function(a){this.I=a&65534};k.Qd=function(){return this.g};k.Le=function(a){this.g=a};k.Rd=function(){return this.D};k.Me=function(a){this.D=a};k.Od=function(){return this.K};k.Je=function(a){this.K=a&63}; var Uh={},Ph=(Uh[63744]=[null,null,O.prototype.Pd,O.prototype.Ke,"RLCS"],Uh[63746]=[null,null,O.prototype.Nd,O.prototype.Ie,"RLBA"],Uh[63748]=[null,null,O.prototype.Qd,O.prototype.Le,"RLDA"],Uh[63750]=[null,null,O.prototype.Rd,O.prototype.Me,"RLMP"],Uh[63752]=[null,null,O.prototype.Od,O.prototype.Je,"RLBE"],Uh);function Vh(a){w.call(this,"Debugger",a,Vh);this.ca=a.base||16;this.Ca=!1;this.K=0;this.T=!1;this.B=-1;this.g=[];this.X={}}A(Vh); var Wh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Vh.prototype.yc=function(){return-1};Vh.prototype.zc=function(){}; function Xh(a,b,c,d){if(c)if(b){0>a.B&&a.g.length&&(a.B=0);if(0>a.B||b!=a.g[a.B])a.g.splice(0,0,b),a.B=0;a.B--}else a.T?b="end":b=a.g[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function Yh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} function Zh(a,b,c){var d;if(b){b=$h(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ci(a,b){if(b)return bi(a,b,a.X[b]);var c=0;for(b in a.X)bi(a,b,a.X[b]),c++;return 0this.b.fb?mi:[];Vc(this,64,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.aa(ni(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.ka;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Dc[c],n&&d.i(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} k.zc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.$a[a-8];else if(20>a)b=this.b.La[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=bd(this.b);break;case 21:b=c.Rb;break;case 22:b=c.va;break;case 23:b=c.hb;break;case 24:b=Wc(c);break;case 25:b=Yc(c);break;case 26:b=Zc(c);break;case 27:b=c.Ta;break;case 28:d&&(b=d.ua);break;case 29:d&&(b=d.tb);break;case 30:d&&mc(d)&&(b=d.Za)}}return b}; k.message=function(a,b){b&&(a+=" @"+K(this,Y(this.b.pa&65535).F));if(this.la&1073741824)this.Aa.push(a);else if(!this.ja||a!=this.ja){this.ja=a;b=!1;if(this.la&-2147483648&&this.b&&(b=this.b.A.W)||wb(this,!0))this.da(),b&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Ed(a),a.Ba=0,a.ra())}}; function fi(a){var b;if(!Ge(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ba=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.i("trapped to "+K(a,c&255,1)+" ("+(0>d?Bb[-d]:K(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.O?ui(a):vi(a)}}function ti(a,b){var c;(c=!a.b||!xb(a.b))||(c=a.b,c.A.ia?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!yb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){fi(this);this.Ba=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.W=!1;wi(this);a||zd(this)};k.save=function(){var a=new Q(this);a.set(0,pi(this.L));a.set(1,pi(this.S));a.set(2,[this.g,this.T,this.la]);a.set(3,this.I);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=qi(a[b++]),this.S=qi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.T=a[b][1],this.la|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.O||this.i("running");this.A.W=!0;this.Jb=a;this.Kb=b}; k.stop=function(a,b){if(this.A.W){this.A.W=!1;this.K=b-this.Kb;if(!this.O){b="stopped";if(this.K){a-=this.Jb;var c=0d&&(d=a.b.Ya(b)),65535!=(d&65535)&&(a.pc(a.H[a.ba],b),++a.ba==a.H.length&&(a.ba=0)));return!1}function Nf(a){var b=a.b;if(b.A.W)throw R(b,a.b.pa&65535),a.da(),-1;return!1} function ei(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.nb=0}k.ob=function(a,b,c){var d=!0;c||xi(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.i("invalid address: "+K(this,b.F)),d=!1;else{var f=this.v;f.Y[e>>>f.ka].ob(e&f.v,a==this.D)}}d&&(a.push(b),c?b.Ra=!0:(yi(this,a,a.length-1,"set"),fi(this)));return d}; function xi(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.D));h.Ra||fi(a);break}}return f}function zi(a,b){for(var c=1;c>23)&65535,x=K(v,t);else if(8192==B)t=t.F-((f&63)<<1)&65535,x=K(v,t);else if(12288==B)x=K(v,f&7,1);else if(24576==B)x=K(v,f&63,1);else if(32768==B)x=K(v,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), z&63)switch(z=B&7,B&56){case 0:x=si(z);break;case 8:x="@"+si(z);break;case 16:7>z?x="("+si(z)+")+":(B=v.oa(t,2),x="#"+K(v,B,0,!0));break;case 24:7>z?x="@("+si(z)+")+":(B=v.oa(t,2),x="@#"+K(v,B,0,!0));break;case 32:x="-("+si(z)+")";break;case 40:x="@-("+si(z)+")";break;case 48:B=v.oa(t,2);x=K(v,B,0,!0)+"("+si(z)+")";7==z&&(x=K(v,B+t.F&65535));break;case 56:B=v.oa(t,2),x="@"+K(v,B)+"("+si(z)+")",7==z&&(x="@"+K(v,B+t.F&65535))}v=x;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]); 0b)c=si(b),c+="="+K(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+K(a,d.$a[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+K(a,d.La[b-16]);else switch(b){case 20:c="PS="+K(a,bd(d));break;case 21:c="IR="+K(a,d.Rb);break;case 22:c="ER="+K(a,d.va);break;case 23:c="SL="+K(a,d.hb);break;case 24:c="MMR0="+K(a,Wc(d));break;case 25:c="MMR1="+K(a,Yc(d));break;case 26:c="MMR2="+K(a,Zc(d));break;case 27:c="MMR3="+K(a,d.Ta);break;case 28:a.w&&(c="AR="+K(a,a.w.ua,3));break;case 29:a.w&& (c="DR="+K(a,a.w.tb));break;case 30:a.w&&mc(a.w)&&(c="SR="+K(a,a.w.Za,3))}c&&(c+=" ");return c}function Di(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ci(a,"T")+Ci(a,"N")+Ci(a,"Z")+Ci(a,"V")+Ci(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.uc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.uc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({gf:b,F:c,dd:d,ga:e,sc:f})}function Ei(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.dd;if(e>=g&&eb)){e.u[b]= g&65535;break}a.i("unknown register: "+f);return}a.C.ra();a.i("updated registers:")}}a.i(Di(a,d));c&&(a.L=Y(e.u[7]),vi(a,K(a,a.L.F)))}}function Ii(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Bi(a,b,g,f);a.i(f);a.L=b;e-=b.F-l;c++}}} function Ai(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.T&&(a.i("ended assemble at "+K(a,a.S.F)),a.L=a.S,a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(xb(a)&&0n||"z"qa.length&&(a.i("note: only "+qa.length+" available"),ca=qa.length);ia-=ca;0>ia&&(null==qa[qa.length-1].F?(ca=ia+ca,ia=0):ia+=qa.length);var Ud=[];"call"==Rg&&(Wb=1E5,Ud=["CALL"]);for(void 0!==Qg&&a.i(ca+" instructions earlier:");0=qa.length&&(ia=0);a.pb=ca;Tg++;Wb--}}Tg||(a.i("no "+Sg+"history available"),a.pb=void 0)}else{var ob=ni(a,pa);if(ob){var Yb=0,Vd=!1,Wd="ds"==Pa;Qa&&(Vd=!0,"l"==Qa.charAt(0)&&(Vd=!1,Qa=Qa.substr(1)||bj),Yb=ai(a,Qa)>>>0,65536Zd?String.fromCharCode(Zd):"."),Oc=Oc>>8}Ra&&(Ra+="\n");Ra=Wd?Ra+(Sa+","):Ra+(pa+" "+Sa+(0==Nc?" "+Yd:""))}Ra&&a.i(Ra);a.mb=ob}}}}break;case "e":if("else"==g[0])break;var rb,$d,ae,be,ce=g[0],de=g[1];"eb"==ce?(rb=1,$d=255,ae=a.Yb,be=a.Fb):"e"==ce||"ew"==ce?(rb=2,$d=65535,ae=a.oa,be=a.wb):de=null;if(null==de)a.i("edit memory commands:"), a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Pc=ni(a,de);if(Pc)for(var Qc=2;Qcge;){for(var Ta=null,gj=256;65536> cc.F>>>0;){he.F=a.oa(cc,2);if(null==cc.F||!gj--)break;if(!(he.F&1)){for(var hj=a,Rc=he,Xg=null,dc=Rc.F,Yg=dc,ie=1;6>=ie&&dc;ie++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bNi){if(Pi(d,this.I)){this.B=new Q(this,"1.30.3","failsafe");Pi(this.B)&&(Ui(this,d),a=2,Vi(this.B));this.B.set("timestamp",Ca());Wi(this.B);var e=this.f&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ti(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pi(d,g):("error"== f&&"no machine state"!=g?(this.R("Error: "+g),"unable to verify user"==g&&(La("user",""),this.g=null)):this.i(f+": "+g),Vi(d),Pi(d)?(c=Ti(d),e=!0):c=!1))}e&&Si(this,c?d:null)}else 2==a&&d.clear()}else Si(this);delete this.I;delete this.K}e=sb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Xi(this,this.b,b,c,a),this.ra(),this.b.yb());this.O&&(Ui(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; function Ui(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} function Ki(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.da(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=sb(a.id),l=0;l=c||30<=(b.Ib+=c))&&(d.textContent=b.A.W?b.xa.toFixed(2)+"Mhz":"Stopped",b.Ib=0)}if(this.w&&(b=this.w,a=a||0,b.D)){c=b.b.A.W;d=!!(b.b.J&4);if(0>=a||60<=(b.B+=a)){for(var e=0;ef.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);nj(a,b,c)}})}else c(a,null)} function oj(a,b,c,d){function e(a){if(void 0===h){var b=g&&E(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--aj||bb(!0));l=!1}var g,h,l=!0;aj++;jb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| (c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?lj(c,null,null,!1,e,function(d,l){l?(kb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--aj||bb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--aj||bb(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?lj(b,a,d,!0,e,m):mj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){bb(!1);return oj(a,b,c,d)};window.enableEvents=bb;window.sendEvent=cb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map