(function(){/* http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ for(var 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,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function oa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ta(a){return a.replace(/[&<>"']/g,function(a){return sa[a]})} function ua(a,b){return(a+" ").slice(0,b)}function va(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var wa={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"}; function ya(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=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 Ba(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 m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}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 Ca(a,b){var c,d={ja:null,ka:null,Lb:null,Kb: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.Lb=g.load;d.Kb=g.exec;if(e=g.bytes)d.ja=e;else if(e=g.words)for(d.ja=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ja=Array(4*e.length),f=c=0;c>8&255,d.ja[f++]=e[c]>>16&255,d.ja[f++]=e[c]>>24&255;else d.ja=g;d.ka=g.symbols;d.ja.length?1==d.ja.length&&(n(d.ja[0]),d=null):(n("Empty resource: "+a),d=null)}catch(k){n("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Wa=this.id:(this.Ra=this.id.substr(0,b),this.Wa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Ia:!1,Ib:!1,ha:!1,error:!1};this.zb=null;this.v.error=!1;this.I={};this.i=null;this.la=d||0;t.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(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 u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.ua-1;this.B=this.H/this.ua|0;this.Ha=[];this.A=0;this.D=[];this.mc=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.W=Array(this.B);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&D(this.i,64)&&C(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&D(this.i,64)&&C(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ha[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.Ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&D(this.i,64)&&C(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&D(this.i,64)&&C(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} function Qb(a,b){var c=-1,d=this.controller;(a=d.Ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&D(this.i,64)&&C(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&D(this.i,64)&&C(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ha[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?this.i&&D(this.i,64)&&C(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&D(this.i,64)&&C(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} function Vb(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.ia;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.C)return m.vb+=m.C-f,m.C=f,!0;if(f>=m.C+m.vb){q=m.size-(f-p);q>g&&(q=g);m.vb=f-m.C+q;f=p+a.ua;g-=q;k++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.ua,d,e);Sb(f,a.i,m);a.W[k++]=f;f=p+a.ua;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ia;0>>=a.ia;0>>this.ia].Eb(a&this.w,a)};h.Bb=function(a){this.A++;a=this.W[(a&this.f)>>>this.ia].Mb(a&this.w,a);this.A--;return a};h.na=function(a){return this.W[(a&this.f)>>>this.ia].oa(a&this.w,a)}; h.pb=function(a){var b=a&this.w,c=(a&this.f)>>>this.ia;this.A++;a=this.W[c].Nb(b,a);this.A--;return a};h.Fb=function(a,b){this.W[(a&this.f)>>>this.ia].Hb(a&this.w,b&255,a)};h.hb=function(a,b){this.A++;this.W[(a&this.f)>>>this.ia].Sb(a&this.w,b&255,a);this.A--};h.Va=function(a,b){this.W[(a&this.f)>>>this.ia].wb(a&this.w,b&65535,a)};h.Gb=function(a,b){var c=a&this.w,d=(a&this.f)>>>this.ia;this.A++;this.W[d].Tb(c,b&65535,a);this.A--}; function cc(a){for(var b=0,c=[],d=0;da.b.ab)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!k&&p&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));dc(a,e,e,g,k,m,p,f[4])}}}function nc(a,b){a.D.push(b)} function oc(a,b){a.A||(a.i&&D(a.i,536870912)&&C(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ea(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Sd:0,Db:20,gd:0};this.f={Td:0,Rb:-1}}u(K);h=K.prototype; h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.Rb=pc(c,function(){e.f.Ka|=128;e.f.Ka&64&&(qc(e.b,e.f.hd),rc(e.b,e.f.Rb,1E3/60))});this.f.hd=sc(64,6);ec(b,this,L);nc(b,this.reset.bind(this));H(this)};h.reset=function(){this.g.Db=this.g.Db&-120|20;this.f.Ka=0};h.Dc=function(){var a=this.f.Ka;this.f.Ka&=-129;return a};h.rd=function(a){this.f.Ka=a;a&64&&rc(this.b,this.f.Rb,1E3/60);this.f.Ka=a&-129};h.wc=function(a){return(a?this.g.gd:this.g.data)&65535}; h.kd=function(a){this.g.data=a};h.Fc=function(){var a=this.b;return a.F&62337|a.wa<<5|a.xa<<1};h.td=function(a){var b=this.b;a&=62337;if(b.F!=a){b.F=a;b.wa=a>>5&3;b.xa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.La!=c&&(b.La=c,tc(b))}uc(this)};h.Gc=function(){var a=this.b.Na;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Hc=function(){return this.b.tb};h.Ic=function(){return this.b.Oa}; h.ud=function(a){var b=this.b;1170>b.ab&&(a&=-49);b.Oa!=a&&(b.Oa=a,a&16?(b.Za=4194303,b.ya=3915776):(b.Za=262143,b.ya=253952),tc(b));uc(this)};function uc(a){a.g.Db=a.g.Db&-8|(a.b.La?a.b.Oa&16?1:2:4)}h.Wc=function(a){return this.b.P[1][a>>1&7]};h.Id=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Uc=function(a){return this.b.P[1][(a>>1&7)+8]};h.Gd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Vc=function(a){return this.b.ta[1][a>>1&7]}; h.Hd=function(a,b){b=b>>1&7;this.b.ta[1][b]=a;this.b.P[1][b]&=65295};h.Tc=function(a){return this.b.ta[1][(a>>1&7)+8]};h.Fd=function(a,b){b=(b>>1&7)+8;this.b.ta[1][b]=a;this.b.P[1][b]&=65295};h.Cc=function(a){return this.b.P[0][a>>1&7]};h.qd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.Ac=function(a){return this.b.P[0][(a>>1&7)+8]};h.od=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.Bc=function(a){return this.b.ta[0][a>>1&7]};h.pd=function(a,b){b=b>>1&7;this.b.ta[0][b]=a;this.b.P[0][b]&=65295}; h.zc=function(a){return this.b.ta[0][(a>>1&7)+8]};h.nd=function(a,b){b=(b>>1&7)+8;this.b.ta[0][b]=a;this.b.P[0][b]&=65295};h.bd=function(a){return this.b.P[3][a>>1&7]};h.Od=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.$c=function(a){return this.b.P[3][(a>>1&7)+8]};h.Md=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.ad=function(a){return this.b.ta[3][a>>1&7]};h.Nd=function(a,b){b=b>>1&7;this.b.ta[3][b]=a;this.b.P[3][b]&=65295};h.Zc=function(a){return this.b.ta[3][(a>>1&7)+8]}; h.Ld=function(a,b){b=(b>>1&7)+8;this.b.ta[3][b]=a;this.b.P[3][b]&=65295};h.fb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.kb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Nc=function(){return this.b.L&49152?this.b.va[0]:this.b.u[6]};h.zd=function(a){this.b.L&49152?this.b.va[0]=a:this.b.u[6]=a};h.Qc=function(){return this.b.u[7]};h.Cd=function(a){this.b.u[7]=a};h.gb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]}; h.lb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Oc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[1]};h.Ad=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[1]=a};h.Pc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[3]};h.Bd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[3]=a};h.yc=function(a){return this.b.gc[a-65504>>1]};h.md=function(a,b){this.b.gc[b-65504>>1]=a};h.dc=function(a){return 65520==a?61183:0};h.jc=function(){}; h.Yc=function(){return 1};h.Kd=function(){};h.xc=function(){return this.b.Z};h.ld=function(){this.b.Z=0};h.Ec=function(){return this.b.fc};h.sd=function(a,b){b&1||(a&=255);this.b.fc=a};h.Jc=function(a){return a?this.b.Pb:0};h.vd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Pb=a;b.G|=2};h.Xc=function(a){return a?this.b.Pa&65280:0};h.Jd=function(a){this.b.Pa=a|255};h.Mc=function(){return Lb(this.b)};h.yd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.G|=128}; h.ic=function(a,b){D(this)&&C(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; var M={},L=(M[62592]=[null,null,K.prototype.Wc,K.prototype.Id,"SISDR",1145],M[62608]=[null,null,K.prototype.Uc,K.prototype.Gd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Vc,K.prototype.Hd,"SISAR",1145],M[62640]=[null,null,K.prototype.Tc,K.prototype.Fd,"SDSAR",1145],M[62656]=[null,null,K.prototype.Cc,K.prototype.qd,"KISDR",1145],M[62672]=[null,null,K.prototype.Ac,K.prototype.od,"KDSDR",1145],M[62688]=[null,null,K.prototype.Bc,K.prototype.pd,"KISAR",1145],M[62704]=[null,null,K.prototype.zc,K.prototype.nd, "KDSAR",1145],M[62798]=[null,null,K.prototype.Ic,K.prototype.ud,"MMR3",1145],M[65382]=[null,null,K.prototype.Dc,K.prototype.rd,"LKS"],M[65400]=[null,null,K.prototype.wc,K.prototype.kd,"CNSL"],M[65402]=[null,null,K.prototype.Fc,K.prototype.td,"MMR0",1145],M[65404]=[null,null,K.prototype.Gc,K.prototype.ic,"MMR1",1145],M[65406]=[null,null,K.prototype.Hc,K.prototype.ic,"MMR2",1145],M[65408]=[null,null,K.prototype.bd,K.prototype.Od,"UISDR",1145],M[65424]=[null,null,K.prototype.$c,K.prototype.Md,"UDSDR", 1145],M[65440]=[null,null,K.prototype.ad,K.prototype.Nd,"UISAR",1145],M[65456]=[null,null,K.prototype.Zc,K.prototype.Ld,"UDSAR",1145],M[65472]=[null,null,K.prototype.fb,K.prototype.kb,"R0SET0"],M[65473]=[null,null,K.prototype.fb,K.prototype.kb,"R1SET0"],M[65474]=[null,null,K.prototype.fb,K.prototype.kb,"R2SET0"],M[65475]=[null,null,K.prototype.fb,K.prototype.kb,"R3SET0"],M[65476]=[null,null,K.prototype.fb,K.prototype.kb,"R4SET0"],M[65477]=[null,null,K.prototype.fb,K.prototype.kb,"R5SET0"],M[65478]= [null,null,K.prototype.Nc,K.prototype.zd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Qc,K.prototype.Cd,"R7KERNEL"],M[65480]=[null,null,K.prototype.gb,K.prototype.lb,"R0SET1",1145],M[65481]=[null,null,K.prototype.gb,K.prototype.lb,"R1SET1",1145],M[65482]=[null,null,K.prototype.gb,K.prototype.lb,"R2SET1",1145],M[65483]=[null,null,K.prototype.gb,K.prototype.lb,"R3SET1",1145],M[65484]=[null,null,K.prototype.gb,K.prototype.lb,"R4SET1",1145],M[65485]=[null,null,K.prototype.gb,K.prototype.lb,"R5SET1",1145], M[65486]=[null,null,K.prototype.Oc,K.prototype.Ad,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Pc,K.prototype.Bd,"R6USER",1145],M[65504]=[null,null,K.prototype.yc,K.prototype.md,"CTRL",1170],M[65520]=[null,null,K.prototype.dc,K.prototype.jc,"LSIZE",1170],M[65522]=[null,null,K.prototype.dc,K.prototype.jc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Yc,K.prototype.Kd,"SYSID",1170],M[65526]=[null,null,K.prototype.xc,K.prototype.ld,"CPUERR",1170],M[65528]=[null,null,K.prototype.Ec,K.prototype.sd, "MB",1170],M[65530]=[null,null,K.prototype.Jc,K.prototype.vd,"PIR"],M[65532]=[null,null,K.prototype.Xc,K.prototype.Jd,"SL"],M[65534]=[null,null,K.prototype.Mc,K.prototype.yd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];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];Ta(function(){for(var a=B(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.A,0,d>>2),Dc(this,zc?Ec:Fc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ma:function(a,b){a&1&&oc(this.w,b);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},sa: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.Ja=!0},T:function(a,b){if(this.i&&null!=this.C){var c=this.i;Kc(c,this.C+a,1,c.M)&&c.da(!0)}return this.Mb(a,b)},ba:function(a,b){if(this.i&&null!=this.C){var c=this.i;Kc(c,this.C+a,2,c.M)&&c.da(!0)}return this.Nb(a,b)},qa:function(a,b,c){if(this.i&&null!=this.C){var d=this.i;Kc(d,this.C+a, 1,d.B)&&d.da(!0)}this.f?this.D(a,b,c):this.Sb(a,b,c)},xa:function(a,b,c){if(this.i&&null!=this.C){var d=this.i;Kc(d,this.C+a,2,d.B)&&d.da(!0)}this.f?this.D(a,b,c):this.Tb(a,b,c)},R:function(a){return this.B[a]},U:function(a,b){a=this.B[a];this.i&&D(this.i,128)&&C(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},aa:function(a,b){a&1&&oc(this.w,b);return this.F.getUint16(a,!0)},fa:function(a,b){a&1&&oc(this.w,b);a=this.J[a>>1];this.i&&D(this.i,128)&&C(this.i,"Memory.readWord("+ J(this.i,b)+"): "+J(this.i,a),!0);return a},pa:function(a,b){this.B[a]=b;this.Ja=!0},Ra:function(a,b,c){this.B[a]=b;this.Ja=!0;this.i&&D(this.i,128)&&C(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&oc(this.w,c);this.F.setUint16(a,b,!0);this.Ja=!0},ya:function(a,b,c){a&1&&oc(this.w,c);this.J[a>>1]=b;this.Ja=!0;this.i&&D(this.i,128)&&C(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; function Sb(a,b,c){a.i=b;a.g=a.I=0;c&&((a.g=c.g)&&Jc(a,Ic,!1),(a.I=c.I)&&Hc(a,Ic,!1))}function Lc(a,b){b?--a.I||(a.Hb=a.f?a.D:a.Sb,a.wb=a.f?a.H:a.Tb):--a.g||(a.Eb=a.Mb,a.oa=a.Nb)}function Hc(a,b,c){c&&a.I||(a.Hb=!a.f&&b[1]||a.D,a.wb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Sb=b[1]||a.D,a.Tb=b[3]||a.H}function Jc(a,b,c){c&&a.g||(a.Eb=b[0]||a.K,a.oa=b[2]||a.M);if(c||void 0===c)a.Mb=b[0]||a.K,a.Nb=b[2]||a.M}function Dc(a,b){b||(b=Mc);Jc(a,b,void 0);Hc(a,b,void 0)} var Mc=[],Gc=[I.prototype.V,I.prototype.sa,I.prototype.ma,I.prototype.Wa],Ic=[I.prototype.T,I.prototype.qa,I.prototype.ba,I.prototype.xa];if(sb)var Fc=[I.prototype.R,I.prototype.pa,I.prototype.aa,I.prototype.wa],Ec=[I.prototype.U,I.prototype.Ra,I.prototype.fa,I.prototype.ya]; function Nc(a,b){r.call(this,"CPU",a,Nc,1);var c=a.multiplier||1;this.Ga=a.cycles||b;this.Ma=c;this.Ya=Math.round(this.Ga/1E4)/100;this.Ua=this.Ya*this.Ma;this.v.ca=!1;this.v.Qb=!1;this.v.mb=a.autoStart;this.v.$a=!1;this.qb=this.ma=0;this.rb=a.csStart;this.bb=a.csInterval;this.cb=a.csStop;this.K=[];this.bc=this.fd.bind(this);H(this)}u(Nc);var Oc=["power","reset"];h=Nc.prototype; h.Ca=function(a,b,c,d){this.D=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.bb,c=!0);0<=a.cb&&a.cb<=Uc(a)&&(a.bb=a.cb=-1,Rc(a),a.da(),c=!0);c&&a.j(Uc(a)+" cycles: checksum="+l(a.qb))}} h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ha)a=!0;else{var b=null,c,k=kb(a.id);for(c=0;ca.V/a.Ua?b=1:d=!0;a.Ma=b;b=a.Ya*a.Ma;if(a.Ua!=b){a.Ua=b;b=a.Ua.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.D&&a.D.ub()}Wc(a,a.T);a.T=0;a.R=za();a.aa=0;Xc(a);return d}function pc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function rc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Ga*a.Ma/1E3*c|0,a.K[b][0]=c+Yc(a))} function Zc(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function $c(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Yc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} h.fd=function(){if(this.v.ca){this.nb>=this.Ga&&Xc(this,!0);this.sa=0;this.Fa=za();if(this.aa){var a=this.Fa-this.aa;a>this.Ab&&(this.R+=a,this.R>this.Fa&&(this.R=this.Fa))}try{do{var b=Zc(this,this.v.$a?1:this.Qa);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=Yc(this,!0);this.sa+=b;this.T+=b;Tc(this,b);$c(this,b);this.pa-=b;if(0>=this.pa){this.pa+=this.Qa;15<=++this.Cb&&(this.D&&this.D.$(),this.Cb=0);break}}while(this.v.ca)}catch(e){this.da();this.D&&this.D.stop(za(),Uc(this));rb(this, e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.bc;this.aa=za();var c=this.Ab;this.sa&&(c=Math.round(c*this.sa/this.Qa));var c=c-(this.aa-this.Fa),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Vc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.nb+=this.sa;this.aa+=c;a(b,c)}}}; h.ib=function(a){if(qb(this))return!1;if(this.v.ca)return this.j(this.toString()+" busy"),!1;Vc(this);this.v.ca=!0;this.v.Qb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.ub(!0),this.D.start(this.R,Uc(this)));setTimeout(this.bc,0);return!0};h.jb=function(){return 0};h.da=function(a){if(this.v.ca){Yc(this);Wc(this,this.T);this.T=0;this.v.ca=!1;var b=this.I.run;b&&(b.textContent="Run");this.D&&this.D.stop(za(),Uc(this))}this.v.complete=a}; function ad(a){this.ab=+a.model||1170;this.xb=a.addrReset||0;Nc.call(this,a,6666667);this.decode=1120==this.ab?bd.bind(this):cd.bind(this);dd(this);this.A=0;this.U=null;this.v.complete=this.v.oc=!1}u(ad,Nc);h=ad.prototype;h.reset=function(){this.status("model "+this.ab);this.v.ca&&this.da();dd(this);Qc(this);this.v.error=!1;this.parent.reset.call(this)}; function dd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.xb];a.Ea=[0,0,0,0,0,0];a.va=[0,0,0,0];a.B=0;a.xa=0;a.sc=[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],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ta=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.uc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.gc=[0,0,0,0,0,0,0,0];a.fc=0;a.G=0;a.H=a.J=0;a.g=a.f=a.Xa=0;a.qa=-1;ed(a)}function ed(a){a.Pa=255;a.Z=0;a.Pb=0;a.F=0;a.Na=0;a.tb=0;a.Oa=0;a.La=0;a.wa=0;a.Za=262143;a.ya=253952;a.G|=2;a.w&&tc(a)}function tc(a){a.La?(a.M=65536,a.Y=a.rc,a.oa=a.cd,a.wb=a.Pd,Vb(a.w,a.Oa&16?22:18)):(a.M=0,a.Y=a.qc,a.oa=a.ec,a.wb=a.kc,Vb(a.w,16))}h.Zb=function(){return 0}; h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ma]);a.set(2,cc(this.w));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Vc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.B!=c&&(a.va[c]=a.u[6],a.u[6]=a.va[a.B]);a.L=b;a.G|=2}function P(a,b){a.G&128||(a.S=a.X=b,a.O=0)}function Dd(a,b,c){a.G&128||(a.S=a.X=a.N=b,a.O=c||0)}function Ed(a,b,c,d){a.G&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Fd(a,b){a.G&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)} function Gd(a,b,c,d){a.G&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))}h.ea=function(a,b){if(!this.A){var c=!1;0>this.qa?this.qa=Lb(this):this.B||(a=4,c=!0);this.F&57344||(this.Na=63222,this.tb=a);this.B=0;var d=this.oa(a|this.M),e=this.oa(a+2&65535|this.M);vc(this,e&-12289|this.qa>>2&12288);c&&(this.Z|=4,this.u[6]=4);Hd(this,this.qa);Hd(this,this.u[7]);O(this,d);this.G&=-113;this.qa=-1;if(26!=b)throw a;}};function Id(a){var b=Jd(a),c=Jd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);O(a,b);vc(a,c);a.G&=-17} function Kd(a,b,c){var d,e,f,g=0;d=b>>13;a.Oa&a.sc[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ta[a.B][d]<<6)+(b&8191)&a.Za;if(ff){if(3932160<=f){f&=262143;var k=f>>13&31;31>k?a.Oa&32&&(f=a.uc[k]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.ya&&4186112>f&&(a.Z|=32,a.ea(4,12))}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(4194170!==f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.ea(168,16)),a.F&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.oa(e)|g; a.b-=8;break;case 6:return e=a.oa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.oa(Cd(a,2)),e=e+a.u[c]&65535,e=a.oa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Na=a.Na<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Pa||65534<=a.u[6])&&(a.u[6]<=a.Pa-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.G|=64));return e}h.Bb=function(a){if(!this.La)return this.w.Bb(a);this.A++;a=Ld(this,Kd(this,a,3));this.A--;return a}; h.pb=function(a){if(!this.La)return this.w.pb(a);this.A++;a=this.ec(Kd(this,a,2));this.A--;return a};h.hb=function(a,b){this.La?(this.A++,Md(this,Kd(this,a,5),b),this.A--):this.w.hb(a,b)};h.Gb=function(a,b){this.La?(this.A++,this.kc(Kd(this,a,4),b),this.A--):this.w.Gb(a,b)};h.qc=function(a,b,c){return Nd(this,a,b,c)};h.rc=function(a,b,c){return Kd(this,Nd(this,a,b,c),c)};h.ec=function(a){return this.w.na(a)};h.cd=function(a){return this.w.na(Kd(this,a,2))};h.kc=function(a,b){this.w.Va(a,b&65535)}; h.Pd=function(a,b){this.w.Va(Kd(this,a,4),b)};function Od(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Nd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.B=a.L>>12&3,c=a.oa(d|c&a.M),a.B=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.va[a.L>>12&3];return c}function Pd(a,b,c,d){a.F&57344||(a.Na=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Nd(a,b,e,4),c&65536||(e&=65535),a.B=a.L>>12&3,e=Kd(a,e|c&65536,4),a.B=a.L>>14&3,a.w.Va(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.va[a.L>>12&3]=d} function Qd(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?Ld(a,a.Y(b,c,3)):a.u[c]&255}function Rd(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?a.w.na(a.Y(b,c,2)):a.u[c]}function Sd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Nd(a,b,c,8)}function Td(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Ld(a,a.Y(b,c,3)):a.u[c]&255}function Ud(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.na(a.Y(b,c,2)):a.u[c]} function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Xa=a.Y(b,e,7),Md(a,e,d.call(a,c,Ld(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Y(b,e,6),a.w.Va(e,d.call(a,c,a.w.na(e)))):a.u[e]=d.call(a,c,a.u[e])}function Vd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Md(a,a.Y(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Wd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.Va(a.Y(b,d,4),c):a.u[d]=c&65535;return c} function S(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} h.jb=function(a){this.v.complete=!0;var b=this.v.oc=this.i&&Xd(this.i),c=a?this.v.Qb?0:1:-1;this.v.Qb=!1;this.ba=this.b=a;do{if(b){if(Yd(this.i,this.u[7],c)){this.da();break}c=1}if(this.G&&(this.G&112&&(this.G&32?this.ea(168,28):this.G&64?this.ea(4,30):this.G&16&&this.ea(12,32),this.G&=-113),this.G&7))if(this.G&2){this.G&=-3;var d=160,e=(this.Pb&224)>>5;if(a=this.U&&this.U.eb>e?this.U:null)d=a.jd,e=a.eb;e>(this.L&224)>>5?(this.G&4&&(Cd(this,2),this.G&=-5),this.ea(d,26),e=!0):e=!1;if(e&&a)if(e=this.U, e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.G&1&&this.G++;this.G=this.G&7|this.L&16;this.decode(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function de(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ee(a,b){a=b&~a;P(this,a);return a}function fe(a,b){a=b&~a;P(this,a<<8);return a}function ge(a,b){a|=b;P(this,a);return a}function he(a,b){a|=b;P(this,a<<8);return a}function ie(a,b){a=~b|65536;Dd(this,a);return a&65535} function je(a,b){a=~b|256;Dd(this,a<<8);return a&255}function ke(a,b){a=b-a;this.G&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function le(a,b){a=b-a;var c=a<<8;b<<=8;this.G&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function me(a,b){a=b+a;this.G&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function ne(a,b){a=b+a;var c=a<<8;this.G&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255}function oe(a,b){a=-b;Dd(this,a,a&b&32768);return a&65535} function pe(a,b){a=-b;Dd(this,a<<8,(a&b&128)<<8);return a&255}function qe(a,b){a=b<<1|this.N>>16&1;Fd(this,a);return a&65535}function re(a,b){a=b<<1|this.N>>16&1;Fd(this,a<<8);return a&255}function se(a,b){a=(this.N&65536|b)>>1|b<<16;Fd(this,a);return a&65535}function te(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Fd(this,a<<8);return a&255}function ue(a,b){var c=b-a;Gd(this,c,a,b);return c&65535}function ve(a,b){var c=b-a;Gd(this,c<<8,a<<8,b<<8);return c&255} function we(a,b){this.G&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function xe(a,b){a^=b;P(this,a);return a&65535}function ye(a){R(this,a,Rd(this,a),Zd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function ze(a){var b=Ud(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.g?6:7)+b} function Ae(a){var b=Ud(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=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.S=d>>16;this.X=d>>16|d;this.b-=(this.g?6:7)+b}function Be(a){S(this,a,!fd(this))}function Ce(a){S(this,a,fd(this))} function De(a){R(this,a,Rd(this,a),ee);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){Q(this,a,Qd(this,a),fe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Fe(a){R(this,a,Rd(this,a),ge);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ge(a){Q(this,a,Qd(this,a),he);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function He(a){P(this,Rd(this,a)&Ud(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ie(a){P(this,(Qd(this,a)&Td(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Je(a){S(this,a,Ad(this))}function Ke(a){S(this,a,!this.Da()==!gd(this))}function Le(a){S(this,a,!Ad(this)&&!this.Da()==!gd(this))}function Me(a){S(this,a,!fd(this)&&!Ad(this))}function Ne(a){S(this,a,Ad(this)||!this.Da()!=!gd(this))} function Oe(a){S(this,a,fd(this)||Ad(this))}function Pe(a){S(this,a,!this.Da()!=!gd(this))}function Qe(a){S(this,a,this.Da())}function Re(a){S(this,a,!Ad(this))}function Se(a){S(this,a,!this.Da())}function Te(){this.ea(12,1);this.b-=5}function Ue(a){S(this,a,!0)}function Ve(a){S(this,a,!gd(this))}function We(a){S(this,a,gd(this))}function T(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} function Xe(a){var b=Rd(this,a);a=Ud(this,a);Gd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ye(a){var b=Qd(this,a)<<8;a=Td(this,a)<<8;Gd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} function Ze(a){var b=Ud(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=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.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function $e(){this.ea(24,2);this.b-=25}function af(){this.L&49152?(this.Z|=128,this.ea(4,3)):this.da();this.b-=7} function bf(){this.ea(16,4);this.b-=25}var cf=[0,7,7,10,7,11,9,13];function df(a){var b=this.b;O(this,Sd(this,a));this.b=b-cf[this.g]}var ef=[0,14,14,17,14,18,16,20];function ff(a){var b=this.b,c=Sd(this,a);a=a>>6&7;Hd(this,this.u[a]);this.u[a]=this.u[7];O(this,c);this.b=b-ef[this.g]}var gf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function hf(a){var b=Rd(this,a),c=this.b;P(this,Wd(this,a,b));this.b=c-gf[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)} function jf(a){var b=Qd(this,a);P(this,Vd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var kf=[7,13,13,17,14,18,17,21];function lf(a){var b=Ud(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.G&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function rf(a){R(this,a,Rd(this,a),ue);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function sf(a){R(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)}function tf(){this.ea(28,5);this.b-=5}function uf(){this.G&4||this.D.$();this.G|=4;Cd(this,-2);this.b-=3}function vf(a){R(this,a,Rd(this,a),xe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,C(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ea(8,6)}function bd(a){wf[a>>12].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)}function zf(a){Af[a>>6&3].call(this,a)} function Bf(a){Cf[a>>6&3].call(this,a)}function Df(a){Ef[a&15].call(this,a)}function Ff(a){Gf[a&15].call(this,a)}function Hf(a){If[a>>6&3].call(this,a)}function Jf(a){Kf[a>>6&3].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)} var wf=[function(a){fg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,ye,V,function(a){gg[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,rf,V],fg=[function(a){hg[a>>4&15].call(this,a)},Ue,Re,Je,Ke,Pe,Le,Ne,ff,ff,xf,zf,Bf,V,V,V],yf=[function(a){Dd(this,Wd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ke);this.b-=this.g?9:3+(7==this.f?2:0)}],Af=[function(a){R(this,a,0, oe);this.b-=this.g?11:6},function(a){R(this,a,fd(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,fd(this)?1:0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ud(this,a);Dd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Cf=[function(a){R(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)}], hg=[function(a){ig[a&15].call(this,a)},V,V,V,df,df,df,df,pf,V,Df,Ff,sf,sf,sf,sf],ig=[af,uf,of,Te,bf,nf,V,V,V,V,V,V,V,V,V,V],Ef=[mf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},T,function(){this.X=1;this.b-=5},T,T,T,function(){this.S=0;this.b-=5},T,T,T,T,T,T,T],Gf=[mf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],gg=[Se,Qe,Me,Oe,Ve,We,Be,Ce,$e,tf,Hf,Jf,Lf,V,V,V],If=[function(a){Dd(this, Vd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,le);this.b-=this.g?9:3+(7==this.f?2:0)}],Kf=[function(a){Q(this,a,0,pe);this.b-=this.g?11:6},function(a){Q(this,a,fd(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,fd(this)?1:0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Td(this,a);Dd(this,a<<8);this.b-=this.g?4:3+(7== this.f?2:0)}],Mf=[function(a){Q(this,a,0,te);this.b-=this.g?9+(this.Xa&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.g?9+(this.Xa&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)}];function cd(a){jg[a>>12].call(this,a)} var jg=[function(a){kg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,ye,function(a){lg[a>>8&15].call(this,a)},function(a){mg[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,rf,V],kg=[function(a){ng[a>>4&15].call(this,a)},Ue,Re,Je,Ke,Pe,Le,Ne,ff,ff,xf,zf,Bf,function(a){og[a>>6&3].call(this,a)},V,V],og=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.oa(a|this.M);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Od(this,a,0);Hd(this,a);P(this,a);this.b-=11},function(a){var b=Jd(this),c= this.b;Pd(this,a,0,b);P(this,b);this.b=c-kf[this.g]},function(a){P(this,Wd(this,a,this.Da?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ng=[function(a){pg[a&15].call(this,a)},V,V,V,df,df,df,df,pf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.G|=1),this.b-=5):V.call(this,a)},Df,Ff,sf,sf,sf,sf],pg=[af,uf,of,Te,bf,nf,function(){Id(this);this.b-=13},V,V,V,V,V,V,V,V,V],lg=[lf,lf,Ze,Ze,ze,ze,Ae,Ae,vf,vf,V,V,V,V,qf,qf],mg=[Se,Qe,Me,Oe,Ve,We,Be,Ce,$e,tf,Hf,Jf,Lf,function(a){qg[a>>6&3].call(this, a)},V,V],qg=[V,function(a){a=Od(this,a,65536);Hd(this,a);P(this,a);this.b-=11},function(a){var b=Jd(this),c=this.b;Pd(this,a,65536,b);P(this,b);this.b=c-kf[this.g]},V]; function rg(a){r.call(this,"ROM",a,rg);this.ka=this.f=null;this.B=a.addr;this.g=a.size;this.A=a.alias;this.D=a.file;this.F=oa(this.D);if(this.D){a=this.D;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.D+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ga("Unable to load ROM resource (error "+f+": "+a+")"):(jb(c.Ra,a,b),(a=Ca(a,b))?(c.f=a.ja,c.ka=a.ka):c.D=null,sg(c))})}}u(rg);rg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;sg(this)}; rg.prototype.Aa=function(){if(this.ka){if(this.i){var a=this.i,b=this.id,c=this.B,d=this.g,e=this.ka,f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var m=k.o,p=k.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=ya(q,m,a.Vb);0>v&&q.splice(-(v+1),0,m)}p&&(k.a=p.replace(/''/g,'"'))}a.F.push({Ud:b,C:c,vc:d,ka:e,Ub:f})}delete this.ka}return!0};rg.prototype.za=function(){return!0}; function sg(a){if(!pb(a)){if(a.D){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)rb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.B;if(Yb(a.w,b,a.g,Cc)){var c;for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=va(b[0]);if(c!=this.Wa)return;b=va(b[1]);if(this.J=lb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.Ra+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; h.za=function(a){return a?this.save():!0};h.reset=function(){yg(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return yg(this)};function yg(a){a.R=0;a.f=0;a.g=128;a.B=[];return!0}h.Ob=function(a){if("number"==typeof a)this.B.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.T||8,c=a-this.H%a,this.T&&(b=ua("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;rc(this.b,this.V,1)}};var zg={},xg=(zg[65392]=[null,null,X.prototype.Sc,X.prototype.Ed,"RCSR"],zg[65394]=[null,null,X.prototype.Rc,X.prototype.Dd,"RBUF"],zg[65396]=[null,null,X.prototype.ed,X.prototype.Rd,"XCSR"],zg[65398]=[null,null,X.prototype.dd,X.prototype.Qd,"XBUF"],zg);Ta(function(){for(var a=B(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.I[b]=c,!0;case "loadTape":return this.I[b]=c,c.onclick=function(){var a=d.I.listTapes;a&&Bg(d, a.options[a.selectedIndex].text,a.value)},!0;case "mountTape":if(this.H)return this.I[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;Bg(d,oa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; h.Ca=function(a,b,c,d){this.D=a;this.w=b;this.b=c;this.i=d;if((this.f=Pc(this.D,"autoMount")||this.f)&&"string"==typeof this.f)try{this.f=eval("("+this.f+")")}catch(e){n("PC11 auto-mount error: "+e.message+" ("+this.f+")"),this.f=null}ec(b,this,Cg);Dg(this,"None","",!0);this.H&&Dg(this,"Local Tape","?");Dg(this,"Remote Tape","??");Eg(this)||H(this)};h.Aa=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.za=function(a){return a?this.save():!0}; h.reset=function(){this.g&=-2241;this.J=0};function Eg(a){a.A=0;if(a.f){var b=a.f.path,c;if(!(c=a.f.name))a:{if((c=a.I.listTapes)&&c.options)for(var d=0;dc.indexOf("/api/v1/dump")&&(d=pa(c),e="json"==d||"gz"==d?encodeURI(c):ra()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ba(e,null,!0,function(d,e,f){var g=0>f&&a.D&&!a.D.v.ha;f?a.ga('Unable to load tape "'+b+'" (error '+f+": "+d+")",g):(jb(a.Ra,d,e),Ca(d,e)&&(a.B=c));a.v.Ia=!1;a.A&&(a.A--,a.A|| H(a));Ig(a)})}function Dg(a,b,c,d){if((a=a.I.listTapes)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Kg.prototype.$b=function(){return-1};Kg.prototype.ac=function(){}; function Mg(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+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(va(b.substring(c,f))),c=f+1}}return a} function Ng(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 Og(a,b,c){var d;if(b){b=Pg(a,b);for(var e=0,f=!1,g=b,k=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Sg(a,b){if(b)return Rg(a,b,a.aa[b]);var c=0;for(b in a.aa)Rg(a,b,a.aa[b]),c++;return 0this.b.ab?ah:[];bh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(ch(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ia;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.j("..."):(c=q.type,p=bc[c],q&&d.j(l(q.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.ac=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.va[a-16]:20==a&&(b=Lb(this.b)));return b}; h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.tb).C));this.la&1073741824?this.wa.push(a):this.sa&&a==this.sa||(this.sa=a,this.la&-2147483648&&(this.da(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,Yc(a),a.pa=0,a.D.$()))}; function Vg(a){var b;if(Xd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.ia],!1)}a.M=["br"];if(a.B)for(b=1;b>>d.ia],!0);a.B=["bw"];a.Xa=0} h.Sa=function(a,b,c){var d=!0;c||mh(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.j("invalid address: "+J(this,b.C)),d=!1;else{var f=this.w;f.W[e>>>f.ia].Sa(e&f.w,a==this.B)}}d&&(a.push(b),c?b.Ba=!0:(nh(this,a,a.length-1,"set"),Vg(this)));return d};function mh(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ia],b==a.B));k.Ba||Vg(a);break}}return f} function oh(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==F)w=w.C-((f&63)<<1)&65535,y=J(x,w);else if(12288==F)y=J(x,f&7,1);else if(24576==F)y=J(x,f&63,1);else if(F=f&E,E&4032&&(F>>=6,E>>=6),E&63)switch(E=F&7,F&56){case 0:y= hh(E);break;case 8:y="@"+hh(E);break;case 16:7>E?y="("+hh(E)+")+":(F=x.na(w,2),y="#"+J(x,F,0,!0));break;case 24:7>E?y="@("+hh(E)+")+":(F=x.na(w,2),y="@#"+J(x,F,0,!0));break;case 32:y="-("+hh(E)+")";break;case 40:y="@-("+hh(E)+")";break;case 48:F=x.na(w,2);y=J(x,F,0,!0)+"("+hh(E)+")";7==E&&(y=[y,J(x,F+w.C&65535)]);break;case 56:F=x.na(w,2),y="@"+J(x,F)+"("+hh(E)+")",7==E&&(y=[y,J(x,F+w.C&65535)])}x=y;if(!x||!x.length){k="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=hh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.va[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function th(a){var b,c="";for(b=0;6>b;b++)c+=sh(a,b);c=c+"\n"+(sh(a,6)+sh(a,7)+sh(a,20));return c+=rh(a,"T")+rh(a,"N")+rh(a,"Z")+rh(a,"V")+rh(a,"C")}h.Vb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,k=f.vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.D.$();a.j("updated registers:")}a.j(th(a));c&&(a.K=Z(d.u[7]),kh(a,J(a,a.K.C)))}}function yh(a,b){b=va(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var p=k[0]+":";k[2]&&(p+=" "+k[2]);a.j(p)}k[3]&&(g=k[3],f=null);f=qh(a,b,g,f);a.j(f);a.K=b;e-=b.C-m;c++}}} function ph(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.U&&(a.j("ended assemble at "+J(a,a.T.C)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(pb(a)&&0q||"z"ja.length&&(a.j("note: only "+ja.length+" available"),Y=ja.length);ca-=Y;0>ca&&(null==ja[ja.length-1].C?(Y=ca+Y,ca=0):ca+=ja.length);var kd=[];"call"==Sf&&(vb=1E5,kd=["CALL"]);for(void 0!==Rf&&a.j(Y+" instructions earlier:");0=ja.length&&(ca=0);a.Ya=Y;Uf++;vb--}}Uf||(a.j("no "+Tf+"history available"),a.Ya=void 0)}else{var xb=ch(a,ia);if(xb){var fc=0;Fa&&("l"==Fa.charAt(0)&&(Fa=Fa.substr(1)||Sh),fc=Qg(a,Fa)>>>0,65536>4||1;Uh--&&0ic?String.fromCharCode(ic):".";gc--}yb&&(yb+="\n");yb+=ia+" "+ld+(0==Ab?" "+Xf:"")}yb&&a.j(yb);a.Qa=xb}}}}break;case "e":if("else"==g[0])break;var bb,nd,od,pd,qd=g[0],rd=g[1];"eb"==qd?(bb=1,nd=255,od=a.ob,pd=a.Fb):"e"==qd||"ew"==qd?(bb=2,nd=65535,od=a.na,pd=a.Va):rd=null;if(null==rd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var jc=ch(a,rd);if(jc)for(var kc=2;kc< g.length;kc++){var Bb=Og(a,g[kc]);if(void 0===Bb){a.j("unrecognized value: "+g[kc]);break}Bb&~nd&&a.j("warning: "+l(Bb)+" exceeds "+bb+"-byte value");var Vh=od.call(a,jc);a.j("changing "+J(a,jc.C)+" from "+J(a,Vh,bb)+" to "+J(a,Bb,bb));pd.call(a,jc,Bb,bb)}}break;case "g":a:{var Yf=g[1],Wh=b;if(void 0!==Yf){var sd=ch(a,Yf,!0);if(!sd)break a;gh(a,sd,Wh);a.Sa(a.f,sd,!0)}a.ib(!0,c)}break;case "h":a.v.ca?(c||a.j("halting"),a.da()):ob(a,!0)||c||a.j("already halted");break;case "i":if("if"==g[0]){var td; var Cb=b.substr(2),Cb=va(Cb);Og(a,Cb)?(c||a.j("true: "+Cb),td=!0):(c||a.j("false: "+Cb),td=!1);td||(d=!1);break}f=!0;break;case "k":var Xh=g[0];if("?"==g[1])a.j("stack trace commands:"),a.j("\tk\tshow frame addresses"),a.j("\tks\tshow symbol information");else{var ud=0,vd=Z(),Db=Z(a.b.u[6]);for(a.j("stack trace for "+J(a,Db.C));10>ud;){for(var Ga=null,Yh=256;65536>Db.C>>>0;){vd.C=a.na(Db,2);if(null==Db.C||!Yh--)break;if(!(vd.C&1)){for(var Zh=a,lc=vd,Zf=null,Eb=lc.C,$f=Eb,wd=1;6>=wd&&Eb;wd++){if(2< wd){lc.C=Eb;var mc=qh(Zh,lc);if(0<=mc.indexOf("JSR")){var ag=mc.indexOf(" ");if(Eb+(mc.indexOf(" ",ag+1)-ag-1)/2==$f){Zf=mc;break}}}Eb-=2}lc.C=$f;if(Ga=Zf)break}}if(!Ga||null==Ga)break;var bg=null;if("ks"==Xh){var cg=Ga.match(/[0-9A-F]+$/);cg&&(bg=xh(a,cg[0]))}Ga=ua(Ga,50)+" ;"+(bg||"stack="+J(a,Db.C));a.j(Ga);ud++}ud||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){xh(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var xa=0;if("all"== G)xa=1878917119,G=null;else if("on"==G)la=!0,G=null;else if("off"==G)la=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(ka in tb)if(G==ka){xa=tb[ka];la=!!(a.la&xa);break}if(!xa){a.j("unknown message category: "+G);break a}}if(xa)if("on"==g[2])a.la|=xa,la=!0;else if("off"==g[2]&&(a.la&=~xa,la=!1,1073741824==xa)){for(var xd=0;xd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bDh){if(Fh(d,this.J)){this.B=new N(this,"1.30.1","failsafe");Fh(this.B)&&(Kh(this,d),a=2,Lh(this.B));this.B.set("timestamp",Aa());Mh(this.B);var e=this.f&&!this.F;if(1==a||Da("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Jh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Fh(d,g):("error"== f&&"no machine state"!=g?(this.ga("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.g=null)):this.j(f+": "+g),Lh(d),Fh(d)?(c=Jh(d),e=!0):c=!1))}e&&Ih(this,c?d:null)}else 2==a&&d.clear()}else Ih(this);delete this.J;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(Nh(this,this.b,b,c,a),this.b.mb());this.T&&(Kh(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; function Kh(a,b){if(Da("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.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}} function Ah(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),k=Aa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.da(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var k=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ba(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 m=k[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);ei(a,b,c)}})}else c(a,null)} function fi(a,b,c,d){function e(a){if(void 0===k){var b=g&&B(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ta(a))}function f(a){e("Error: "+a);m&&(--Rh||Va(!0));m=!1}var g,k,m=!0;Rh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| (c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,k){k?ci(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--Rh||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Rh||Va(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ci(b,a,d,!0,e,p):di(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){Va(!1);return fi(a,b,c,d)};window.enableEvents=Va;window.sendEvent=Wa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map