From 686396d72641587b88d235ab5972c3c7fa2d54da Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 13 Oct 2016 10:20:11 -0700 Subject: [PATCH] Switched interrupt management to a new set of Trigger functions and static Trigger objects, eliminating the old InterruptQueue of constantly created/destroyed InterruptEvents --- modules/pdp11/lib/cpu.js | 5 + modules/pdp11/lib/cpuops.js | 4 +- modules/pdp11/lib/cpustate.js | 185 +++++++++++++-------------- modules/pdp11/lib/defines.js | 2 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 195 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 132 +++++++++---------- 6 files changed, 262 insertions(+), 261 deletions(-) diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 65d3f58eb..85930a886 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -898,6 +898,11 @@ CPUPDP11.prototype.calcRemainingTime = function() * * Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below. * + * TODO: Consider making the addTimer() and setTimer() interfaces more like the addTrigger() and setTrigger() + * interfaces (which return the underlying object instead of an array index) and maintaining a separate list + * of active timers, in order of highest to lowest cycle countdown values, as this could speed up getBurstCycles() + * and updateTimers() functions ever so slightly. + * * @this {CPUPDP11} * @param {function()} callBack * @return {number} timer index diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 1148b9942..7b3bda5fc 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1704,8 +1704,8 @@ PDP11.opWAIT = function(opCode) * * 1) opWAIT() sets a new opFlags bit (OPFLAG.WAIT) * 2) Rewind the PC back to the WAIT instruction - * 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterruptQueue() - * 4) If checkInterruptQueue() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt + * 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterrupts() + * 4) If checkInterrupts() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt * * Technically, the PC is already exactly where it's supposed to be, so why are we wasting time with steps * 2 and 4? It's largely for the Debugger's sake, so that as long as execution is "blocked" by a WAIT, that's diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 1d07478c5..98fe47a80 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -87,29 +87,30 @@ Component.subclass(CPUStatePDP11, CPUPDP11); * Overview of Device Interrupt Support * * Originally, the CPU maintained a queue of requested interrupts. Entries in this queue recorded a device's - * priority, vector, and delay (ie, a number of instructions to process before issuing the interrupt). This queue - * would constantly grow and shrink as requests were issued and dispatched, and as long as there was something + * priority, vector, and delay (ie, a number of instructions to execute before dispatching the interrupt). This + * queue would constantly grow and shrink as requests were issued and dispatched, and as long as there was something * in the queue, the CPU was constantly examining it. * - * Now we are trying something simpler. First, the CPU offers timer services to any device that wants a callback - * after a specified delay, which are much more efficient than requiring the CPU to dive into an interrupt queue and - * look for (and decrement) delay counts on every instruction. + * Now we are trying something more efficient. First, for devices that require delays (like a serial port's receiver + * and transmitter buffer registers that are supposed to "clock" the data in and out at a specific baud rate), the + * CPU offers timer services that will "fire" a callback after a specified delay, which are much more efficient than + * requiring the CPU to dive into an interrupt queue and decrement delay counts on every instruction. * - * Second, when a device decides it's time to interrupt (either at the end of some operation or when its delay timer - * has fired), it will simply request the interrupt, and CPU priority permitting, the interrupt will be dispatched. - * If CPU priority is NOT permitting, then the interrupt will remain pending until the priority drops. This means - * that the CPU need not check for any pending interrupts until/unless the CPU priority changes. + * Second, devices that generate interrupts will allocate a trigger object during initialization; we will no longer + * be creating and destroying interrupt event objects and inserting/deleting them in a constantly changing queue. Each + * trigger contains properties that never change (eg, the vector and priority), along with a "next" pointer that's + * only used when the trigger is active. * - * All this will be managed with "triggers". Every device that wants to interrupt must register via addTrigger(). - * This will add a Trigger object to an array, and each object will contain the (self) assigned vector, the priority, - * the interrupt request status, and a next pointer. + * When a device decides it's time to interrupt (either at the end of some I/O operation or when a timer has "fired"), + * it will simply "pull the trigger", which basically means that its trigger will be linked onto a list of active + * triggers, and in priority order, so that when the CPU is ready to acknowledge interrupts, it need only check the + * top of the active trigger list. */ /** * @typedef {{ * vector: number, * priority: number, - * request: number, * next: (Trigger|null) * }} Trigger */ @@ -125,10 +126,10 @@ CPUStatePDP11.prototype.initProcessor = function() this.decode = PDP11.op1170.bind(this); /** @type {Array.} */ - this.aTriggers = []; + this.aTriggers = []; // list of all triggers, active or not (TODO: DEBUG-only?) /** @type {Trigger|null} */ - this.triggerNext = null; + this.triggerNext = null; // the head of the active triggers list, in priority order this.initRegs(); @@ -599,23 +600,11 @@ CPUStatePDP11.prototype.setSP = function(addr) */ CPUStatePDP11.prototype.addTrigger = function(vector, priority) { - var trigger = {vector: vector, priority: priority, request: -1, next: null}; + var trigger = {vector: vector, priority: priority, next: null}; this.aTriggers.push(trigger); return trigger; }; -/** - * checkTriggers() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.checkTriggers = function() -{ - if (this.triggerNext && this.setTrigger(this.triggerNext)) { - this.removeTrigger(this.triggerNext); - } -}; - /** * insertTrigger(trigger) * @@ -638,7 +627,7 @@ CPUStatePDP11.prototype.insertTrigger = function(trigger) break; } triggerPrev = triggerNext; - } while (true); + } while (triggerPrev); } } }; @@ -655,14 +644,14 @@ CPUStatePDP11.prototype.removeTrigger = function(trigger) if (triggerPrev == trigger) { this.triggerNext = trigger.next; } else { - do { + while (triggerPrev) { var triggerNext = triggerPrev.next; if (triggerNext == trigger) { triggerPrev.next = triggerNext.next; break; } triggerPrev = triggerNext; - } while (true); + } } }; @@ -670,16 +659,65 @@ CPUStatePDP11.prototype.removeTrigger = function(trigger) * setTrigger(trigger) * * @this {CPUStatePDP11} - * @param {Trigger|null} trigger + * @param {Trigger} trigger * @return {boolean} (true if interrupt dispatched, false if not) */ CPUStatePDP11.prototype.setTrigger = function(trigger) { - if (!this.dispatchInterrupt(trigger.vector, trigger.priority)) { - this.insertTrigger(trigger); - return false; + /* + * For now, we will not dispatch interrupts immediately, but always defer to checkInterrupts() instead. + * + if (this.dispatchInterrupt(trigger.vector, trigger.priority)) { + return true; + } + */ + this.insertTrigger(trigger); + this.opFlags |= PDP11.OPFLAG.INTQ; + return false; +}; + +/** + * checkTriggers(priority) + * + * @this {CPUStatePDP11} + * @param {number} priority + * @return {Trigger|null} + */ +CPUStatePDP11.prototype.checkTriggers = function(priority) +{ + return (this.triggerNext && this.triggerNext.priority > priority)? this.triggerNext : null; +}; + +/** + * checkInterrupts() + * + * @this {CPUStatePDP11} + */ +CPUStatePDP11.prototype.checkInterrupts = function() +{ + if (this.opFlags & PDP11.OPFLAG.INTQ) { + this.opFlags &= ~PDP11.OPFLAG.INTQ; + + var vector = PDP11.TRAP.PIRQ; + var priority = (this.regPIR & PDP11.PSW.PRI) >> PDP11.PSW.SHIFT.PRI; + + var trigger = this.checkTriggers(priority); + if (trigger) { + vector = trigger.vector; + priority = trigger.priority; + } + + if (this.dispatchInterrupt(vector, priority)) { + if (trigger) this.removeTrigger(trigger); + } + } + else if (this.opFlags & PDP11.OPFLAG.INTQ_SPL) { + /* + * We know that INTQ (bit 1) is clear, so since INTQ_SPL (bit 0) is set, incrementing opFlags + * will transform INTQ_SPL into INTQ, without affecting any other (higher) bits. + */ + this.opFlags++; } - return true; }; /** @@ -704,61 +742,6 @@ CPUStatePDP11.prototype.dispatchInterrupt = function(vector, priority) return false; }; -/** - * checkInterrupts() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.checkInterrupts = function() -{ - if (this.opFlags & PDP11.OPFLAG.INTQ) { - this.opFlags &= ~PDP11.OPFLAG.INTQ; - this.checkTriggers(); - /* - var interruptEvent = null; - var savePSW = this.regPIR & 0xe0; - for (var i = this.interruptQueue.length; --i >= 0;) { - if (this.interruptQueue[i].delay > 0) { - this.interruptQueue[i].delay--; - this.opFlags |= PDP11.OPFLAG.INTQ; - break; // Decrement only one delay 'difference' per cycle - } - if (this.interruptQueue[i].callback) { - if (!this.interruptQueue[i].callback()) { - this.interruptQueue.splice(i, 1); - continue; - } - //delete - this.interruptQueue[i].callback = null; - } - if (this.interruptQueue[i].priority > savePSW) { - savePSW = this.interruptQueue[i].priority; - interruptEvent = this.interruptQueue[i]; - this.interruptQueue.splice(i, 1); - } - } - if (savePSW > (this.regPSW & 0xe0)) { - if (this.opFlags & PDP11.OPFLAG.WAIT) { - this.advancePC(2); - this.opFlags &= ~PDP11.OPFLAG.WAIT; - } - if (!interruptEvent) { - this.trap(PDP11.TRAP.PIRQ, PDP11.REASON.INTERRUPT); - } else { - this.trap(interruptEvent.vector, PDP11.REASON.INTERRUPT); - } - } - */ - } - else if (this.opFlags & PDP11.OPFLAG.INTQ_SPL) { - /* - * We know that INTQ (bit 1) is clear, so since INTQ_SPL (bit 0) is set, incrementing opFlags - * will transform INTQ_SPL into INTQ, without affecting any other (higher) bits. - */ - this.opFlags++; - } -}; - /** * getPSW() * @@ -768,11 +751,11 @@ CPUStatePDP11.prototype.checkInterrupts = function() CPUStatePDP11.prototype.getPSW = function() { /* - * I'm not sure why this function can't simply be written as: + * TODO: I'm not sure why this function can't simply be written as: * * return (this.regPSW & ~PDP11.PSW.FLAGS) | (this.getNF() | this.getZF() | this.getVF() | this.getCF()); * - * but for now, I'm keeping the same masking logic as pdp11.js. + * but for now, I'm keeping the same masking logic as the original pdp11.js. */ var mask = PDP11.PSW.CMODE | PDP11.PSW.PMODE | PDP11.PSW.REGSET | PDP11.PSW.PRI | PDP11.PSW.TF; return this.regPSW = (this.regPSW & mask) | this.getNF() | this.getZF() | this.getVF() | this.getCF(); @@ -817,11 +800,23 @@ CPUStatePDP11.prototype.setPSW = function(newPSW) this.regsAltStack[oldMode] = this.regsGen[6]; this.regsGen[6] = this.regsAltStack[this.mmuMode]; } + this.regPSW = newPSW; + /* - * Trigger a call to checkInterrupts() + * Trigger a call to checkInterrupts(), just in case. + * + * TODO: I think this is overdone; if you set a breakpoint on checkInterrupts(), you'll see that a significant + * percentage of calls do nothing. For example, you'll usually see a spurious checkInterrupts() immediately after + * an interrupt has been dispatched, because it's dispatched via trap(), and trap() calls setPSW(). + * + * I mean, sure, it's POSSIBLE that the new PSW loaded by trap() actually set a lower priority, allowing a lower + * priority interrupt to immediately be acknowledged. But perhaps we should a bit more rigorous here. + * + * For example, we could avoid setting INTQ unless 1) there's actually an active interrupt trigger (ie, triggerNext + * is not null) or 2) an optional fCheckInterrupts flag is passed to us, because the caller has some knowledge + * that priority could be changing. Just throwing out some ideas.... */ this.opFlags |= PDP11.OPFLAG.INTQ; - this.regPSW = newPSW; }; /** diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index e1581ea45..4ec828132 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -186,7 +186,7 @@ var PDP11 = { */ OPFLAG: { INTQ_SPL: 0x01, // INTQ triggered by SPL - INTQ: 0x02, // call checkInterruptQueue() + INTQ: 0x02, // call checkInterrupts() WAIT: 0x04, // WAIT operation in progress TRAP_TF: 0x10, // aka PDP11.PSW.TF TRAP_MMU: 0x20, diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index f9a251047..9af43aa23 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -693,7 +693,7 @@ function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window. function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(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 Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,fb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.mc=b;b=this.id.indexOf(".");0>b?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.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=r);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={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];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.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.F=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ea[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ea[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ea[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} function Hb(a,b){var c=-1,d=this.controller;(a=d.Ea[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ea[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&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} function Lb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Ub(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Eb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;d>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Vb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Fb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Sb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} -function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Db:-1}}y(K);h=K.prototype; -h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Db=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Db,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Db,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.D&62337|a.sa<<5|a.ta<<1}; -h.gd=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.gb=4194303,b.va=3915776):(b.gb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} +function Wb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Tb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} +function fc(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Eb:-1}}y(K);h=K.prototype; +h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Eb=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Eb,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Eb,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.F&62337|a.sa<<5|a.ta<<1}; +h.gd=function(a){var b=this.b;a&=62337;if(b.F!=a){b.F=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} h.Mc=function(a){return this.b.P[1][a>>1&7]};h.ud=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.P[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.uc=function(a){return this.b.P[0][a>>1&7]}; h.dd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.P[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.Sc=function(a){return this.b.P[3][a>>1&7]};h.Ad=function(a,b){this.b.P[3][b>>1&7]=a&65295}; -h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Ya=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.bb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; -h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.Za=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; -h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Tb=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Wb};h.fd=function(a,b){b&1||(a&=255);this.b.Wb=a}; -h.Bc=function(a){return a?this.b.Xb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Xb=a;b.F|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; +h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Za=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; +h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; +h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Ub=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Xb};h.fd=function(a,b){b&1||(a&=255);this.b.Xb=a}; +h.Bc=function(a){return a?this.b.Cb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Cb=a;b.D|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.D|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; var M={},L=(M[62592]=[null,null,K.prototype.Mc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Kc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Lc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Jc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.uc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.sc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.tc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.rc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, K.prototype.Ac,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.vc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.xc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.yc,K.prototype.$b,"MMR1"],M[65406]=[null,null,K.prototype.zc,K.prototype.$b,"MMR2"],M[65408]=[null,null,K.prototype.Sc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Qc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Rc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Pc,K.prototype.xd,"UDSAR"], -M[65472]=[null,null,K.prototype.Ya,K.prototype.bb,"R0SET0"],M[65473]=[null,null,K.prototype.Ya,K.prototype.bb,"R1SET0"],M[65474]=[null,null,K.prototype.Ya,K.prototype.bb,"R2SET0"],M[65475]=[null,null,K.prototype.Ya,K.prototype.bb,"R3SET0"],M[65476]=[null,null,K.prototype.Ya,K.prototype.bb,"R4SET0"],M[65477]=[null,null,K.prototype.Ya,K.prototype.bb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, -K.prototype.Za,K.prototype.cb,"R0SET1"],M[65481]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET1"],M[65482]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET1"],M[65483]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET1"],M[65484]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET1"],M[65485]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, -"CTRL",1170],M[65520]=[null,null,K.prototype.Tb,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Tb,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], +M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, +K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, +"CTRL",1170],M[65520]=[null,null,K.prototype.Ub,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Ub,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, -1,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Fa=!0},ma:function(a,b,c){this.D[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&Yb(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Eb,a.bc=a.f?a.H:a.Fb):--a.i||(a.tb=a.yb,a.Ub=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Eb=b[1]||a.I,a.Fb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Ub=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} +k(this.A),!0),this.j.fa());return 255},I:function(a,b){this.j&&E(this.j,128)&&(B(this.j,"attempt to write "+k(b,4,!0)+" to invalid block %"+k(this.A),!0),this.j.fa())},M:function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8},H:function(a,b,c){this.ub(a++,b&255,c++);this.ub(a,b>>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&fc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, +1,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Gb(a,b,c)},R:function(a){return this.F[a]},U:function(a,b){a=this.F[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&fc(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&fc(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.F[a]=b;this.Fa=!0},ma:function(a,b,c){this.F[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&fc(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&fc(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Fb,a.bc=a.f?a.H:a.Gb):--a.i||(a.tb=a.yb,a.Vb=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Fb=b[1]||a.I,a.Gb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Vb=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.R,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; -function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Cb=!1;this.v.eb=a.autoStart;this.v.Va=!1;this.ib=this.ka=0;this.jb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Pb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; -h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.ib))}} -h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} +function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Db=!1;this.v.fb=a.autoStart;this.v.Va=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Qb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; +h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.jb))}} +h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Qc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Oc(a,b){var c=a.ea-=a.b;a.b=0;b&&(a.ea=0);return c} -h.Wc=function(){if(this.v.da){this.hb>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.ab(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Ob&&(this.B&&this.B.aa(),this.Ob=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, -e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Pb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.hb+=this.qa;this.ca+=c;a(b,c)}}}; -h.$a=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Cb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Pb,0);return!0};h.ab=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; -function jd(a){this.Sb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.F=this.Wb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ld(a){a.Ka=255;a.Z=0;a.Xb=0;a.D=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.gb=262143;a.va=253952;a.F|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Vb,a.Rb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Rb=a.Bd,Lb(a.w,16))}h.Lb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; +h.Wc=function(){if(this.v.da){this.ib>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Pb&&(this.B&&this.B.aa(),this.Pb=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, +e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Qb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.ib+=this.qa;this.ca+=c;a(b,c)}}}; +h.ab=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Db=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Qb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; +function jd(a){this.Tb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.D=this.Xb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; +function ld(a){a.Ka=255;a.Z=0;a.Cb=0;a.F=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.D|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Wb,a.Sb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Sb=a.Bd,Lb(a.w,16))}h.Mb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c(a.L&224)>>5?(a.F&4&&(a.u[7]=a.u[7]+2&65535,a.F&=-5),a.$(c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.lb<=b.lb)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.lb<=b.lb){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Db(a){return a.L=a.L&63728|a.Aa()|od(a)|nd(a)|md(a)} -function mc(a,b){a.S=b<<12;a.X=~b&4;a.O=b<<14;a.N=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.D&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.F&=-17} -function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.gb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: -128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.D&57344||(a.D=a.D|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.M(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.M(e)|g;a.b-= -8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Vb=function(a){return this.w.ja(yd(this,a,2))}; +function pd(a){var b=a.M(a.u[7]);a.u[7]=a.u[7]+2&65535;return b}function qd(a,b){a.u[7]=b&65535}function jc(a,b,c){b={Yc:b,Ya:c,next:null};a.jc.push(b);return b}function hc(a,b){if(b!=a.U){var c=a.U;if(!c||c.Ya<=b.Ya)b.next=c,a.U=b;else{do{var d=c.next;if(!d||d.Ya<=b.Ya){b.next=d;c.next=b;break}c=d}while(c)}}a.D|=2}function Db(a){return a.L=a.L&63728|a.Aa()|od(a)|nd(a)|md(a)} +function mc(a,b){a.S=b<<12;a.X=~b&4;a.O=b<<14;a.N=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.L=b;a.D|=2}function O(a,b){a.D&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.D&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.D&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.F&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.D&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.D&=-17} +function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: +128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.F&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.M(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.M(e)|g;a.b-= +8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Wb=function(a){return this.w.ja(yd(this,a,2))}; h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(yd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.M(d|c&a.V),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function Bd(a,b,c,d){a.D&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} +function Bd(a,b,c,d){a.F&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} function Fd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(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.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.ab=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Cb?0:1:-1;this.v.Cb=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){if(this.F&=-3,this.U&&hc(this,this.U)){var d=a=this.U;if(d==a)this.U=a.next;else{do{var e=d.next;if(e==a){d.next=e.next;break}d=e}while(1)}}}else this.F&1&&this.F++;this.D&57344||(this.Ia= -0,this.Bb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(pd(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;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(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.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535} -function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=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.N>>16&1;td(this,a);return a&65535} -function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&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.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(this,a);return a&65535} +h.bb=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Db?0:1:-1;this.v.Db=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;var d=160,e=(this.Cb&224)>>5;if(a=this.U&&this.U.Ya>e?this.U:null)d=a.Yc,e=a.Ya;e>(this.L&224)>>5?(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),this.$(d,26),e=!0):e=!1;if(e&& +a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.D&1&&this.D++;this.F&57344||(this.Ia=0,this.Bb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(pd(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;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(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.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.S=this.X=c,this.O=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.N>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&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.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(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.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?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.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}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.i]} -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.i]}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.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.i]}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.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){Q(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){Q(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function kd(a){ye[a>>12].call(this,a)} var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;O(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.H&&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);O(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&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.i? 4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ze= [function(a){Ve[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!od(this))},function(a){R(this,a,od(this))},function(a){R(this,a,!this.Aa()==!nd(this))},function(a){R(this,a,!this.Aa()!=!nd(this))},function(a){R(this,a,!od(this)&&!this.Aa()==!nd(this))},function(a){R(this,a,od(this)||!this.Aa()!=!nd(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)},V,V],We=[function(a){rd(this, Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){Q(this,a,0,ae);this.b-=this.i?11:6},function(a){Q(this,a,md(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Vb(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);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, -0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(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.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= +2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Wb(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);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, +0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(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.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.D&4||this.B.aa();this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= [ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Te=[te,te,me,me,ke,ke,le,le,xe,xe,V,V,V,V,ve,ve],Ue=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!md(this)&&!od(this))},function(a){R(this,a,md(this)||od(this))},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(){this.$(24, 2);this.b-=25},function(){this.$(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)},V,V],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,be);this.b-= this.i?11:6},function(a){P(this,a,md(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,md(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){P(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9:3+(7== -this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Hb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Gb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; +this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.F=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.F,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Ib);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Hb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.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=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Ab=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Rb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.F=[];return!0}h.Ab=function(a){if("number"==typeof a)this.F.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],pf[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],pf[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],pf[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Mb=function(){return-1};qf.prototype.Nb=function(){}; +function qf(a){r.call(this,"Debugger",a,qf);this.ha=a.base||16;this.ta=!1;this.R=this.sa=this.H=0;this.U=!1;this.C=-1;this.i=[];this.ba={}}y(qf);var rf={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Nb=function(){return-1};qf.prototype.Ob=function(){}; function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[a.C+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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ba[b]);var c=0;for(b in a.ba)xf(a,b,a.ba[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; -h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Fb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} +d.ka.value="";Ic(d,a,!0);return!0}return!1}),!0;case "step":return this.I[b]=c,Fa(c,function(a){var b=!1;hb(d,!0)||(gb(d,!0),b=d.bb(a?1:0),gb(d,!1));return b}),!0}return!1};h.nb=function(){this.ka&&this.ka.focus()};function Z(a){a=a&&a.A;null==a&&(a=-1);return a}h.Pa=function(a,b){var c=255,d=Z(a);-1!==d&&(c=this.w,c.w++,d=c.W[(d&c.i)>>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Gb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} function Hf(a,b,c){var d;c=(c?a.K:a.Ma).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"}h.Nb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.Nb=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7a?"R"+a:6==a?"SP":"PC"}h.Ob=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Oc(a),a.la=0,a.B.aa()))}; -function Bf(a){var b;if(Jd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.La=0} -h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||Bf(a);break}}return f} +h.save=function(){var a=new N(this);a.set(0,Jf(this.K));a.set(1,Jf(this.T));a.set(2,[this.i,this.U,this.ia]);a.set(3,this.G);return a.data()};h.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Kf(a[b++]),this.T=Kf(a[b++]),this.i=a[b][0],"string"==typeof this.i&&(this.i=[this.i]),this.U=a[b][1],this.ia|=a[b][2]);a[3]&&(this.G=a[3]);return!0};h.start=function(a,b){this.V||this.g("running");this.v.da=!0;this.hb=a;this.ib=b}; +h.stop=function(a,b){if(this.v.da){this.v.da=!1;this.H=b-this.ib;if(!this.V){b="stopped";if(this.H){a-=this.hb;var c=0>>d.Y],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.Y],!0);a.F=["bw"];a.La=0} +h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.F)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.F));l.wa||Bf(a);break}}return f} function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ ")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(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")}h.Hb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(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")}h.Ib=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=X(d.u[7]),Pf(a,J(a,a.K.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Zb=wf(a,za)>>>0,65536>4||1;yg--&&0<$b;){var ac=0,rb=0,sb,Vc="",Ke="",ha=J(a,pb.A);for(sb=4==Ta?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Hf(a,ad);if(cc)for(var dc=2;dc< -g.length;dc++){var tb=uf(a,g[dc]);if(void 0===tb){a.g("unrecognized value: "+g[dc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,cc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.$a(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,ec=ed,Me=null,wb= -ec.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< +g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,dc=ed,Me=null,wb= +dc.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.J)){this.D=new N(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;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.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(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.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.eb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +h.lb=function(a){void 0===a&&(a=this.f||(this.J?1:hg));if(!this.B){this.B++;var b=!1,c=!1;this.T=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>hg){if(jg(d,this.J)){this.F=new N(this,"1.30.1","failsafe");jg(this.F)&&(og(this,d),a=2,pg(this.F));this.F.set("timestamp",ta());qg(this.F);var e=this.f&&!this.G;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.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(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.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.fb());this.T&&(og(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.B=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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;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.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mb?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.eb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.j-1;this.s=this.D/this.j|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.s=this.D/this.l|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[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||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Oa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.xa+t;f=q+a.j;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.j,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.j;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} -function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} +function Ya(a,b,c,d,e){for(var f=b,h=c,l=f>>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.ya+t;f=q+a.l;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.l;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a,b){a.o||H(a.a,4,b)} -function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,Za:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;var e=this;this.b.Za=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.Za,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.Za,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; +function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,$a:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.$a=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.$a,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.$a,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Ua=4194303,b.Fa=3915776):(b.Ua=262143,b.Fa=253952),nb(b));ob(this)};function ob(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.$b=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Yb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.Zb=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; g.Xb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Ib=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Gb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Hb=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Fb=function(a){return this.a.P[0][(a>>1&7)+8]}; g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.fc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.dc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ec=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.cc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.ua=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.jb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; -g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.lb};g.vc=function(a,b){b&1||(a&=255);this.a.lb=a};g.Pb=function(a){return a?this.a.mb:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.mb=a;b.l|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.l|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +g.ta=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; +g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.kb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; +g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.mb};g.vc=function(a,b){b&1||(a&=255);this.a.mb=a};g.Pb=function(a){return a?this.a.Za:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Za=a;b.j|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; var K={},J=(K[62592]=[null,null,I.prototype.$b,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Yb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.Zb,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Xb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Ib,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Gb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Hb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Fb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, I.prototype.Ob,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Jb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Lb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Mb,I.prototype.rb,"MMR1"],K[65406]=[null,null,I.prototype.Nb,I.prototype.rb,"MMR2"],K[65408]=[null,null,I.prototype.fc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.dc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.ec,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.cc,I.prototype.Mc,"UDSAR"], -K[65472]=[null,null,I.prototype.sa,I.prototype.ua,"R0SET0"],K[65473]=[null,null,I.prototype.sa,I.prototype.ua,"R1SET0"],K[65474]=[null,null,I.prototype.sa,I.prototype.ua,"R2SET0"],K[65475]=[null,null,I.prototype.sa,I.prototype.ua,"R3SET0"],K[65476]=[null,null,I.prototype.sa,I.prototype.ua,"R4SET0"],K[65477]=[null,null,I.prototype.sa,I.prototype.ua,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, -I.prototype.ta,I.prototype.va,"R0SET1"],K[65481]=[null,null,I.prototype.ta,I.prototype.va,"R1SET1"],K[65482]=[null,null,I.prototype.ta,I.prototype.va,"R2SET1"],K[65483]=[null,null,I.prototype.ta,I.prototype.va,"R3SET1"],K[65484]=[null,null,I.prototype.ta,I.prototype.va,"R4SET1"],K[65485]=[null,null,I.prototype.ta,I.prototype.va,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, -"CTRL",1170],K[65520]=[null,null,I.prototype.jb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.jb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], +K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.kb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.kb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.j,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.j,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.j,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.j,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.j,c);this.o[a>> +b&255,c++);this.Pa(a,b>>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.l,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> 1]=b;this.ha=!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.U=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa];if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.ca,G.prototype.W,G.prototype.pa]; -function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.ca=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.ya=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.hb=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; -g.ja=function(a,b,c,d){this.w=a;this.j=b;this.I=d;for(b=0;ba.X/a.ca&&(b=1),a.Z=b,b=a.Ta*a.Z,a.ca!=b)){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.R;a.R=0;a.N=ka();a.Y=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.da-=a.a;a.a=0;b&&(a.da=0);return c} -g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.wa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.fb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.wa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.bb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& -(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.gb&&(this.w&&this.w.ba(),this.gb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.hb;this.Y=ka();d=this.fb;this.wa&&(d=Math.round(d*this.wa/ -this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.wa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.hb,0)}}g.pb=function(){return 0}; +g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.gb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.xa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.cb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& +(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.hb&&(this.w&&this.w.ba(),this.hb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.ib;this.Y=ka();d=this.gb;this.xa&&(d=Math.round(d*this.xa/ +this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.xa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.ib,0)}}g.pb=function(){return 0}; function F(a){if(a.h.S){Nb(a);a.J+=a.R;a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0} function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.U=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.V=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.l=this.lb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Qb(a){a.na=255;a.F=0;a.mb=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.l|=2;a.j&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.kb,a.ib=a.Sc,Va(a.j,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.ib=a.Rc,Va(a.j,16))}g.bb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.j));return a.data()}; -g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c(a.u&224)>>5?(a.l&4&&(a.f[7]=a.f[7]+2&65535,a.l&=-5),H(a,c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.Aa<=b.Aa)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.Aa<=b.Aa){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function pb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.s=b>>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.l|=2;a.u=b}function N(a,b){a.l&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.l&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.l&=-17} +0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.j=this.mb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Qb(a){a.na=255;a.F=0;a.Za=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.lb,a.jb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.jb=a.Rc,Va(a.l,16))}g.cb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: -128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= -8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.l|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.j,a)};g.kb=function(a){return cb(this.j,Xb(this,a,2))}; -g.Rc=function(a,b){db(this.j,a,b&65535)};g.Sc=function(a,b){db(this.j,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} -function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.j,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} -function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.j,e)),e&1&&a.a--,a=a.j,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.j,e,d.call(a,c,cb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])} -function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.j,a.b[(d&a.i)>>>a.c].Pa(d&a.g,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 ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.j,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?H(this,168,28):this.l&64?H(this,4,30):this.l&16&&H(this,12,32),this.l&=-113),this.l&7))if(this.l&2){if(this.l&=-3,this.U&&kb(this,this.U)){var b=a=this.U;if(b==a)this.U=a.next;else{do{var c=b.next;if(c==a){b.next=c.next;break}b=c}while(1)}}}else this.l&1&&this.l++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.l=this.l&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255} -function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255}function rc(a,b){a=b-a;this.l&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.i=c,this.g=b&(b^c));return a&255} -function tc(a,b){a=b+a;this.l&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535} -function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.l&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Ec(a,b){a^=b;N(this,a);return a&65535} -function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= +8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.l,a)};g.lb=function(a){return cb(this.l,Xb(this,a,2))}; +g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} +function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} +function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,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 ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.Za&224)>>5;if(a=this.U&&this.U.sa>c?this.U:null)b=a.nc,c=a.sa;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.U,c==a)this.U=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +1&&this.j++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255} +function rc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function tc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} +function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} +function Ec(a,b){a^=b;N(this,a);return a&65535}function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} function Gc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} function Ic(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=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.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Jc=[0,7,7,10,7,11,9,13];function Kc(a){var b=this.a;a=bc(this,a);this.f[7]=a&65535;this.a=b-Jc[this.c]} -var Lc=[0,14,14,17,14,18,16,20];function Mc(a){var b=this.a,c=bc(this,a);a=a>>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(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.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-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 Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Uc[a>>12].call(this,a)} var Uc=[function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,ec(this,a,b));this.a=c-Nc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Tb(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),lc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Wc[a>>8&15].call(this,a)},function(a){Xc[a>>8&15].call(this,a)},function(a){var b=ac(this,a);N(this,dc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=ac(this,a)<<8;a=cc(this,a)<<8;Tb(this,b-a,a,b);this.a-=this.c?4+ (this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(ac(this,a)&cc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),mc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Vc=[function(a){Yc[a>> 4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Mc,Mc,function(a){Zc[a>>6&3].call(this,a)},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)},X,X],Zc=[function(a){O(this,ec(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)}],$c=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9: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:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.kb(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=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= -11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8,6);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.l|=1),this.a-=5):H(this,8,6)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc, -Sc,Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.l&4||this.w.ba();this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.l|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Qb(this),this.j.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9: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:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.lb(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=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= +11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8,6);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc, +Sc,Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.j&4||this.w.ba();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.j|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Qb(this),this.l.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= 5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],ed=[Qc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Wc=[Pc,Pc,Ic,Ic,Fc,Fc,Gc,Gc,Tc,Tc,X,X,X,X,Rc,Rc],Xc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a, this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24,2);this.a-=25},function(){H(this,28,5);this.a-=5},function(a){fd[a>>6&3].call(this,a)},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)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2: 0)},function(a){S(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, a,0,kc);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; -function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; jd.prototype.$=function(){return!0}; function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].qb(e&d.g,f&255,e);d.o--}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>>d.c].qb(e&d.g,f&255,e);d.o--}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=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.eb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ja=function(a,b,c,d){this.w=a;this.l=b;this.a=c;this.I=d;var e=this;this.M=mb(this.a,48,4);this.H=jb(this.a,function(){e.b&128||!e.i.length||(e.D=e.i.shift(),e.b|=128,e.b&64&&kb(e.a,e.M))});this.N=mb(this.a,52,4);this.J=jb(this.a,function(){e.c|=128;e.c&64&&kb(e.a,e.N)});gb(b,this,od);D(this)}; +g.fb=function(){if(!this.s){var a=Gb(this.w,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.fb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; g.$=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var qd={},od=(qd[65392]=[null,null,Z.prototype.Wb,Z.prototype.Fc,"RCSR"],qd[65394]=[null,null,Z.prototype.Vb,Z.prototype.Ec,"RBUF"],qd[65396]=[null,null,Z.prototype.jc,Z.prototype.Uc,"XCSR"],qd[65398]=[null,null,Z.prototype.ic,Z.prototype.Tc,"XBUF"],qd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;btd){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.ya());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +g.Aa=function(a){void 0===a&&(a=this.b||(this.s?1:td));if(!this.g){this.g++;var b=!1,c=!1;this.G=!1;var d=this.A||new L(this,"1.30.1");if(-1==a)b=!0;else if(a>td){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.za());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; function Ad(a,b){if(ma("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} function Ed(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.$&&(c&&F(a.a),d=a.a.$(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n