From 57bceb4da9cb7666809c14e6d53198eb5cf2be3b Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Nov 2016 10:28:54 -0700 Subject: [PATCH] Fixed the LED (lamp) test, fixed Front Panel update on a machine RESET, and cleaned up the status update code a bit --- .../machine/1170/panel/debugger/README.md | 14 +- modules/pdp11/lib/computer.js | 89 ++-- modules/pdp11/lib/cpu.js | 19 +- modules/pdp11/lib/cpuops.js | 3 +- modules/pdp11/lib/panel.js | 101 ++-- versions/pdpjs/1.30.2/pdp11-dbg.js | 484 +++++++++--------- versions/pdpjs/1.30.2/pdp11.js | 356 ++++++------- 7 files changed, 554 insertions(+), 512 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index db3a3696d..31e2adb6d 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -13,13 +13,11 @@ machines: Toggle-Ins ---------- -From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: +As DEC explains in its [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are listed below. + +### Memory Management - There are several useful toggle-ins that are probably not very well known. They are as follows: - - Memory Management - Use the following toggle-in to verify the correct operation of Memory Management Relocation. 200/012737 MOV #400,@#177572 (load maint. bit in MMRO) @@ -79,10 +77,8 @@ which should produce these results: >> dw 300 l1 000300 70707 ---- +### Unibus Map Checkout - Unibus Map Checkout - Use the following console operating procedure to verify the correct operation of the Unibus Map. Load Address 500 diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 15a6b9c10..4fe1afd01 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -744,6 +744,7 @@ ComputerPDP11.prototype.donePowerOn = function(aParms) * TODO: Do we not care about the return value here? (ie, is checking fRestoreError sufficient)? */ this.powerRestore(this.cpu, stateComputer, fRepower, fRestore); + this.updateStatus(); this.cpu.autoStart(); } @@ -955,26 +956,31 @@ ComputerPDP11.prototype.powerOff = function(fSave, fShutdown) * allocated the Bus object ourselves, after all the other components were allocated, it ends * up near the end of Component's list of components. Hence the special case for this.bus below. * + * Ditto for the CPU, in part because if the Front Panel resets before the CPU, it will end up + * snapping/displaying the PC as of the last instruction executed, before the CPU resets the PC, + * causing the Front Panel to display a stale address when we call updateStatus() at the end. + * * @this {ComputerPDP11} */ ComputerPDP11.prototype.reset = function() { if (this.bus && this.bus.reset) { - /* - * TODO: Why does WebStorm think that this.bus.type is undefined? The base class (Component) - * constructor defines it. - */ this.printMessage("Resetting " + this.bus.type); this.bus.reset(); } + if (this.cpu && this.cpu.reset) { + this.printMessage("Resetting " + this.cpu.type); + this.cpu.reset(); + } var aComponents = Component.getComponents(this.id); for (var iComponent = 0; iComponent < aComponents.length; iComponent++) { var component = aComponents[iComponent]; - if (component !== this && component !== this.bus && component.reset) { + if (component !== this && component !== this.bus && component !== this.cpu && component.reset) { this.printMessage("Resetting " + component.type); component.reset(); } } + this.updateStatus(true); }; /** @@ -1027,6 +1033,44 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) this.updateStatus(true); }; +/** + * updateStatus(fForce) + * + * TODO: Notify all (other) components with an updateStatus() method that the computer's state has changed. + * + * If any DOM controls were bound to the CPU, then we need to call its updateStatus() handler; if there are no + * such bindings, then cpu.updateStatus() does nothing. + * + * Similarly, if there's a Panel, then we need to call its updateStatus() handler, in case it created its own canvas + * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateStatus() also does nothing. + * + * In practice, there will *either* be a Panel with a custom canvas *or* a set of DOM controls bound to the CPU *or* + * neither. In theory, there could be BOTH, but that would be unusual. + * + * TODO: Consider alternate approaches to these largely register-oriented display updates. Ordinarily, we like to + * separate logic from presentation, and currently the CPUState contains both, since it's the component that intimately + * knows the names, number, sizes, etc, of all the active registers. The Panel component is the logical candidate, + * but Panel is an optional component; it's often the case that only machines that include the Debugger also include + * Panel. + * + * @this {ComputerPDP11} + * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) + */ +ComputerPDP11.prototype.updateStatus = function(fForce) +{ + /* + * fForce is generally set to true whenever the CPU is transitioning to/from a running state, in which case + * cpu.updateStatus() will definitely want to hide/show register contents; however, at other times, when the + * CPU is running, constantly updating the DOM controls too frequently can adversely impact overall performance. + * + * So fForce serves as a hint to help cpu.updateStatus() make a more informed decision. panel.updateStatus() + * currently doesn't care, on the theory that canvas updates should be significantly faster than DOM updates, + * but we still pass fForce on. + */ + if (this.cpu) this.cpu.updateStatus(fForce); + if (this.panel) this.panel.updateStatus(fForce); +}; + /** * setBinding(sType, sBinding, control, sValue) * @@ -1429,41 +1473,6 @@ ComputerPDP11.prototype.setFocus = function(fScroll) } }; -/** - * updateStatus(fForce) - * - * If any DOM controls were bound to the CPU, then we need to call its updateStatus() handler; if there are no - * such bindings, then cpu.updateStatus() does nothing. - * - * Similarly, if there's a Panel, then we need to call its updateStatus() handler, in case it created its own canvas - * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateStatus() also does nothing. - * - * In practice, there will *either* be a Panel with a custom canvas *or* a set of DOM controls bound to the CPU *or* - * neither. In theory, there could be BOTH, but that would be unusual. - * - * TODO: Consider alternate approaches to these largely register-oriented display updates. Ordinarily, we like to - * separate logic from presentation, and currently the CPUState contains both, since it's the component that intimately - * knows the names, number, sizes, etc, of all the active registers. The Panel component is the logical candidate, - * but Panel is an optional component; generally, only machines that include Debugger also include Panel. - * - * @this {ComputerPDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) - */ -ComputerPDP11.prototype.updateStatus = function(fForce) -{ - /* - * fForce is generally set to true whenever the CPU is transitioning to/from a running state, in which case - * cpu.updateStatus() will definitely want to hide/show register contents; however, at other times, when the - * CPU is running, constantly updating the DOM controls too frequently can adversely impact overall performance. - * - * So fForce serves as a hint to help cpu.updateStatus() make a more informed decision. panel.updateStatus() - * currently doesn't care, on the theory that canvas updates should be significantly faster than DOM updates, - * but we still pass fForce on. - */ - if (this.cpu) this.cpu.updateStatus(fForce); - if (this.panel) this.panel.updateStatus(fForce); -}; - /** * ComputerPDP11.init() * diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index c94e8886c..e5e1dffc8 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -282,11 +282,7 @@ CPUPDP11.prototype.powerUp = function(data, fRepower) * is now responsible for managing a component's fPowered flag, not us. * * this.flags.powered = true; - * - * And we don't have to worry whether this.cmp is set, because powerUp() handlers are never called - * before initBus() handlers. */ - this.cmp.updateStatus(); return true; }; @@ -508,6 +504,17 @@ CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) return false; }; +/** + * updateComputer(fForce) + * + * @this {CPUPDP11} + * @param {boolean} [fForce] + */ +CPUPDP11.prototype.updateComputer = function(fForce) +{ + if (this.cmp) this.cmp.updateStatus(fForce); +}; + /** * updateStatus(fForce) * @@ -1094,7 +1101,7 @@ CPUPDP11.prototype.runCPU = function() if (this.nCyclesNextYield <= 0) { this.nCyclesNextYield += this.nCyclesPerYield; if (++this.nYieldsSinceStatusUpdate >= CPUPDP11.YIELDS_PER_STATUS) { - if (this.cmp) this.cmp.updateStatus(); + this.updateComputer(); this.nYieldsSinceStatusUpdate = 0; } break; @@ -1209,7 +1216,7 @@ CPUPDP11.prototype.yieldCPU = function() * odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not, * so I've added this call to try to keep things looking synchronized. */ - if (this.cmp) this.cmp.updateStatus(); + this.updateComputer(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index c5b2a0a1e..960be5b01 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1413,9 +1413,8 @@ PDP11.opRESET = function(opCode) if (!(this.regPSW & PDP11.PSW.CMODE)) { this.bus.reset(); this.resetRegs(); - // display.data = this.regsGen[0]; // TODO: Review } - this.nStepCycles -= 667; // TODO: Review (but it's definitely a big number) + this.nStepCycles -= 667; // TODO: Review (but it's definitely a big number) }; /** diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index fdcc817b1..0723ec4f0 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -63,12 +63,16 @@ function PanelPDP11(parmsPanel) this.fDisplayLiveRegs = true; /* - * regSwitches contains the Console (Front Panel) Switch Register, which is also available as a - * read-only register at 177570 (but only the low 16 bits). + * regSwitches contains the Front Panel (aka Console) 'SWITCH' register, which is also available + * as a read-only register at 177570 (but only the low 16 bits). * - * regAddr is an internal register containing the contents of the Front Panel's ADDRESS display, - * and regData corresponds to the DATA display. They are updated by setAddr() and setData(), + * regAddr is an internal register containing the contents of the Front Panel's 'ADDRESS' display, + * and regData corresponds to the 'DATA' display. They are updated by setAddr() and setData(), * which in turn take care of calling setLEDArray(). + * + * The state of ALL switches is maintained in this.switches, and likewise all LED states are + * maintained in this.leds, but for convenience, we also mirror some of those states in dedicated + * variables (eg, regSwitches for the 'SWITCH' register, fLEDTest for the 'TEST' switch, etc). */ this.regSwitches = 0; this.regAddr = this.regData = 0; @@ -82,7 +86,7 @@ function PanelPDP11(parmsPanel) * register (regData) [the equivalent of selecting 'DISPLAY REGISTER'] except when data is being * examined or deposited [the equivalent of selecting 'DATA PATHS']. */ - this.fLampTest = false; // lamp (LED) test in progress + this.fLEDTest = false; // LED (lamp) test in progress this.fExamine = false; // true if the previously pressed switch was the 'EXAM' switch this.fDeposit = false; // true if the previously pressed switch was the 'DEP' switch this.nAddrSel = PanelPDP11.ADDRSEL.CONS_PHY; @@ -107,11 +111,11 @@ function PanelPDP11(parmsPanel) * * initBus() will call displaySwitches() to ensure that every switch is the position represented below. * - * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a lamp test - * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the ADDRESS register from the SWITCH - * register when it is momentarily pressed "down". + * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a LED test + * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the 'ADDRESS' register from the + * 'SWITCH' register when it is momentarily pressed "down". * - * This means that processLampTest(value) must act when value == 1 ("up"), whereas processLoadAddr(value) + * This means that processLEDTest(value) must act when value == 1 ("up"), whereas processLoadAddr(value) * must act when value == 0 ("down"). You can infer all this from the table below, because the initial value * of any momentary switch is its "inactive" value, so the opposite is its "active" value. */ @@ -123,7 +127,7 @@ function PanelPDP11(parmsPanel) 'DEP': [0, true, false, this.processDeposit], 'EXAM': [1, true, false, this.processExamine], 'LOAD': [1, true, false, this.processLoadAddr], - 'TEST': [0, true, false, this.processLampTest] + 'TEST': [0, true, false, this.processLEDTest] }; for (var i = 0; i < 22; i++) { this.switches['S'+i] = [0, false, false, this.processSwitchReg, i]; @@ -203,10 +207,18 @@ PanelPDP11.prototype.getSwitch = function(name) /** * reset() * + * NOTE: Since we've registered our handler with the Bus component, we will be called twice whenever + * the entire machine is reset: once when the Computer's reset() handler calls the Bus's reset() handler, + * and again when the Computer's reset() handler calls us directly. Multiple resets should be harmless. + * * @this {PanelPDP11} */ PanelPDP11.prototype.reset = function() { + /* + * Simulate a call to our stop() handler, to update the panel's 'ADDRESS' register with the current PC. + */ + this.stop(); }; /** @@ -346,15 +358,9 @@ PanelPDP11.prototype.powerUp = function(data, fRepower) */ PanelPDP11.init(); /* - * TODO: Until we implement a restore() function, all we can do is reset(); however, that's - * currently unnecessary, since we've added reset() to the addResetHandler() list. - * - * this.reset(); - * - * In the meantime, simulate a call to our stop() handler, to update the panel's ADDRESS register - * with the new PC. + * TODO: Until we implement a restore() function, all we can do is reset() */ - this.stop(); + this.reset(); } return true; }; @@ -491,8 +497,14 @@ PanelPDP11.prototype.pressSwitch = function(sBinding) */ if (sw[3]) sw[3].call(this, sw[0], sw[4]); - this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); - this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); + /* + * This helps the next 'DEP' or 'EXAM' press determine if the previous press was the same, + * while also ignoring any intervening 'STEP' presses (see processStep() for why we do that). + */ + if (sBinding != PanelPDP11.SWITCH.STEP) { + this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); + this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); + } }; /** @@ -562,8 +574,11 @@ PanelPDP11.prototype.processStart = function(value, index) * processStep(value, index) * * If value == 1 (our initial value), then the 'STEP' switch is set to "S INST" (step one instruction); - * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). Note that we don't actually support the - * latter. + * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). + * + * However, since we can't currently support cycle-stepping, I've decided to change the meaning of this + * switch: the normal ("up") position means that successive 'EXAM' and 'DEP' operations will first add 2 + * to the 'ADDRESS' register, while the opposite ("down") position means they will first subtract 2. * * @this {PanelPDP11} * @param {number} value @@ -649,7 +664,7 @@ PanelPDP11.prototype.processContinue = function(value, index) } /* - * Simulate a call to our stop() handler, to update the panel's ADDRESS register with the new PC. + * Simulate a call to our stop() handler, to update the panel's 'ADDRESS' register with the new PC. */ this.stop(); @@ -658,8 +673,8 @@ PanelPDP11.prototype.processContinue = function(value, index) * updateStatus() handlers will be called, including ours. * * NOTE: If we used the Debugger's stepCPU() function, then that includes a call to updateStatus(); - * unfortunately, it will have happened BEFORE we called stop() to update the ADDRESS register, so we - * still need to call it again. + * unfortunately, it will have happened BEFORE we called stop() to update the 'ADDRESS' register, so + * we still need to call it again. */ if (this.cmp) this.cmp.updateStatus(); } @@ -679,9 +694,7 @@ PanelPDP11.prototype.processContinue = function(value, index) PanelPDP11.prototype.processDeposit = function(value, index) { if (value && !this.cpu.isRunning()) { - if (this.fDeposit) { - this.setAddr(this.regAddr + 2); - } + if (this.fDeposit) this.advanceAddr(); var w = this.setData(this.regSwitches); if (this.nAddrSel == PanelPDP11.ADDRSEL.CONS_PHY) { this.bus.setWordDirect(this.regAddr, w); @@ -704,10 +717,8 @@ PanelPDP11.prototype.processDeposit = function(value, index) PanelPDP11.prototype.processExamine = function(value, index) { if (!value && !this.cpu.isRunning()) { - if (this.fExamine) { - this.setAddr(this.regAddr + 2); - } var w; + if (this.fExamine) this.advanceAddr(); if (this.nAddrSel == PanelPDP11.ADDRSEL.CONS_PHY) { w = this.bus.getWordDirect(this.regAddr); } else { @@ -735,15 +746,21 @@ PanelPDP11.prototype.processLoadAddr = function(value, index) }; /** - * processLampTest(value, index) + * processLEDTest(value, index) * * @this {PanelPDP11} * @param {number} value * @param {number} [index] */ -PanelPDP11.prototype.processLampTest = function(value, index) +PanelPDP11.prototype.processLEDTest = function(value, index) { - this.displayLEDs(value || null); + if (value) { + this.fLEDTest = true; + this.displayLEDs(true); + } else { + this.fLEDTest = false; + this.displayLEDs(); + } }; /** @@ -776,6 +793,20 @@ PanelPDP11.prototype.setAddr = function(value) return this.regAddr; }; +/** + * advanceAddr() + * + * @this {PanelPDP11} + * @return {number} + */ +PanelPDP11.prototype.advanceAddr = function() +{ + var inc = this.getSwitch(PanelPDP11.SWITCH.STEP)? 2 : -2; + this.regAddr = (this.regAddr + inc) & this.bus.nBusMask; + this.setLEDArray("A", this.regAddr, 22); + return this.regAddr; +}; + /** * setData(value) * @@ -801,7 +832,7 @@ PanelPDP11.prototype.setData = function(value) PanelPDP11.prototype.setLED = function(sBinding, value) { this.leds[sBinding] = value; - if (!this.fLampTest) this.displayLED(sBinding, value); + if (!this.fLEDTest) this.displayLED(sBinding, value); return value; }; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index 5820907bc..4826a09fe 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -40,279 +40,279 @@ function xa(a,b){return(a+" ").slice(0,b) function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ia:null,Ja:null,Ia:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ja=g.load;d.Ia=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ka=g.load;d.Ja=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.kb=this.id:(this.Pa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Za:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(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} +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;k=yb.prototype;k.reset=function(){}; -k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.f[b];Ab(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.H="DEP"==b;a.J="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(Ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Bb(b,this,Cb);Db(b,this.reset.bind(this));Eb(this);Fb(this)};k.Fa=function(a,b){b||(Gb(),this.stop());return!0};k.Ea=function(){return!0}; -function Ub(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Eb(a,b){for(var c in a.C)Ub(a,c,null!=b?b:a.C[c])}function Ab(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Fb(a){for(var b in a.f)Ab(a,b,a.f[b][0])}function Vb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Wb(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[ic,jc,kc,lc];a=new I(this);mc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function jc(a,b,c){var d=!1,e=this.controller,f=e.Ya[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.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function kc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function lc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function oc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return tc(1,f,g)}f=new I(a,f,n,a.xa,d,e);mc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Oa)>>>this.la].fc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=vc(this.b,a));return this.W[(a&this.Oa)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Oa)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Oa)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; -k.gb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Oa)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function wc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.La=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Mc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Mc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; +function yb(a){u.call(this,"Panel",a,yb);this.f=this.v=this.Ua=this.D=0;this.J=this.K=this.H=!1;this.L=zb;this.C={};this.g={START:[1,!0,!1,this.ad],STEP:[1,!1,!1,this.bd],ENABLE:[1,!1,!1,this.Xc],CONT:[1,!0,!1,this.Vc],DEP:[0,!0,!1,this.Wc],EXAM:[1,!0,!1,this.Yc],LOAD:[1,!0,!1,this.$c],TEST:[0,!0,!1,this.Zc]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; +function Vb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Vb(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Wb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Xb(this.b),Ab(this,"ENABLE")&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[jc,kc,lc,mc];a=new I(this);nc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function kc(a,b,c){var d=!1,e=this.controller,f=e.Ya[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.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function lc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function mc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function pc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return uc(1,f,g)}f=new I(a,f,n,a.xa,d,e);nc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Ea)>>>this.la].fc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=wc(this.b,a));return this.W[(a&this.Ea)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Ea)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Ea)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; +k.gb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Ea)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function xc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Nc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Nc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Va[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; -k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; -k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return ec(this.b)};k.me=function(a){Nc(this.b,a&-1809|ec(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[1]}; +k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; +k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return fc(this.b)};k.me=function(a){Oc(this.b,a&-1809|fc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],M[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],M[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],M[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],M[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],M[65477]=[null,null,K.prototype.Ab,K.prototype.Db, "R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Bb, K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Vc(this,Rc?Wc:Xc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},va: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.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Ca(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ha:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function mc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&ad(a,$c,!1),(a.A=c.A)&&Zc(a,$c,!1))}function cd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function Zc(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function ad(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Vc(a,b){b||(b=dd);ad(a,b,void 0);Zc(a,b,void 0)} -var dd=[],Yc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.La],$c=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Xc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Wc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.Ha]; -function ed(a,b){u.call(this,"CPU",a,ed,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(ed);var fd=["power","reset"];k=ed.prototype; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=kd(a)&&(a.xb=a.yb=-1,id(a),a.ha(),c=!0);c&&a.j(kd(a)+" cycles: checksum="+p(a.Gb))}} +1]&255)<<8},va: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.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Ca(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ia:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function nc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function $c(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +var ed=[],Zc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ma],ad=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Xc=[I.prototype.R,I.prototype.ta,I.prototype.aa,I.prototype.Ia]; +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=ld(a)&&(a.xb=a.yb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Gb))}} k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Yb(a,a.S);a.S=0;a.R=Ba();a.$=0;md(a);return d}function zc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+nd(a))} -function od(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Xb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function nd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&md(this,!0);this.za=0;this.Xa=Ba();if(this.$){var a=this.Xa-this.$;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=od(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.za+=b;this.S+=b;Zb(this,b);Xb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.ca(),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),kd(this));vb(this,e.stack|| -e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.$-this.Xa),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,ld(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.$+=c;a(b,c)}}}; -k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;ld(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,kd(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){nd(this);Yb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),kd(this));b=!0}this.B.complete=a;return b}; -function pd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;ed.call(this,a,6666667);this.decode=1120==this.wb?qd.bind(this):rd.bind(this);sd(this);this.L=0;this.N=null;this.B.complete=!1}z(pd,ed);k=pd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();sd(this);hd(this);this.B.error=!1;this.parent.reset.call(this)}; -function sd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.La=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Wb(a)}function Wb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ha=0;a.Qb=262143;a.N=null;a.w&&Mc(a)}function Mc(a){a.Ta?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,oc(a.w,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,oc(a.w,16))}function td(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.rc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,wc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];ld(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function zd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ad(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Bd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Cd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=ec(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Nc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Dd(this,this.va);Dd(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; -function Vd(a){var b=Wd(a),c=Wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Nc(a,c);a.I&=-17}function vc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Xd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ha=a.v,a.La=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ha<<5|a.La<<1), -b=!0),a.C&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.ra(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.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Yd(this,Xd(this,a,3));this.L--;return a}; -k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Xd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,Zd(this,Xd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Xd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return $d(this,a,b,c)};k.Pc=function(a,b,c){return Xd(this,$d(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Xd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; -k.Je=function(a,b){this.w.gb(Xd(this,a,4),b)};function ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=$d(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function be(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=$d(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Xd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} -function ce(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return $d(a,b,c,8)}function fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Zd(a,e,d.call(a,c,Yd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function he(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Zd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function ie(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.ib=function(a){this.B.complete=!0;var b=this.i&&je(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&ke(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(yd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(xd(this))}while(0>1|b<<16;Bd(this,a);return a&65535}function qe(a,b){a=b&2048|b>>1|b<<8;Bd(this,a<<8);return a&255}function re(a,b){a=b&~a;R(this,a);return a}function se(a,b){a=b&~a;R(this,a<<8);return a}function te(a,b){a|=b;R(this,a);return a}function ue(a,b){a|=b;R(this,a<<8);return a} -function ve(a,b){a=~b|65536;zd(this,a);return a&65535}function we(a,b){a=~b|256;zd(this,a<<8);return a&255}function xe(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function ye(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function ze(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ae(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Be(a,b){a=-b;zd(this,a,a&b&32768);return a&65535}function Ce(a,b){a=-b;zd(this,a<<8,(a&b&128)<<8);return a&255}function De(a,b){a=b<<1|this.T>>16&1;Bd(this,a);return a&65535}function Ee(a,b){a=b<<1|this.T>>16&1;Bd(this,a<<8);return a&255}function Fe(a,b){a=(this.T&65536|b)>>1|b<<16;Bd(this,a);return a&65535}function Ge(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Bd(this,a<<8);return a&255}function He(a,b){var c=b-a;Cd(this,c,a,b);return c&65535} -function Ie(a,b){var c=b-a;Cd(this,c<<8,a<<8,b<<8);return c&255}function Je(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ke(a,b){a^=b;R(this,a);return a&65535}function Le(a){T(this,a,de(this,a),le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Me(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Ne(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Oe(a){U(this,a,!ud(this))}function Pe(a){U(this,a,ud(this))} -function Qe(a){T(this,a,de(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Re(a){S(this,a,ce(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){T(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ce(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ue(a){R(this,de(this,a)&ge(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ve(a){R(this,(ce(this,a)&fe(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){U(this,a,wd(this))}function Xe(a){U(this,a,!this.Sa()==!vd(this))}function Ye(a){U(this,a,!wd(this)&&!this.Sa()==!vd(this))}function Ze(a){U(this,a,!ud(this)&&!wd(this))}function $e(a){U(this,a,wd(this)||!this.Sa()!=!vd(this))} -function af(a){U(this,a,ud(this)||wd(this))}function bf(a){U(this,a,!this.Sa()!=!vd(this))}function cf(a){U(this,a,this.Sa())}function df(a){U(this,a,!wd(this))}function ef(a){U(this,a,!this.Sa())}function ff(){this.pa(12,1);this.b-=5}function gf(a){U(this,a,!0)}function hf(a){U(this,a,!vd(this))}function jf(a){U(this,a,vd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function kf(a){var b=de(this,a);a=ge(this,a);Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function lf(a){var b=ce(this,a)<<8;a=fe(this,a)<<8;Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function mf(a){var b=ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function nf(){this.pa(24,2);this.b-=25} -function of(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?pf(this.i):this.ha();this.b-=7}function qf(){this.pa(16,4);this.b-=25}var rf=[0,7,7,10,7,11,9,13];function sf(a){this.J=this.b;O(this,ee(this,a));this.b=this.J-rf[this.g]}var tf=[0,14,14,17,14,18,16,20];function uf(a){this.J=this.b;var b=ee(this,a);a=a>>6&7;Dd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-tf[this.g]}var vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function wf(a){var b=de(this,a);this.J=this.b;R(this,ie(this,a,b));this.b=this.J-vf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function xf(a){var b=ce(this,a);R(this,he(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var yf=[7,13,13,17,14,18,17,21]; -function zf(a){var b=ge(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.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ff(a){T(this,a,de(this,a),He);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Gf(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)}function Hf(){this.pa(28,5);this.b-=5}function If(){this.I&4||this.A&&this.A.ca();this.I|=4;yd(this,-2);this.b-=3}function Jf(a){T(this,a,de(this,a),Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=pf(b);b||this.pa(8,6)}function qd(a){Kf[a>>12].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)} -function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a&15].call(this,a)}function Tf(a){Uf[a&15].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)} -var Kf=[function(a){ag[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,W,function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],ag=[function(a){cg[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,W,W,W],Mf=[function(a){zd(this,ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,xe);this.b-=this.g?9:3+(7==this.f?2:0)}],Of=[function(a){T(this,a,0, -Be);this.b-=this.g?11:6},function(a){T(this,a,ud(this)?1:0,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,ud(this)?1:0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);zd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Qf=[function(a){T(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)}], -cg=[function(a){dg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,W,Rf,Tf,Gf,Gf,Gf,Gf],dg=[of,If,Cf,ff,qf,Bf,W,W,W,W,W,W,W,W,W,W],Sf=[Af,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Uf=[Af,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],bg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,W,W,W],Wf=[function(a){zd(this, -he(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Yf=[function(a){S(this,a,0,Ce);this.b-=this.g?11:6},function(a){S(this,a,ud(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ud(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=fe(this,a);zd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],$f=[function(a){S(this,a,0,Ge);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}];function rd(a){eg[a>>12].call(this,a)} -var eg=[function(a){fg[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,function(a){gg[a>>8&15].call(this,a)},function(a){hg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],fg=[function(a){ig[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,function(a){jg[a>>6&3].call(this,a)},W,W],jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ae(this,a,0);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J= -this.b;be(this,a,0,b);R(this,b);this.b=this.J-yf[this.g]},function(a){R(this,ie(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ig=[function(a){kg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Rf,Tf,Gf,Gf,Gf,Gf],kg=[of,If,Cf,ff,qf,Bf,function(){Vd(this);this.b-=13},W,W,W,W,W,W,W,W,W],gg=[zf,zf,mf,mf,Me,Me,Ne,Ne,Jf,Jf,W,W,W,W,Ef,Ef],hg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,function(a){lg[a>> -6&3].call(this,a)},W,W],lg=[W,function(a){a=ae(this,a,65536);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J=this.b;be(this,a,65536,b);R(this,b);this.b=this.J-yf[this.g]},W]; -function mg(a){u.call(this,"ROM",a,mg);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);ng(c)})}}z(mg);mg.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;ng(this)}; -mg.prototype.Fa=function(){this.ia&&(this.i&&og(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};mg.prototype.Ea=function(){return!0}; -function ng(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(rc(a.w,b,a.g,Uc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():td(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.ka))});this.ma=Lc(52,4);this.$=zc(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.ma)});Bb(b,this,Ng);H(this)}; -k.vc=function(){if(!this.J){var a=gd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ea=function(a){return a?this.save():!0};k.reset=function(){Og(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Og(this)};function Og(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;ba.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Zb(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+od(a))} +function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Yb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&nd(this,!0);this.za=0;this.Xa=Ba();if(this.aa){var a=this.Xa-this.aa;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=pd(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.za+=b;this.S+=b;$b(this,b);Yb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.$(void 0),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.aa=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.aa-this.Xa),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.aa+=c;a(b,c)}}}; +k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,ld(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);Zb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; +function qd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.wb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; +function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Ma=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Xb(a)}function Xb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ia=0;a.Qb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ta?(a.P=65536,a.ca=a.Pc,a.ra=a.Sd,a.Mb=a.Je,pc(a.w,a.ob&16?22:18)):(a.P=0,a.ca=a.Oc,a.ra=a.yc,a.Mb=a.Fc,pc(a.w,16))}function ud(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.rc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,xc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=fc(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Oc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.va);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; +function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function wc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Yd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Ma<<1), +b=!0),a.C&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.ra(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.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; +k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Yd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Yd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return ae(this,a,b,c)};k.Pc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Yd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; +k.Je=function(a,b){this.w.gb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ha[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ha[a.M>>12&3]=d} +function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.ib=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} +function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} +function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} +function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Le(a,b){a^=b;R(this,a);return a&65535}function Me(a){T(this,a,ee(this,a),me);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} +function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} +function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Sa()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Sa()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Sa()!=!wd(this))} +function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Sa()!=!wd(this))}function df(a){U(this,a,this.Sa())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Sa())}function gf(){this.pa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=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.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.pa(24,2);this.b-=25} +function pf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.pa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; +function Af(a){var b=he(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.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.pa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.pa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} +var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, +Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], +dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, +ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} +var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= +this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> +6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; +function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; +ng.prototype.Ga=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Fa=function(){return!0}; +function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(sc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.ma=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Og);H(this)}; +k.vc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Fa=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.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.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.$,1E3/Math.round(this.R/10))}};var Pg={},Ng=(Pg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Pg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Pg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Pg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Pg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Sg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Sg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Tg(a);var e=this;if((this.g=gd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Lc(56,4);this.da=zc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&bh(a,b,c,d,e.ea,e.Ja, -e.Ia));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));Zg(a)})}function Wg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;d'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.Ka, +e.Ja));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){ih(a,b,c,d)})} -function ih(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Na+a.Aa&&(a.Aa+=f-(a.Na+a.Aa)+1):(a.Na=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=kh(this,a++);)mh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function mh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&nh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&oh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=kh(a,c++);)for(var l=0,m=h.length;ld&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.La=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Oa+a.Aa&&(a.Aa+=f-(a.Oa+a.Aa)+1):(a.Oa=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nh(this,0)}}return!0};k.Ea=function(a){return a?this.save():!0};k.reset=function(){ph(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return ph(this,a[0])};function sh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}uh(a,e,b,c,!1,d)}else th(a,e)} -function uh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,th(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,hh(new dh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));nh(this,a.ec)}; -function rh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} +function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} +k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));oh(this,a.ec)}; +function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(yc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(yc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; +k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; -var vh={},qh=(vh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],vh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],vh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],vh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],vh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],vh);function wh(a){u.call(this,"Debugger",a,wh);this.da=a.base||16;this.Ha=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(wh); -var xh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};wh.prototype.sc=function(){return-1};wh.prototype.tc=function(){}; -function yh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[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(ya(b.substring(c,f))),c=f+1}}return a} -function zh(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; +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; +var wh={},rh=(wh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],wh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],wh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],wh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],wh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ia=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); +var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.sc=function(){return-1};xh.prototype.tc=function(){}; +function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[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(ya(b.substring(c,f))),c=f+1}}return a} +function Ah(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 Ah(a,b,c){var d;if(b){b=Bh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Eh(a,b){if(b)return Dh(a,b,a.Y[b]);var c=0;for(b in a.Y)Dh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0this.b.wb?Nh:[];Oh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Ph(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=uc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ga[a-16]:20==a?b=ec(this.b):21==a&&this.f&&dc(this.f)&&(b=this.f.Ua));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,nd(a),a.ta=0,a.A&&a.A.ca()))};function Hh(a){var b;if(!je(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Wh(this):Xh(this)}};function Vh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Hh(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Yh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Rh(this.L));a.set(1,Rh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Sh(a[b++]),this.P=Sh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Ma=!1,++a.$==a.H.length&&(a.$=0)));return!1}function pf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} -function Gh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||Zh(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Ma=!0:($h(this,a,a.length-1,"set"),Hh(this)));return d}; -function Zh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.D));h.Ma||Hh(a);break}}return f}function ai(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Uh(y);break;case 8:x="@"+Uh(y);break;case 16:7>y?x="("+Uh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Uh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Uh(y)+")";break;case 40:x="@-("+Uh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Uh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Uh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Uh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b?c="PS="+J(a,ec(d)):21==b&&a.f&&dc(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function fi(a){var b,c="";for(b=0;6>b;b++)c+=ei(a,b);c=c+"\n"+(ei(a,6)+ei(a,7));c+=ei(a,20)+ei(a,21);return c+=di(a,"T")+di(a,"N")+di(a,"Z")+di(a,"V")+di(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function gi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.f["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.ca();a.j("updated registers:")}a.j(fi(a));c&&(a.L=Z(d.u[7]),Xh(a,J(a,a.L.F)))}}function ki(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ci(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function bi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Gd=[];"call"==wg&&(Hb=1E5,Gd=["CALL"]);for(void 0!==vg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;yg++;Hb--}}yg||(a.j("no "+xg+"history available"),a.tb=void 0)}else{var Jb=Ph(a,ma);if(Jb){var Ac=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Ei),Ac=Ch(a,Ka)>>>0,65536>4||1;Gi--&&0Ec?String.fromCharCode(Ec):".";Bc-=Dc}Kb&&(Kb+="\n");Kb+=ma+" "+Hd+(0==Mb?" "+Bg:"")}Kb&&a.j(Kb);a.lb=Jb}}}}break;case "e":if("else"==g[0])break;var ib,Id,Jd,Kd,Ld=g[0],Md=g[1];"eb"==Ld?(ib=1,Id=255,Jd=a.Fb,Kd=a.Wb):"e"==Ld||"ew"==Ld?(ib=2,Id=65535,Jd=a.oa,Kd=a.gb):Md=null;if(null==Md)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Ph(a,Md);if(Fc)for(var Gc= -2;GcPd;){for(var La=null,Ki=256;65536>Pb.F>>>0;){Qd.F=a.oa(Pb,2);if(null==Pb.F||!Ki--)break;if(!(Qd.F&1)){for(var Li=a,Hc=Qd,Dg=null,Qb=Hc.F,Eg=Qb,Rd=1;6>=Rd&&Qb;Rd++){if(2< -Rd){Hc.F=Qb;var Ic=ci(Li,Hc);if(0<=Ic.indexOf("JSR")){var Fg=Ic.indexOf(" ");if(Qb+(Ic.indexOf(" ",Fg+1)-Fg-1)/2==Eg){Dg=Ic;break}}}Qb-=2}Hc.F=Eg;if(La=Dg)break}}if(!La||null==La)break;var Gg=null;if("ks"==Ji){var Hg=La.match(/[0-9A-F]+$/);Hg&&(Gg=ji(a,Hg[0]))}La=xa(La,50)+" ;"+(Gg||"stack="+J(a,Pb.F));a.j(La);Pd++}Pd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ji(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== -G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Sd=0;Sd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bpi){if(ri(d,this.J)){this.C=new P(this,"1.30.2","failsafe");ri(this.C)&&(wi(this,d),a=2,xi(this.C));this.C.set("timestamp",Da());yi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=vi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ri(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),xi(d),ri(d)?(c=vi(d),e=!0):c=!1))}e&&ui(this,c?d:null)}else 2==a&&d.clear()}else ui(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(zi(this,this.b,b,c,a),this.b.sb());this.P&&(wi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function wi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function mi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ea&&(c&&a.b.ha(),d=a.b.Ea(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Ri(a,b,c)}})}else c(a,null)} -function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Di||Za(!0));l=!1}var g,h,l=!0;Di++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Di||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Di||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Nh=[0],Oh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Gh.prototype; +k.Da=function(a,b,c,d){this.w=b;this.b=c;this.A=a;this.f=a.f;(a=hd(a,"messages"))&&Jh(this,a);this.ub=Mh;this.Nb=1145>this.b.wb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=vc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=fc(this.b):21==a&&this.f&&ec(this.f)&&(b=this.f.Ua));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ta=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Na=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} +function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Na=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; +function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Na||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,fc(d)):21==b&&a.f&&ec(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Ib=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;zg++;Ib--}}zg||(a.j("no "+yg+"history available"),a.tb=void 0)}else{var Kb=Qh(a,ma);if(Kb){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Fi),zc=Dh(a,Ka)>>>0,65536>4||1;Hi--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Lb&&(Lb+="\n");Lb+=ma+" "+Id+(0==Nb?" "+Cg:"")}Lb&&a.j(Lb);a.lb=Kb}}}}break;case "e":if("else"==g[0])break;var jb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(jb=1,Jd=255,Kd=a.Fb,Ld=a.Wb):"e"==Md||"ew"==Md?(jb=2,Jd=65535,Kd=a.oa,Ld=a.gb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var La=null,Li=256;65536>Qb.F>>>0;){Rd.F=a.oa(Qb,2);if(null==Qb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Eg=null,Rb=Gc.F,Fg=Rb,Sd=1;6>=Sd&&Rb;Sd++){if(2< +Sd){Gc.F=Rb;var Hc=di(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Rb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Rb-=2}Gc.F=Fg;if(La=Eg)break}}if(!La||null==La)break;var Hg=null;if("ks"==Ki){var Ig=La.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}La=xa(La,50)+" ;"+(Hg||"stack="+J(a,Qb.F));a.j(La);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== +G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Da());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.sb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Si(a,b,c)}})}else c(a,null)} +function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ei||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 5c18f4908..4e17efc5a 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -40,203 +40,203 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={K:null,X:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;h=Za.prototype;h.reset=function(){}; -h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];ab(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;bb(b,this,cb);db(b,this.reset.bind(this));eb(this);for(var e in this.b)ab(this,e,this.b[e][0])};h.ja=function(a,b){b||(fb(),this.stop());return!0};h.ia=function(){return!0}; -function gb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function eb(a,b){for(var c in a.m)gb(a,c,null!=b?b:a.m[c])}function ab(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),ib(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&jb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])jb(this.a);else{a=this.C;var b;if(b=a)a.l.Fa&&(a.l.pb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[ub,vb,wb,xb];a=new I(this);yb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function vb(a,b,c){var d=!1,e=this.controller,f=e.ya[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.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function wb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function xb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[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||J(e,c,16)}function Ab(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Fb(1,f,g)}f=new I(a,f,p,a.b,d,e);yb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Jb(a,b){3932160<=b&&(b=Ib(a.a,b));return a.h[(b&a.ua)>>>a.c].W(b&a.j,b)} -h.kb=function(a){var b=a&this.j,c=(a&this.ua)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ua)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Kb(a,b,c){3932160<=b&&(b=Ib(a.a,b));a.h[(b&a.ua)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){var c=a&this.j,d=(a&this.ua)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Lb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Tb(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Tb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.f=this.i=this.s=0;this.w=this.A=this.v=!1;this.C=$a;this.m={};this.c={START:[1,!0,!1,this.qc],STEP:[1,!1,!1,this.rc],ENABLE:[1,!1,!1,this.mc],CONT:[1,!0,!1,this.kc],DEP:[0,!0,!1,this.lc],EXAM:[1,!0,!1,this.nc],LOAD:[1,!0,!1,this.pc],TEST:[0,!0,!1,this.oc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);for(var e in this.c)bb(this,e,this.c[e][0])};h.la=function(a,b){b||(gb(),this.reset());return!0}; +h.ka=function(){return!0};function hb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)hb(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.j.U||(this.h.reset(),jb(this.a),ab(this,"ENABLE")&&kb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))kb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.l=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[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.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[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||J(e,c,16)}function Bb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} +h.kb=function(a){var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; +h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return rb(this.a)};h.Cd=function(a){Ub(this.a,a&-1809|rb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +h.Kc=function(){return sb(this.a)};h.Cd=function(a){Vb(this.a,a&-1809|sb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, "R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= [null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),bc(this,Yb?cc:dc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function yb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&fc(a,hc,!1),(a.m=c.m)&&ic(a,hc,!1))}function ic(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function fc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function bc(a,b){b||(b=jc);fc(a,b,void 0);ic(a,b,void 0)} -var jc=[],ec=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],hc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var dc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],cc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function kc(a,b){x.call(this,"CPU",a,kc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(kc);var lc=["power","reset"];h=kc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=pc(a)&&(a.Qa=a.Ra=-1,oc(a),G(a),c=!0);c&&a.T(pc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&sc(a.j)}lb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;rc(a)}function Ob(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+tc(a))} -function kb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function tc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} -h.kd=function(){if(this.l.U){this.vb>=this.gb&&rc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=tc(this,!0);this.Ta+=b;this.aa+=b;mb(this,b);kb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),pc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,qc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; -function jb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{qc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,pc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){tc(a);lb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),pc(a));b=!0}a.l.complete=void 0;return b} -function uc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;kc.call(this,a,6666667);this.decode=1120==this.Za?vc.bind(this):wc.bind(this);xc(this);this.ra=0;this.N=null;this.l.complete=!1}z(uc,kc);h=uc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);xc(this);nc(this);this.l.error=!1;this.parent.reset.call(this)}; -function xc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.tb=0;a.Ia=-1;ib(a)}function ib(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Tb(a)}function Tb(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Ab(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Ab(a.h,16))}function yc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Lb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];qc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Bc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Cc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Dc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=rb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Ub(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Fc(a,a.Ia);Fc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Gc(a){var b=Hc(a),c=Hc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Ub(a,c);a.u&=-17} -function Ib(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Ic(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Hc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Fc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Ic(this,a,2));this.ra--;return a}; -h.Xa=function(a,b){this.Ba?(this.ra++,Jc(this,Ic(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Ic(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Kc(this,a,b,c)};h.hc=function(a,b,c){return Ic(this,Kc(this,a,b,c),c)};h.Tb=function(a){return Jb(this.h,a)};h.gd=function(a){return Jb(this.h,Ic(this,a,2))};h.$b=function(a,b){Kb(this.h,a,b&65535)};h.Zd=function(a,b){Kb(this.h,Ic(this,a,4),b)}; -function Lc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Kc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Mc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Kc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Ic(a,e|c&65536,4),a.v=a.B>>14&3,Kb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Nc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Oc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]}function Pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Kc(a,b,c,8)}function Qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Jc(a,e,d.call(a,c,Hb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Kb(a.h,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Jc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Ac(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(zc(this))}while(0>1|b<<16;Dc(this,a);return a&65535}function Zc(a,b){a=b&2048|b>>1|b<<8;Dc(this,a<<8);return a&255}function $c(a,b){a=b&~a;S(this,a);return a}function ad(a,b){a=b&~a;S(this,a<<8);return a}function bd(a,b){a|=b;S(this,a);return a}function cd(a,b){a|=b;S(this,a<<8);return a}function dd(a,b){a=~b|65536;Bc(this,a);return a&65535}function ed(a,b){a=~b|256;Bc(this,a<<8);return a&255} -function fd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function gd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function hd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function id(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function jd(a,b){a=-b;Bc(this,a,a&b&32768);return a&65535}function kd(a,b){a=-b;Bc(this,a<<8,(a&b&128)<<8);return a&255} -function ld(a,b){a=b<<1|this.m>>16&1;Dc(this,a);return a&65535}function md(a,b){a=b<<1|this.m>>16&1;Dc(this,a<<8);return a&255}function nd(a,b){a=(this.m&65536|b)>>1|b<<16;Dc(this,a);return a&65535}function od(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Dc(this,a<<8);return a&255}function pd(a,b){var c=b-a;Ec(this,c,a,b);return c&65535}function qd(a,b){var c=b-a;Ec(this,c<<8,a<<8,b<<8);return c&255}function rd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function sd(a,b){a^=b;S(this,a);return a&65535}function td(a){U(this,a,Oc(this,a),Uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function vd(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function wd(a){V(this,a,!R(this))}function xd(a){V(this,a,R(this))} -function yd(a){U(this,a,Oc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){T(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){U(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Nc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Cd(a){S(this,Oc(this,a)&Rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){S(this,(Nc(this,a)&Qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){V(this,a,this.i&65535?0:4)}function Fd(a){V(this,a,!this.za()==!(this.f&32768))}function Gd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Id(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Jd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Kd(a){V(this,a,!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,this.za())}function Md(a){V(this,a,!!(this.i&65535))}function Nd(a){V(this,a,!this.za())}function Od(){K(this,12,1);this.a-=5}function Pd(a){V(this,a,!0)}function Qd(a){V(this,a,!(this.f&32768))}function Rd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Sd(a){var b=Oc(this,a);a=Rc(this,a);Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Td(a){var b=Nc(this,a)<<8;a=Qc(this,a)<<8;Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Ud(a){var b=Rc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Vd(){K(this,24,2);this.a-=25} -function Wd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Xd(){K(this,16,4);this.a-=25}var Yd=[0,7,7,10,7,11,9,13];function Zd(a){this.G=this.a;P(this,Pc(this,a));this.a=this.G-Yd[this.c]}var $d=[0,14,14,17,14,18,16,20];function ae(a){this.G=this.a;var b=Pc(this,a);a=a>>6&7;Fc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-$d[this.c]}var be=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ce(a){var b=Oc(this,a);this.G=this.a;S(this,Tc(this,a,b));this.a=this.G-be[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function de(a){var b=Nc(this,a);S(this,Sc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ee=[7,13,13,17,14,18,17,21]; -function fe(a){var b=Rc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function le(a){U(this,a,Oc(this,a),pd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function me(a){U(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)}function ne(){K(this,28,5);this.a-=5}function oe(){this.u&4||this.j&&this.j.ka();this.u|=4;Ac(this,-2);this.a-=3}function pe(a){U(this,a,Oc(this,a),sd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function vc(a){qe[a>>12].call(this,a)}function re(a){se[a>>6&3].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a&15].call(this,a)} -function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)} -var qe=[function(a){He[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,Y,function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],He=[function(a){Je[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,Y,Y,Y],se=[function(a){Bc(this,Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,fd);this.a-=this.c?9:3+(7==this.b?2:0)}],ue=[function(a){U(this,a,0, -jd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Bc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Je=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,Y,xe,ze,me,me,me,me],Ke=[Wd,oe,ie,Od,Xd,he,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ye=[ge,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ae=[ge,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ie=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,Y,Y,Y],Ce=[function(a){Bc(this, -Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ee=[function(a){T(this,a,0,kd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Bc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Ge=[function(a){T(this,a,0,od);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function wc(a){Le[a>>12].call(this,a)} -var Le=[function(a){Me[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,function(a){Ne[a>>8&15].call(this,a)},function(a){Oe[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,function(a){Qe[a>>6&3].call(this,a)},Y,Y],Qe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Lc(this,a,0);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G= -this.a;Mc(this,a,0,b);S(this,b);this.a=this.G-ee[this.c]},function(a){S(this,Tc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){Re[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},xe,ze,me,me,me,me],Re=[Wd,oe,ie,Od,Xd,he,function(){Gc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ne=[fe,fe,Ud,Ud,ud,ud,vd,vd,pe,pe,Y,Y,Y,Y,ke,ke],Oe=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,function(a){Se[a>>6& -3].call(this,a)},Y,Y],Se=[Y,function(a){a=Lc(this,a,65536);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G=this.a;Mc(this,a,65536,b);S(this,b);this.a=this.G-ee[this.c]},Y]; -function Te(a){x.call(this,"ROM",a,Te);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Ue(c)})}}z(Te);Te.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ue(this)}; -Te.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Te.prototype.ia=function(){return!0}; -function Ue(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Db(a.h,b,a.c,ac)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):yc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Pb(e.a,e.aa))});this.da=Rb(52,4);this.P=Ob(this.a,function(){e.c|=128;e.c&64&&Pb(e.a,e.da)});bb(b,this,$e);F(this)}; -h.Kb=function(){if(!this.v){var a=mc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ia=function(a){return a?this.save():!0};h.reset=function(){af(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return af(this)};function af(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),cc(this,Zb?dc:ec);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},oa:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra: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.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ea:function(a,b){this.o[a]=b;this.ua=!0},qa:function(a,b){this.o[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ua=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&gc(a,ic,!1),(a.m=c.m)&&jc(a,ic,!1))}function jc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function gc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function cc(a,b){b||(b=kc);gc(a,b,void 0);jc(a,b,void 0)} +var kc=[],fc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],ic=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var ec=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],dc=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; +function lc(a,b){x.call(this,"CPU",a,lc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(lc);var mc=["power","reset"];h=lc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=qc(a)&&(a.Qa=a.Ra=-1,pc(a),G(a),c=!0);c&&a.T(qc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&tc(a.l)}mb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;sc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+uc(a))} +function lb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function uc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.kd=function(){if(this.j.U){this.vb>=this.gb&&sc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=uc(this,!0);this.Ta+=b;this.aa+=b;nb(this,b);lb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); +this.l&&this.l.stop(ra(),qc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,rc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; +function kb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{rc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,qc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){uc(a);mb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),qc(a));b=!0}a.j.complete=void 0;return b} +function vc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;lc.call(this,a,6666667);this.decode=1120==this.Za?wc.bind(this):xc.bind(this);yc(this);this.sa=0;this.N=null;this.j.complete=!1}z(vc,lc);h=vc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);yc(this);oc(this);this.j.error=!1;this.parent.reset.call(this)}; +function yc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;jb(a)}function jb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function zc(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];rc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Cc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ec(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=sb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Vb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Gc(a,a.Ia);Gc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Hc(a){var b=Ic(a),c=Ic(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Vb(a,c);a.u&=-17} +function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Jc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Ic(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Gc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Jc(this,a,2));this.sa--;return a}; +h.Xa=function(a,b){this.Ba?(this.sa++,Kc(this,Jc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Jc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Lc(this,a,b,c)};h.hc=function(a,b,c){return Jc(this,Lc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Jc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Jc(this,a,4),b)}; +function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Lc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Nc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Lc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Jc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} +function Oc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Pc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Lc(a,b,c,8)}function Rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Kc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Kc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Bc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ac(this))}while(0>1|b<<16;Ec(this,a);return a&65535}function $c(a,b){a=b&2048|b>>1|b<<8;Ec(this,a<<8);return a&255}function ad(a,b){a=b&~a;S(this,a);return a}function bd(a,b){a=b&~a;S(this,a<<8);return a}function cd(a,b){a|=b;S(this,a);return a}function dd(a,b){a|=b;S(this,a<<8);return a}function ed(a,b){a=~b|65536;Cc(this,a);return a&65535}function fd(a,b){a=~b|256;Cc(this,a<<8);return a&255} +function gd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function hd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function id(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function jd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function kd(a,b){a=-b;Cc(this,a,a&b&32768);return a&65535}function ld(a,b){a=-b;Cc(this,a<<8,(a&b&128)<<8);return a&255} +function md(a,b){a=b<<1|this.m>>16&1;Ec(this,a);return a&65535}function nd(a,b){a=b<<1|this.m>>16&1;Ec(this,a<<8);return a&255}function od(a,b){a=(this.m&65536|b)>>1|b<<16;Ec(this,a);return a&65535}function pd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ec(this,a<<8);return a&255}function qd(a,b){var c=b-a;Fc(this,c,a,b);return c&65535}function rd(a,b){var c=b-a;Fc(this,c<<8,a<<8,b<<8);return c&255}function sd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function td(a,b){a^=b;S(this,a);return a&65535}function ud(a){U(this,a,Pc(this,a),Vc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function vd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function wd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function xd(a){V(this,a,!R(this))}function yd(a){V(this,a,R(this))} +function zd(a){U(this,a,Pc(this,a),ad);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){U(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Oc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Dd(a){S(this,Pc(this,a)&Sc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){S(this,(Oc(this,a)&Rc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){V(this,a,this.i&65535?0:4)}function Gd(a){V(this,a,!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Id(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Jd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Kd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Ld(a){V(this,a,!this.za()!=!(this.f&32768))}function Md(a){V(this,a,this.za())}function Nd(a){V(this,a,!!(this.i&65535))}function Od(a){V(this,a,!this.za())}function Pd(){K(this,12,1);this.a-=5}function Qd(a){V(this,a,!0)}function Rd(a){V(this,a,!(this.f&32768))}function Sd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Td(a){var b=Pc(this,a);a=Sc(this,a);Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ud(a){var b=Oc(this,a)<<8;a=Rc(this,a)<<8;Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Vd(a){var b=Sc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Wd(){K(this,24,2);this.a-=25} +function Xd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Yd(){K(this,16,4);this.a-=25}var Zd=[0,7,7,10,7,11,9,13];function $d(a){this.G=this.a;P(this,Qc(this,a));this.a=this.G-Zd[this.c]}var ae=[0,14,14,17,14,18,16,20];function be(a){this.G=this.a;var b=Qc(this,a);a=a>>6&7;Gc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-ae[this.c]}var ce=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function de(a){var b=Pc(this,a);this.G=this.a;S(this,Uc(this,a,b));this.a=this.G-ce[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ee(a){var b=Oc(this,a);S(this,Tc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var fe=[7,13,13,17,14,18,17,21]; +function ge(a){var b=Sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function me(a){U(this,a,Pc(this,a),qd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function ne(a){U(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)}function oe(){K(this,28,5);this.a-=5}function pe(){this.u&4||this.l&&this.l.da();this.u|=4;Bc(this,-2);this.a-=3}function qe(a){U(this,a,Pc(this,a),td);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function wc(a){re[a>>12].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a&15].call(this,a)} +function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)} +var re=[function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,Y,function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ie=[function(a){Ke[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,Y,Y,Y],te=[function(a){Cc(this,Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0, +kd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Cc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Ke=[function(a){Le[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,Y,ye,Ae,ne,ne,ne,ne],Le=[Xd,pe,je,Pd,Yd,ie,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[he,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Be=[he,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Je=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Cc(this, +Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,ld);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Cc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],He=[function(a){T(this,a,0,pd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function xc(a){Me[a>>12].call(this,a)} +var Me=[function(a){Ne[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,function(a){Oe[a>>8&15].call(this,a)},function(a){Pe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ne=[function(a){Qe[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,function(a){Re[a>>6&3].call(this,a)},Y,Y],Re=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Mc(this,a,0);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G= +this.a;Nc(this,a,0,b);S(this,b);this.a=this.G-fe[this.c]},function(a){S(this,Uc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Qe=[function(a){Se[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ye,Ae,ne,ne,ne,ne],Se=[Xd,pe,je,Pd,Yd,ie,function(){Hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Oe=[ge,ge,Vd,Vd,vd,vd,wd,wd,qe,qe,Y,Y,Y,Y,le,le],Pe=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,function(a){Te[a>>6& +3].call(this,a)},Y,Y],Te=[Y,function(a){a=Mc(this,a,65536);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G=this.a;Nc(this,a,65536,b);S(this,b);this.a=this.G-fe[this.c]},Y]; +function Ue(a){x.call(this,"ROM",a,Ue);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ve(c)})}}z(Ue);Ue.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Ve(this)}; +Ue.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ue.prototype.ka=function(){return!0}; +function Ve(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,bc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.ea=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.ea)});cb(b,this,af);F(this)}; +h.Kb=function(){if(!this.v){var a=nc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ka=function(a){return a?this.save():!0};h.reset=function(){bf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return bf(this)};function bf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Qb(this.a,this.P,1E3/Math.round(this.I/10))}};var bf={},$e=(bf[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],bf[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],bf[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],bf[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],bf);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&ef(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ef(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ff(a);var e=this;if((this.c=mc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Rb(56,4);this.R=Ob(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&pf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));mf(a)})}function jf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){wf(a,b,c,d)})} -function wf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=yf(this,a++);)Af(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Af(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Bf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Cf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=yf(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&ff(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ff(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=gf(a);var e=this;if((this.c=nc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&qf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));nf(a)})}function kf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){xf(a,b,c,d)})} +function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,wa=w.length;wa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=zf(this,a++);)Bf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function Bf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; +h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Cf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Df(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=zf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Bf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Df(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Df(this,a[0])};function Gf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}If(a,e,b,c,!1,d)}else Hf(a,e)} -function If(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Hf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,vf(new rf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.j&&sc(this.j)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Bf(this,a.wb)}; -function Ff(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Cf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ef(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Ef(this,a[0])};function Hf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Jf(a,e,b,c,!1,d)}else If(a,e)} +function Jf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,If(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,wf(new sf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&tc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Cf(this,a.wb)}; +function Gf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Kb(this.h,f,t|w<<8);if(Nb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Jb(this.h,f);if(Nb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; -h.Ld=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Pb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var Jf={},Ef=(Jf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Jf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Jf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Jf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Jf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Jf); -function Kf(a,b,c){x.call(this,"Computer",a,Kf);this.l.O=!1;Lf(this,b);this.A=mc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Mf;this.v=null;this.m=this.I=!1;this.P=mc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Nf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new tb({id:this.na+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bMf){if(Of(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Of(this.i)&&(Tf(this,d),a=2,Uf(this.i));this.i.set("timestamp",sa());Vf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Sf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Of(d,g):("error"== -f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Uf(d),Of(d)?(c=Sf(d),e=!0):c=!1))}e&&Rf(this,c?d:null)}else 2==a&&d.clear()}else Rf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Wf(this,this.a,b,c,a),this.a.Ua());this.G&&(Tf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Tf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Zf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);fg(a,b,c)}})}else c(a,null)} -function gg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--cg||Ja(!0));l=!1}var g,k,l=!0;cg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?dg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--cg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--cg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?dg(b,a,d,!0,e,n):eg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return gg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; +var Kf={},Ff=(Kf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Kf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Kf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Kf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Kf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Kf); +function Lf(a,b,c){x.call(this,"Computer",a,Lf);this.j.O=!1;Mf(this,b);this.A=nc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Nf;this.v=null;this.m=this.I=!1;this.P=nc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Of(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bNf){if(Pf(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Pf(this.i)&&(Uf(this,d),a=2,Vf(this.i));this.i.set("timestamp",sa());Wf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Tf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Vf(d),Pf(d)?(c=Tf(d),e=!0):c=!1))}e&&Sf(this,c?d:null)}else 2==a&&d.clear()}else Sf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Xf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Uf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +function Uf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function $f(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);gg(a,b,c)}})}else c(a,null)} +function hg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--dg||Ja(!0));l=!1}var g,k,l=!0;dg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?eg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--dg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--dg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?eg(b,a,d,!0,e,n):fg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return hg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map