diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/machine.xml index 2dbff9c67a..a97be9c258 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Test Machine diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index 040b60897e..2c7f044fba 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Test Machine diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index e2d9b618bc..b62519a07c 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -183,7 +183,7 @@ function ComputerPDP11(parmsComputer, parmsMachine, fSuspended) { } } - this.println(PDP11.APPNAME + " v" + (XMLVERSION || PDP11.APPVERSION) + "\n" + COPYRIGHT + "\n" + LICENSE); + this.println(PDP11.APPNAME + " v" + PDP11.APPVERSION + "\n" + COPYRIGHT + "\n" + LICENSE); this.println("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis "); @@ -1458,7 +1458,7 @@ ComputerPDP11.init = function() /* * In non-COMPILED builds, embedMachine() may have set XMLVERSION. */ - if (!COMPILED && PDP11.XMLVERSION) PDP11.APPVERSION = PDP11.XMLVERSION; + if (!COMPILED && XMLVERSION) PDP11.APPVERSION = XMLVERSION; var aeMachines = Component.getElementsByClass(document, PDP11.APPCLASS + "-machine"); diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 9089d93d4c..5e0ffd2c01 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -205,9 +205,7 @@ CPUStatePDP11.prototype.resetRegs = function() this.mmuMask = [ // mask to control I&D access for each mode 0x7, 0x7, 0x7, 0x7 ]; - /** - * @type {Array.} - */ + /** @type {Array.} */ this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; this.initMemoryAccess(); @@ -617,12 +615,30 @@ CPUStatePDP11.prototype.interrupt = function(delay, priority, vector, callback) } delay -= this.interruptQueue[i].delay; } - this.interruptQueue.splice(i + 1, 0, { - "delay": delay, - "priority": (priority << 5) & 0xe0, - "vector": vector, - "callback": callback - }); + /* + * NOTE regarding a Google Closure Compiler "bug": if an InterruptEvent is inserted into the + * interruptQueue with the named properties below, they will never be seen by the rest of the + * code, because the compiler renames all other property references EXCEPT these. + * + * this.interruptQueue.splice(i + 1, 0, { + * "delay": delay, + * "priority": (priority << 5) & 0xe0, + * "vector": vector, + * "callback": callback + * }); + * + * Perhaps if the inlined object had been explicitly @typed, that wouldn't have happened, but + * I'm playing it safe now: I've taken the object out-of-line, removed the quoted property names, + * and explicitly typed it. The compiler re-inlines the object with correctly renamed properties. + */ + /** @type {InterruptEvent} */ + var interruptEvent = { + delay: delay, + priority: (priority << 5) & 0xe0, + vector: vector, + callback: callback + }; + this.interruptQueue.splice(i + 1, 0, interruptEvent); } this.opFlags |= PDP11.OPFLAG.INTQ; }; diff --git a/versions/pdpjs/1.30.0/pdp11-dbg.js b/versions/pdpjs/1.30.0/pdp11-dbg.js index 69a789abe8..1e39dabd38 100644 --- a/versions/pdpjs/1.30.0/pdp11-dbg.js +++ b/versions/pdpjs/1.30.0/pdp11-dbg.js @@ -1,223 +1,230 @@ (function(){var k; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function ra(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} +function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={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 qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function r(a){window&&window.alert(a)}function sa(a){var b=!1;window&&(b=window.confirm(a));return b}var ua=null;function va(){if(null==ua){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ua=a}return ua}function wa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ca(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.pb=this.id:(this.dc=this.id.substr(0,b),this.pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Hb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Sa=void 0,Ta={}; -if(window){Sa||(Sa=window.location.search.substr(1));for(var Ua,Va=/\+/g,Wa=/([^&=]+)=?([^&]*)/g;Ua=Wa.exec(Sa);)Ta[decodeURIComponent(Ua[1].replace(Va," "))]=decodeURIComponent(Ua[2].replace(Va," "))}function Xa(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 y(a,b){b||(b=w);a.prototype=Xa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ya=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ya={},x=[];function Za(a,b,c){Ya[a]&&b&&(Ya[a][b]=c)}function $a(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.pb=this.id:(this.dc=this.id.substr(0,b),this.pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Hb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=w);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},x=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.B/this.Ca|0;this.C=this.w-1;this.Qa=[];this.F=null;this.Jb=this.Hc;a=new I;yb(a,this.j);this.O=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} -function Ab(a,b,c){var d=!1,e=this.controller,f=e.Qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):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.Qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} -function Bb(a,b){var c=-1,d=this.controller;(a=d.Qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} -function Cb(a,b,c){var d=!1,e=this.controller;if(a=e.Qa[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.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=xb.prototype;k.reset=function(){this.F&&this.F()}; -k.Hc=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; -function Db(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ub+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ub){n=l.size-(f-m);n>g&&(n=g);l.Ub=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Fb(1,f,g)}f=new I(f,n,a.Ca,d,e);yb(f,a.j,l);a.O[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Gb[d]+" at "+p(b,8,!0)),!0):Fb(2,b,c)} -k.jb=function(a){return this.O[(a&this.g)>>>this.ca].ub(a&this.f,a)};k.Ha=function(a){var b=a&this.f,c=(a&this.g)>>>this.ca;return b!=this.f?this.O[c].Ac(b,a):this.O[c++].ub(b,a)|this.O[c&this.C].ub(0,a+1)<<8};function Hb(a,b){var c=b&a.f,d=(b&a.g)>>>a.ca;return c!=a.f?a.O[d].jc(c,b):a.O[d++].Nb(c,b)|a.O[d&a.C].Nb(0,b+1)<<8}k.Rb=function(a,b){this.O[(a&this.g)>>>this.ca].Ab(a&this.f,b&255,a)}; -k.nb=function(a,b){var c=a&this.f,d=(a&this.g)>>>this.ca;c!=this.f?this.O[d].Gc(c,b&65535,a):(this.O[d++].Ab(c,b&255,a),this.O[d&this.C].Ab(0,b>>8&255,a+1))};function Ib(a){for(var b=0,c=[],d=0;d>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.B/this.Ca|0;this.C=this.w-1;this.Ra=[];this.F=null;this.Jb=this.Jc;a=new I;Bb(a,this.j);this.O=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ra[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} +function Db(a,b,c){var d=!1,e=this.controller,f=e.Ra[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):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.Ra[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} +function Eb(a,b){var c=-1,d=this.controller;(a=d.Ra[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} +function Fb(a,b,c){var d=!1,e=this.controller;if(a=e.Ra[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.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=Ab.prototype;k.reset=function(){this.F&&this.F()}; +k.Jc=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; +function Gb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ub+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ub){n=l.size-(f-m);n>g&&(n=g);l.Ub=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Ib(1,f,g)}f=new I(f,n,a.Ca,d,e);Bb(f,a.j,l);a.O[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Jb[d]+" at "+p(b,8,!0)),!0):Ib(2,b,c)} +k.jb=function(a){return this.O[(a&this.g)>>>this.ca].ub(a&this.f,a)};k.Ha=function(a){var b=a&this.f,c=(a&this.g)>>>this.ca;return b!=this.f?this.O[c].Bc(b,a):this.O[c++].ub(b,a)|this.O[c&this.C].ub(0,a+1)<<8};function Kb(a,b){var c=b&a.f,d=(b&a.g)>>>a.ca;return c!=a.f?a.O[d].kc(c,b):a.O[d++].Nb(c,b)|a.O[d&a.C].Nb(0,b+1)<<8}k.Rb=function(a,b){this.O[(a&this.g)>>>this.ca].Ab(a&this.f,b&255,a)}; +k.nb=function(a,b){var c=a&this.f,d=(a&this.g)>>>this.ca;c!=this.f?this.O[d].Ic(c,b&65535,a):(this.O[d++].Ab(c,b&255,a),this.O[d&this.C].Ab(0,b>>8&255,a+1))};function Lb(a){for(var b=0,c=[],d=0;d>5&3;c.xa=a>>1&15;c.Yb=a&257?a&1?6:4:0;Pb(c);a=c.F;a&1|256&&(b=this.b.lb&16?1:2);this.g.rb=this.g.rb&-8|b};k.Yc=function(){return Qb(this.b)};k.rd=function(a){Rb(this.b,a&-1809|Qb(this.b)&1808);this.b.D|=128}; -function Sb(a){var b=a.C,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.cd,drive:f,blocksize:256,mapped:0,maxblock:b.cb[f]*b.da[f],url:"rk"+f+".dsk"});b.R&=-129;switch(b.R>>1&7){case 0:b.Pb=2496;b.oa=0;b.R=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.cb[f]){b.oa|=32832;b.R|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.R|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;Tb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.cb[f])b.oa|= -32832,b.R|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.R|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;a.$b(b.ra[f],c,d,e);return}}b.Pb=f<<13|b.Pb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.R=b.R&65534|128;return!!(b.R&64)})}k.cd=function(a,b,c,d,e){var f=this.C;f.Ob=d&65535;f.R=f.R&-49|d>>12&48;f.Qb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.R|=49152;break;case 2:f.oa|=33792,f.R|=49152}L(this.b,20,5,144,function(){f.R=f.R&65534|128;return!!(f.R&64)})}; -function Ub(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:128,mapped:1,maxblock:b.cb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Jc[f]|b.ab&64;break;case 3:1==(b.fa&3)&&(b.ab=b.fa&4?b.ab+(b.fa&65408)&65408|b.fa<<2&64:b.ab-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.ab);break;case 4:b.Wa=b.ab;break;case 5:if(b.fa>>6>=b.cb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* -b.da[f]+(b.fa&63);d=(b.Ra&63)<<16|b.Gb;e=65536-b.Wa&65535;Tb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.cb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Ra&63)<<16|b.Gb;e=65536-b.Wa&65535;a.$b(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -k.dd=function(a,b,c,d,e){var f=this.w;f.Gb=d&65535;f.M=f.M&-49|d>>12&48;f.Ra=d>>16&63;f.fa=~~(c/f.da[b.La])<<6|c%f.da[b.La];f.ab=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Vb(a){a=a.B;a.T=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.$a=a.mc=0} -function Wb(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.ed,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.bb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Pa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Pa[b]*c.bb[0]+(c.Ea[b]>>8))* -c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;Tb(a,c.ra[b],d,e,f);return;case 57:if(c.Pa[b]>=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Pa[b]*c.bb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;a.$b(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} -k.ed=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.bb[0]);f.Ea[b.La]=e%f.bb[0]<<8|c%f.da[0];f.bc[b.La]=f.Pa[b.La]=d;f.mb|=1<=b.Tc-1&&(f.ta[b.La]|=1024);switch(a){case 1:f.Da|=512;f.T|=49152;break;case 2:f.Da|=2048,f.T|=49152}L(this.b,20,5,172,function(){f.ta[b.La]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; -function ec(a,b,c,d,e,f){var g=~~((f+c.Sa-1)/c.Sa),h=new XMLHttpRequest;2048>g&&d+2048g){b.ic(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.ic(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Va=0;this.C.R=128;this.w.M=128;Vb(this)}; -k.Ic=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.lc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.lc=d;f.D|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.gc[e]:(d=M(this,f.gc[e],a,b,c),0<=d&&(f.gc[e]=d));break;case 4194254:return a&1?f.P>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.P&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Oa[e]= -b),d=f.Oa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.P&2048?(0<=b&&(f.Oa[e]=b),d=f.Oa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.Ya;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.nd&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.C;switch(a&-2){case 4194048:d=M(this,e.Pb,a,b,c);0<=d&&(e.Pb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.R,a,b,c);0<=b&&0<=d&&(e.R=d&-36993|e.R&36992,e.R&1&&Sb(this));break;case 4194054:d=M(this,e.Qb,a,b,c);0<=d&&(e.Qb=d);break;case 4194056:d=M(this,e.Ob,a,b,c);0<=d&&(e.Ob=d); -break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Bc,a,b,c);0<=d&&(e.Bc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?Wb(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=M(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= -M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Vb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.kd[e];break;case 4193746:d=M(this,g.Cc,a,b,c);0<=d&&(g.Cc=d);break;case 4193748:d=M(this,g.Dc[e],a,b,c);0<=d&&(g.Dc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ld[e];break;case 4193754:d=M(this,g.Ec[e],a,b,c);0<=d&& -(g.Ec[e]=d);break;case 4193756:d=M(this,g.Pa[e],a,b,c);0<=d&&(g.Pa[e]=d&511);break;case 4193758:g.bc[e]=g.Pa[e];d=g.bc[e];break;case 4193760:d=g.hd[e];break;case 4193762:d=g.jd[e];break;case 4193764:d=g.fd[e];break;case 4193766:d=g.gd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.mc,a,b,c);0<=d&&(g.mc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Ra= -e.Ra&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Ub(this));break;case 4192514:d=M(this,e.Gb,a,b,c);0<=d&&(e.Gb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Ra,a,b,c);0<=d&&(e.Ra=d&63,e.M=e.M&-49|(e.Ra&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Zb[0]=d&4?15:7,f.Zb[1]=d&2?15:7,f.Zb[3]= +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];k=K.prototype;k.Oa=function(a,b,c,d){this.H=b;this.b=c;this.j=d;var e=this;this.f.pc=Pb(this.b,function(){e.f.Va|=128;e.f.Va&64&&(L(e.b,0,6,64),Qb(e.b,e.f.pc,1E3/60))});Mb(b,this,Rb);Nb(b,this.reset.bind(this),this.Kc.bind(this));G(this)};k.Xc=function(){var a=this.f.Va;this.f.Va&=-129;return a}; +k.pd=function(a){this.f.Va=a;a&64&&Qb(this.b,this.f.pc,1E3/60);this.f.Va=a&-129};k.Yc=function(){var a=this.b;return a.F&62337|a.wa<<5|a.xa<<1};k.qd=function(a){var b=4,c=this.b;c.F=a&=62337;c.wa=a>>5&3;c.xa=a>>1&15;c.Yb=a&257?a&1?6:4:0;Sb(c);a=c.F;a&1|256&&(b=this.b.lb&16?1:2);this.g.rb=this.g.rb&-8|b};k.Zc=function(){return Tb(this.b)};k.rd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.D|=128}; +function Vb(a){var b=a.C,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:256,mapped:0,maxblock:b.cb[f]*b.da[f],url:"rk"+f+".dsk"});b.R&=-129;switch(b.R>>1&7){case 0:b.Pb=2496;b.oa=0;b.R=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.cb[f]){b.oa|=32832;b.R|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.R|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;Wb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.cb[f])b.oa|= +32832,b.R|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.R|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;a.$b(b.ra[f],c,d,e);return}}b.Pb=f<<13|b.Pb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.R=b.R&65534|128;return!!(b.R&64)})}k.dd=function(a,b,c,d,e){var f=this.C;f.Ob=d&65535;f.R=f.R&-49|d>>12&48;f.Qb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.R|=49152;break;case 2:f.oa|=33792,f.R|=49152}L(this.b,20,5,144,function(){f.R=f.R&65534|128;return!!(f.R&64)})}; +function Xb(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.ed,drive:f,blocksize:128,mapped:1,maxblock:b.cb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Lc[f]|b.ab&64;break;case 3:1==(b.fa&3)&&(b.ab=b.fa&4?b.ab+(b.fa&65408)&65408|b.fa<<2&64:b.ab-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.ab);break;case 4:b.Wa=b.ab;break;case 5:if(b.fa>>6>=b.cb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* +b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;Wb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.cb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;a.$b(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +k.ed=function(a,b,c,d,e){var f=this.w;f.Gb=d&65535;f.M=f.M&-49|d>>12&48;f.Sa=d>>16&63;f.fa=~~(c/f.da[b.Ma])<<6|c%f.da[b.Ma];f.ab=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Yb(a){a=a.B;a.T=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.$a=a.nc=0} +function gc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.fd,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.bb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Qa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))* +c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;Wb(a,c.ra[b],d,e,f);return;case 57:if(c.Qa[b]>=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;a.$b(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} +k.fd=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.bb[0]);f.Ea[b.Ma]=e%f.bb[0]<<8|c%f.da[0];f.bc[b.Ma]=f.Qa[b.Ma]=d;f.mb|=1<=b.Vc-1&&(f.ta[b.Ma]|=1024);switch(a){case 1:f.Da|=512;f.T|=49152;break;case 2:f.Da|=2048,f.T|=49152}L(this.b,20,5,172,function(){f.ta[b.Ma]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; +function hc(a,b,c,d,e,f){var g=~~((f+c.Ta-1)/c.Ta),h=new XMLHttpRequest;2048>g&&d+2048g){b.jc(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.jc(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Va=0;this.C.R=128;this.w.M=128;Yb(this)}; +k.Kc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.D|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=M(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.P>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.P&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Pa[e]= +b),d=f.Pa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.P&2048?(0<=b&&(f.Pa[e]=b),d=f.Pa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.Ya;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.od&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.C;switch(a&-2){case 4194048:d=M(this,e.Pb,a,b,c);0<=d&&(e.Pb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.R,a,b,c);0<=b&&0<=d&&(e.R=d&-36993|e.R&36992,e.R&1&&Vb(this));break;case 4194054:d=M(this,e.Qb,a,b,c);0<=d&&(e.Qb=d);break;case 4194056:d=M(this,e.Ob,a,b,c);0<=d&&(e.Ob=d); +break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Cc,a,b,c);0<=d&&(e.Cc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?gc(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=M(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= +M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Yb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.ld[e];break;case 4193746:d=M(this,g.Dc,a,b,c);0<=d&&(g.Dc=d);break;case 4193748:d=M(this,g.Ec[e],a,b,c);0<=d&&(g.Ec[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.md[e];break;case 4193754:d=M(this,g.Fc[e],a,b,c);0<=d&& +(g.Fc[e]=d);break;case 4193756:d=M(this,g.Qa[e],a,b,c);0<=d&&(g.Qa[e]=d&511);break;case 4193758:g.bc[e]=g.Qa[e];d=g.bc[e];break;case 4193760:d=g.jd[e];break;case 4193762:d=g.kd[e];break;case 4193764:d=g.gd[e];break;case 4193766:d=g.hd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Sa= +e.Sa&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Xb(this));break;case 4192514:d=M(this,e.Gb,a,b,c);0<=d&&(e.Gb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Sa,a,b,c);0<=d&&(e.Sa=d&63,e.M=e.M&-49|(e.Sa&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Zb[0]=d&4?15:7,f.Zb[1]=d&2?15:7,f.Zb[3]= d&1?15:7,f.Yb&&(e=2,f.lb&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.J|=16,f.L(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.na[0][e],a,b,c);0<=d&&(f.na[0][e]=d,f.na[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.na[1][e],a,b,c);0<=d&&(f.na[1][e]=d,f.na[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.ib)return f.L(4,234);e=a>>2&31;d=f.Sb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Sb[e]=a&2?d<<16|f.Sb[e]&65535:f.Sb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Lb[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var hc={},Ob=(hc[65382]=[null,null,K.prototype.Wc,K.prototype.pd,"LKS"],hc[65402]=[null,null,K.prototype.Xc,K.prototype.qd,"MMR0"],hc[65534]=[null,null,K.prototype.Yc,K.prototype.rd,"PSW"],hc); -Ja(function(){for(var a=D(document,"pdpjs","device"),b=0;b>1),this.b=new Int32Array(this.B,0,c>>2),oc(this,kc?pc:qc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;bb)d=Ob[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,K.prototype.Xc,K.prototype.pd,"LKS"],kc[65402]=[null,null,K.prototype.Yc,K.prototype.qd,"MMR0"],kc[65534]=[null,null,K.prototype.Zc,K.prototype.rd,"PSW"],kc); +La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},$:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ma:function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},Y:function(a,b){if(this.j&&null!=this.A){var c=this.j;vc(c,this.A+a,1,c.U)&&c.ja(!0)}return this.Nb(a,b)},ha:function(a,b){if(this.j&&null!=this.A){var c=this.j;vc(c,this.A+a,2,c.U)&&c.ja(!0)}return this.jc(a,b)},ua:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;vc(d,this.A+a,1,d.F)&&d.ja(!0)}this.g?this.w(a, -b,c):this.Bb(a,b,c)},Aa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;vc(d,this.A+a,2,d.F)&&d.ja(!0)}this.g?this.w(a,b,c):this.pc(a,b,c)},U:function(a){return this.f[a]},Z:function(a,b){a=this.f[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ea:function(a){return this.F.getUint16(a,!0)},la:function(a,b){a=a&1?this.f[a]|this.f[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a}, -qa:function(a,b){this.f[a]=b;this.Ua=!0},wa:function(a,b,c){this.f[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},za:function(a,b){this.F.setUint16(a,b,!0);this.Ua=!0},Ba:function(a,b,c){a&1?(this.f[a]=b,this.f[a+1]=b>>8):this.I[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function yb(a,b,c){a.j=b;a.K=a.C=0;c&&((a.K=c.K)&&uc(a,tc,!1),(a.C=c.C)&&sc(a,tc,!1))} -function wc(a,b){b?--a.C||(a.Ab=a.g?a.w:a.Bb,a.Gc=a.g?a.G:a.pc):--a.K||(a.ub=a.Nb,a.Ac=a.jc)}function sc(a,b,c){c&&a.C||(a.Ab=!a.g&&b[1]||a.w,a.Gc=!a.g&&b[3]||a.G);if(c||void 0===c)a.Bb=b[1]||a.w,a.pc=b[3]||a.G}function uc(a,b,c){c&&a.K||(a.ub=b[0]||a.N,a.Ac=b[2]||a.S);if(c||void 0===c)a.Nb=b[0]||a.N,a.jc=b[2]||a.S}function oc(a,b){b||(b=xc);uc(a,b,void 0);sc(a,b,void 0)}var xc=[],rc=[I.prototype.$,I.prototype.xa,I.prototype.ma,I.prototype.pb],tc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa]; -if(ib)var qc=[I.prototype.U,I.prototype.qa,I.prototype.ea,I.prototype.za],pc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba];function yc(a,b){w.call(this,"CPU",a,yc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.fb=Math.round(this.Aa/1E4)/100;this.kb=this.fb*this.Xa;this.v.ga=!1;this.v.nc=!1;this.v.Eb=a.autoStart;this.v.uc=!1;this.v.qb=!1;this.Kb=this.ha=0;this.Lb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Wb=this.md.bind(this);G(this)}y(yc); -var zc=["power","reset"];k=yc.prototype;k.Na=function(a,b,c,d){this.C=a;this.H=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.sb,c=!0);0<=a.tb&&a.tb<=Fc(a)&&(a.sb=a.tb=-1,Cc(a),a.ja(),c=!0);c&&a.i(Fc(a)+" cycles: checksum="+p(a.Kb))}} -function Gc(a,b,c,d){if(a.K[b]){void 0===c&&(hb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.ea||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} -k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ia)a=!0;else{var b=null,c,h=$a(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.fb*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.Tb()}Ic(a,a.U);a.U=0;a.S=pa();a.Z=0;Jc(a);return d}function Mb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Nb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function cd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function dd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ed(a){a.$-=a.b;a.b=0} -k.md=function(){if(this.v.ga){this.ob>=this.Aa&&Jc(this,!0);this.ua=0;this.za=pa();if(this.Z){var a=this.za-this.Z;a>this.Ib&&(this.S+=a,this.S>this.za&&(this.S=this.za))}try{do{var b=cd(this,this.v.qb?1:this.Ba);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;dd(this,c);this.ua+=c;this.U+=c;Ic(this,0,!0);Ec(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Vb&&(this.C&&this.C.Fa(),this.Vb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.C&&this.C.stop(pa(), -Fc(this));hb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Wb;this.Z=pa();c=this.Ib;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.S;d&&(this.Y=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ea=0,Hc(this)));if(0>c||this.Yc&&(this.S-=c),c=0;this.ob+=this.ua;this.Z+=c;a(b,c)}}}; -k.yb=function(a){if(gb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Hc(this);this.v.ga=!0;this.v.nc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.Tb(!0),this.C.start(this.S,Fc(this)));N(this,!0);setTimeout(this.Wb,0);return!0};k.zb=function(){return 0}; -k.ja=function(a){if(this.v.ga){ed(this);Ic(this,this.U);this.U=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.C&&this.C.stop(pa(),Fc(this));N(this)}this.v.complete=a};function N(a,b){a.C&&a.C.Fa(b)} -function fd(a){this.Uc=+a.model||1170;this.hc=a.resetAddr||0;yc.call(this,a,6666667);this.Fb=0;this.decode=gd.bind(this);this.V=65536;this.W=32768;this.aa=65535;this.X=32768;this.P=15;this.u=[0,0,0,0,0,0,0,this.hc];this.Oa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, -0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.gc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.eb=this.G=this.I=this.D=0;this.ib=70;this.ma=-1;hd(this);this.v.complete=this.v.Mc=!1}y(fd,yc);k=fd.prototype;k.reset=function(){this.v.ga&&this.ja();hd(this);Bc(this);this.v.error=!1;this.parent.reset.call(this)}; -function hd(a){a.Za=255;a.J=0;a.lc=0;a.F=0;a.Ya=0;a.ac=0;a.lb=0;a.Yb=0;a.wa=0;a.Zb=[7,7,7,7];a.w=[];a.D|=2;Pb(a)}function Pb(a){a.Yb?(a.Cb=65536,a.ba=a.Qc):(a.Cb=0,a.ba=a.Pc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Ib(this.H));return a.data()}; -k.restore=function(a){var b=a[1];this.ea=b[1];Hc(this,b[3]);a:{b=this.H;a=a[2];var c;for(c=0;c>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},Y:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.U)&&c.ja(!0)}return this.Nb(a,b)},ha:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.U)&&c.ja(!0)}return this.kc(a,b)},ua:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.F)&&d.ja(!0)}this.g?this.w(a, +b,c):this.Bb(a,b,c)},Aa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.F)&&d.ja(!0)}this.g?this.w(a,b,c):this.qc(a,b,c)},U:function(a){return this.f[a]},Z:function(a,b){a=this.f[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ea:function(a){return this.F.getUint16(a,!0)},la:function(a,b){a=a&1?this.f[a]|this.f[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a}, +qa:function(a,b){this.f[a]=b;this.Ua=!0},wa:function(a,b,c){this.f[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},za:function(a,b){this.F.setUint16(a,b,!0);this.Ua=!0},Ba:function(a,b,c){a&1?(this.f[a]=b,this.f[a+1]=b>>8):this.I[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Bb(a,b,c){a.j=b;a.K=a.C=0;c&&((a.K=c.K)&&xc(a,wc,!1),(a.C=c.C)&&vc(a,wc,!1))} +function zc(a,b){b?--a.C||(a.Ab=a.g?a.w:a.Bb,a.Ic=a.g?a.G:a.qc):--a.K||(a.ub=a.Nb,a.Bc=a.kc)}function vc(a,b,c){c&&a.C||(a.Ab=!a.g&&b[1]||a.w,a.Ic=!a.g&&b[3]||a.G);if(c||void 0===c)a.Bb=b[1]||a.w,a.qc=b[3]||a.G}function xc(a,b,c){c&&a.K||(a.ub=b[0]||a.N,a.Bc=b[2]||a.S);if(c||void 0===c)a.Nb=b[0]||a.N,a.kc=b[2]||a.S}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.$,I.prototype.xa,I.prototype.ma,I.prototype.pb],wc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa]; +if(xb)var tc=[I.prototype.U,I.prototype.qa,I.prototype.ea,I.prototype.za],sc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.fb=Math.round(this.Aa/1E4)/100;this.kb=this.fb*this.Xa;this.v.ga=!1;this.v.oc=!1;this.v.Eb=a.autoStart;this.v.uc=!1;this.v.qb=!1;this.Kb=this.ha=0;this.Lb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Wb=this.nd.bind(this);G(this)}y(Bc); +var Cc=["power","reset"];k=Bc.prototype;k.Oa=function(a,b,c,d){this.C=a;this.H=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ja(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Kb))}} +function Jc(a,b,c,d){if(a.K[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.ea||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} +k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ia)a=!0;else{var b=null,c,h=cb(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.fb*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.Tb()}Lc(a,a.U);a.U=0;a.S=ra();a.Z=0;Mc(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function hd(a){a.$-=a.b;a.b=0} +k.nd=function(){if(this.v.ga){this.ob>=this.Aa&&Mc(this,!0);this.ua=0;this.za=ra();if(this.Z){var a=this.za-this.Z;a>this.Ib&&(this.S+=a,this.S>this.za&&(this.S=this.za))}try{do{var b=fd(this,this.v.qb?1:this.Ba);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;gd(this,c);this.ua+=c;this.U+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Vb&&(this.C&&this.C.Fa(),this.Vb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.C&&this.C.stop(ra(), +Ic(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Wb;this.Z=ra();c=this.Ib;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.S;d&&(this.Y=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ea=0,Kc(this)));if(0>c||this.Yc&&(this.S-=c),c=0;this.ob+=this.ua;this.Z+=c;a(b,c)}}}; +k.yb=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.ga=!0;this.v.oc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.Tb(!0),this.C.start(this.S,Ic(this)));N(this,!0);setTimeout(this.Wb,0);return!0};k.zb=function(){return 0}; +k.ja=function(a){if(this.v.ga){hd(this);Lc(this,this.U);this.U=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Ic(this));N(this)}this.v.complete=a};function N(a,b){a.C&&a.C.Fa(b)} +function id(a){this.Wc=+a.model||1170;this.ic=a.resetAddr||0;Bc.call(this,a,6666667);this.Fb=0;this.decode=jd.bind(this);this.V=65536;this.W=32768;this.aa=65535;this.X=32768;this.P=15;this.u=[0,0,0,0,0,0,0,this.ic];this.Pa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, +0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.eb=this.G=this.I=this.D=0;this.ib=70;this.ma=-1;kd(this);this.v.complete=this.v.Oc=!1}y(id,Bc);k=id.prototype;k.reset=function(){this.v.ga&&this.ja();kd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +function kd(a){a.Za=255;a.J=0;a.mc=0;a.F=0;a.Ya=0;a.ac=0;a.lb=0;a.Yb=0;a.wa=0;a.Zb=[7,7,7,7];a.w=[];a.D|=2;Sb(a)}function Sb(a){a.Yb?(a.Cb=65536,a.ba=a.Sc):(a.Cb=0,a.ba=a.Rc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Lb(this.H));return a.data()}; +k.restore=function(a){var b=a[1];this.ea=b[1];Kc(this,b[3]);a:{b=this.H;a=a[2];var c;for(c=0;cb){a.w[f].Ta-=b;break}b-=a.w[f].Ta}a.w.splice(f+1,0,{delay:b,priority:c<<5&224,vector:d,callback:e})}a.D|=2}function Qb(a){return a.P=a.P&63728|a.Ma()|kd(a)|jd(a)|id(a)} -function Rb(a,b){a.X=b<<12;a.aa=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.Oa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Oa[c];a.Oa[c]=d}a.B=b>>14&3;c=a.P>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.D|=2;a.P=b}function P(a,b){a.D&128||(a.X=a.aa=b,a.W=0)}function od(a,b,c){a.D&128||(a.X=a.aa=a.V=b,a.W=c||0)}function pd(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^b)&(d^b))}function qd(a,b){a.D&128||(a.X=a.aa=a.V=b,a.W=a.X^a.V>>1)} -function rd(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Qb(this):this.B||(a=4,b=!0);this.F&57344||(this.Ya=63222,this.ac=a);this.B=0;var c=md(this,a|65536),d=md(this,a+2&65535|65536);Rb(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);sd(this,this.ma);sd(this,this.u[7]);nd(this,c);this.D&=-113;this.ma=-1;throw a;};function td(a){var b=ud(a),c=ud(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);nd(a,b);Rb(a,c);a.D&=-17} -function fc(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Sb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function vd(a,b,c){var d,e,f,g=0;if(c&a.Yb){d=b>>13&a.Zb[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=fc(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.J|=32,a.L(4,12)),f&1&&!(c&1)&&(a.J|=64,a.L(4,14)));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.na[a.B][d]=e;if(4194170!==f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.L(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=md(a,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=md(a,e)|g; -a.b-=8;break;case 6:return e=ld(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=ld(a),e=e+a.u[c]&65535,e=md(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.D|=64));return e}k.Pc=function(a,b,c){return wd(this,a,b,c)};k.Qc=function(a,b,c){return vd(this,wd(this,a,b,c),c)}; -function xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=wd(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.B=a.P>>12&3,c=md(a,d|c&65536),a.B=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.ya[a.P>>12&3];return c}function yd(a,b,c,d){a.F&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=wd(a,b,e,4),c&65536||(e&=65535),a.B=a.P>>12&3,e=vd(a,e|c&65536,4),a.B=a.P>>14&3,a.H.nb(e,d&65535)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.ya[a.P>>12&3]=d} -function zd(a,b){b>>=6;var c=a.I=b&7;(b=a.G=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Ad(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.G=(b&56)>>3)?c=gc(a,a.ba(b,d,2)):c=a.u[d];return c}function Bd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return wd(a,b,c,8)}function Cd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=gc(a,a.ba(b,d,2)):c=a.u[d];return c} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.eb=a.ba(b,e,7),c=d.call(a,c,a.H.jb(e)),e&1&&a.b--,a.H.Rb(e,c&255)):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.ba(b,e,6),c=d.call(a,c,gc(a,e)),a.H.nb(e,c&65535)):a.u[e]=d.call(a,c,a.u[e])}function Ed(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.H.Rb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function Fd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,d,4),a.H.nb(d,c&65535)):a.u[d]=c&65535;return c}function T(a,b,c){c&&(nd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.zb=function(a){this.v.complete=!0;var b=this.v.Mc=this.j&&Gd(this.j),c=a?this.v.nc?0:1:-1;this.v.nc=!1;this.$=this.b=a;do{if(b){if(Hd(this.j,this.u[7],c)){this.ja();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.L(168,28):this.D&64?this.L(4,30):this.D&16&&this.L(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.lc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Vc,a=this.w[e],this.w.splice(e,1))}d>(this.P&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.L(a.od,26):this.L(160,26))}else this.D&1&&this.D++;this.F&57344||(this.Ya=0,this.ac=this.u[7]);this.D=this.D&7|this.P&16;this.decode(ld(this))}while(0>1|b<<16;qd(this,a);return a&65535}function Nd(a,b){a=b&2048|b>>1|b<<8;qd(this,a<<8);return a&255}function Od(a,b){a=b&~a;P(this,a);return a}function Pd(a,b){a=b&~a;P(this,a<<8);return a}function Qd(a,b){a|=b;P(this,a);return a} -function Rd(a,b){a|=b;P(this,a<<8);return a}function Sd(a,b){a=~b|65536;od(this,a);return a&65535}function Td(a,b){a=~b|256;od(this,a<<8);return a&255}function Ud(a,b){a=b-a;this.D&128||(this.X=this.aa=a,this.W=b&(b^a));return a&65535}function Vd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.X=this.aa=c,this.W=b&(b^c));return a&255}function Wd(a,b){a=b+a;this.D&128||(this.X=this.aa=a,this.W=a&(b^a));return a&65535} -function Xd(a,b){a=b+a;var c=a<<8;this.D&128||(this.X=this.aa=c,this.W=c&(b<<8^c));return a&255}function Yd(a,b){a=-b;od(this,a,a&b&32768);return a&65535}function Zd(a,b){a=-b;od(this,a<<8,(a&b&128)<<8);return a&255}function $d(a,b){a=b<<1|this.V>>16&1;qd(this,a);return a&65535}function ae(a,b){a=b<<1|this.V>>16&1;qd(this,a<<8);return a&255}function be(a,b){a=(this.V&65536|b)>>1|b<<16;qd(this,a);return a&65535}function ce(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;qd(this,a<<8);return a&255} -function de(a,b){var c=b-a;rd(this,c,a,b);return c&65535}function ee(a,b){var c=b-a;rd(this,c<<8,a<<8,b<<8);return c&255}function fe(a,b){this.D&128||(this.X=this.aa=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function ge(a,b){a^=b;P(this,a);return a&65535} -function he(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function ie(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=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.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function je(a){var b=Dd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=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.aa=d>>16|d,this.X=d>>16):(this.W=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.W=32768,this.V=65536,this.b-=7}var ke=[0,7,7,10,7,11,9,13];function le(a){var b=this.b;nd(this,Bd(this,a));this.b=b-ke[this.g]} -var me=[0,14,14,17,14,18,16,20];function ne(a){var b=this.b,c=Bd(this,a);a=a>>6&7;sd(this,this.u[a]);this.u[a]=this.u[7];nd(this,c);this.b=b-me[this.g]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],pe=[7,13,13,17,14,18,17,21];function qe(a){var b=Dd(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.D&128||(this.X=b>>16,this.aa=this.X|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)nd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Me(a){R(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Ne(a){R(this,a,Ad(this,a),ge);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function gd(a){Oe[a>>12].call(this,a)} -var Oe=[function(a){Pe[a>>8&15].call(this,a)},function(a){var b=Ad(this,a),c=this.b;P(this,Fd(this,a,b));this.b=c-oe[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ad(this,a);a=Dd(this,a);rd(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,Ad(this,a)&Dd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){R(this,a,Ad(this,a),Od);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? -2:0)},function(a){R(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ad(this,a),Id);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Qe[a>>8&15].call(this,a)},function(a){Re[a>>8&15].call(this,a)},function(a){var b=zd(this,a);P(this,Ed(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=zd(this,a)<<8;a=Cd(this,a)<<8;rd(this,b-a,a,b);this.b-=this.g? -4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,(zd(this,a)&Cd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,zd(this,a),Pd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,zd(this,a),Rd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ad(this,a),de);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},W],Pe= -[function(a){Se[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!kd(this))},function(a){T(this,a,kd(this))},function(a){T(this,a,!this.Ma()==!jd(this))},function(a){T(this,a,!this.Ma()!=!jd(this))},function(a){T(this,a,!kd(this)&&!this.Ma()==!jd(this))},function(a){T(this,a,kd(this)||!this.Ma()!=!jd(this))},ne,ne,function(a){Te[a>>6&3].call(this,a)},function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},W,W],Te=[function(a){od(this, -Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ud);this.b-=this.g?9:3+(7==this.f?2:0)}],Ue=[function(a){R(this,a,0,Yd);this.b-=this.g?11:6},function(a){R(this,a,id(this)?1:0,Id);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,id(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);od(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],Ve=[function(a){R(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)}],We=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=md(this,a|65536);nd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xd(this,a,0);sd(this,a);P(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a, -0,b);P(this,b);this.b=c-pe[this.g]},function(a){P(this,Fd(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Se=[function(a){Xe[a&15].call(this,a)},W,W,W,le,le,le,le,function(a){if(a&8)this.L(8,6);else{var b=ud(this);a&=7;nd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.L(8,6)},function(a){Ye[a&15].call(this,a)},function(a){Ze[a&15].call(this,a)},Me,Me,Me,Me],Xe=[function(){this.P&49152?(this.J|=128,this.L(4, -3)):ed(this);this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){td(this);this.D|=this.P&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.P&49152||(hd(this),this.H.reset());this.b-=667},function(){td(this);this.b-=13},W,W,W,W,W,W,W,W,W],Ye=[re,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],Ze=[re,function(){this.V= -65536;this.b-=5},function(){this.W=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.X=32768;this.b-=5},V,V,V,V,V,V,V],Qe=[qe,qe,je,je,he,he,ie,ie,Ne,Ne,W,W,W,W,se,se],Re=[function(a){T(this,a,!this.Ma())},function(a){T(this,a,this.Ma())},function(a){T(this,a,!id(this)&&!kd(this))},function(a){T(this,a,id(this)||kd(this))},function(a){T(this,a,!jd(this))},function(a){T(this,a,jd(this))},function(a){T(this,a,!id(this))},function(a){T(this,a,id(this))},function(){this.L(24,2); -this.b-=25},function(){this.L(28,5);this.b-=5},function(a){$e[a>>6&3].call(this,a)},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},W,W],$e=[function(a){od(this,Ed(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],af=[function(a){Q(this,a,0,Zd);this.b-= -this.g?11:6},function(a){Q(this,a,id(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,id(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Cd(this,a);od(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],bf=[function(a){Q(this,a,0,ce);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.g?9:3+(7== -this.f?2:0)}],cf=[W,function(a){a=xd(this,a,65536);sd(this,a);P(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a,65536,b);P(this,b);this.b=c-pe[this.g]},W];function df(a){w.call(this,"ROM",a,df);this.f=null;this.B=a.addr;this.g=a.size;this.F=a.writable;this.C=a.alias;this.w=a.file;this.G=da(this.w);if(this.w){a=this.w;var b=ea(this.G);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ra(a,null,!0,function(a,b,f){ef(c,a,b,f)})}}y(df); -df.prototype.Na=function(a,b,c,d){this.H=b;this.b=c;this.j=d;ff(this)};df.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],t=oa(n,l,a.tc);0>t&&n.splice(-(t+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.G.push({xd:b,A:c,Rc:d,Ka:e,qc:f})}delete this.Ka}return!0};df.prototype.Ia=function(){return!0}; -function ef(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{Za(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){r("Empty ROM: "+ -b);return}if(1==a.f.length){r(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].Bb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.C?b.push(a.C):null!=a.C&&a.C.length&&(b=a.C);for(c=0;c>> -e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ma(b[0]);if(c!=this.pb)return;b=ma(b[1]);if(this.I=ab(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ia=function(a){return a?this.save():!0};k.reset=function(){lf(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return lf(this)};function lf(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.kc=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.Z||8,c=a-this.G%a,this.Z&&(b=ha("",c)));this.S&&!this.G&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.G+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.i(this.F), -this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.U)}};var mf={},kf=(mf[65392]=[null,null,Y.prototype.$c,Y.prototype.td,"RCSR"],mf[65394]=[null,null,Y.prototype.Zc,Y.prototype.sd,"RBUF"],mf[65396]=[null,null,Y.prototype.bd,Y.prototype.vd,"XCSR"],mf[65398]=[null,null,Y.prototype.ad,Y.prototype.ud,"XBUF"],mf);Ja(function(){for(var a=D(document,"pdpjs","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};nf.prototype.xc=function(){return-1};nf.prototype.yc=function(){}; -function pf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ma(b.substring(c,f))),c=f+1}}return a} -function qf(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; +k.Fa=function(a){if(this.Fb&&(a||!this.v.ga||this.v.uc)){for(a=0;ab){a.w[f].La-=b;break}b-=a.w[f].La}a.w.splice(f+1,0,{La:b,Ac:c<<5&224,Hc:d,gc:e})}a.D|=2}function Tb(a){return a.P=a.P&63728|a.Na()|nd(a)|md(a)|ld(a)} +function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.Pa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Pa[c];a.Pa[c]=d}a.B=b>>14&3;c=a.P>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.D|=2;a.P=b}function P(a,b){a.D&128||(a.X=a.aa=b,a.W=0)}function rd(a,b,c){a.D&128||(a.X=a.aa=a.V=b,a.W=c||0)}function sd(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^b)&(d^b))}function td(a,b){a.D&128||(a.X=a.aa=a.V=b,a.W=a.X^a.V>>1)} +function ud(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Tb(this):this.B||(a=4,b=!0);this.F&57344||(this.Ya=63222,this.ac=a);this.B=0;var c=pd(this,a|65536),d=pd(this,a+2&65535|65536);Ub(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,c);this.D&=-113;this.ma=-1;throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);qd(a,b);Ub(a,c);a.D&=-17} +function ic(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Sb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function yd(a,b,c){var d,e,f,g=0;if(c&a.Yb){d=b>>13&a.Zb[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=ic(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.J|=32,a.L(4,12)),f&1&&!(c&1)&&(a.J|=64,a.L(4,14)));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.na[a.B][d]=e;if(4194170!==f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.L(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=pd(a,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=pd(a,e)|g; +a.b-=8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=pd(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.D|=64));return e}k.Rc=function(a,b,c){return zd(this,a,b,c)};k.Sc=function(a,b,c){return yd(this,zd(this,a,b,c),c)}; +function Ad(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.B=a.P>>12&3,c=pd(a,d|c&65536),a.B=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.ya[a.P>>12&3];return c}function Bd(a,b,c,d){a.F&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.B=a.P>>12&3,e=yd(a,e|c&65536,4),a.B=a.P>>14&3,a.H.nb(e,d&65535)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.ya[a.P>>12&3]=d} +function Cd(a,b){b>>=6;var c=a.I=b&7;(b=a.G=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.G=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c}function Ed(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Gd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.eb=a.ba(b,e,7),c=d.call(a,c,a.H.jb(e)),e&1&&a.b--,a.H.Rb(e,c&255)):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.ba(b,e,6),c=d.call(a,c,jc(a,e)),a.H.nb(e,c&65535)):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.H.Rb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function Id(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,d,4),a.H.nb(d,c&65535)):a.u[d]=c&65535;return c}function T(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.zb=function(a){this.v.complete=!0;var b=this.v.Oc=this.j&&Jd(this.j),c=a?this.v.oc?0:1:-1;this.v.oc=!1;this.$=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.ja();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.L(168,28):this.D&64?this.L(4,30):this.D&16&&this.L(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Ac,a=this.w[e],this.w.splice(e,1))}d>(this.P&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.L(a.Hc,26):this.L(160,26))}else this.D&1&&this.D++;this.F&57344||(this.Ya=0,this.ac=this.u[7]);this.D=this.D&7|this.P&16;this.decode(od(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a} +function Ud(a,b){a|=b;P(this,a<<8);return a}function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.D&128||(this.X=this.aa=a,this.W=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.X=this.aa=c,this.W=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.X=this.aa=a,this.W=a&(b^a));return a&65535} +function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.X=this.aa=c,this.W=c&(b<<8^c));return a&255}function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.V>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.V>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.V&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255} +function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535}function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.D&128||(this.X=this.aa=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} +function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=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.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=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.aa=d>>16|d,this.X=d>>16):(this.W=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.W=32768,this.V=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.g]} +var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.g]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(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.D&128||(this.X=b>>16,this.aa=this.X|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Pe(a){R(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)}function Qe(a){R(this,a,Dd(this,a),je);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function jd(a){Re[a>>12].call(this,a)} +var Re=[function(a){Se[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? +2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.g? +4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},W],Se= +[function(a){Ve[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!nd(this))},function(a){T(this,a,nd(this))},function(a){T(this,a,!this.Na()==!md(this))},function(a){T(this,a,!this.Na()!=!md(this))},function(a){T(this,a,!nd(this)&&!this.Na()==!md(this))},function(a){T(this,a,nd(this)||!this.Na()!=!md(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){rd(this, +Id(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.g?11:6},function(a){R(this,a,ld(this)?1:0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],Ye=[function(a){R(this,a,0,ee);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,Pd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=pd(this,a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, +0,b);P(this,b);this.b=c-se[this.g]},function(a){P(this,Id(this,a,this.Na?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.L(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.L(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},Pe,Pe,Pe,Pe],$e=[function(){this.P&49152?(this.J|=128,this.L(4, +3)):hd(this);this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.P&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.P&49152||(kd(this),this.H.reset());this.b-=667},function(){wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],bf=[ue,function(){this.V= +65536;this.b-=5},function(){this.W=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.X=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,Qe,Qe,W,W,W,W,ve,ve],Ue=[function(a){T(this,a,!this.Na())},function(a){T(this,a,this.Na())},function(a){T(this,a,!ld(this)&&!nd(this))},function(a){T(this,a,ld(this)||nd(this))},function(a){T(this,a,!md(this))},function(a){T(this,a,md(this))},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(){this.L(24,2); +this.b-=25},function(){this.L(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= +this.g?11:6},function(a){Q(this,a,ld(this)?1:0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.g?9:3+(7== +this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.g]},W];function gf(a){w.call(this,"ROM",a,gf);this.f=null;this.B=a.addr;this.g=a.size;this.F=a.writable;this.C=a.alias;this.w=a.file;this.G=da(this.w);if(this.w){a=this.w;var b=ea(this.G);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Oa=function(a,b,c,d){this.H=b;this.b=c;this.j=d;jf(this)};gf.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.G.push({xd:b,A:c,Tc:d,Ka:e,rc:f})}delete this.Ka}return!0};gf.prototype.Ia=function(){return!0}; +function hf(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){t("Empty ROM: "+ +b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].Bb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.C?b.push(a.C):null!=a.C&&a.C.length&&(b=a.C);for(c=0;c>> +e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.pb)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ia=function(a){return a?this.save():!0};k.reset=function(){of(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return of(this)};function of(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=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.Z||8,c=a-this.G%a,this.Z&&(b=na("",c)));this.S&&!this.G&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.G+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.i(this.F), +this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.U)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.ad,Y.prototype.td,"RCSR"],pf[65394]=[null,null,Y.prototype.$c,Y.prototype.sd,"RBUF"],pf[65396]=[null,null,Y.prototype.cd,Y.prototype.vd,"XCSR"],pf[65398]=[null,null,Y.prototype.bd,Y.prototype.ud,"XBUF"],pf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.xc=function(){return-1};qf.prototype.yc=function(){}; +function sf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +function tf(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 rf(a,b,c){var d;if(b){b=sf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function vf(a,b){if(b)return uf(a,b,a.la[b]);var c=0;for(b in a.la)uf(a,b,a.la[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.la[b]);var c=0;for(b in a.la)xf(a,b,a.la[b]),c++;return 0>>d.H.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Gb[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].Nb(d&c.f,d),this.g--,b&&Ff(a,b));return c}; -k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Hb(this.H,d),this.g--,b&&Ff(a,b));return c};k.Rb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.H;e.O[(d&e.g)>>>e.ca].Bb(d&e.f,b&255,d);this.g--;c&&Ff(a,c);N(this.b,!0)}};k.nb=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.H,f=d&e.f,g=(d&e.g)>>>e.ca;f!=e.f?e.O[g].pc(f,b&65535,d):(e.O[g++].Bb(f,b&255,d),e.O[g&e.C].Bb(0,b>>8&255,d+1));this.g--;c&&Ff(a,c);N(this.b,!0)}}; -function Z(a){return{A:a,Ga:!1}}function Gf(a){return[a.A,a.Ga]}function Hf(a){return{A:a[0],Ga:a[1]}}function Ef(a,b,c){var d;c=(c?a.S:a.ob).A;if(void 0!==b){d=b=sf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Oa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Qb(this.b)));return b}; -k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,ed(a),a.la=0,N(a))))}; -function yf(a){var b;if(Gd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.U=["br"];if(a.F)for(b=1;b>>d.ca],!0);a.F=["bw"];a.Cb=0} -k.gb=function(a,b,c){var d=!0;c||Of(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.H;f.O[e>>>f.ca].gb(e&f.f,a==this.F)}}d&&(a.push(b),c?b.Ga=!0:(Pf(this,a,a.length-1,"set"),yf(this)));return d};function Of(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.F));h.Ga||yf(a);break}}return f} -function Qf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Jf(z);break;case 8:v="@"+Jf(z);break;case 16:7>z?v="("+Jf(z)+ -")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Jf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Jf(z)+")";break;case 40:v="@-("+Jf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Jf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Jf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Jf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Oa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Qb(d)));c&&(c+=" ");return c}function Vf(a){var b,c="";for(b=0;6>b;b++)c+=Uf(a,b);c=c+"\n"+(Uf(a,6)+Uf(a,7)+Uf(a,20));return c+=Tf(a,"T")+Tf(a,"N")+Tf(a,"Z")+Tf(a,"V")+Tf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Rc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Vf(a));c&&(a.S=Z(d.u[7]),Mf(a,J(a,a.S.A)))}}function $f(a,b){b=ma(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Sf(a,b,g,f);a.i(f);a.S=b;e-=b.A-l;c++}}} -function Rf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.S=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(fb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Nc=[];"call"==ye&&(kb=1E5,Nc=["CALL"]);for(void 0!==xe&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Fb=X;Ae++;kb--}}Ae||(a.i("no "+ze+"history available"),a.Fb=void 0)}else{var Xb=Ef(a,ia);if(Xb){var Yb=0;ya&&("l"==ya.charAt(0)&&(ya=ya.substr(1)||pg),Yb=tf(a,ya)>>>0,65536>4||1;rg--&&0$b?String.fromCharCode($b):".";Zb--}mb&&(mb+="\n");mb+=ia+" "+Pc+(0==ob?" "+De:"")}mb&&a.i(mb);a.ob=Xb}}}}break;case "e":if("else"==g[0])break;var Ra,Qc,Rc,Sc,Tc=g[0],Uc=g[1];"eb"==Tc?(Ra=1,Qc=255,Rc=a.jb,Sc=a.Rb):"e"==Tc||"ew"==Tc?(Ra=2,Qc=65535,Rc=a.Ha,Sc=a.nb):Uc=null;if(null==Uc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var ac=Ef(a,Uc);if(ac)for(var bc=2;bcXc;){for(var za=null,vg=256;65536>rb.A>>>0;){Yc.A=a.Ha(rb,2);if(null==rb.A||!vg--)break;if(!(Yc.A&1)){for(var wg=a,cc=Yc,Fe=null,sb=cc.A, -Ge=sb,Zc=1;6>=Zc&&sb;Zc++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;beg){if(gg(d,this.I)){this.B=new O(this,"1.30.0","failsafe");gg(this.B)&&(lg(this,d),a=2,mg(this.B));this.B.set("timestamp",qa());ng(this.B);var e=this.f&&!this.F;if(1==a||sa("Click OK to restore the previous PDP11 machine state, or CANCEL to reset the machine.")){if(c=kg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gg(d,g):("error"== -f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.g=null)):this.i(f+": "+g),mg(d),gg(d)?(c=kg(d),e=!0):c=!1))}e&&jg(this,c?d:null)}else 2==a&&d.clear()}else jg(this);delete this.I;delete this.N}e=$a(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(og(this,this.b,b,c,a),this.b.Eb());this.Y&&(lg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; -function lg(a,b){if(sa("There may be a problem with your PDP11 machine.\n\nTo help us diagnose it, click OK to send this PDP11 machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDP11",ver:"1.30.0"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ra("http://www.pcjs.org/api/v1/report",d,!0)}} -function bg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new O(a,"1.30.0"),g=new O(a,"1.30.0","validate"),h=qa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.0");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=$a(a.id),l=0;l>>d.H.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Jb[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].Nb(d&c.f,d),this.g--,b&&If(a,b));return c}; +k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Kb(this.H,d),this.g--,b&&If(a,b));return c};k.Rb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.H;e.O[(d&e.g)>>>e.ca].Bb(d&e.f,b&255,d);this.g--;c&&If(a,c);N(this.b,!0)}};k.nb=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.H,f=d&e.f,g=(d&e.g)>>>e.ca;f!=e.f?e.O[g].qc(f,b&65535,d):(e.O[g++].Bb(f,b&255,d),e.O[g&e.C].Bb(0,b>>8&255,d+1));this.g--;c&&If(a,c);N(this.b,!0)}}; +function Z(a){return{A:a,Ga:!1}}function Jf(a){return[a.A,a.Ga]}function Kf(a){return{A:a[0],Ga:a[1]}}function Hf(a,b,c){var d;c=(c?a.S:a.ob).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Pa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; +k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,hd(a),a.la=0,N(a))))}; +function Bf(a){var b;if(Jd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.U=["br"];if(a.F)for(b=1;b>>d.ca],!0);a.F=["bw"];a.Cb=0} +k.gb=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.H;f.O[e>>>f.ca].gb(e&f.f,a==this.F)}}d&&(a.push(b),c?b.Ga=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.F));h.Ga||Bf(a);break}}return f} +function Tf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Mf(z);break;case 8:v="@"+Mf(z);break;case 16:7>z?v="("+Mf(z)+ +")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Mf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Mf(z)+")";break;case 40:v="@-("+Mf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Mf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Mf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Pa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Yf(a));c&&(a.S=Z(d.u[7]),Pf(a,J(a,a.S.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Vf(a,b,g,f);a.i(f);a.S=b;e-=b.A-l;c++}}} +function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.S=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(ib(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Qc=[];"call"==Be&&(lb=1E5,Qc=["CALL"]);for(void 0!==Ae&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Fb=X;De++;lb--}}De||(a.i("no "+Ce+"history available"),a.Fb=void 0)}else{var Zb=Hf(a,ia);if(Zb){var $b=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),$b=wf(a,za)>>>0,65536<$b&&($b=65536));for(var nb="",Ra="dd"==Oa?4:"dw"==Oa?2:1,ac=Ra*$b||128,yg=ac+15>>4||1;yg--&&0bc?String.fromCharCode(bc):".";ac--}nb&&(nb+="\n");nb+=ia+" "+Sc+(0==pb?" "+Ge:"")}nb&&a.i(nb);a.ob=Zb}}}}break;case "e":if("else"==g[0])break;var Sa,Tc,Uc,Vc,Wc=g[0],Xc=g[1];"eb"==Wc?(Sa=1,Tc=255,Uc=a.jb,Vc=a.Rb):"e"==Wc||"ew"==Wc?(Sa=2,Tc=65535,Uc=a.Ha,Vc=a.nb):Xc=null;if(null==Xc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=Hf(a,Xc);if(cc)for(var dc=2;dc$c;){for(var Aa=null,Cg=256;65536>sb.A>>>0;){ad.A=a.Ha(sb,2);if(null==sb.A||!Cg--)break;if(!(ad.A&1)){for(var Dg=a,ec=ad,Ie=null,tb=ec.A, +Je=tb,bd=1;6>=bd&&tb;bd++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.I)){this.B=new O(this,"1.30.0","failsafe");jg(this.B)&&(og(this,d),a=2,pg(this.B));this.B.set("timestamp",sa());qg(this.B);var e=this.f&&!this.F;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.Eb());this.Y&&(og(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; +function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.0"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function eg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new O(a,"1.30.0"),g=new O(a,"1.30.0","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.0");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=cb(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(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Jg(a,b,c)}})}else c(a,null)} +function Kg(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ma(a))}function f(a){e("Error: "+a);l&&(--vg||Ta(!0));l=!1}var g,h,l=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdp11/1.30.0/components.xsl");m=function(d,h){h?Hg(c,null,null,!1,e,function(d,l){l?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--vg||Ta(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--vg||Ta(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,m):Ig(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Ta(!1);return Kg(a,b,c,d)};window.enableEvents=Ta;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.0/pdp11.js b/versions/pdpjs/1.30.0/pdp11.js index 1205591367..fecbbf09d6 100644 --- a/versions/pdpjs/1.30.0/pdp11.js +++ b/versions/pdpjs/1.30.0/pdp11.js @@ -1,152 +1,160 @@ (function(){var k; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");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 ja(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +function da(){var a=ea();return-1!==a.indexOf("pcjs.org",a.length-8)}var fa={"&":"&","<":"<",">":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ia={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"},ja=Date.now||function(){return+new Date}; +function ka(){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 p(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function p(a){window&&window.alert(a)}function ka(a){var b=!1;window&&(b=window.confirm(a));return b}var la=null;function ma(){if(null==la){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}la=a}return la}function na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},qa=!1,ra=!1,sa=!0;function ta(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function t(a){r.init.push(a)} -function ua(a){if(sa)try{for(var b=0;bb?this.fb=this.id:(this.wb=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.nb=null;this.i.error=!1;this.w={};this.K=null;v.push(this)}var wa=void 0,xa={}; -if(window){wa||(wa=window.location.search.substr(1));for(var ya,za=/\+/g,Aa=/([^&=]+)=?([^&]*)/g;ya=Aa.exec(wa);)xa[decodeURIComponent(ya[1].replace(za," "))]=decodeURIComponent(ya[2].replace(za," "))}function Ba(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function w(a,b){b||(b=u);a.prototype=Ba(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ca=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Ca={},v=[];function Da(a,b,c){Ca[a]&&b&&(Ca[a][b]=c)}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.fb=this.id:(this.wb=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.nb=null;this.i.error=!1;this.w={};this.K=null;x.push(this)}var ya=void 0,za={}; +if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.m=this.o/this.g|0;this.H=this.m-1;this.pa=[];this.A=null;this.Xa=this.I;a=new E;Ja(a,this.K);this.b=Array(this.m);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.pa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Xa(b|4186112,-1,1)} -function La(a,b,c){var d=!1,e=this.controller,f=e.pa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):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.pa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Xa(c|4186112,b,1)}function Ma(a,b){var c=-1,d=this.controller;(a=d.pa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Xa(b|4186112,-1,0)} -function Na(a,b,c){var d=!1,e=this.controller;if(a=e.pa[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||e.Xa(c|4186112,b,0)}D.prototype.reset=function(){this.A&&this.A()};D.prototype.I=function(){return 0};D.prototype.ka=function(a,b){b||this.reset();return!0}; -function Oa(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Ta)return l.tb+=l.Ta-f,l.Ta=f,!0;if(f>=l.Ta+l.tb){q=l.size-(f-m);q>g&&(q=g);l.tb=f-l.Ta+q;f=m+a.g;g-=q;h++;continue}}return Qa(1,f,g)}f=new E(f,q,a.g,d,e);Ja(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ra[d]+" at "+n(b,8,!0)),!0):Qa(2,b,c)}function Sa(a,b){return a.b[(b&a.j)>>>a.c].Za(b&a.h,b)} -function Ta(a,b,c){var d=b&a.h,e=(b&a.j)>>>a.c;d!=a.h?a.b[e].Hc(d,c&65535,b):(a.b[e++].Sa(d,c&255,b),a.b[e&a.H].Sa(0,c>>8&255,b+1))}function Ua(a){for(var b=0,c=[],d=0;d>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.m=this.o/this.g|0;this.H=this.m-1;this.qa=[];this.A=null;this.Xa=this.I;a=new G;Ma(a,this.K);this.b=Array(this.m);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Xa(b|4186112,-1,1)} +function Oa(a,b,c){var d=!1,e=this.controller,f=e.qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):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.qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Xa(c|4186112,b,1)}function Pa(a,b){var c=-1,d=this.controller;(a=d.qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Xa(b|4186112,-1,0)} +function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.qa[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||e.Xa(c|4186112,b,0)}La.prototype.reset=function(){this.A&&this.A()};La.prototype.I=function(){return 0};La.prototype.la=function(a,b){b||this.reset();return!0}; +function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Ta)return l.tb+=l.Ta-f,l.Ta=f,!0;if(f>=l.Ta+l.tb){q=l.size-(f-m);q>g&&(q=g);l.tb=f-l.Ta+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.j)>>>a.c].Za(b&a.h,b)} +function Wa(a,b,c){var d=b&a.h,e=(b&a.j)>>>a.c;d!=a.h?a.b[e].Hc(d,c&65535,b):(a.b[e++].Sa(d,c&255,b),a.b[e&a.H].Sa(0,c>>8&255,b+1))}function Xa(a){for(var b=0,c=[],d=0;d>5&3;c.hb=a>>1&15;c.ob=a&257?a&1?6:4:0;ab(c);a=c.G;a&1|256&&(b=this.a.Ka&16?1:2);this.c.Na=this.c.Na&-8|b};k.kc=function(){return bb(this.a)};k.Ec=function(a){cb(this.a,a&-1809|bb(this.a)&1808);this.a.l|=128}; -function db(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.qc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.ab=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ia[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;eb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ia[f])b.S|=32832, -b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;a.qb(b.T[f],c,d,e);return}}b.ab=f<<13|b.ab&8176|b.X%9&15;G(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.qc=function(a,b,c,d,e){var f=this.g;f.$a=d&65535;f.D=f.D&-49|d>>12&48;f.bb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}G(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function fb(a){var b=a.h,c,d,e,f=b.u>>8&3;b.u&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.u>>1&7){case 2:b.xa&8&&(b.u&=63);b.xa=b.Zb[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ia[f]){b.u|=37888;break}if((b.L&63)>=b.J[f]){b.u|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); -d=(b.qa&63)<<16|b.Wa;e=65536-b.xa&65535;eb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.u|=37888;else if((b.L&63)>=b.J[f])b.u|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.qa&63)<<16|b.Wa;e=65536-b.xa&65535;a.qb(b.T[f],c,d,e);return}}G(a.a,20,5,112,function(){b.u|=129;return!!(b.u&64)})} -k.rc=function(a,b,c,d,e){var f=this.h;f.Wa=d&65535;f.u=f.u&-49|d>>12&48;f.qa=d>>16&63;f.L=~~(c/f.J[b.ia])<<6|c%f.J[b.ia];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.u|=33792;break;case 2:f.u|=40960}G(this.a,20,5,112,function(){f.u|=129;return!!(f.u&64)})};function gb(a){a=a.j;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.Ma=a.Qa=a.Oa=a.Aa=a.Eb=0} -function hb(a,b){var c=a.j,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;G(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.sc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.sb[b]=c.la[b];c.F|=32896;c.V[b]|=32896;c.Ma|=1<=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.la[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ -(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;eb(a,c.T[b],d,e,f);return;case 57:if(c.la[b]>=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.la[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;a.qb(c.T[b],d,e,f);return}}G(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} -k.sc=function(a,b,c,d,e){var f=this.j;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.ia]=e%f.Ha[0]<<8|c%f.J[0];f.sb[b.ia]=f.la[b.ia]=d;f.Ma|=1<=b.gc-1&&(f.V[b.ia]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}G(this.a,20,5,172,function(){f.V[b.ia]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function ib(a,b,c,d,e,f){var g=~~((f+c.ra-1)/c.ra),h=new XMLHttpRequest;2048>g&&d+2048g){b.Bb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Bb(0,b,c,d,e)}k.reset=function(){this.c.Na=this.c.Na&-120|20;this.b.wa=0;this.g.D=128;this.h.u=128;gb(this)}; -k.Yb=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Db;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Db=d;f.l|=2}break;case 4194294:if(70!==f.Ja)return I(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return I(f,4);d=1;break;case 4194290:if(70!==f.Ja)return I(f,4);d=0;break;case 4194288:if(70!==f.Ja)return I(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return I(f,4);e=a-4194272>>1;0>b?d=f.zb[e]:(d=H(this,f.zb[e],a,b,c),0<=d&&(f.zb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.La[e]=b),d=f.La[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.La[e]=b),d=f.La[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,I(f,4)}break;case 4194176:e=a>>1&31;d=H(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=H(this,f.rb,a,b,c);0<=d&&(f.rb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Ac&65535:(d=H(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,I(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=H(this,e.ab,a,b,c);0<=d&&(e.ab=d);break;case 4194050:d=H(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=H(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&db(this));break;case 4194054:d=H(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194056:d=H(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194058:d=H(this,e.X,a,b,c);0<=d&&(e.X= -d);break;case 4194060:break;case 4194062:d=H(this,e.Rb,a,b,c);0<=d&&(e.Rb=d);break;default:return f.s|=16,I(f,4)}break;case 4193728:var g=this.j;e=g.aa&7;switch(a&-2){case 4193728:d=H(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?hb(this,e):192==(d&192)&&G(f,0,5,172));break;case 4193730:d=H(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=H(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=H(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= -H(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&gb(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=H(this,g.Ma,a,b,c);0<=d&&(g.Ma=d&255);break;case 4193744:d=g.xc[e];break;case 4193746:d=H(this,g.Sb,a,b,c);0<=d&&(g.Sb=d);break;case 4193748:d=H(this,g.Tb[e],a,b,c);0<=d&&(g.Tb[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.yc[e];break;case 4193754:d=H(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d);break;case 4193756:d=H(this,g.la[e],a,b,c);0<=d&&(g.la[e]= -d&511);break;case 4193758:g.sb[e]=g.la[e];d=g.sb[e];break;case 4193760:d=g.vc[e];break;case 4193762:d=g.wc[e];break;case 4193764:d=g.tc[e];break;case 4193766:d=g.uc[e];break;case 4193768:d=H(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=H(this,g.Eb,a,b,c);0<=d&&(g.Eb=d);break;default:return f.s|=16,I(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=H(this,e.u,a,b,c);0<=b&&0<=d&&(e.qa=e.qa&60|d>>4&3,e.u=e.u&-1023|d&1022,e.u&128||fb(this));break;case 4192514:d= -H(this,e.Wa,a,b,c);0<=d&&(e.Wa=d&65534);break;case 4192516:d=H(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=H(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=H(this,e.qa,a,b,c);0<=d&&(e.qa=d&63,e.u=e.u&-49|(e.qa&3)<<4);break;default:return f.s|=16,I(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ka:(d=H(this,f.Ka,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ka=d,f.pb[0]=d&4?15:7,f.pb[1]=d&2?15:7,f.pb[3]=d&1?15:7,f.ob&&(e=2,f.Ka&16&&(e=1),this.c.Na=this.c.Na&-8|e)));break;default:return f.s|= -16,I(f,4)}break;case 4191424:e=a>>1&31;d=H(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=H(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return I(f,4);e=a>>2&31;d=f.cb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=H(this,d,a,b,c),0<=d&&(f.cb[e]=a&2?d<<16|f.cb[e]&65535:f.cb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=Xa[a>>1&255];else return f.s|=16,I(f,4);break;default:return f.s|=16,I(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var lb={},$a=(lb[65382]=[null,null,F.prototype.ic,F.prototype.Cc,"LKS"],lb[65402]=[null,null,F.prototype.jc,F.prototype.Dc,"MMR0"],lb[65534]=[null,null,F.prototype.kc,F.prototype.Ec,"PSW"],lb);t(function(){for(var a=B(document,"pdpjs","device"),b=0;b>1),this.a=new Int32Array(this.c,0,c>>2),sb(this,ob?tb:ub);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ga:function(a){var 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},oa: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},I:function(a,b){return this.M(a,b)},ca:function(a,b){return this.ea(a, -b)},ma:function(a,b,c){this.w||this.Xb(a,b,c)},Da:function(a,b,c){this.w||this.Ea(a,b,c)},H:function(a){return this.b[a]},N:function(a){return this.b[a]},Z:function(a){return this.g.getUint16(a,!0)},fa:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.m[a>>1]},ha:function(a,b){this.b[a]=b;this.ta=!0},na:function(a,b){this.b[a]=b;this.ta=!0},Ca:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Fa:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.m[a>>1]=b;this.ta=!0}}; -function Ja(a,b,c){a.K=b;a.h=a.j=0;c&&((a.h=c.h)&&wb(a,xb,!1),(a.j=c.j)&&yb(a,xb,!1))}function yb(a,b,c){c&&a.j||(a.Sa=!a.w&&b[1]||a.v,a.Hc=!a.w&&b[3]||a.G);if(c||void 0===c)a.Xb=b[1]||a.v,a.Ea=b[3]||a.G}function wb(a,b,c){c&&a.h||(a.Za=b[0]||a.o,a.nc=b[2]||a.A);if(c||void 0===c)a.M=b[0]||a.o,a.ea=b[2]||a.A}function sb(a,b){b||(b=zb);wb(a,b,void 0);yb(a,b,void 0)}var zb=[],vb=[E.prototype.W,E.prototype.oa,E.prototype.ga,E.prototype.Ga],xb=[E.prototype.I,E.prototype.ma,E.prototype.ca,E.prototype.Da]; -if(Ga)var ub=[E.prototype.H,E.prototype.ha,E.prototype.Z,E.prototype.Ca],tb=[E.prototype.N,E.prototype.na,E.prototype.fa,E.prototype.Fa];function Ab(a,b){u.call(this,"CPU",a,Ab);var c=a.multiplier||1;this.lb=a.cycles||b;this.ga=c;this.xb=Math.round(this.lb/1E4)/100;this.ma=this.xb*this.ga;this.i.$=!1;this.i.Vb=!1;this.i.Va=a.autoStart;this.i.Hb=!1;this.i.mb=!1;this.jb=this.na=0;this.kb=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.zc.bind(this);C(this)}w(Ab); -var Bb=["power","reset"];k=Ab.prototype;k.va=function(a,b,c,d){this.A=a;this.B=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.P)a=!0;else{var b=null,c,h=x(a.id);for(c=0;ca.ea/a.ma&&(b=1),a.ga=b,b=a.xb*a.ga,a.ma!=b)){a.ma=b;b=a.ma.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Kb(a,a.ca);a.ca=0;a.Z=ha();a.fa=0;Lb(a)}function Ya(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Za(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.lb*a.ga/1E3,a.M[b][0]=c)} -k.zc=function(){if(this.i.$){this.Ab>=this.lb&&Lb(this,!0);this.Ga=0;this.ib=ha();if(this.fa){var a=this.ib-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.ib&&(this.Z=this.ib))}try{do{for(var b,c=this.i.mb?1:this.eb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Wb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ga+=f;this.ca+=f;Kb(this,0,!0);a=f;if(this.i.mb){var l= -!1;this.jb=this.jb+this.Mb()|0;this.na-=a;0>=this.na&&(this.na+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Mb(this)&&(this.Da=this.Ea=-1,Eb(this),Ib(this),l=!0);l&&this.U(Mb(this)+" cycles: checksum="+n(this.jb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.eb;15<=++this.Ob&&(this.A&&this.A.Ra(),this.Ob=0);break}}while(this.i.$)}catch(m){Ib(this);Fb(this);this.A&&this.A.stop(ha(),Mb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ha();d=this.Nb;this.Ga&& -(d=Math.round(d*this.Ga/this.eb));d-=this.fa-this.ib;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Jb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Ab+=this.Ga;this.fa+=d;b(c,d)}}};function Gb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Jb(a);a.i.$=!0;a.i.Vb=!0;a.Ca&&a.Ca.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.Z,Mb(a));Fb(a,!0);setTimeout(a.Qb,0)}}k.Wb=function(){return 0}; -function Ib(a){if(a.i.$){a.W-=a.a;a.a=0;Kb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ha(),Mb(a));Fb(a)}a.i.complete=void 0}function Fb(a,b){a.A&&a.A.Ra(b)} -function Nb(a){this.ec=a.resetAddr||0;Ab.call(this,a,6666667);this.Kb=0;this.decode=Ob.bind(this);this.j=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.ec];this.La=[0,0,0,0,0,0];this.da=[0,0,0,0];this.hb=this.v=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.zb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.l=0;this.Ja=70;this.oa=-1;Pb(this);this.i.complete=this.i.$b=!1}w(Nb,Ab);k=Nb.prototype;k.reset=function(){this.i.$&&Ib(this);Pb(this);Db(this);this.i.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.za=255;a.s=0;a.Db=0;a.G=0;a.ya=0;a.rb=0;a.Ka=0;a.ob=0;a.gb=0;a.pb=[7,7,7,7];a.o=[];a.l|=2;ab(a)}function ab(a){a.ob?(a.Jb=65536,a.N=a.cc):(a.Jb=0,a.N=a.bc)}k.Mb=function(){return 0};k.save=function(){var a=new K(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Ua(this.B));return a.data()}; -k.restore=function(a){var b=a[1];this.ha=b[1];Jb(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;c>5&3;c.hb=a>>1&15;c.ob=a&257?a&1?6:4:0;db(c);a=c.G;a&1|256&&(b=this.a.Ka&16?1:2);this.c.Na=this.c.Na&-8|b};k.lc=function(){return eb(this.a)};k.Ec=function(a){fb(this.a,a&-1809|eb(this.a)&1808);this.a.l|=128}; +function gb(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.ab=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ia[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;hb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ia[f])b.S|=32832, +b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;a.qb(b.T[f],c,d,e);return}}b.ab=f<<13|b.ab&8176|b.X%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.rc=function(a,b,c,d,e){var f=this.g;f.$a=d&65535;f.D=f.D&-49|d>>12&48;f.bb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function ib(a){var b=a.h,c,d,e,f=b.u>>8&3;b.u&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.sc,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.u>>1&7){case 2:b.xa&8&&(b.u&=63);b.xa=b.ac[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ia[f]){b.u|=37888;break}if((b.L&63)>=b.J[f]){b.u|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); +d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;hb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.u|=37888;else if((b.L&63)>=b.J[f])b.u|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;a.qb(b.T[f],c,d,e);return}}I(a.a,20,5,112,function(){b.u|=129;return!!(b.u&64)})} +k.sc=function(a,b,c,d,e){var f=this.h;f.Wa=d&65535;f.u=f.u&-49|d>>12&48;f.ra=d>>16&63;f.L=~~(c/f.J[b.ja])<<6|c%f.J[b.ja];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.u|=33792;break;case 2:f.u|=40960}I(this.a,20,5,112,function(){f.u|=129;return!!(f.u&64)})};function jb(a){a=a.j;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.Ma=a.Qa=a.Oa=a.Aa=a.Fb=0} +function kb(a,b){var c=a.j,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.tc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.sb[b]=c.ma[b];c.F|=32896;c.V[b]|=32896;c.Ma|=1<=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ +(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;hb(a,c.T[b],d,e,f);return;case 57:if(c.ma[b]>=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;a.qb(c.T[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} +k.tc=function(a,b,c,d,e){var f=this.j;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.ja]=e%f.Ha[0]<<8|c%f.J[0];f.sb[b.ja]=f.ma[b.ja]=d;f.Ma|=1<=b.ic-1&&(f.V[b.ja]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.V[b.ja]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function lb(a,b,c,d,e,f){var g=~~((f+c.sa-1)/c.sa),h=new XMLHttpRequest;2048>g&&d+2048g){b.Cb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Cb(0,b,c,d,e)}k.reset=function(){this.c.Na=this.c.Na&-120|20;this.b.wa=0;this.g.D=128;this.h.u=128;jb(this)}; +k.$b=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Eb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Eb=d;f.l|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.La[e]=b),d=f.La[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.La[e]=b),d=f.La[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.rb,a,b,c);0<=d&&(f.rb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Bc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.ab,a,b,c);0<=d&&(e.ab=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&gb(this));break;case 4194054:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194056:d=J(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194058:d=J(this,e.X,a,b,c);0<=d&&(e.X= +d);break;case 4194060:break;case 4194062:d=J(this,e.Sb,a,b,c);0<=d&&(e.Sb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.j;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?kb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= +J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&jb(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.Ma,a,b,c);0<=d&&(g.Ma=d&255);break;case 4193744:d=g.yc[e];break;case 4193746:d=J(this,g.Tb,a,b,c);0<=d&&(g.Tb=d);break;case 4193748:d=J(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.zc[e];break;case 4193754:d=J(this,g.Vb[e],a,b,c);0<=d&&(g.Vb[e]=d);break;case 4193756:d=J(this,g.ma[e],a,b,c);0<=d&&(g.ma[e]= +d&511);break;case 4193758:g.sb[e]=g.ma[e];d=g.sb[e];break;case 4193760:d=g.wc[e];break;case 4193762:d=g.xc[e];break;case 4193764:d=g.uc[e];break;case 4193766:d=g.vc[e];break;case 4193768:d=J(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Fb,a,b,c);0<=d&&(g.Fb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.u,a,b,c);0<=b&&0<=d&&(e.ra=e.ra&60|d>>4&3,e.u=e.u&-1023|d&1022,e.u&128||ib(this));break;case 4192514:d= +J(this,e.Wa,a,b,c);0<=d&&(e.Wa=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=J(this,e.ra,a,b,c);0<=d&&(e.ra=d&63,e.u=e.u&-49|(e.ra&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ka:(d=J(this,f.Ka,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ka=d,f.pb[0]=d&4?15:7,f.pb[1]=d&2?15:7,f.pb[3]=d&1?15:7,f.ob&&(e=2,f.Ka&16&&(e=1),this.c.Na=this.c.Na&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.cb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.cb[e]=a&2?d<<16|f.cb[e]&65535:f.cb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var ob={},cb=(ob[65382]=[null,null,H.prototype.jc,H.prototype.Cc,"LKS"],ob[65402]=[null,null,H.prototype.kc,H.prototype.Dc,"MMR0"],ob[65534]=[null,null,H.prototype.lc,H.prototype.Ec,"PSW"],ob);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.c,0,c>>2),vb(this,rb?wb:xb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ga:function(a){var 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},pa: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},I:function(a,b){return this.M(a,b)},ca:function(a,b){return this.ea(a, +b)},na:function(a,b,c){this.w||this.Zb(a,b,c)},Da:function(a,b,c){this.w||this.Ea(a,b,c)},H:function(a){return this.b[a]},N:function(a){return this.b[a]},Z:function(a){return this.g.getUint16(a,!0)},fa:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.m[a>>1]},ha:function(a,b){this.b[a]=b;this.ta=!0},oa:function(a,b){this.b[a]=b;this.ta=!0},Ca:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Fa:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.m[a>>1]=b;this.ta=!0}}; +function Ma(a,b,c){a.K=b;a.h=a.j=0;c&&((a.h=c.h)&&zb(a,Ab,!1),(a.j=c.j)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.j||(a.Sa=!a.w&&b[1]||a.v,a.Hc=!a.w&&b[3]||a.G);if(c||void 0===c)a.Zb=b[1]||a.v,a.Ea=b[3]||a.G}function zb(a,b,c){c&&a.h||(a.Za=b[0]||a.o,a.oc=b[2]||a.A);if(c||void 0===c)a.M=b[0]||a.o,a.ea=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.W,G.prototype.pa,G.prototype.ga,G.prototype.Ga],Ab=[G.prototype.I,G.prototype.na,G.prototype.ca,G.prototype.Da]; +if(Ia)var xb=[G.prototype.H,G.prototype.ha,G.prototype.Z,G.prototype.Ca],wb=[G.prototype.N,G.prototype.oa,G.prototype.fa,G.prototype.Fa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.lb=a.cycles||b;this.ga=c;this.xb=Math.round(this.lb/1E4)/100;this.na=this.xb*this.ga;this.i.$=!1;this.i.Wb=!1;this.i.Va=a.autoStart;this.i.Hb=!1;this.i.mb=!1;this.jb=this.oa=0;this.kb=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.Ac.bind(this);F(this)}y(Db); +var Eb=["power","reset"];k=Db.prototype;k.va=function(a,b,c,d){this.A=a;this.B=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} +k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.ea/a.na&&(b=1),a.ga=b,b=a.xb*a.ga,a.na!=b)){a.na=b;b=a.na.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Nb(a,a.ca);a.ca=0;a.Z=ja();a.fa=0;Ob(a)}function ab(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.lb*a.ga/1E3,a.M[b][0]=c)} +k.Ac=function(){if(this.i.$){this.Bb>=this.lb&&Ob(this,!0);this.Ga=0;this.ib=ja();if(this.fa){var a=this.ib-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.ib&&(this.Z=this.ib))}try{do{for(var b,c=this.i.mb?1:this.eb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Xb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ga+=f;this.ca+=f;Nb(this,0,!0);a=f;if(this.i.mb){var l= +!1;this.jb=this.jb+this.Mb()|0;this.oa-=a;0>=this.oa&&(this.oa+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Pb(this)&&(this.Da=this.Ea=-1,Hb(this),Lb(this),l=!0);l&&this.U(Pb(this)+" cycles: checksum="+n(this.jb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.eb;15<=++this.Ob&&(this.A&&this.A.Ra(),this.Ob=0);break}}while(this.i.$)}catch(m){Lb(this);Ib(this);this.A&&this.A.stop(ja(),Pb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ja();d=this.Nb;this.Ga&& +(d=Math.round(d*this.Ga/this.eb));d-=this.fa-this.ib;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Mb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Bb+=this.Ga;this.fa+=d;b(c,d)}}};function Jb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Mb(a);a.i.$=!0;a.i.Wb=!0;a.Ca&&a.Ca.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.Z,Pb(a));Ib(a,!0);setTimeout(a.Qb,0)}}k.Xb=function(){return 0}; +function Lb(a){if(a.i.$){a.W-=a.a;a.a=0;Nb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ja(),Pb(a));Ib(a)}a.i.complete=void 0}function Ib(a,b){a.A&&a.A.Ra(b)} +function Qb(a){this.gc=a.resetAddr||0;Db.call(this,a,6666667);this.Kb=0;this.decode=Rb.bind(this);this.j=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.gc];this.La=[0,0,0,0,0,0];this.da=[0,0,0,0];this.hb=this.v=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.l=0;this.Ja=70;this.pa=-1;Sb(this);this.i.complete=this.i.bc=!1}y(Qb,Db);k=Qb.prototype;k.reset=function(){this.i.$&&Lb(this);Sb(this);Gb(this);this.i.error=!1;this.parent.reset.call(this)}; +function Sb(a){a.za=255;a.s=0;a.Eb=0;a.G=0;a.ya=0;a.rb=0;a.Ka=0;a.ob=0;a.gb=0;a.pb=[7,7,7,7];a.o=[];a.l|=2;db(a)}function db(a){a.ob?(a.Jb=65536,a.N=a.ec):(a.Jb=0,a.N=a.dc)}k.Mb=function(){return 0};k.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Xa(this.B));return a.data()}; +k.restore=function(a){var b=a[1];this.ha=b[1];Mb(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.o[f].sa-=b;break}b-=a.o[f].sa}a.o.splice(f+1,0,{delay:b,priority:c<<5&224,vector:d,callback:e})}a.l|=2}function bb(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|L(a)} -function cb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.j=b<<16;if((b^a.C)&2048)for(var c=a.La.length;0<=--c;){var d=a.f[c];a.f[c]=a.La[c];a.La[c]=d}a.v=b>>14&3;c=a.C>>14&3;a.v!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.v]);a.l|=2;a.C=b}function O(a,b){a.l&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.m=a.h=a.j=b,a.g=c||0)}function Rb(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.m=a.h=a.j=b,a.g=a.m^a.j>>1)}function Sb(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^d)&(d^b))} -function I(a,b){var c=!1;0>a.oa?a.oa=bb(a):a.v||(b=4,c=!0);a.G&57344||(a.ya=63222,a.rb=b);a.v=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);cb(a,e&-12289|a.oa>>2&12288);c&&(a.s|=4,a.f[6]=4);Tb(a,a.oa);Tb(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.oa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;cb(a,c);a.l&=-17} -function jb(a,b){var c=b>>13&31;31>c?a.Ka&32&&(b=a.cb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Wb(a,b,c){var d,e,f,g=0;if(c&a.ob){d=b>>13&a.pb[a.v];e=a.R[a.v][d];f=(a.R[a.v][d+16]<<6)+(b&8191)&4194303;a.Ka&16?3932160<=f&&4186112>f&&(f=jb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.s|=32,I(a,4)),f&1&&!(c&1)&&(a.s|=64,I(a,4)));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.R[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;g&&(g&57344&&(0<=a.oa&&(g|=128),a.G&57344||(a.G=a.G|g|a.gb<<5|a.hb<<1),I(a,168)),a.G&61440||!(4191360>f||4194239>>a.c;return c!=a.h?a.b[d].nc(c,b):a.b[d++].Za(c,b)|a.b[d&a.H].Za(0,b+1)<<8}function N(a,b){return kb(a,Wb(a,b,2))} -function Vb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b}function Tb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.v&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,I(a,4)):(a.s|=8,a.l|=64));return e}k.bc=function(a,b,c){return Xb(this,a,b,c)};k.cc=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)}; -function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=N(a,d|c&65536),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function Zb(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Wb(a,e|c&65536,4),a.v=a.C>>14&3,Ta(a.B,e,d&65535)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} -function $b(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Sa(a.B,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=kb(a,a.N(b,d,2)):c=a.f[d];return c}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)}function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Sa(a.B,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=kb(a,a.N(b,d,2)):c=a.f[d];return c} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Sa(a.B,e)),e&1&&a.a--,a=a.B,a.b[(e&a.j)>>>a.c].Sa(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),c=d.call(a,c,kb(a,e)),Ta(a.B,e,c&65535)):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.B,a.b[(d&a.j)>>>a.c].Sa(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,d,4),Ta(a.B,d,c&65535)):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -k.Wb=function(a){this.i.complete=!0;this.i.$b=!1;this.i.Vb=!1;this.W=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?I(this,168):this.l&64?I(this,4):this.l&16&&I(this,12),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;a=null;for(var b=this.Db&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].hc,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.l&4&&(this.f[7]= -this.f[7]+2&65535,this.l&=-5),a?I(this,a.Bc):I(this,160))}else this.l&1&&this.l++;this.G&57344||(this.ya=0,this.rb=this.f[7]);this.l=this.l&7|this.C&16;this.decode(Qb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function kc(a,b){a=b&~a;O(this,a);return a}function lc(a,b){a=b&~a;O(this,a<<8);return a}function mc(a,b){a|=b;O(this,a);return a}function nc(a,b){a|=b;O(this,a<<8);return a}function oc(a,b){a=~b|65536;P(this,a);return a&65535} -function pc(a,b){a=~b|256;P(this,a<<8);return a&255}function qc(a,b){a=b-a;this.l&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.l&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.l&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function vc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.j>>16&1;Q(this,a);return a&65535}function xc(a,b){a=b<<1|this.j>>16&1;Q(this,a<<8);return a&255}function yc(a,b){a=(this.j&65536|b)>>1|b<<16;Q(this,a);return a&65535}function zc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} -function Cc(a,b){this.l&128||(this.m=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;O(this,a);return a&65535}function Ec(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Fc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.j=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Gc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.j=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} -var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.j=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,R(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){I(this,8)}function Ob(a){Sc[a>>12].call(this,a)} -var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,dc(this,a,b));this.a=c-Lc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),kc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? -2:0)},function(a){U(this,a,R(this,a),mc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);O(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ -(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),lc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Ac);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ua()==!(this.g&32768))},function(a){V(this,a,!this.ua()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> -6&3].call(this,a)},Y,Y],Xc=[function(a){P(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,L(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,L(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=N(this,a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);O(this,a);this.a-=11}, -function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);O(this,b);this.a=c-Mc[this.c]},function(a){O(this,dc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)I(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.l|=1),this.a-=5):I(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc,Qc,Qc], -ad=[function(){this.C&49152?(this.s|=128,I(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.l|=this.C&16;this.a-=13},function(){I(this,12);this.a-=5},function(){I(this,16);this.a-=25},function(){this.C&49152||(Pb(this),this.B.reset());this.a-=667},function(){Ub(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= -0;this.a-=5},W,W,W,W,W,W,W],cd=[Oc,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!L(this)&&!!(this.h&65535))},function(a){V(this,a,L(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, -a,!L(this))},function(a){V(this,a,L(this))},function(){I(this,24);this.a-=25},function(){I(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){P(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? -9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,L(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,L(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.vb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.vb&1):3+(7==this.b? -2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Yb(this,a,65536);Tb(this,a);O(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);O(this,b);this.a=c-Mc[this.c]},Y]; -function hd(a){u.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.A=ba(this.h);if(this.h){a=this.h;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;ja(a,null,!0,function(a,b,f){id(c,a,b,f)})}}w(hd);hd.prototype.va=function(a,b,c,d){this.B=b;this.a=c;this.K=d;jd(this)};hd.prototype.ka=function(){this.j&&(this.K&&this.K.a(this.id,this.m,this.c,this.j),delete this.j);return!0}; -hd.prototype.ja=function(){return!0}; -function id(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Da(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.j=h.symbols;if(!a.b.length){p("Empty ROM: "+b); -return}if(1==a.b.length){p(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].Xb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=fa(b[0]);if(c!=this.fb)return;b=fa(b[1]);if(this.o=Ea(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.v=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ka=function(a,b){if(!b)if(this.Pb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ja=function(a){return a?this.save():!0};k.reset=function(){od(this)};k.save=function(){var a=new K(this);a.set(0,[]);return a.data()};k.restore=function(){return od(this)};function od(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Cb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.U(this.j), -this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;G(this.a,100,4,52,this.H)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.mc,Z.prototype.Gc,"RCSR"],pd[65394]=[null,null,Z.prototype.lc,Z.prototype.Fc,"RBUF"],pd[65396]=[null,null,Z.prototype.pc,Z.prototype.Jc,"XCSR"],pd[65398]=[null,null,Z.prototype.oc,Z.prototype.Ic,"XBUF"],pd);t(function(){for(var a=B(document,"pdpjs","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.A)){this.j=new K(this,"1.30.0","failsafe");ud(this.j)&&(zd(this,d),a=2,Ad(this.j));this.j.set("timestamp",ia());Bd(this.j);var e=this.b&&!this.m;if(1==a||ka("Click OK to restore the previous PDP11 machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(oa("user",""),this.c=null)):this.U(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.v}e=x(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.Va());this.I&&(zd(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; -function zd(a,b){if(ka("There may be a problem with your PDP11 machine.\n\nTo help us diagnose it, click OK to send this PDP11 machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDP11",ver:"1.30.0"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ja("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new K(a,"1.30.0"),g=new K(a,"1.30.0","validate"),h=ia();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.0");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&Ib(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=x(a.id),l=0;lb){a.o[f].ia-=b;break}b-=a.o[f].ia}a.o.splice(f+1,0,{ia:b,Rb:c<<5&224,Yb:d,yb:e})}a.l|=2}function eb(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|M(a)} +function fb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.j=b<<16;if((b^a.C)&2048)for(var c=a.La.length;0<=--c;){var d=a.f[c];a.f[c]=a.La[c];a.La[c]=d}a.v=b>>14&3;c=a.C>>14&3;a.v!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.v]);a.l|=2;a.C=b}function O(a,b){a.l&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.m=a.h=a.j=b,a.g=c||0)}function Ub(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.m=a.h=a.j=b,a.g=a.m^a.j>>1)}function Vb(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.pa?a.pa=eb(a):a.v||(b=4,c=!0);a.G&57344||(a.ya=63222,a.rb=b);a.v=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);fb(a,e&-12289|a.pa>>2&12288);c&&(a.s|=4,a.f[6]=4);Wb(a,a.pa);Wb(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.pa=-1;throw b;}function Xb(a){var b=Yb(a),c=Yb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;fb(a,c);a.l&=-17} +function mb(a,b){var c=b>>13&31;31>c?a.Ka&32&&(b=a.cb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Zb(a,b,c){var d,e,f,g=0;if(c&a.ob){d=b>>13&a.pb[a.v];e=a.R[a.v][d];f=(a.R[a.v][d+16]<<6)+(b&8191)&4194303;a.Ka&16?3932160<=f&&4186112>f&&(f=mb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.s|=32,K(a,4)),f&1&&!(c&1)&&(a.s|=64,K(a,4)));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.R[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;g&&(g&57344&&(0<=a.pa&&(g|=128),a.G&57344||(a.G=a.G|g|a.gb<<5|a.hb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239>>a.c;return c!=a.h?a.b[d].oc(c,b):a.b[d++].Za(c,b)|a.b[d&a.H].Za(0,b+1)<<8}function N(a,b){return nb(a,Zb(a,b,2))} +function Yb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b}function Wb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.v&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; +case 6:return e=Tb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Tb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.l|=64));return e}k.dc=function(a,b,c){return $b(this,a,b,c)};k.ec=function(a,b,c){return Zb(this,$b(this,a,b,c),c)}; +function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=N(a,d|c&65536),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function bc(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Zb(a,e|c&65536,4),a.v=a.C>>14&3,Wa(a.B,e,d&65535)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} +function cc(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)}function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Va(a.B,e)),e&1&&a.a--,a=a.B,a.b[(e&a.j)>>>a.c].Sa(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),c=d.call(a,c,nb(a,e)),Wa(a.B,e,c&65535)):a.f[e]=d.call(a,c,a.f[e])} +function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.B,a.b[(d&a.j)>>>a.c].Sa(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,d,4),Wa(a.B,d,c&65535)):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +k.Xb=function(a){this.i.complete=!0;this.i.bc=!1;this.i.Wb=!1;this.W=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?K(this,168):this.l&64?K(this,4):this.l&16&&K(this,12),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;a=null;for(var b=this.Eb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Rb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.l&4&&(this.f[7]= +this.f[7]+2&65535,this.l&=-5),a?K(this,a.Yb):K(this,160))}else this.l&1&&this.l++;this.G&57344||(this.ya=0,this.rb=this.f[7]);this.l=this.l&7|this.C&16;this.decode(Tb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function nc(a,b){a=b&~a;O(this,a);return a}function oc(a,b){a=b&~a;O(this,a<<8);return a}function pc(a,b){a|=b;O(this,a);return a}function qc(a,b){a|=b;O(this,a<<8);return a}function rc(a,b){a=~b|65536;P(this,a);return a&65535} +function sc(a,b){a=~b|256;P(this,a<<8);return a&255}function tc(a,b){a=b-a;this.l&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.l&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.l&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function yc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function zc(a,b){a=b<<1|this.j>>16&1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1|this.j>>16&1;Q(this,a<<8);return a&255}function Bc(a,b){a=(this.j&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Vb(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Vb(this,c<<8,a<<8,b<<8);return c&255} +function Fc(a,b){this.l&128||(this.m=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535}function Gc(a,b){a^=b;O(this,a);return a&65535}function Hc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Ic(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.j=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Jc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.j=65536,this.a-=7}var Kc=[0,7,7,10,7,11,9,13];function Lc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Kc[this.c]} +var Mc=[0,14,14,17,14,18,16,20];function Nc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Wb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Mc[this.c]}var Oc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Pc=[7,13,13,17,14,18,17,21];function Qc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.j=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Tc(a){U(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Uc(a){U(this,a,R(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Rb(a){Vc[a>>12].call(this,a)} +var Vc=[function(a){Wc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,gc(this,a,b));this.a=c-Oc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Vb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? +2:0)},function(a){U(this,a,R(this,a),pc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Xc[a>>8&15].call(this,a)},function(a){Yc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);O(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Vb(this,b-a,a,b);this.a-=this.c?4+ +(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),oc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),qc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Dc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Wc=[function(a){Zc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ua()==!(this.g&32768))},function(a){V(this,a,!this.ua()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))},Nc,Nc,function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>> +6&3].call(this,a)},Y,Y],$c=[function(a){P(this,gc(this,a,0));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,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){U(this,a,0,xc);this.a-=this.c?11:6},function(a){U(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, +a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],bd=[function(a){U(this,a,0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],cd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=N(this,a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Wb(this,a);O(this,a);this.a-=11}, +function(a){var b=Yb(this),c=this.a;bc(this,a,0,b);O(this,b);this.a=c-Pc[this.c]},function(a){O(this,gc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){dd[a&15].call(this,a)},Y,Y,Y,Lc,Lc,Lc,Lc,function(a){if(a&8)K(this,8);else{var b=Yb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.l|=1),this.a-=5):K(this,8)},function(a){ed[a&15].call(this,a)},function(a){fd[a&15].call(this,a)},Tc,Tc,Tc,Tc], +dd=[function(){this.C&49152?(this.s|=128,K(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Xb(this);this.l|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Sb(this),this.B.reset());this.a-=667},function(){Xb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ed=[Rc,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= +0;this.a-=5},W,W,W,W,W,W,W],fd=[Rc,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Xc=[Qc,Qc,Jc,Jc,Hc,Hc,Ic,Ic,Uc,Uc,Y,Y,Y,Y,Sc,Sc],Yc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!M(this)&&!!(this.h&65535))},function(a){V(this,a,M(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +a,!M(this))},function(a){V(this,a,M(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},Y,Y],gd=[function(a){P(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,uc);this.a-=this.c? +9:3+(7==this.b?2:0)}],hd=[function(a){T(this,a,0,yc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],id=[function(a){T(this,a,0,Cc);this.a-=this.c?9+(this.vb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,mc);this.a-=this.c?9+(this.vb&1):3+(7==this.b? +2:0)},function(a){T(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],jd=[Y,function(a){a=ac(this,a,65536);Wb(this,a);O(this,a);this.a-=11},function(a){var b=Yb(this),c=this.a;bc(this,a,65536,b);O(this,b);this.a=c-Pc[this.c]},Y]; +function kd(a){v.call(this,"ROM",a,kd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.A=ba(this.h);if(this.h){a=this.h;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){ld(c,a,b,f)})}}y(kd);kd.prototype.va=function(a,b,c,d){this.B=b;this.a=c;this.K=d;md(this)};kd.prototype.la=function(){this.j&&(this.K&&this.K.a(this.id,this.m,this.c,this.j),delete this.j);return!0}; +kd.prototype.ka=function(){return!0}; +function ld(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.j=h.symbols;if(!a.b.length){r("Empty ROM: "+b); +return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].Zb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.fb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.v=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.la=function(a,b){if(!b)if(this.Pb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ka=function(a){return a?this.save():!0};k.reset=function(){rd(this)};k.save=function(){var a=new L(this);a.set(0,[]);return a.data()};k.restore=function(){return rd(this)};function rd(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Db=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.U(this.j), +this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.nc,Z.prototype.Gc,"RCSR"],sd[65394]=[null,null,Z.prototype.mc,Z.prototype.Fc,"RBUF"],sd[65396]=[null,null,Z.prototype.qc,Z.prototype.Jc,"XCSR"],sd[65398]=[null,null,Z.prototype.pc,Z.prototype.Ic,"XBUF"],sd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.A)){this.j=new L(this,"1.30.0","failsafe");xd(this.j)&&(Cd(this,d),a=2,Dd(this.j));this.j.set("timestamp",ka());Ed(this.j);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xd(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.A;delete this.v}e=z(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Va());this.I&&(Cd(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; +function Cd(a,b){if(la("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.0"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} +function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.0"),g=new L(a,"1.30.0","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.0");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&Lb(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Nd(a,b,c)}})}else c(a,null)} +function Od(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--Kd||wa(!0));l=!1}var g,h,l=!0;Kd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| +(c="/versions/pdp11/1.30.0/components.xsl");m=function(d,h){h?Ld(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Kd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Kd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,m):Md(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Od(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})();