(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 h,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 m(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function q(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={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"},ra=Date.now||function(){return+new Date}; function sa(){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 r(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 k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={K:null,X:null,ga:null,fa: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.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.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=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Qa=this.id:(this.oa=this.id.substr(0,b),this.Qa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,ob:!1,P:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(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 z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.rc,a]}z(Ya);h=Ya.prototype;h.reset=function(){this.A=this.A&-120|20}; h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.s[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];Za(a, b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(Za(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;$a(b,this,ab);bb(b,this.reset.bind(this));cb(this);for(var e in this.b)Za(this,e,this.b[e][0])};h.ka=function(a,b){b||db();return!0};h.ja=function(){return!0}; function eb(a,b,c,d){a.o[b]&&(void 0===c&&(a.j.error=!0,a.D("Value for "+b+" is invalid"),F(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))}function fb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function cb(a,b){for(var c in a.s)fb(a,c,null!=b?b:a.s[c])}function Za(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"} h.pc=function(a){a||this.a.j.U||(this.h.reset(),gb(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&hb(this.a))};h.qc=function(){};h.lc=function(a){a||F(this.a)};h.jc=function(a){if(!a&&!this.a.j.U)if(this.b.ENABLE&&this.b.ENABLE[0])hb(this.a);else{a=this.C;var b;if(b=a)a.j.Ea&&(a.j.ob=!0),b=!a.j.Ea;b?(Va(a,!0),a.lb(0),Va(a,!1)):(this.a.lb(1),this.aa())}};h.kc=function(a){a&&!this.a.j.U&&(this.v&&ib(this,this.c+2),this.h.Bb(this.c,jb(this,this.f)))}; h.mc=function(a){a||this.a.j.U||(this.w&&ib(this,this.c+2),jb(this,this.h.sb(this.c)))};h.oc=function(a){a||this.a.j.U||ib(this,this.f)};h.nc=function(a){cb(this,a||null)};h.rc=function(a,b){this.f=a?this.f|1<c;c++)fb(a,"A"+c,b&1<c;c++)fb(a,"D"+c,b&1<>2;this.l=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.bc=[nb,ob,pb,qb];a=new H(this);rb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function ob(a,b,c){var d=!1,e=this.controller,f=e.xa[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.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||I(e,c,16)} function pb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function qb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[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||I(e,c,16)}function tb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.mb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.mb){p=l.size-(f-n);p>g&&(p=g);l.mb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return yb(1,f,g)}f=new H(a,f,p,a.b,d,e);rb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Cb(a,b){3932160<=b&&(b=Bb(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.l,b)} h.sb=function(a){var b=a&this.l,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Fb(a&this.l,b&255,a);this.f--};function Db(a,b,c){3932160<=b&&(b=Bb(a.a,b));a.h[(b&a.Aa)>>>a.c].nb(b&a.l,c&65535,b)}h.Bb=function(a,b){var c=a&this.l,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; function Eb(a){for(var b=0,c=[],d=0;da.a.bb)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null,p=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=f[4],w=0;w>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.wa!=c&&(b.wa=c,Lb(b));b.G&&b.G.aa()}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.zb};h.Hc=function(){return this.a.Na}; h.zd=function(a){var b=this.a;1170>b.bb&&(a&=-49);b.Na!=a&&(b.Na=a,b.Nb=a&16?4194303:262143,Lb(b),b.G&&b.G.aa())};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Fa[a]:this.a.g[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Fa[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Fa[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Fa[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){return 65520==a?61183:0};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Ab:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.ad=function(a){return a?this.a.Ca&65280:0};h.Td=function(a){this.a.Ca=a|255}; h.Lc=function(){return kb(this.a)};h.Dd=function(a){Mb(this.a,a&-1809|kb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; var M={},L=(M[61568]=[null,null,K.prototype.gd,K.prototype.Zd,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.$c,K.prototype.Sd,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Yc,K.prototype.Qd,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Zc,K.prototype.Rd,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Xc,K.prototype.Pd,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.vd,"KISDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.td,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.Ac, K.prototype.ud,"KISAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.sd,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.zd,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.wd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.yd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.fd,K.prototype.Yd,"UISDR",8,1145],M[65424]=[null,null,K.prototype.dd, K.prototype.Wd,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.ed,K.prototype.Xd,"UISAR",8,1145],M[65456]=[null,null,K.prototype.cd,K.prototype.Vd,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.La,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.La,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.La,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.La,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.La,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.La,K.prototype.Oa, "R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Ed,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Hd,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ma,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ma,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ma,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ma,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ma,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ma, K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Fd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Gd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.qd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.bd,K.prototype.Ud,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.pd,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.Dc,K.prototype.xd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Ad,"PIR"],M[65532]=[null,null,K.prototype.ad,K.prototype.Td,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Dd,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),Ub(this,Qb?Vb:Wb);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&I(this.h,b,64);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},qa: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.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.$b(a,b,c)},G:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&I(this.h,b,64);return this.c.getUint16(a,!0)},ba:function(a,b){a&1&&I(this.h,b,64);return this.s[a>>1]},la:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.h, c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&I(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function rb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&Yb(a,Zb,!1),(a.m=c.m)&&$b(a,Zb,!1))}function $b(a,b,c){c&&a.m||(a.Eb=!a.l&&b[1]||a.f,a.nb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function Yb(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function Ub(a,b){b||(b=ac);Yb(a,b,void 0);$b(a,b,void 0)} var ac=[],Xb=[H.prototype.N,H.prototype.qa,H.prototype.ca,H.prototype.wa],Zb=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Xa)var Wb=[H.prototype.G,H.prototype.la,H.prototype.O,H.prototype.ra],Vb=[H.prototype.J,H.prototype.pa,H.prototype.ba,H.prototype.va]; function bc(a,b){x.call(this,"CPU",a,bc);var c=a.multiplier||1;this.ib=a.cycles||b;this.ra=c;this.vb=Math.round(this.ib/1E4)/100;this.va=this.vb*this.ra;this.j.U=!1;this.j.Cb=!1;this.j.Va=a.autoStart;this.j.eb=!1;this.fb=this.Ha=0;this.gb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Rb=this.ld.bind(this);E(this)}z(bc);var ec=["power","reset"];h=bc.prototype; h.ia=function(a,b,c,d){this.l=a;this.h=b;this.C=d;this.G=a.G;for(b=0;ba.pa/a.va&&(b=1);a.ra=b;b=a.vb*a.ra;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&lc(a.l)}a.O+=a.la;a.la=0;a.ca=ra();a.qa=0;jc(a)}function Hb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Jb(a,b,c){0<=b&&ba.J[b][0]&&(c=a.ib*a.ra/1E3*c|0,a.J[b][0]=c+mc(a))}function mc(a,b){var c=a.Ga-=a.a;a.a=a.I=0;b&&(a.Ga=0);return c} h.ld=function(){if(this.j.U){this.wb>=this.ib&&jc(this,!0);this.Ua=0;this.cb=ra();if(this.qa){var a=this.cb-this.qa;a>this.Pb&&(this.ca+=a,this.ca>this.cb&&(this.ca=this.cb))}try{do{for(var b,c=this.j.eb?1:this.kb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.lb(b)}catch(l){if("number"!=typeof l)throw l;}b=mc(this,!0);this.Ua+=b;this.la+=b;a=b;if(this.j.eb){var f=!1;this.fb=this.fb+this.Jb()|0;this.Ha-=a;0>=this.Ha&&(this.Ha+=this.Ra,f=!0);0<=this.Sa&&this.Sa<= kc(this)&&(this.Ra=this.Sa=-1,hc(this),F(this),f=!0);f&&this.T(kc(this)+" cycles: checksum="+m(this.fb))}for(var a=b,g=this.J.length-1;0<=g;g--){var k=this.J[g];0>k[0]||(k[0]-=a,0>=k[0]&&(k[0]=-1,k[1]()))}this.Ta-=b;if(0>=this.Ta){this.Ta+=this.kb;15<=++this.Qb&&(this.l&&this.l.aa(),this.Qb=0);break}}while(this.j.U)}catch(l){F(this);this.l&&this.l.stop(ra(),kc(this));b=l.stack||l.message;this.j.error=!0;this.D(b);return}if(this.j.U){b=setTimeout;c=this.Rb;this.qa=ra();d=this.Pb;this.Ua&&(d=Math.round(d* this.Ua/this.kb));d-=this.qa-this.cb;if(e=this.qa-this.ca)this.pa=Math.round(this.la/(10*e))/100,864E5<=e&&(this.O=0,ic(this));if(0>d||this.pad&&(this.ca-=d),d=0;this.wb+=this.Ua;this.qa+=d;b(c,d)}}};function hb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{ic(a);a.j.U=!0;a.j.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.ca,kc(a));setTimeout(a.Rb,0)}}h.lb=function(){return 0}; function F(a){var b=!1;if(a.j.U){mc(a);a.O+=a.la;a.la=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),kc(a));b=!0}a.j.complete=void 0;return b}function nc(a){this.bb=+a.model||1170;this.Lb=a.addrReset||0;bc.call(this,a,6666667);this.decode=1120==this.bb?oc.bind(this):pc.bind(this);qc(this);this.sa=0;this.R=null;this.j.complete=!1}z(nc,bc);h=nc.prototype;h.reset=function(){this.status("model "+this.bb);this.j.U&&F(this);qc(this);gc(this);this.j.error=!1;this.parent.reset.call(this)}; function qc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Lb];a.Fa=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.sc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[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.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Za=[0,0,0,0,0,0,0,0,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.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.F=0;a.c=a.b=a.tb=0;a.Ia=-1;gb(a)}function gb(a){a.Ca=255;a.M=0;a.Ab=0;a.w=0;a.Ba=0;a.zb=0;a.Na=0;a.wa=0;a.$a=0;a.Nb=262143;a.R=null;a.h&&Lb(a)}function Lb(a){a.wa?(a.ba=65536,a.N=a.ic,a.W=a.hd,a.nb=a.$d,tb(a.h,a.Na&16?22:18)):(a.ba=0,a.N=a.hc,a.W=a.Ub,a.nb=a.ac,tb(a.h,16))}function rc(a,b,c){a.Lb=b;O(a,b);!c&&a.C&&(F(a)||a.C.aa())}h.Jb=function(){return 0}; h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.O,this.ra]);a.set(2,Eb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.O=b[1];ic(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function uc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function vc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function wc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function xc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} function J(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=kb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.zb=b);a.v=0;var e=a.W(b|a.ba),f=a.W(b+2&65535|a.ba);Mb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);yc(a,a.Ia);yc(a,a.g[7]);O(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function zc(a){var b=Ac(a),c=Ac(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Mb(a,c);a.u&=-17} function Bb(a,b){var c=b>>13&31;31>c&&a.Na&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} function Bc(a,b,c){var d,e,f,g=0;d=b>>13;a.Na&a.sc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;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.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> f||4194239>>a.c].Eb(b&a.l,c&255,b)}function Ac(a){var b=a.W(a.g[6]|a.ba);a.g[6]=a.g[6]+2&65535;return b}function yc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= 8;break;case 6:return e=a.W(tc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(tc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.ba)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.sb=function(a){if(!this.wa)return this.h.sb(a);this.sa++;a=this.Ub(Bc(this,a,2));this.sa--;return a}; h.Ya=function(a,b){this.wa?(this.sa++,Cc(this,Bc(this,a,5),b),this.sa--):this.h.Ya(a,b)};h.Bb=function(a,b){this.wa?(this.sa++,this.ac(Bc(this,a,4),b),this.sa--):this.h.Bb(a,b)};h.hc=function(a,b,c){return Dc(this,a,b,c)};h.ic=function(a,b,c){return Bc(this,Dc(this,a,b,c),c)};h.Ub=function(a){return Cb(this.h,a)};h.hd=function(a){return Cb(this.h,Bc(this,a,2))};h.ac=function(a,b){Db(this.h,a,b&65535)};h.$d=function(a,b){Db(this.h,Bc(this,a,4),b)}; function Ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Dc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.ba),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Fc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Dc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Bc(a,e|c&65536,4),a.v=a.B>>14&3,Db(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} function Gc(a,b){b>>=6;var c=a.F=b&7;(b=a.A=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Hc(a,b){b>>=6;var c=a.F=b&7;return(b=a.A=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]}function Ic(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Dc(a,b,c,8)}function Jc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Kc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]} function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.N(b,e,7),Cc(a,e,d.call(a,c,Ab(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),Db(a.h,e,d.call(a,c,Cb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Lc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Cc(a,a.N(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Db(a.h,a.N(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} h.lb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.Ga=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.R&&this.R.Ka>d?this.R:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(tc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.R,e==a)this.R=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(sc(this))}while(0>1|b<<16;wc(this,a);return a&65535}function Sc(a,b){a=b&2048|b>>1|b<<8;wc(this,a<<8);return a&255}function Tc(a,b){a=b&~a;R(this,a);return a}function Uc(a,b){a=b&~a;R(this,a<<8);return a}function Vc(a,b){a|=b;R(this,a);return a}function Wc(a,b){a|=b;R(this,a<<8);return a}function Xc(a,b){a=~b|65536;uc(this,a);return a&65535}function Yc(a,b){a=~b|256;uc(this,a<<8);return a&255} function Zc(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function $c(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function ad(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function bd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function cd(a,b){a=-b;uc(this,a,a&b&32768);return a&65535}function dd(a,b){a=-b;uc(this,a<<8,(a&b&128)<<8);return a&255} function ed(a,b){a=b<<1|this.m>>16&1;wc(this,a);return a&65535}function fd(a,b){a=b<<1|this.m>>16&1;wc(this,a<<8);return a&255}function gd(a,b){a=(this.m&65536|b)>>1|b<<16;wc(this,a);return a&65535}function hd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;wc(this,a<<8);return a&255}function id(a,b){var c=b-a;xc(this,c,a,b);return c&65535}function jd(a,b){var c=b-a;xc(this,c<<8,a<<8,b<<8);return c&255}function kd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} function ld(a,b){a^=b;R(this,a);return a&65535}function md(a){U(this,a,Hc(this,a),Nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} function od(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function pd(a){V(this,a,!Q(this))}function qd(a){V(this,a,Q(this))} function rd(a){U(this,a,Hc(this,a),Tc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function sd(a){S(this,a,Gc(this,a),Uc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function td(a){U(this,a,Hc(this,a),Vc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){S(this,a,Gc(this,a),Wc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} function vd(a){R(this,Hc(this,a)&Kc(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function wd(a){R(this,(Gc(this,a)&Jc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function xd(a){V(this,a,this.i&65535?0:4)}function yd(a){V(this,a,!this.ya()==!(this.f&32768))}function zd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Ad(a){V(this,a,!Q(this)&&!!(this.i&65535))} function Bd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Cd(a){V(this,a,Q(this)||(this.i&65535?0:4))}function Dd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Ed(a){V(this,a,this.ya())}function Fd(a){V(this,a,!!(this.i&65535))}function Gd(a){V(this,a,!this.ya())}function Hd(){J(this,12,1);this.a-=5}function Id(a){V(this,a,!0)}function Jd(a){V(this,a,!(this.f&32768))}function Kd(a){V(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ld(a){var b=Hc(this,a);a=Kc(this,a);xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Md(a){var b=Gc(this,a)<<8;a=Jc(this,a)<<8;xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} function Nd(a){var b=Kc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Od(){J(this,24,2);this.a-=25} function Pd(){this.B&49152?(this.M|=128,J(this,4,3)):this.C?this.C.b():F(this);this.a-=7}function Qd(){J(this,16,4);this.a-=25}var Rd=[0,7,7,10,7,11,9,13];function Sd(a){this.I=this.a;O(this,Ic(this,a));this.a=this.I-Rd[this.c]}var Td=[0,14,14,17,14,18,16,20];function Ud(a){this.I=this.a;var b=Ic(this,a);a=a>>6&7;yc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.I-Td[this.c]}var Vd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function Wd(a){var b=Hc(this,a);this.I=this.a;R(this,Mc(this,a,b));this.a=this.I-Vd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Xd(a){var b=Gc(this,a);R(this,Lc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Yd=[7,13,13,17,14,18,17,21]; function Zd(a){var b=Kc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ee(a){U(this,a,Hc(this,a),id);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} function fe(a){U(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)}function ge(){J(this,28,5);this.a-=5}function he(){this.u&4||this.l.aa();this.u|=4;tc(this,-2);this.a-=3}function ie(a){U(this,a,Hc(this,a),ld);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function oc(a){je[a>>12].call(this,a)}function ke(a){le[a>>6&3].call(this,a)}function me(a){ne[a>>6&3].call(this,a)}function oe(a){pe[a>>6&3].call(this,a)}function qe(a){re[a&15].call(this,a)}function se(a){te[a&15].call(this,a)} function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)} var je=[function(a){Ae[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,Y,function(a){Be[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Ae=[function(a){Ce[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,Y,Y,Y],le=[function(a){uc(this,Mc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}],ne=[function(a){U(this,a,0, cd);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Kc(this,a);uc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],pe=[function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)}], Ce=[function(a){De[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,Y,qe,se,fe,fe,fe,fe],De=[Pd,he,be,Hd,Qd,ae,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],re=[$d,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],te=[$d,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Be=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,Y,Y,Y],ve=[function(a){uc(this, Lc(this,a,0));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)},function(a){S(this,a,1,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,$c);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){S(this,a,0,dd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Jc(this,a);uc(this,a<<8);this.a-=this.c?4:3+(7==this.b? 2:0)}],ze=[function(a){S(this,a,0,hd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Sc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)}];function pc(a){Ee[a>>12].call(this,a)} var Ee=[function(a){Fe[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,function(a){Ge[a>>8&15].call(this,a)},function(a){He[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Fe=[function(a){Ie[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,function(a){Je[a>>6&3].call(this,a)},Y,Y],Je=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.ba);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Ec(this,a,0);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I= this.a;Fc(this,a,0,b);R(this,b);this.a=this.I-Yd[this.c]},function(a){R(this,Mc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ie=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},qe,se,fe,fe,fe,fe],Ke=[Pd,he,be,Hd,Qd,ae,function(){zc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ge=[Zd,Zd,Nd,Nd,nd,nd,od,od,ie,ie,Y,Y,Y,Y,de,de],He=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,function(a){Le[a>>6& 3].call(this,a)},Y,Y],Le=[Y,function(a){a=Ec(this,a,65536);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I=this.a;Fc(this,a,65536,b);R(this,b);this.a=this.I-Yd[this.c]},Y]; function Me(a){x.call(this,"ROM",a,Me);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ne(c)})}}z(Me);Me.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ne(this)}; Me.prototype.ka=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Me.prototype.ja=function(){return!0}; function Ne(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")";a.j.error=!0;a.D(b)}else{b=a.i;if(wb(a.h,b,a.c,Tb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?F(a.a):rc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Ib(e.a,e.ba))});this.ca=Kb(52,4);this.O=Hb(this.a,function(){e.c|=128;e.c&64&&Ib(e.a,e.ca)});$a(b,this,Te);E(this)}; h.Kb=function(){if(!this.v){var a=fc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Qa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; h.ja=function(a){return a?this.save():!0};h.reset=function(){Ue(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Ue(this)};function Ue(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.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.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Jb(this.a,this.O,1E3/Math.round(this.I/10))}};var Ve={},Te=(Ve[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],Ve[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],Ve[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],Ve[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],Ve);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= d.o.listTapes;a&&Ye(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ye(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;this.J=Ze(a);var e=this;if((this.c=fc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Kb(56,4);this.R=Hb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.P;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&hf(a,b,c,d,e.K,e.ga,e.fa)); a.j.Ea=!1;a.m&&(a.m--,a.m||E(a));ef(a)})}function bf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(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"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.rb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){pf(a,b,c,d)})} function pf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.P;if(d)a.controller.D('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var T=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.da?f=a.ma+a.da&&(a.da+=f-(a.ma+a.da)+1):(a.ma=f,a.da=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.D("Unable to restore disk '"+this.ua+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=rf(this,a++);)tf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function tf(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 N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.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.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&uf(d,a)},!0;case "loadDrive":return this.o[b]= c,c.onclick=function(){var a=d.o.listDisks;a&&vf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ea){var b;b="";for(var c=0,k;k=rf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";uf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){wf(this)};h.save=function(){return(new P(this)).data()}; h.restore=function(a){return wf(this,a[0])};function zf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('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=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Bf(a,e,b,c,!1,d)}else Af(a,e)} function Bf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Af(a,b,!0),k.qb?a.D("RL11 busy"):(k.qb=!0,e&&(k.pb=!0,a.s++),k.hb=!!f,of(new kf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} h.ec=function(a,b,c,d,e){var f;a.qb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.ub)),b=null);b?(a.ea=b,a.ua=c,a.Da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.ub),a.pb||e),this.l&&lc(this.l)):a.hb=!1;a.pb&&(a.pb=!1,--this.s||E(this));uf(this,a.ub)}; function yf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){if(!n){n=a.ea.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ea.read(n,p++))||0>(w=a.ea.read(n,p++))){k=5120;break}Db(this.h,f,t|w<<8);if(Gb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){var t=Cb(this.h,f);if(Gb(this.h)){k=8192;break}f+=2;if(!n){n=a.ea.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ea.write(n,p++,t&255)||!a.ea.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; h.Md=function(a){this.L=this.L&-1023|a&1022;this.G=this.G&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& 63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Ib(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; var Cf={},xf=(Cf[63744]=[null,null,N.prototype.Uc,N.prototype.Md,"RLCS"],Cf[63746]=[null,null,N.prototype.Sc,N.prototype.Kd,"RLBA"],Cf[65284]=[null,null,N.prototype.Vc,N.prototype.Nd,"RLDA"],Cf[65286]=[null,null,N.prototype.Wc,N.prototype.Od,"RLMP"],Cf[65288]=[null,null,N.prototype.Tc,N.prototype.Ld,"RLBE"],Cf); function Df(a,b,c){x.call(this,"Computer",a,Df);this.j.P=!1;Ef(this,b);this.w=fc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Ff;this.s=null;this.i=this.I=!1;this.O=fc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Gf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new mb({id:this.oa+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.G=Ua("Panel",this.id))&&this.G.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bFf){if(Hf(d,this.s)){this.f=new P(this,"1.30.2","failsafe");Hf(this.f)&&(Mf(this,d),a=2,Nf(this.f));this.f.set("timestamp",sa());Of(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Lf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Hf(d,g):("error"== f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Nf(d),Hf(d)?(c=Lf(d),e=!0):c=!1))}e&&Kf(this,c?d:null)}else 2==a&&d.clear()}else Kf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Pf(this,this.a,b,c,a),this.a.Va());this.F&&(Mf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; function Mf(a,b){if(ua("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.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} function Sf(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.P=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Zf(a,b,c)}})}else c(a,null)} function $f(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Wf||Ja(!0));l=!1}var g,k,l=!0;Wf++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| (c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?Xf(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Wf||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Wf||Ja(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Xf(b,a,d,!0,e,n):Yf(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return $f(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map