diff --git a/devices/pdp11/panel/1170/led.xml b/devices/pdp11/panel/1170/led.xml index 1a3376b83..a7e08568d 100644 --- a/devices/pdp11/panel/1170/led.xml +++ b/devices/pdp11/panel/1170/led.xml @@ -9,43 +9,43 @@ - . + . - . + . - . + . - . + . - . + . - . + . - . + . @@ -57,31 +57,31 @@ - . + . - . + . - . + . - . + . - . + . diff --git a/modules/pcx86/lib/cpu.js b/modules/pcx86/lib/cpu.js index 73de14c10..ae65359df 100644 --- a/modules/pcx86/lib/cpu.js +++ b/modules/pcx86/lib/cpu.js @@ -99,7 +99,7 @@ function CPU(parmsCPU, nCyclesDefault) this.flags.autoStart = parmsCPU['autoStart']; /* - * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both) + * TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both) */ this.flags.displayLiveRegs = false; diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 31a9d8933..10e50637f 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -999,6 +999,7 @@ ComputerPDP11.prototype.start = function(ms, nCycles) component.start(ms, nCycles); } } + this.updateStatus(true); }; /** @@ -1023,19 +1024,20 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) component.stop(ms, nCycles); } } + this.updateStatus(true); }; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {ComputerPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -ComputerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +ComputerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var computer = this; diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 7b80d6d72..af9db3336 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -126,11 +126,6 @@ function CPUPDP11(parmsCPU, nCyclesDefault) this.flags.starting = false; this.flags.autoStart = parmsCPU['autoStart']; - /* - * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both) - */ - this.flags.displayLiveRegs = false; - /* * Get checksum parameters, if any. runCPU() behavior is not affected until fChecksum * is true, which won't happen until resetChecksum() is called with nCyclesChecksumInterval @@ -288,7 +283,7 @@ CPUPDP11.prototype.powerUp = function(data, fRepower) * * this.flags.powered = true; */ - this.updateCPU(); + this.cmp.updateStatus(); return true; }; @@ -451,54 +446,18 @@ CPUPDP11.prototype.displayChecksum = function() }; /** - * displayValue(sLabel, nValue, cch) - * - * This is principally for displaying register values, but in reality, it can be used to display any - * numeric value bound to the given label. + * setBinding(sType, sBinding, control, sValue) * * @this {CPUPDP11} - * @param {string} sLabel - * @param {number} nValue - * @param {number} [cch] - */ -CPUPDP11.prototype.displayValue = function(sLabel, nValue, cch) -{ - if (this.bindings[sLabel]) { - if (nValue === undefined) { - this.setError("Value for " + sLabel + " is invalid"); - this.stopCPU(); - } - var sVal; - var nBase = this.dbg && this.dbg.nBase || 8; - if (!this.flags.running || this.flags.displayLiveRegs) { - sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch); - } else { - sVal = "--------".substr(0, cch || 4); - } - /* - * TODO: Determine if this test actually avoids any redrawing when a register hasn't changed, and/or if - * we should maintain our own (numeric) cache of displayed register values (to avoid creating these temporary - * string values that will have to garbage-collected), and/or if this is actually slower, and/or if I'm being - * too obsessive. - */ - if (this.bindings[sLabel].textContent != sVal) this.bindings[sLabel].textContent = sVal; - } -}; - -/** - * setBinding(sHTMLType, sBinding, control, sValue) - * - * @this {CPUPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "run") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var cpu = this; - var fBound = false; switch (sBinding) { case "power": @@ -509,8 +468,7 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) * so we record those bindings here and pass them on to the Computer component in initBus(). */ this.bindings[sBinding] = control; - fBound = true; - break; + return true; case "run": this.bindings[sBinding] = control; @@ -526,13 +484,11 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) else cpu.stopCPU(); }; - fBound = true; - break; + return true; case "speed": this.bindings[sBinding] = control; - fBound = true; - break; + return true; case "setSpeed": this.bindings[sBinding] = control; @@ -540,13 +496,27 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) cpu.setSpeed(cpu.nCyclesMultiplier << 1, true); }; control.textContent = this.getSpeedTarget(); - fBound = true; - break; + return true; default: break; } - return fBound; + return false; +}; + +/** + * updateStatus(fForce) + * + * Some of the CPU bindings provide feedback and therefore need to be updated periodically. This is called + * via the Computer's updateStatus() handler several times per second; see YIELDS_PER_STATUS. + * + * @this {CPUPDP11} + * @param {boolean} [fForce] + */ +CPUPDP11.prototype.updateStatus = function(fForce) +{ + var controlSpeed = this.bindings["speed"]; + if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent(); }; /** @@ -1111,7 +1081,6 @@ CPUPDP11.prototype.runCPU = function() } catch (e) { this.stopCPU(); - this.updateCPU(); if (this.cmp) this.cmp.stop(usr.getTime(), this.getCycles()); this.setError(e.stack || e.message); return; @@ -1152,7 +1121,6 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus) if (fUpdateFocus) this.cmp.updateFocus(true); this.cmp.start(this.msStartRun, this.getCycles()); } - this.updateCPU(true); setTimeout(this.onRunTimeout, 0); return true; }; @@ -1194,29 +1162,10 @@ CPUPDP11.prototype.stopCPU = function(fComplete) if (this.cmp) { this.cmp.stop(usr.getTime(), this.getCycles()); } - this.updateCPU(); } this.flags.complete = fComplete; }; -/** - * updateCPU(fForce) - * - * This used to be performed at the end of every stepCPU(), but runCPU() -- which relies upon - * stepCPU() -- needed to have more control over when these updates are performed. However, for - * other callers of stepCPU(), such as the Debugger, the combination of stepCPU() + updateCPU() - * provides the old behavior. - * - * @this {CPUPDP11} - * @param {boolean} [fForce] (true to force a video update; used by the Debugger) - */ -CPUPDP11.prototype.updateCPU = function(fForce) -{ - if (this.cmp) { - this.cmp.updateStatus(fForce); - } -}; - /** * yieldCPU() * @@ -1232,10 +1181,10 @@ CPUPDP11.prototype.yieldCPU = function() // if (DEBUG) this.nSnapCycles = this.nBurstCycles; /* * The Debugger calls yieldCPU() after every message() to ensure browser responsiveness, but it looks - * odd for those messages to show CPU state changes but for the CPU's own status display to not (ditto - * for the Video display), so I've added this call to try to keep things looking synchronized. + * 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. */ - this.updateCPU(); + this.cmp.updateStatus(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 7d4fe952b..2f37706c9 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -75,11 +75,6 @@ function CPUStatePDP11(parmsCPU) CPUPDP11.call(this, parmsCPU, nCyclesDefault); - /* - * If there are no live registers to display, then updateStatus() can skip a bit.... - */ - this.cLiveRegs = 0; - /* * Initialize processor operation to match the requested model */ @@ -374,72 +369,6 @@ CPUStatePDP11.prototype.restore = function(data) return this.bus.restoreMemory(data[2]); }; -/** - * setBinding(sHTMLType, sBinding, control, sValue) - * - * @this {CPUStatePDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") - * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "AX") - * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) - * @param {string} [sValue] optional data value - * @return {boolean} true if binding was successful, false if unrecognized binding request - */ -CPUStatePDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) -{ - var fBound = false; - switch (sBinding) { - 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": - this.bindings[sBinding] = control; - this.cLiveRegs++; - fBound = true; - break; - default: - fBound = this.parent.setBinding.call(this, sHTMLType, sBinding, control); - break; - } - return fBound; -}; - -/** - * updateStatus(fForce) - * - * This provides periodic Control Panel updates (a few times per second; see YIELDS_PER_STATUS). - * this is where we take care of any DOM updates (eg, register values) while the CPU is running. - * - * @this {CPUStatePDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) - */ -CPUStatePDP11.prototype.updateStatus = function(fForce) -{ - if (this.cLiveRegs) { - if (fForce || !this.flags.running || this.flags.displayLiveRegs) { - for (var i = 0; i < this.regsGen.length; i++) { - this.displayValue('R'+i, this.regsGen[i]); - } - var regPSW = this.getPSW(); - this.displayValue("PS", regPSW); - this.displayValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); - this.displayValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); - this.displayValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); - this.displayValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); - } - } - var controlSpeed = this.bindings["speed"]; - if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent(); -}; - /** * clearCF() * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 47b6355c9..80ed0b66a 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -454,16 +454,16 @@ if (DEBUGGER) { }; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {DebuggerPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "debugInput") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ - DebuggerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) + DebuggerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var dbg = this; switch (sBinding) { @@ -626,7 +626,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.bus.setByteDirect(addr, b); if (inc) this.incAddr(dbgAddr, inc); - this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target + this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } }; @@ -644,7 +644,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.bus.setWordDirect(addr, w); if (inc) this.incAddr(dbgAddr, inc); - this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target + this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } }; @@ -1242,15 +1242,15 @@ if (DEBUGGER) { }; /** - * stepCPU(nCycles, fRegs, fUpdateCPU) + * stepCPU(nCycles, fRegs, fUpdateStatus) * * @this {DebuggerPDP11} * @param {number} nCycles (0 for one instruction without checking breakpoints) * @param {boolean} [fRegs] is true to display registers after step (default is false) - * @param {boolean} [fUpdateCPU] is false to disable calls to updateCPU() (default is true) + * @param {boolean} [fUpdateStatus] is false to disable Computer status updates (default is true) * @return {boolean} */ - DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateCPU) + DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateStatus) { if (!this.checkCPU()) return false; @@ -1291,11 +1291,11 @@ if (DEBUGGER) { } /* - * Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the cpu's update code, - * and then update our own state. Normally, the only time fUpdateCPU will be false is when doTrace() - * is calling us in a loop, in which case it will perform its own updateCPU() when it's done. + * Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the Computer's update code, + * and then update our own state. Normally, the only time fUpdateStatus will be false is when doTrace() + * is calling us in a loop, in which case it will perform its own updateStatus() when it's done. */ - if (fUpdateCPU !== false) this.cpu.updateCPU(); + if (fUpdateStatus !== false) this.cmp.updateStatus(); this.updateStatus(fRegs || false); return (this.nCycles > 0); @@ -2550,7 +2550,7 @@ if (DEBUGGER) { if (asArgs[2] === undefined) { this.println("begin assemble at " + this.toStrAddr(dbgAddr)); this.fAssemble = true; - this.cpu.updateCPU(); + this.cmp.updateStatus(); return; } @@ -3247,7 +3247,7 @@ if (DEBUGGER) { this.println("unknown register: " + sReg); return; } - cpu.updateCPU(); + this.cmp.updateStatus(); this.println("updated registers:"); } @@ -3493,11 +3493,12 @@ if (DEBUGGER) { }, function onCountStepComplete() { /* - * We explicitly called stepCPU() with fUpdateCPU === false, because repeatedly - * calling updateCPU() can be very slow, especially when fDisplayLiveRegs is true, - * so once the repeat count has been exhausted, we must perform a final updateCPU(). + * We explicitly called stepCPU() with fUpdateStatus === false, because repeatedly + * calling updateStatus() can be very slow, especially if a Control Panel is present + * with displayLiveRegs enabled, so once the repeat count has been exhausted, we must + * perform a final updateStatus(). */ - dbg.cpu.updateCPU(); + dbg.cmp.updateStatus(); dbg.setBusy(false); } ); diff --git a/modules/pdp11/lib/keyboard.js b/modules/pdp11/lib/keyboard.js index 6d9d0452c..54e10c866 100644 --- a/modules/pdp11/lib/keyboard.js +++ b/modules/pdp11/lib/keyboard.js @@ -60,16 +60,16 @@ Component.subclass(KeyboardPDP11); KeyboardPDP11.MINPRESSTIME = 100; // 100ms /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {KeyboardPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "esc") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -KeyboardPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +KeyboardPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { return false; }; diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index bae335d91..a29f74706 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -54,30 +54,70 @@ if (NODE) { function PanelPDP11(parmsPanel) { Component.call(this, "Panel", parmsPanel, PanelPDP11); + /* + * If there are any live registers, LEDs, etc, to display, this will provide a count. + */ + this.cLiveRegs = 0; + /* + * TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both) + */ + this.flags.displayLiveRegs = true; + } Component.subclass(PanelPDP11); /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * - * Most panel layouts don't have bindings of their own, so we pass along all binding requests to the - * Computer, CPU, Keyboard and Debugger components first. The order shouldn't matter, since any component - * that doesn't recognize the specified binding should simply ignore it. + * Some panel layouts don't have bindings of their own, and even when they do, there may still be some + * components (eg, the CPU) that prefer to update their own bindings, so we pass along all binding requests + * to the Computer, CPU, Keyboard and Debugger components first. The order shouldn't matter, since any + * component that doesn't recognize the specified binding should simply ignore it. * * @this {PanelPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -PanelPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { - if (this.cmp && this.cmp.setBinding(sHTMLType, sBinding, control, sValue)) return true; - if (this.cpu && this.cpu.setBinding(sHTMLType, sBinding, control, sValue)) return true; - if (DEBUGGER && this.dbg && this.dbg.setBinding(sHTMLType, sBinding, control, sValue)) return true; - return this.parent.setBinding.call(this, sHTMLType, sBinding, control, sValue); + if (this.cmp && this.cmp.setBinding(sType, sBinding, control, sValue)) { + return true; + } + if (this.cpu && this.cpu.setBinding(sType, sBinding, control, sValue)) { + return true; + } + if (DEBUGGER && this.dbg && this.dbg.setBinding(sType, sBinding, control, sValue)) { + return true; + } + switch (sBinding) { + 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": + this.bindings[sBinding] = control; + this.cLiveRegs++; + return true; + default: + if (sType == "rled") { + this.bindings[sBinding] = control; + this.cLiveRegs++; + return true; + } + return this.parent.setBinding.call(this, sType, sBinding, control, sValue); + } }; /** @@ -124,21 +164,98 @@ PanelPDP11.prototype.powerDown = function(fSave, fShutdown) return true; }; +/** + * updateValue(sLabel, nValue, cch) + * + * This is principally for displaying register values, but in reality, it can be used to display any + * numeric value bound to the given label. + * + * @this {PanelPDP11} + * @param {string} sLabel + * @param {number} nValue + * @param {number} [cch] + */ +PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) +{ + if (this.bindings[sLabel]) { + if (nValue === undefined) { + this.setError("Value for " + sLabel + " is invalid"); + this.cpu.stopCPU(); + } + var sVal; + var nBase = this.dbg && this.dbg.nBase || 8; + if (!this.cpu.isRunning() || this.flags.displayLiveRegs) { + sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch); + } else { + sVal = "--------".substr(0, cch || 4); + } + /* + * TODO: Determine if this test actually avoids any redrawing when a register hasn't changed, and/or if + * we should maintain our own (numeric) cache of displayed register values (to avoid creating these temporary + * string values that will have to garbage-collected), and/or if this is actually slower, and/or if I'm being + * too obsessive. + */ + if (this.bindings[sLabel].textContent != sVal) this.bindings[sLabel].textContent = sVal; + } +}; + +/** + * setLED(control, f) + * + * @this {PanelPDP11} + * @param {Object} control is an HTML control DOM object + * @param {boolean|number} f is true if the LED represented by control should be "on", false if "off" + */ +PanelPDP11.prototype.setLED = function(control, f) +{ + /* + * TODO: Add support for user-definable LED colors + */ + control.style.backgroundColor = (f? "#ff0000" : "#000000"); +}; + +/** + * updateLEDs(sPrefix, data, nLEDs) + * + * @this {PanelPDP11} + * @param {string} sPrefix + * @param {number} data + * @param {number} nLEDs + */ +PanelPDP11.prototype.updateLEDs = function(sPrefix, data, nLEDs) +{ + for (var i = 0; i < nLEDs; i++) { + var id = sPrefix + i; + var control = this.bindings[id]; + if (control) { + this.setLED(control, data & (1 << i)); + } + } +}; + /** * updateStatus(fForce) * - * Update function for Panels containing elements with high-frequency display requirements. - * - * For older (and slower) DOM-based display elements, those are sill being managed by the CPUState component, - * so it has its own updateStatus() handler. - * - * The Computer's updateStatus() handler is currently responsible for calling both our handler and the CPU's handler. - * * @this {PanelPDP11} * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) */ PanelPDP11.prototype.updateStatus = function(fForce) { + if (this.cLiveRegs) { + if (fForce || !this.cpu.isRunning() || this.flags.displayLiveRegs) { + for (var i = 0; i < this.cpu.regsGen.length; i++) { + this.updateValue('R'+i, this.cpu.regsGen[i]); + } + var regPSW = this.cpu.getPSW(); + this.updateValue("PS", regPSW); + this.updateValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); + this.updateValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); + this.updateValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); + this.updateValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); + this.updateLEDs("D", this.cpu.regsGen[0], 16); + this.updateLEDs("A", this.cpu.regsGen[7], 22); + } + } }; /** diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 57dd66dcf..cb43b4b04 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -165,16 +165,16 @@ Component.subclass(SerialPortPDP11); SerialPortPDP11.sIOBuffer = "buffer"; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {SerialPortPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "buffer") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -SerialPortPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +SerialPortPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var serial = this; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index cc465f45f..34affccf5 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -164,7 +164,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -214,7 +214,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -310,7 +310,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -337,7 +337,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -364,7 +364,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -391,7 +391,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -418,7 +418,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -445,7 +445,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -472,7 +472,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -499,7 +499,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -526,7 +526,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -553,7 +553,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -580,7 +580,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -607,7 +607,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -634,7 +634,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -683,217 +683,215 @@ */ var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ca(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=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 qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Va=void 0,Wa={}; +function Ma(a){if(Ja)try{for(var b=0;bb?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ta-1;this.C=this.I/this.ta|0;this.Fa=[];this.w=0;this.B=[];this.hc=[Db,Eb,Fb,Gb];a=new H(this);Hb(a,this.j);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Eb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Fb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Jb(a,b){if(b!=a.F){var c;a.F&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ta;g-=q;l++;continue}}return Ob(1,f,g)}f=new H(a,f,q,a.ta,d,e);Hb(f,a.j,m);a.W[l++]=f;f=p+a.ta;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Pb[d]+" at "+k(b,8,!0)),!0):Ob(2,b,c)} -function Lb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ia=function(a){return this.W[(a&this.i)>>>this.Y].Yb(a&this.f,a)};function Qb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Rb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].fc(a&this.f,b&65535,a)};function Sb(a){for(var b=0,c=[],d=0;da.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} -function Wb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+I(a.j,b),!0,!0),a.b.$(4,b))}function Ob(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function J(a){r.call(this,"Device",a,J,256);this.i={data:0,Gd:0,rb:20,Jd:0};this.f={Hd:0,Fb:-1}}y(J);h=J.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=Xb(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(Yb(e.b,0,6,64),Zb(e.b,e.f.Fb,1E3/60))});Ub(b,this,K);Vb(b,this.reset.bind(this));G(this)}; -h.yc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.fd=function(a){this.f.Ha=a;a&64&&Zb(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.Ac=function(){var a=this.b;return a.G&62337|a.ra<<5|a.sa<<1};h.hd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ra=a>>5&3;b.sa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,hc(b))}ic(this)};h.Bc=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Cc=function(){return this.b.Cb};h.Dc=function(){return this.b.Ka}; -h.jd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),hc(b));ic(this)};function ic(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Pc=function(a){return this.b.R[1][a>>1&7]};h.vd=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Nc=function(a){return this.b.R[1][(a>>1&7)+8]};h.td=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Oc=function(a){return this.b.oa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; -h.Mc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.xc=function(a){return this.b.R[0][a>>1&7]};h.ed=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.vc=function(a){return this.b.R[0][(a>>1&7)+8]};h.cd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.wc=function(a){return this.b.oa[0][a>>1&7]};h.dd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.uc=function(a){return this.b.oa[0][(a>>1&7)+8]}; -h.bd=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Vc=function(a){return this.b.R[3][a>>1&7]};h.Bd=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Tc=function(a){return this.b.R[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Uc=function(a){return this.b.oa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Sc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; -h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Gc=function(){return this.b.L&49152?this.b.qa[0]:this.b.u[6]};h.md=function(a){this.b.L&49152?this.b.qa[0]=a:this.b.u[6]=a};h.Jc=function(){return this.b.u[7]};h.pd=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; -h.Hc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[1]};h.nd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[1]=a};h.Ic=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[3]};h.od=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[3]=a};h.tc=function(a){return this.b.ac[a-65504>>1]};h.ad=function(a,b){this.b.ac[b-65504>>1]=a};h.Xb=function(a){return 65520==a?61183:0};h.ec=function(){};h.Rc=function(){return 1};h.xd=function(){};h.sc=function(){return this.b.Z}; -h.$c=function(){this.b.Z=0};h.zc=function(){return this.b.$b};h.gd=function(a,b){b&1||(a&=255);this.b.$b=a};h.Ec=function(){return this.b.Db};h.kd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Qc=function(){return this.b.La&65280};h.wd=function(a){this.b.La=a|255};h.Fc=function(){return jc(this.b)};h.ld=function(a){kc(this.b,a&-1809|jc(this.b)&1808);this.b.D|=128};h.dc=function(a,b){E(this)&&B(this,"writeIgnored("+ba(b)+"): "+ba(a),!0,!0)}; +var lb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function zb(a){r.call(this,"Panel",a,zb);this.f=0;this.v.Kb=!0}y(zb);h=zb.prototype; +h.pa=function(a,b,c,d){if(this.C&&this.C.pa(a,b,c,d)||this.b&&this.b.pa(a,b,c,d)||this.j&&this.j.pa(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.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.pa.call(this,a,b,c,d)}};h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.j=d};h.ya=function(a,b){b||Ab();return!0};h.xa=function(){return!0}; +function Bb(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.b.fa());var e=a.j&&a.j.ha||8;c=!a.b.v.ba||a.v.Kb?8==e?ca(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Cb(a,b,c,d){for(var e=0;e>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Hb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Lb(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} +function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Xb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Ub)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.B.push(b)} +function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Fb:-1}}y(K);h=K.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=gc(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(hc(e.b,0,6,64),ic(e.b,e.f.Fb,1E3/60))});Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)}; +h.xc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.ed=function(a){this.f.Ha=a;a&64&&ic(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.zc=function(){var a=this.b;return a.G&62337|a.sa<<5|a.ta<<1};h.gd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,jc(b))}kc(this)};h.Ac=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Bc=function(){return this.b.Cb};h.Cc=function(){return this.b.Ka}; +h.hd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),jc(b));kc(this)};function kc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Oc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Mc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Nc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; +h.Lc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.wc=function(a){return this.b.R[0][a>>1&7]};h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.uc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.vc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.tc=function(a){return this.b.oa[0][(a>>1&7)+8]}; +h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Uc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Sc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Tc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Rc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; +h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Fc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Ic=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; +h.Gc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a};h.Hc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.sc=function(a){return this.b.$b[a-65504>>1]};h.$c=function(a,b){this.b.$b[b-65504>>1]=a};h.Wb=function(a){return 65520==a?61183:0};h.dc=function(){};h.Qc=function(){return 1};h.wd=function(){};h.rc=function(){return this.b.Z}; +h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.F|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)}; h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0}; -var L={},K=(L[62592]=[null,null,J.prototype.Pc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Nc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Oc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Mc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.xc,J.prototype.ed,"KISDR"],L[62672]=[null,null,J.prototype.vc,J.prototype.cd,"KDSDR"],L[62688]=[null,null,J.prototype.wc,J.prototype.dd,"KISAR"],L[62704]=[null,null,J.prototype.uc,J.prototype.bd,"KDSAR"],L[62798]=[null,null, -J.prototype.Dc,J.prototype.jd,"MMR3"],L[65382]=[null,null,J.prototype.yc,J.prototype.fd,"LKS"],L[65402]=[null,null,J.prototype.Ac,J.prototype.hd,"MMR0"],L[65404]=[null,null,J.prototype.Bc,J.prototype.dc,"MMR1"],L[65406]=[null,null,J.prototype.Cc,J.prototype.dc,"MMR2"],L[65408]=[null,null,J.prototype.Vc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Tc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Uc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Sc,J.prototype.yd,"UDSAR"], -L[65472]=[null,null,J.prototype.Za,J.prototype.cb,"R0SET0"],L[65473]=[null,null,J.prototype.Za,J.prototype.cb,"R1SET0"],L[65474]=[null,null,J.prototype.Za,J.prototype.cb,"R2SET0"],L[65475]=[null,null,J.prototype.Za,J.prototype.cb,"R3SET0"],L[65476]=[null,null,J.prototype.Za,J.prototype.cb,"R4SET0"],L[65477]=[null,null,J.prototype.Za,J.prototype.cb,"R5SET0"],L[65478]=[null,null,J.prototype.Gc,J.prototype.md,"R6KERNEL"],L[65479]=[null,null,J.prototype.Jc,J.prototype.pd,"R7KERNEL"],L[65480]=[null,null, -J.prototype.$a,J.prototype.eb,"R0SET1"],L[65481]=[null,null,J.prototype.$a,J.prototype.eb,"R1SET1"],L[65482]=[null,null,J.prototype.$a,J.prototype.eb,"R2SET1"],L[65483]=[null,null,J.prototype.$a,J.prototype.eb,"R3SET1"],L[65484]=[null,null,J.prototype.$a,J.prototype.eb,"R4SET1"],L[65485]=[null,null,J.prototype.$a,J.prototype.eb,"R5SET1"],L[65486]=[null,null,J.prototype.Hc,J.prototype.nd,"R6SUPER"],L[65487]=[null,null,J.prototype.Ic,J.prototype.od,"R6USER"],L[65504]=[null,null,J.prototype.tc,J.prototype.ad, -"CTRL",1170],L[65520]=[null,null,J.prototype.Xb,J.prototype.ec,"LSIZE",1170],L[65522]=[null,null,J.prototype.Xb,J.prototype.ec,"HSIZE",1170],L[65524]=[null,null,J.prototype.Rc,J.prototype.xd,"SYSID",1170],L[65526]=[null,null,J.prototype.sc,J.prototype.$c,"CPUERR",1170],L[65528]=[null,null,J.prototype.zc,J.prototype.gd,"MB",1170],L[65530]=[null,null,J.prototype.Ec,J.prototype.kd,"PIR"],L[65532]=[null,null,J.prototype.Qc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Fc,J.prototype.ld,"PSW"], -L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608];K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640]; -K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672];K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704]; -K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424];K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456]; -K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&Wb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},pa: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.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.M)&&c.ea(!0)}return this.zb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.M)&&c.ea(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a, -1,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Gb(a,b,c)},sa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Hb(a,b,c)},N:function(a){return this.C[a]},U:function(a,b){a=this.C[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ba:function(a,b){a&1&&Wb(this.w,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&Wb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -I(this.j,b)+"): "+I(this.j,a),!0);return a},ka:function(a,b){this.C[a]=b;this.Ga=!0},ma:function(a,b,c){this.C[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},ra:function(a,b,c){a&1&&Wb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Wb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}}; -function Hb(a,b,c){a.j=b;a.i=a.J=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.J=c.J)&&vc(a,wc,!1))}function zc(a,b){b?--a.J||(a.ub=a.f?a.F:a.Gb,a.fc=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Yb=a.Ab)}function vc(a,b,c){c&&a.J||(a.ub=!a.f&&b[1]||a.F,a.fc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.F,a.Hb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Yb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} -var Ac=[],uc=[H.prototype.V,H.prototype.pa,H.prototype.ga,H.prototype.va],wc=[H.prototype.S,H.prototype.la,H.prototype.ca,H.prototype.sa];if(lb)var tc=[H.prototype.N,H.prototype.ka,H.prototype.ba,H.prototype.ra],sc=[H.prototype.U,H.prototype.ma,H.prototype.da,H.prototype.Ta]; -function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.aa=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Kb=!1;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Tb=this.Zc.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; -h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Ic(a)&&(a.Xa=a.Ya=-1,Fc(a),a.ea(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.jb))}} -function Jc(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ga||8;c=!a.v.aa||a.v.Kb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} -h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ca/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&a.F.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.da=0;Mc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Zb(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)}function Nc(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 Oc(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]()))}} -h.Zc=function(){if(this.v.aa){this.ib>=this.Na&&Mc(this,!0);this.pa=0;this.Ea=ra();if(this.da){var a=this.Ea-this.da;a>this.Qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Oc(this,c);this.pa+=c;this.V+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Rb&&(this.F&&this.F.ua(),this.Rb=0);break}}while(this.v.aa)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), -Ic(this));kb(this,e.stack||e.message);return}if(this.v.aa){a=setTimeout;b=this.Tb;this.da=ra();c=this.Qb;this.pa&&(c=Math.round(c*this.pa/this.Ma));var c=c-(this.da-this.Ea),d=this.da-this.U;d&&(this.ca=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ga=0,Kc(this)));if(0>c||this.cac&&(this.U-=c),c=0;this.ib+=this.pa;this.da+=c;a(b,c)}}}; -h.ab=function(a){if(jb(this))return!1;if(this.v.aa)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.aa=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.U,Ic(this)));M(this,!0);setTimeout(this.Tb,0);return!0};h.bb=function(){return 0};h.ea=function(a){if(this.v.aa){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.aa=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Ic(this));M(this)}this.v.complete=a}; -function M(a,b){a.F&&a.F.ua(b)} -function hd(a){this.Vb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.pb=0;this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.qc];this.Da=[0,0,0,0,0,0];this.qa=[0,0,0,0];this.sa=this.C=0;this.nc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.ac=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.$b=0;this.ma=-1;jd(this);this.v.complete=this.v.jc=!1}y(hd,Bc);h=hd.prototype;h.reset=function(){this.v.aa&&this.ea();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.ra=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&hc(a)}function hc(a){a.sb?(a.ba=65536,a.M=a.mc,a.S=a.Zb,a.Ub=a.Dd,Jb(a.w,a.Ka&16?22:18)):(a.ba=0,a.M=a.lc,a.S=a.Wc,a.Ub=a.Cd,Jb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Ia]);a.set(2,Sb(this.w));return a.data()}; -h.restore=function(a){var b=a[1];this.ga=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Wb:c<<5&224,cc:d,yb:e})}a.D|=2}function jc(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} -function kc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.qa[c]=a.u[6],a.u[6]=a.qa[a.C]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} -h.$=function(a){var b=!1;0>this.ma?this.ma=jc(this):this.C||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.C=0;var c=this.S(a|this.ba),d=this.S(a+2&65535|this.ba);kc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.D&=-17} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.nc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: -128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.C][d]=e;if(4194170!==f||a.C)a.ra=a.C,a.sa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ra<<5|a.sa<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.lc=function(a,b,c){return xd(this,a,b,c)};h.mc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Wc=function(a){return this.w.ia(a)};h.Zb=function(a){return this.w.ia(wd(this,a,2))}; -h.Cd=function(a,b){this.w.Sa(a,b&65535)};h.Dd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.S(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.qa[a.L>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=wd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.qa[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} -function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ia(e)))):a.u[e]=d.call(a,c,a.u[e])} +var M={},L=(M[62592]=[null,null,K.prototype.Oc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Mc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Nc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Lc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.wc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.uc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.vc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.tc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, +K.prototype.Cc,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.xc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.zc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.Ac,K.prototype.cc,"MMR1"],M[65406]=[null,null,K.prototype.Bc,K.prototype.cc,"MMR2"],M[65408]=[null,null,K.prototype.Uc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Sc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Tc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Rc,K.prototype.xd,"UDSAR"], +M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Fc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ic,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, +K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Gc,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Hc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.sc,K.prototype.$c, +"CTRL",1170],M[65520]=[null,null,K.prototype.Wb,K.prototype.dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.Wb,K.prototype.dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Qc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.rc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.yc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Dc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Pc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Ec,K.prototype.kd,"PSW"], +M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; +L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; +L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; +L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.M)&&c.fa(!0)}return this.zb(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.M)&&c.fa(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a, +1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Ga=!0},ma:function(a,b,c){this.D[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.C=0;c&&((a.i=c.i)&&yc(a,xc,!1),(a.C=c.C)&&wc(a,xc,!1))}function Ac(a,b){b?--a.C||(a.ub=a.f?a.J:a.Gb,a.ec=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Xb=a.Ab)}function wc(a,b,c){c&&a.C||(a.ub=!a.f&&b[1]||a.J,a.ec=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.J,a.Hb=b[3]||a.H}function yc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Xb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)} +var Bc=[],vc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],xc=[I.prototype.S,I.prototype.la,I.prototype.da,I.prototype.ta];if(lb)var uc=[I.prototype.N,I.prototype.ka,I.prototype.ca,I.prototype.sa],tc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Ta]; +function Cc(a,b){r.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.ba=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Rb=this.Yc.bind(this);G(this)}y(Cc);var Dc=["power","reset"];h=Cc.prototype; +h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Jc(a)&&(a.Xa=a.Ya=-1,Gc(a),a.fa(),c=!0);c&&a.g(Jc(a)+" cycles: checksum="+k(a.jb))}} +h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.da/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.C&&a.C.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.ea=0;Mc(a);return d}function gc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)} +function Nc(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 gd(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]()))}} +h.Yc=function(){if(this.v.ba){this.ib>=this.Na&&Mc(this,!0);this.qa=0;this.Ea=ra();if(this.ea){var a=this.Ea-this.ea;a>this.qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;gd(this,c);this.qa+=c;this.V+=c;Lc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Qb&&(this.C&&this.C.aa(),this.Qb=0);break}}while(this.v.ba)}catch(e){this.fa();this.C&&this.C.stop(ra(), +Jc(this));kb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Rb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.Ma));var c=c-(this.ea-this.Ea),d=this.ea-this.U;d&&(this.da=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ha=0,Kc(this)));if(0>c||this.dac&&(this.U-=c),c=0;this.ib+=this.qa;this.ea+=c;a(b,c)}}}; +h.ab=function(a){if(jb(this))return!1;if(this.v.ba)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.ba=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.nb(!0),this.C.start(this.U,Jc(this)));setTimeout(this.Rb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Jc(this))}this.v.complete=a}; +function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.D=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.F=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.F|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()}; +h.restore=function(a){var b=a[1];this.ha=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.F|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} +function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.D=b>>14&3;c=a.L>>14&3;a.D!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.D]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.F&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} +h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.D=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.F&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.F&=-17} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.D]||(d&=7);e=a.R[a.D][d];f=(a.oa[a.D][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: +128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.D][d]=e;if(4194170!==f||a.D)a.sa=a.D,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= +8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))}; +h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.S(d|c&a.ca),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} +function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} +function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.bb=function(a){this.v.complete=!0;var b=this.v.jc=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0d&&(d=this.B[e].Wb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.cc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.F&1&&this.F++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} +function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.F&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.F&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} +function Yd(a,b){a=b+a;var c=a<<8;this.F&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} +function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.F&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b} function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=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.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5} function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)} var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? 4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],xe= [function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= +2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, +0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= 65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24,2); this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.C=a.addr;this.i=a.size;this.G=a.writable;this.F=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Id:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; +this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.C=[];return!0}h.Bb=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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;Yb(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Lc,W.prototype.rd,"RCSR"],nf[65394]=[null,null,W.prototype.Kc,W.prototype.qd,"RBUF"],nf[65396]=[null,null,W.prototype.Yc,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.Xc,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; +function gf(a){if(!ib(a))if(!a.B)G(a);else if(a.f&&a.w){a.i||(a.i=a.f.length);if(a.f.length!=a.i)kb(a,"ROM size ("+k(a.f.length,8,!0)+") does not match specified size ("+k(a.i,8,!0)+")");else{var b;b=a.D;if(Ob(a.w,b,a.i,a.G?1:rc)){var c;for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.D=[];return!0}h.Bb=function(a){if("number"==typeof a)this.D.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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;hc(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Kc,W.prototype.qd,"RCSR"],nf[65394]=[null,null,W.prototype.Jc,W.prototype.pd,"RBUF"],nf[65396]=[null,null,W.prototype.Xc,W.prototype.Ed,"XCSR"],nf[65398]=[null,null,W.prototype.Wc,W.prototype.Dd,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; function qf(a,b,c,d){if(c)if(b){0>a.B&&a.i.length&&(a.B=0);if(0>a.B||b!=a.i[a.B])a.i.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.i[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} function rf(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 sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ba[b]);var c=0;for(b in a.ba)vf(a,b,a.ba[b]),c++;return 0>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ca[b]);var c=0;for(b in a.ca)vf(a,b,a.ca[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Pb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ia=function(a,b){var c=65535,d=Y(a);-1!==d&&(c=Qb(this.w,d),b&&Gf(a,b));return c}; -h.mb=function(a,b,c){var d=Y(a);-1!==d&&(Rb(this.w,d,b),c&&Gf(a,c),M(this.b,!0))};h.Sa=function(a,b,c){var d=Y(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} -function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.qa[a-16]:20==a&&(b=jc(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+I(this,X(this.b.u[7]).A));this.ha&1073741824?this.pa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,M(a)))}; -function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.C)for(b=1;b>>d.Y],!0);a.C=["bw"];a.Ma=0} -h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.g("invalid address: "+I(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.C)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Y],b==a.C));l.wa||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,x=I(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=I(v,u);else if(12288==D)x=I(v,f&7,1);else if(24576==D)x=I(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ -")+":(D=v.ia(u,2),x="#"+I(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ia(u,2),x="@#"+I(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ia(u,2);x=I(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,I(v,D+u.A&65535)]);break;case 56:D=v.ia(u,2),x="@"+I(v,D)+"("+Kf(C)+")",7==C&&(x=[x,I(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.qa[b-16]):20==b&&(c="PS="+I(a,jc(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&e>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Gf(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Gf(a,c),this.C.aa(!0))};h.Sa=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);this.C.aa(!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} +function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,a.C.aa()))}; +function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.Ma=0} +h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ +")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Kf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}M(d);a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,I(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.C.aa();a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,J(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+I(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ja.length&&(a.g("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].A?(Z=ca+Z,ca=0):ca+=ja.length);var Sc=[];"call"==De&&(nb=1E5,Sc=["CALL"]);for(void 0!==Ce&&a.g(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Ua=Z;Fe++;nb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var pb=Ff(a,ia);if(pb){var $b=0;Aa&&("l"==Aa.charAt(0)&&(Aa=Aa.substr(1)||ug),$b=uf(a,Aa)>>>0,65536<$b&&($b=65536));for(var qb="",Ta="dd"==Qa?4:"dw"==Qa?2:1,ac=Ta*$b||128,wg=ac+15>>4||1;wg--&&0cc?String.fromCharCode(cc):".";ac--}qb&&(qb+="\n");qb+=ia+" "+Tc+(0==sb?" "+Ie:"")}qb&&a.g(qb);a.Na=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Vc,Wc,Xc,Yc=g[0],Zc=g[1];"eb"==Yc?(Ua=1,Vc=255,Wc=a.Qa,Xc=a.mb):"e"==Yc||"ew"==Yc?(Ua=2,Vc=65535,Wc=a.ia,Xc=a.Sa):Zc=null;if(null==Zc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var dc=Ff(a,Zc);if(dc)for(var ec=2;ec< -g.length;ec++){var tb=sf(a,g[ec]);if(void 0===tb){a.g("unrecognized value: "+g[ec]);break}tb&~Vc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var xg=Wc.call(a,dc);a.g("changing "+I(a,dc.A)+" from "+I(a,xg,Ua)+" to "+I(a,tb,Ua));Xc.call(a,dc,tb,Ua)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var $c=Ff(a,Je,!0);if(!$c)break a;Jf(a,$c,yg);a.Oa(a.f,$c,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.aa?(c||a.g("halting"),a.ea()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var ad;var ub=b.substr(2),ub=oa(ub);sf(a,ub)?(c||a.g("true: "+ub),ad=!0):(c||a.g("false: "+ub),ad=!1);ad||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var bd=0,cd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+I(a,vb.A));10>bd;){for(var Ba=null,Ag=256;65536>vb.A>>>0;){cd.A=a.ia(vb,2);if(null==vb.A||!Ag--)break;if(!(cd.A&1)){for(var Bg=a,fc=cd,Ke=null,wb= -fc.A,Le=wb,dd=1;6>=dd&&wb;dd++){if(2> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Rc=[];"call"==De&&(mb=1E5,Rc=["CALL"]);for(void 0!==Ce&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ua=Y;Fe++;mb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var ob=Ff(a,ha);if(ob){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Zb=uf(a,za)>>>0,65536>4||1;wg--&&0<$b;){var ac=0,qb=0,rb,Sc="",Ie="",ha=J(a,ob.A);for(rb=4==Sa?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}pb&&(pb+="\n");pb+=ha+" "+Sc+(0==rb?" "+Ie:"")}pb&&a.g(pb);a.Na=ob}}}}break;case "e":if("else"==g[0])break;var Ta,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ta=1,Uc=255,Vc=a.Qa,Wc=a.mb):"e"==Xc||"ew"==Xc?(Ta=2,Uc=65535,Vc=a.ja,Wc=a.Sa):Yc=null;if(null==Yc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Ff(a,Yc);if(cc)for(var dc=2;dc< +g.length;dc++){var sb=sf(a,g[dc]);if(void 0===sb){a.g("unrecognized value: "+g[dc]);break}sb&~Uc&&a.g("warning: "+k(sb)+" exceeds "+Ta+"-byte value");var xg=Vc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,xg,Ta)+" to "+J(a,sb,Ta));Wc.call(a,cc,sb,Ta)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var Zc=Ff(a,Je,!0);if(!Zc)break a;Jf(a,Zc,yg);a.Oa(a.f,Zc,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.ba?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var $c;var tb=b.substr(2),tb=oa(tb);sf(a,tb)?(c||a.g("true: "+tb),$c=!0):(c||a.g("false: "+tb),$c=!1);$c||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ad=0,bd=X(),ub=X(a.b.u[6]);for(a.g("stack trace for "+J(a,ub.A));10>ad;){for(var Aa=null,Ag=256;65536>ub.A>>>0;){bd.A=a.ja(ub,2);if(null==ub.A||!Ag--)break;if(!(bd.A&1)){for(var Bg=a,ec=bd,Ke=null,vb= +ec.A,Le=vb,cd=1;6>=cd&&vb;cd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");hg(this.C)&&(mg(this,d),a=2,ng(this.C));this.C.set("timestamp",sa());og(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +h.lb=function(a){void 0===a&&(a=this.f||(this.I?1:fg));if(!this.C){this.C++;var b=!1,c=!1;this.S=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>fg){if(hg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");hg(this.D)&&(mg(this,d),a=2,ng(this.D));this.D.set("timestamp",ta());og(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; -function mg(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.ea(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;ma[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.C=0}; +function mg(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e= "");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| (c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index b919f7a39..0408e7044 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -164,7 +164,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -214,7 +214,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -310,7 +310,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -337,7 +337,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -364,7 +364,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -391,7 +391,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -418,7 +418,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -445,7 +445,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -472,7 +472,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -499,7 +499,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -526,7 +526,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -553,7 +553,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -580,7 +580,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -607,7 +607,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -634,7 +634,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -692,79 +692,78 @@ typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encod function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function t(a){r.init.push(a)} function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Xc:!1,Yc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.w={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.fb=b.comment;this.Db=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.xb=[Na,Oa,Pa,Qa];a=new E(this);Ra(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Sa(d)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Sa(e)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Sa(d)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Sa(e)}function Ta(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return Ya(1,f,h)}f=new E(a,f,u,a.l,d,e);Ra(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+Za[d]+" at "+k(b,8,!0)),!0):Ya(2,b,c)} -function Va(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function ab(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function bb(a,b,c){a.b[(b&a.i)>>>a.c].Rc(b&a.g,c&65535,b)} -function cb(a){for(var b=0,c=[],d=0;da.a.Db)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));db(a,e,e,h,l,n,p,f[4])}}}function fb(a,b){a.s.push(b)}function G(a){a.o||F(a.a,4)} -function Ya(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function H(a){v.call(this,"Device",a,H);this.c={data:0,Wc:0,Ma:20,$c:0};this.b={Zc:0,ab:-1}}x(H);g=H.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=gb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(hb(e.a,0,6,64),ib(e.a,e.b.ab,1E3/60))});eb(b,this,I);fb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.vc=function(a){this.b.ka=a;a&64&&ib(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.xc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,jb(b))}kb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; -g.yc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),jb(b));kb(this)};function kb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Kc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Ic=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Jc=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; -g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Hc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.uc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.sc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.tc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; -g.rc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Qc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Oc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Pc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Nc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; -g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Bc=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Ec=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Cc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Dc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.qb[a-65504>>1]};g.qc=function(a,b){this.a.qb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.wb=function(){};g.ec=function(){return 1};g.Mc=function(){};g.Gb=function(){return this.a.G}; -g.pc=function(){this.a.G=0};g.Nb=function(){return this.a.pb};g.wc=function(a,b){b&1||(a&=255);this.a.pb=a};g.Sb=function(){return this.a.$a};g.zc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Lc=function(a){this.a.na=a|255};g.Tb=function(){return lb(this.a)};g.Ac=function(a){mb(this.a,a&-1809|lb(this.a)&1808);this.a.j|=128};g.vb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; -var J={},I=(J[62592]=[null,null,H.prototype.cc,H.prototype.Kc,"SISDR"],J[62608]=[null,null,H.prototype.ac,H.prototype.Ic,"SDSDR"],J[62624]=[null,null,H.prototype.bc,H.prototype.Jc,"SISAR"],J[62640]=[null,null,H.prototype.$b,H.prototype.Hc,"SDSAR"],J[62656]=[null,null,H.prototype.Lb,H.prototype.uc,"KISDR"],J[62672]=[null,null,H.prototype.Jb,H.prototype.sc,"KDSDR"],J[62688]=[null,null,H.prototype.Kb,H.prototype.tc,"KISAR"],J[62704]=[null,null,H.prototype.Ib,H.prototype.rc,"KDSAR"],J[62798]=[null,null, -H.prototype.Rb,H.prototype.yc,"MMR3"],J[65382]=[null,null,H.prototype.Mb,H.prototype.vc,"LKS"],J[65402]=[null,null,H.prototype.Ob,H.prototype.xc,"MMR0"],J[65404]=[null,null,H.prototype.Pb,H.prototype.vb,"MMR1"],J[65406]=[null,null,H.prototype.Qb,H.prototype.vb,"MMR2"],J[65408]=[null,null,H.prototype.ic,H.prototype.Qc,"UISDR"],J[65424]=[null,null,H.prototype.gc,H.prototype.Oc,"UDSDR"],J[65440]=[null,null,H.prototype.hc,H.prototype.Pc,"UISAR"],J[65456]=[null,null,H.prototype.fc,H.prototype.Nc,"UDSAR"], -J[65472]=[null,null,H.prototype.sa,H.prototype.va,"R0SET0"],J[65473]=[null,null,H.prototype.sa,H.prototype.va,"R1SET0"],J[65474]=[null,null,H.prototype.sa,H.prototype.va,"R2SET0"],J[65475]=[null,null,H.prototype.sa,H.prototype.va,"R3SET0"],J[65476]=[null,null,H.prototype.sa,H.prototype.va,"R4SET0"],J[65477]=[null,null,H.prototype.sa,H.prototype.va,"R5SET0"],J[65478]=[null,null,H.prototype.Ub,H.prototype.Bc,"R6KERNEL"],J[65479]=[null,null,H.prototype.Xb,H.prototype.Ec,"R7KERNEL"],J[65480]=[null,null, -H.prototype.ta,H.prototype.wa,"R0SET1"],J[65481]=[null,null,H.prototype.ta,H.prototype.wa,"R1SET1"],J[65482]=[null,null,H.prototype.ta,H.prototype.wa,"R2SET1"],J[65483]=[null,null,H.prototype.ta,H.prototype.wa,"R3SET1"],J[65484]=[null,null,H.prototype.ta,H.prototype.wa,"R4SET1"],J[65485]=[null,null,H.prototype.ta,H.prototype.wa,"R5SET1"],J[65486]=[null,null,H.prototype.Vb,H.prototype.Cc,"R6SUPER"],J[65487]=[null,null,H.prototype.Wb,H.prototype.Dc,"R6USER"],J[65504]=[null,null,H.prototype.Hb,H.prototype.qc, -"CTRL",1170],J[65520]=[null,null,H.prototype.nb,H.prototype.wb,"LSIZE",1170],J[65522]=[null,null,H.prototype.nb,H.prototype.wb,"HSIZE",1170],J[65524]=[null,null,H.prototype.ec,H.prototype.Mc,"SYSID",1170],J[65526]=[null,null,H.prototype.Gb,H.prototype.pc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Nb,H.prototype.wc,"MB",1170],J[65530]=[null,null,H.prototype.Sb,H.prototype.zc,"PIR"],J[65532]=[null,null,H.prototype.dc,H.prototype.Lc,"SL"],J[65534]=[null,null,H.prototype.Tb,H.prototype.Ac,"PSW"], -J);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592];I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640]; -I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656];I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704]; -I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408];I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; -I[65506]=I[65504];I[65508]=I[65504];I[65510]=I[65504];I[65512]=I[65504];I[65514]=I[65504];I[65516]=I[65504];I[65518]=I[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),tb(this,pb?ub:vb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&G(this.l);var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},da:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ha=!0},F:function(a,b){return this.H(a,b)}, -S:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.w||this.ub(a,b,c)},fa:function(a,b,c){this.w||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},R:function(a){a&1&&G(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&G(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&G(this.l);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b){a&1&&G(this.l);this.o[a>>1]=b;this.ha=!0}}; -function Ra(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&xb(a,yb,!1),(a.m=c.m)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.m||(a.Pa=!a.w&&b[1]||a.v,a.Rc=!a.w&&b[3]||a.B);if(c||void 0===c)a.ub=b[1]||a.v,a.oa=b[3]||a.B}function xb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[E.prototype.N,E.prototype.da,E.prototype.X,E.prototype.qa],yb=[E.prototype.F,E.prototype.Z,E.prototype.S,E.prototype.fa]; -if(Ja)var vb=[E.prototype.D,E.prototype.Y,E.prototype.R,E.prototype.ea],ub=[E.prototype.J,E.prototype.$,E.prototype.W,E.prototype.pa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.T=!1;this.h.rb=!1;this.h.za=a.autoStart;this.h.bb=!1;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.H=[];this.kb=this.nc.bind(this);D(this)}x(Bb);var Cb=["power","reset"]; -g=Bb.prototype;g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -g.P=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.h.L)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.S);a.S=0;a.R=ka();a.X=0;Lb(a)}function gb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function ib(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} -g.nc=function(){if(this.h.T){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.ib&&(this.R+=a,this.R>this.Ga&&(this.R=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.sb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.S+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= -!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,n=!0);0<=this.pa&&this.pa<=Mb(this)&&(this.oa=this.pa=-1,Fb(this),K(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.qa-=f;if(0>=this.qa){this.qa+=this.Ja;15<=++this.jb&&(this.A&&this.A.ua(),this.jb=0);break}}while(this.h.T)}catch(p){K(this);Gb(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.kb;this.X=ka();d=this.ib;this.xa&&(d= -Math.round(d*this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.R)this.W=Math.round(this.S/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.R-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Hb(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.M(a.toString()+" busy");else{Jb(a);a.h.T=!0;a.h.rb=!0;if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.R,Mb(a));Gb(a,!0);setTimeout(a.kb,0)}}g.sb=function(){return 0}; -function K(a){if(a.h.T){a.Y-=a.a;a.a=0;Kb(a,a.S);a.S=0;a.h.T=!1;var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a));Gb(a)}a.h.complete=void 0}function Gb(a,b){a.A&&a.A.ua(b)} -function Nb(a){this.Db=+a.model||1170;this.Fb=a.resetAddr||0;Bb.call(this,a,6666667);this.fb=0;this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Fb];this.ra=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.v=0;this.Cb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.qb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.pb=0;this.fa=-1;Pb(this);this.h.complete=this.h.yb=!1}x(Nb,Bb);g=Nb.prototype;g.reset=function(){this.h.T&&K(this);Pb(this);Eb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&jb(a)}function jb(a){a.Na?(a.V=65536,a.J=a.Bb,a.N=a.ob,a.lb=a.Tc,Ta(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.Ab,a.N=a.kc,a.lb=a.Sc,Ta(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,cb(this.l));return a.data()}; -g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,mb:c<<5&224,tb:d,Qa:e})}a.j|=2}function lb(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function mb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.v=b>>14&3;c=a.u>>14&3;a.v!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.v]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function F(a,b){var c=!1;0>a.fa?a.fa=lb(a):a.v||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.v=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);mb(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;mb(a,c);a.j&=-17} -function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Cb[a.v]||(d&=7);e=a.C[a.v][d];f=(a.O[a.v][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,F(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; -default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.v][d]=e;if(4194170!==f||a.v)a.Da=a.v,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),F(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,F(a,4)):(a.G|=8,a.j|=64));return e}g.Ab=function(a,b,c){return Xb(this,a,b,c)};g.Bb=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return ab(this.l,a)};g.ob=function(a){return ab(this.l,Wb(this,a,2))}; -g.Sc=function(a,b){bb(this.l,a,b&65535)};g.Tc=function(a,b){bb(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.v=a.u>>12&3,c=a.N(d|c&a.V),a.v=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} -function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.v=a.u>>12&3,e=Wb(a,e|c&65536,4),a.v=a.u>>14&3,bb(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} -function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,$a(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),bb(a.l,e,d.call(a,c,ab(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?bb(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.sb=function(a){this.h.complete=!0;this.h.yb=!1;this.h.rb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].mb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?F(this,a.tb):F(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.wb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return $a(1,f,h)}f=new G(a,f,u,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} +function eb(a){for(var b=0,c=[],d=0;da.a.Cb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.s.push(b)}function ib(a){a.o||H(a.a,4)} +function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,ab:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=jb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,0,6,64),lb(e.a,e.b.ab,1E3/60))});gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,mb(b))}nb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; +g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),mb(b));nb(this)};function nb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; +g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; +g.qc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; +g.ta=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; +g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.mb=function(a){return 65520==a?61183:0};g.vb=function(){};g.ec=function(){return 1};g.Lc=function(){};g.Gb=function(){return this.a.G}; +g.oc=function(){this.a.G=0};g.Nb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Sb=function(){return this.a.$a};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Kc=function(a){this.a.na=a|255};g.Tb=function(){return Na(this.a)};g.zc=function(a){ob(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.ub=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +var K={},J=(K[62592]=[null,null,I.prototype.cc,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.ac,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.bc,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.$b,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Lb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Jb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Kb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Ib,I.prototype.qc,"KDSAR"],K[62798]=[null,null, +I.prototype.Rb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Mb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Ob,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Pb,I.prototype.ub,"MMR1"],K[65406]=[null,null,I.prototype.Qb,I.prototype.ub,"MMR2"],K[65408]=[null,null,I.prototype.ic,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.gc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.hc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.fc,I.prototype.Mc,"UDSAR"], +K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Ub,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Xb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Vb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Wb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Hb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.mb,I.prototype.vb,"LSIZE",1170],K[65522]=[null,null,I.prototype.mb,I.prototype.vb,"HSIZE",1170],K[65524]=[null,null,I.prototype.ec,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Gb,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Nb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Sb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.dc,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Tb,I.prototype.zc,"PSW"], +K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; +J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; +J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; +J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),vb(this,rb?wb:xb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.l);var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},da:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ha=!0},F:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.tb(a,b,c)},fa:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},P:function(a){a&1&&ib(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&ib(this.l);this.g.setUint16(a,b,!0);this.ha=!0},qa:function(a,b){a&1&&ib(this.l);this.o[a>>1]=b;this.ha= +!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&zb(a,Ab,!1),(a.m=c.m)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.w,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.tb=b[1]||a.w,a.pa=b[3]||a.B}function zb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.da,G.prototype.X,G.prototype.ra],Ab=[G.prototype.F,G.prototype.Z,G.prototype.R,G.prototype.fa]; +if(Ja)var xb=[G.prototype.D,G.prototype.Y,G.prototype.P,G.prototype.ea],wb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.qa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.S=!1;this.h.qb=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.jb=this.nc.bind(this);D(this)}x(Db);var Eb=["power","reset"];g=Db.prototype; +g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;ba.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.R);a.R=0;a.P=ka();a.X=0;Lb(a)}function jb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} +g.nc=function(){if(this.h.S){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.hb&&(this.P+=a,this.P>this.Ga&&(this.P=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.R+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= +!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.pa,n=!0);0<=this.qa&&this.qa<=Mb(this)&&(this.pa=this.qa=-1,Hb(this),F(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.ra-=f;if(0>=this.ra){this.ra+=this.Ja;15<=++this.ib&&(this.A&&this.A.oa(),this.ib=0);break}}while(this.h.S)}catch(p){F(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.jb;this.X=ka();d=this.hb;this.xa&&(d=Math.round(d* +this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.P)this.W=Math.round(this.R/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.P-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Ib(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.M(a.toString()+" busy");else{Jb(a);a.h.S=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.A&&a.A.start(a.P,Mb(a));setTimeout(a.jb,0)}}g.rb=function(){return 0}; +function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Kb(a,a.R);a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a))}a.h.complete=void 0} +function Nb(a){this.Cb=+a.model||1170;this.Eb=a.resetAddr||0;Db.call(this,a,6666667);this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Eb];this.sa=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.w=0;this.Bb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.ob=0;this.fa=-1;Pb(this);this.h.complete=this.h.xb=!1}x(Nb,Db);g=Nb.prototype;g.reset=function(){this.h.S&&F(this);Pb(this);Gb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&mb(a)}function mb(a){a.Na?(a.V=65536,a.J=a.Ab,a.N=a.nb,a.kb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.zb,a.N=a.kc,a.kb=a.Rc,Va(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,lb:c<<5&224,sb:d,Qa:e})}a.j|=2}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +function ob(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.sa.length;0<=--c;){var d=a.f[c];a.f[c]=a.sa[c];a.sa[c]=d}a.w=b>>14&3;c=a.u>>14&3;a.w!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.w]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b){var c=!1;0>a.fa?a.fa=Na(a):a.w||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.w=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);ob(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;ob(a,c);a.j&=-17} +function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Bb[a.w]||(d&=7);e=a.C[a.w][d];f=(a.O[a.w][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.Fb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; +default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.w][d]=e;if(4194170!==f||a.w)a.Da=a.w,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),H(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; +case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,H(a,4)):(a.G|=8,a.j|=64));return e}g.zb=function(a,b,c){return Xb(this,a,b,c)};g.Ab=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return cb(this.l,a)};g.nb=function(a){return cb(this.l,Wb(this,a,2))}; +g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.w=a.u>>12&3,c=a.N(d|c&a.V),a.w=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} +function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.u>>12&3,e=Wb(a,e|c&65536,4),a.w=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} +function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.xb=!1;this.h.qb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168):this.j&64?H(this,4):this.j&16&&H(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].lb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?H(this,a.sb):H(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>1|b<<16;P(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function kc(a,b){a=b&~a;N(this,a);return a}function lc(a,b){a=b&~a;N(this,a<<8);return a}function mc(a,b){a|=b;N(this,a);return a}function nc(a,b){a|=b;N(this,a<<8);return a}function oc(a,b){a=~b|65536;O(this,a);return a&65535} function pc(a,b){a=~b|256;O(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;O(this,a,a&b&32768);return a&65535} function vc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function yc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} @@ -772,54 +771,54 @@ function Cc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8 function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} function Hc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Ic=[0,7,7,10,7,11,9,13];function Jc(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Ic[this.c]} var Kc=[0,14,14,17,14,18,16,20];function Lc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Kc[this.c]}var Mc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Nc=[7,13,13,17,14,18,17,21];function Oc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){F(this,8)}function Ob(a){Tc[a>>12].call(this,a)} +function Pc(){this.a-=5}function W(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a&4&&(this.i=0);a&8&&(this.o=32768);this.a-=5}function Qc(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8)}function Ob(a){Tc[a>>12].call(this,a)} var Tc=[function(a){Uc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,dc(this,a,b));this.a=c-Mc[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),kc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),ec);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){Vc[a>>8&15].call(this,a)},function(a){Wc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);N(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ (this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),lc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},X],Uc=[function(a){Xc[a>> 4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> 6&3].call(this,a)},X,X],Yc=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){T(this,a,0,uc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.ob(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)F(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, -Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,F(this,4)):K(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.nb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= +11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)H(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, +Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,H(this,4)):F(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= 5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768?2:0)},function(a){U(this, -a,!M(this))},function(a){U(this,a,M(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? +a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? 9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b? 2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; id.prototype.ba=function(){return!0}; function jd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].ub(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.v=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;hb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Gc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Fc,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Vc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Uc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b>>d.c].tb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.w=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;kb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Fc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Ec,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Uc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Tc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.v}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.h.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function zd(a,b){if(ma("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.R;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&K(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function zd(a,b){if(ma("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.P;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&F(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n