Improved Debugger focus handling, added a new zeroMemory() Bus interface, and updated the RAM component's reset() function to re-zero RAM and then restore any predefined contents

This commit is contained in:
Jeff Parsons 2016-10-21 12:15:02 -07:00 committed by Jeff Parsons
commit 3db1439b40
11 changed files with 498 additions and 406 deletions

View file

@ -23,6 +23,8 @@ Third-party resources include:
Debugging Notes Debugging Notes
--------------- ---------------
### TRAP Handling
One of the first things I noticed when debugging PDP-11 BASIC was its heavy reliance on TRAP instructions. One of the first things I noticed when debugging PDP-11 BASIC was its heavy reliance on TRAP instructions.
For example, `TRAP 000` is used to output the character in R2 to the terminal. Let's take a closer look at how For example, `TRAP 000` is used to output the character in R2 to the terminal. Let's take a closer look at how
its TRAP handler works. its TRAP handler works.
@ -64,3 +66,19 @@ an *even* value) into a jump table index.
The final instruction, `MOV @(SP)+,PC`, moves the address at the jump table index into PC, while also removing the TRAP The final instruction, `MOV @(SP)+,PC`, moves the address at the jump table index into PC, while also removing the TRAP
instruction from the stack, leaving only the *previous PC* on the stack. instruction from the stack, leaving only the *previous PC* on the stack.
### Comparing to SIMH
How to set (and display) a breakpoint in PDPjs:
>> bp 016220
bp 016220 set
>> bl
bp 016220
How to set (and display) the same breakpoint in SIMH:
sim> break -e 016220
sim> show break
16220: E

View file

@ -151,7 +151,7 @@ function BusPDP11(parmsBus, cpu, dbg)
*/ */
this.aIOHandlers = []; this.aIOHandlers = [];
this.fIOBreakAll = false; this.fIOBreakAll = false;
this.nDisableTraps = 0; this.nDisableFaults = 0;
/* /*
* Array of RESET notification handlers registered by Device components. * Array of RESET notification handlers registered by Device components.
@ -558,7 +558,7 @@ BusPDP11.prototype.unknownAccess = function(addr, fByte, data)
this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true); this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true);
if (this.dbg.stopInstruction()) return 0; if (this.dbg.stopInstruction()) return 0;
} }
if (!this.nDisableTraps) { if (!this.nDisableFaults) {
this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr);
} }
return 0; return 0;
@ -700,6 +700,25 @@ BusPDP11.prototype.cleanMemory = function(addr, size)
return fClean; return fClean;
}; };
/**
* zeroMemory(addr, size)
*
* @this {BusPDP11}
* @param {number} addr
* @param {number} size
*/
BusPDP11.prototype.zeroMemory = function(addr, size)
{
var off = addr & this.nBlockLimit;
var iBlock = addr >>> this.nBlockShift;
while (size > 0 && iBlock < this.aMemBlocks.length) {
this.aMemBlocks[iBlock].zero(off, size);
size -= this.nBlockSize;
iBlock++;
off = 0;
}
};
/* /*
* Data types used by scanMemory() * Data types used by scanMemory()
*/ */
@ -906,9 +925,9 @@ BusPDP11.prototype.getByte = function(addr)
*/ */
BusPDP11.prototype.getByteDirect = function(addr) BusPDP11.prototype.getByteDirect = function(addr)
{ {
this.nDisableTraps++; this.nDisableFaults++;
var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr);
this.nDisableTraps--; this.nDisableFaults--;
return b; return b;
}; };
@ -943,13 +962,13 @@ BusPDP11.prototype.getWordDirect = function(addr)
var w; var w;
var off = addr & this.nBlockLimit; var off = addr & this.nBlockLimit;
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
this.nDisableTraps++; this.nDisableFaults++;
if (!PDP11.WORDBUS && off == this.nBlockLimit) { if (!PDP11.WORDBUS && off == this.nBlockLimit) {
w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8);
} else { } else {
w = this.aMemBlocks[iBlock].readWordDirect(off, addr); w = this.aMemBlocks[iBlock].readWordDirect(off, addr);
} }
this.nDisableTraps--; this.nDisableFaults--;
return w; return w;
}; };
@ -977,9 +996,9 @@ BusPDP11.prototype.setByte = function(addr, b)
*/ */
BusPDP11.prototype.setByteDirect = function(addr, b) BusPDP11.prototype.setByteDirect = function(addr, b)
{ {
this.nDisableTraps++; this.nDisableFaults++;
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr); this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
this.nDisableTraps--; this.nDisableFaults--;
}; };
/** /**
@ -1015,14 +1034,14 @@ BusPDP11.prototype.setWordDirect = function(addr, w)
{ {
var off = addr & this.nBlockLimit; var off = addr & this.nBlockLimit;
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
this.nDisableTraps++; this.nDisableFaults++;
if (!PDP11.WORDBUS && off == this.nBlockLimit) { if (!PDP11.WORDBUS && off == this.nBlockLimit) {
this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr); this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr);
this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1); this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
} else { } else {
this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr); this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr);
} }
this.nDisableTraps--; this.nDisableFaults--;
}; };
/** /**
@ -1245,7 +1264,7 @@ BusPDP11.prototype.addResetHandler = function(fnReset)
*/ */
BusPDP11.prototype.fault = function(addr) BusPDP11.prototype.fault = function(addr)
{ {
if (!this.nDisableTraps) { if (!this.nDisableFaults) {
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) {
this.dbg.printMessage("memory fault on address " + this.dbg.toStrBase(addr), true, true); this.dbg.printMessage("memory fault on address " + this.dbg.toStrBase(addr), true, true);
} }

View file

@ -1398,7 +1398,7 @@ ComputerPDP11.prototype.getMachineComponent = function(sType, componentPrev)
}; };
/** /**
* updateFocus(fScroll) * setFocus(fScroll)
* *
* NOTE: When soft keyboard buttons call us to return focus to the machine (and away from the button), * NOTE: When soft keyboard buttons call us to return focus to the machine (and away from the button),
* the browser's default behavior is to scroll the element into view, which can be annoying, especially on iOS, * the browser's default behavior is to scroll the element into view, which can be annoying, especially on iOS,
@ -1407,8 +1407,9 @@ ComputerPDP11.prototype.getMachineComponent = function(sType, componentPrev)
* @this {ComputerPDP11} * @this {ComputerPDP11}
* @param {boolean} [fScroll] * @param {boolean} [fScroll]
*/ */
ComputerPDP11.prototype.updateFocus = function(fScroll) ComputerPDP11.prototype.setFocus = function(fScroll)
{ {
if (this.controlPrint) this.controlPrint.focus();
}; };
/** /**

View file

@ -260,10 +260,10 @@ CPUPDP11.prototype.powerUp = function(data, fRepower)
this.resetChecksum(); this.resetChecksum();
} }
/* /*
* Give the Debugger a chance to do/print something once we've powered up * Give the Debugger a chance to do/print something once we've powered up.
*/ */
if (DEBUGGER && this.dbg) { if (DEBUGGER && this.dbg) {
this.dbg.init(); this.dbg.init(this.flags.autoStart);
} else { } else {
/* /*
* The Computer (this.cmp) knows if there's a Control Panel (this.cmp.panel), and the Control Panel * The Computer (this.cmp) knows if there's a Control Panel (this.cmp.panel), and the Control Panel
@ -722,7 +722,7 @@ CPUPDP11.prototype.setSpeed = function(nMultiplier, fUpdateFocus)
if (controlSpeed) controlSpeed.textContent = sSpeed; if (controlSpeed) controlSpeed.textContent = sSpeed;
this.println("target speed: " + sSpeed); this.println("target speed: " + sSpeed);
} }
if (fUpdateFocus && this.cmp) this.cmp.updateFocus(); if (fUpdateFocus && this.cmp) this.cmp.setFocus();
} }
this.addCycles(this.nRunCycles); this.addCycles(this.nRunCycles);
this.nRunCycles = 0; this.nRunCycles = 0;
@ -1130,7 +1130,7 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus)
var controlRun = this.bindings["run"]; var controlRun = this.bindings["run"];
if (controlRun) controlRun.textContent = "Halt"; if (controlRun) controlRun.textContent = "Halt";
if (this.cmp) { if (this.cmp) {
if (fUpdateFocus) this.cmp.updateFocus(true); if (fUpdateFocus) this.cmp.setFocus(true);
this.cmp.start(this.msStartRun, this.getCycles()); this.cmp.start(this.msStartRun, this.getCycles());
} }
setTimeout(this.onRunTimeout, 0); setTimeout(this.onRunTimeout, 0);

View file

@ -360,16 +360,17 @@ CPUStatePDP11.prototype.setMMR3 = function(newMMR3)
}; };
/** /**
* setReset(addr) * setReset(addr, fReset)
* *
* @this {CPUStatePDP11} * @this {CPUStatePDP11}
* @param {number} addr * @param {number} addr
* @param {boolean} [fReset] (true if called in the context of a complete reset, obviating the need to notify the Debugger)
*/ */
CPUStatePDP11.prototype.setReset = function(addr) CPUStatePDP11.prototype.setReset = function(addr, fReset)
{ {
this.addrReset = addr; this.addrReset = addr;
this.setPC(addr); this.setPC(addr);
if (this.dbg) { if (!fReset && this.dbg) {
/* /*
* TODO: Review the decision to always stop the CPU if the Debugger is loaded. * TODO: Review the decision to always stop the CPU if the Debugger is loaded.
*/ */

View file

@ -572,11 +572,11 @@ if (DEBUGGER) {
}; };
/** /**
* updateFocus() * setFocus()
* *
* @this {DebuggerPDP11} * @this {DebuggerPDP11}
*/ */
DebuggerPDP11.prototype.updateFocus = function() DebuggerPDP11.prototype.setFocus = function()
{ {
if (this.controlDebug) this.controlDebug.focus(); if (this.controlDebug) this.controlDebug.focus();
}; };
@ -1216,12 +1216,14 @@ if (DEBUGGER) {
* init() * init()
* *
* @this {DebuggerPDP11} * @this {DebuggerPDP11}
* @param {boolean} [fAutoStart]
*/ */
DebuggerPDP11.prototype.init = function() DebuggerPDP11.prototype.init = function(fAutoStart)
{ {
this.fInit = true; this.fInit = true;
this.println("Type ? for help with PDP11 Debugger commands"); this.println("Type ? for help with PDP11 Debugger commands");
this.updateStatus(); this.updateStatus();
if (!fAutoStart) this.setFocus();
if (this.sInitCommands) { if (this.sInitCommands) {
var sCmds = this.sInitCommands; var sCmds = this.sInitCommands;
this.sInitCommands = null; this.sInitCommands = null;
@ -1567,7 +1569,7 @@ if (DEBUGGER) {
this.println(sStopped); this.println(sStopped);
} }
this.updateStatus(true); this.updateStatus(true);
this.updateFocus(); this.setFocus();
this.clearTempBreakpoint(this.cpu.getPC()); this.clearTempBreakpoint(this.cpu.getPC());
} }
}; };
@ -2903,9 +2905,12 @@ if (DEBUGGER) {
* And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've * And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've
* changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated * changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated
* to prevent generating traps due to to Debugger access of unaligned memory and/or undefined IOPAGE addresses. * to prevent generating traps due to to Debugger access of unaligned memory and/or undefined IOPAGE addresses.
*
* Besides, it's nice for "db" and "dw" to generate the same Bus activity that typical byte and word reads do.
*/ */
for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) { for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) {
var n, v = size == 2? this.getWord(dbgAddr, n = 2) : this.getByte(dbgAddr, n = 1); var n = 1;
var v = size == 1? this.getByte(dbgAddr, n) : this.getWord(dbgAddr, (n = 2));
data |= (v << (shift << 3)); data |= (v << (shift << 3));
shift += n; shift += n;
if (shift == size) { if (shift == size) {
@ -3445,7 +3450,7 @@ if (DEBUGGER) {
if (this.nStep) { if (this.nStep) {
this.setTempBreakpoint(dbgAddr); this.setTempBreakpoint(dbgAddr);
if (!this.startCPU()) { if (!this.startCPU()) {
if (this.cmp) this.cmp.updateFocus(); if (this.cmp) this.cmp.setFocus();
this.nStep = 0; this.nStep = 0;
} }
/* /*

View file

@ -98,7 +98,7 @@ var littleEndian = (TYPEDARRAYS? (function() {
*/ */
function MemoryPDP11(bus, addr, used, size, type, controller) function MemoryPDP11(bus, addr, used, size, type, controller)
{ {
var i; var a, i;
this.bus = bus; this.bus = bus;
this.id = (MemoryPDP11.idBlock += 2); this.id = (MemoryPDP11.idBlock += 2);
this.adw = null; this.adw = null;
@ -127,7 +127,7 @@ function MemoryPDP11(bus, addr, used, size, type, controller)
/* /*
* For empty memory blocks, all we need to do is ensure all access functions are mapped to "none" handlers. * For empty memory blocks, all we need to do is ensure all access functions are mapped to "none" handlers.
*/ */
if (!size) { if (!this.size) {
this.setAccess(); this.setAccess();
return; return;
} }
@ -138,7 +138,7 @@ function MemoryPDP11(bus, addr, used, size, type, controller)
*/ */
if (controller) { if (controller) {
this.controller = controller; this.controller = controller;
var a = controller.getControllerBuffer(addr); a = controller.getControllerBuffer(addr);
this.adw = a[0]; this.adw = a[0];
this.offset = a[1]; this.offset = a[1];
this.setAccess(controller.getControllerAccess()); this.setAccess(controller.getControllerAccess());
@ -154,20 +154,24 @@ function MemoryPDP11(bus, addr, used, size, type, controller)
* mode; pseudo-random might be best, to help make any bugs reproducible. * mode; pseudo-random might be best, to help make any bugs reproducible.
*/ */
if (TYPEDARRAYS) { if (TYPEDARRAYS) {
this.buffer = new ArrayBuffer(size); this.buffer = new ArrayBuffer(this.size);
this.dv = new DataView(this.buffer, 0, size); this.dv = new DataView(this.buffer, 0, this.size);
/* /*
* If littleEndian is true, we can use ab[], aw[] and adw[] directly; well, we can use them * If littleEndian is true, we can use ab[], aw[] and adw[] directly; well, we can use them
* whenever the offset is a multiple of 1, 2 or 4, respectively. Otherwise, we must fallback to * whenever the offset is a multiple of 1, 2 or 4, respectively. Otherwise, we must fallback to
* dv.getUint8()/dv.setUint8(), dv.getUint16()/dv.setUint16() and dv.getInt32()/dv.setInt32(). * dv.getUint8()/dv.setUint8(), dv.getUint16()/dv.setUint16() and dv.getInt32()/dv.setInt32().
*/ */
this.ab = new Uint8Array(this.buffer, 0, size); this.ab = new Uint8Array(this.buffer, 0, this.size);
this.aw = new Uint16Array(this.buffer, 0, size >> 1); this.aw = new Uint16Array(this.buffer, 0, this.size >> 1);
this.adw = new Int32Array(this.buffer, 0, size >> 2); this.adw = new Int32Array(this.buffer, 0, this.size >> 2);
this.setAccess(littleEndian? MemoryPDP11.afnArrayLE : MemoryPDP11.afnArrayBE); this.setAccess(littleEndian? MemoryPDP11.afnArrayLE : MemoryPDP11.afnArrayBE);
} else { } else {
/*
* NOTE: An ArrayBuffer is defined as being zero-initialized, but the elements of a new
* Array are not, so this code path takes care of zero-initialization ourselves.
*/
if (BYTEARRAYS) { if (BYTEARRAYS) {
this.ab = new Array(size); a = this.ab = new Array(this.size);
} else { } else {
/* /*
* NOTE: This is the default mode of operation (!TYPEDARRAYS && !BYTEARRAYS), because it * NOTE: This is the default mode of operation (!TYPEDARRAYS && !BYTEARRAYS), because it
@ -175,9 +179,9 @@ function MemoryPDP11(bus, addr, used, size, type, controller)
* come at twice the overhead of TYPEDARRAYS, it's increasingly likely that the JavaScript * come at twice the overhead of TYPEDARRAYS, it's increasingly likely that the JavaScript
* runtime will notice that all we ever store are 32-bit values, and optimize accordingly. * runtime will notice that all we ever store are 32-bit values, and optimize accordingly.
*/ */
this.adw = new Array(size >> 2); a = this.adw = new Array(this.size >> 2);
for (i = 0; i < this.adw.length; i++) this.adw[i] = 0;
} }
for (i = 0; i < a.length; i++) a[i] = 0;
this.setAccess(MemoryPDP11.afnMemory); this.setAccess(MemoryPDP11.afnMemory);
} }
} }
@ -247,7 +251,7 @@ MemoryPDP11.prototype = {
this.addr = addr; this.addr = addr;
}, },
/** /**
* clone(mem, type) * clone(mem, type, dbg)
* *
* Converts the current Memory block (this) into a clone of the given Memory block (mem), * Converts the current Memory block (this) into a clone of the given Memory block (mem),
* and optionally overrides the current block's type with the specified type. * and optionally overrides the current block's type with the specified type.
@ -381,6 +385,31 @@ MemoryPDP11.prototype = {
} }
return false; return false;
}, },
/**
* zero(off, len)
*
* Zeros the block. Supporting off and len parameters is probably overkill, and makes more
* work in the non-TYPEDARRAY, non-BYTEARRAY case, because there all we have is an array of DWORDs,
* but that's not the typical case.
*
* @this {MemoryPDP11}
* @param {number} [off] (optional starting byte offset within block)
* @param {number} [len] (optional maximum number of bytes; default is the entire block)
*/
zero: function(off, len) {
var i;
off = off || 0;
/*
* NOTE: If len happens to be larger than the block, that's OK, because we also bounds-check the index.
*/
if (len === undefined) len = this.size;
Component.assert(off >= 0 && off < this.size);
if (TYPEDARRAYS || BYTEARRAYS) {
for (i = off; len-- && i < this.ab.length; i++) this.ab[i] = 0;
} else {
for (i = off; len-- && i < this.size; i++) this.writeByteDirect(off, 0, this.addr + off);
}
},
/** /**
* setAccess(afn, fDirect) * setAccess(afn, fDirect)
* *

View file

@ -324,6 +324,9 @@ PC11.prototype.powerDown = function(fSave, fShutdown)
/** /**
* reset() * reset()
* *
* TODO: Consider making our reset() handler ALSO restore the original attached tape, in much the same
* way the RAM component now restores the original predefined memory or tape image after resetting the RAM.
*
* @this {PC11} * @this {PC11}
*/ */
PC11.prototype.reset = function() PC11.prototype.reset = function()
@ -691,7 +694,7 @@ PC11.prototype.parseTape = function(sTapeName, sTapePath, nTapeTarget, aBytes, a
this.sTapePath = ""; this.sTapePath = "";
this.sTapeSource = PC11.SOURCE.NONE; this.sTapeSource = PC11.SOURCE.NONE;
this.nTapeTarget = PC11.TARGET.NONE; this.nTapeTarget = PC11.TARGET.NONE;
this.status("error loading tape: " + sTapeName); this.notice("No load address available for tape: " + sTapeName);
return; return;
} }
this.status("tape loaded: " + sTapeName); this.status("tape loaded: " + sTapeName);

View file

@ -126,6 +126,16 @@ RAMPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
*/ */
RAMPDP11.prototype.powerUp = function(data, fRepower) RAMPDP11.prototype.powerUp = function(data, fRepower)
{ {
if (this.aSymbols) {
if (this.dbg) {
this.dbg.addSymbols(this.id, this.addrRAM, this.sizeRAM, this.aSymbols);
}
/*
* Our only role in the handling of symbols is to hand them off to the Debugger at our
* first opportunity. Now that we've done that, our copy of the symbols, if any, are toast.
*/
delete this.aSymbols;
}
/* /*
* The Computer powers up the CPU last, at which point CPUState state is restored, * The Computer powers up the CPU last, at which point CPUState state is restored,
* which includes the Bus state, and since we use the Bus to allocate all our memory, * which includes the Bus state, and since we use the Bus to allocate all our memory,
@ -210,13 +220,12 @@ RAMPDP11.prototype.initRAM = function()
* Too early... * Too early...
*/ */
if (!this.abInit || !this.bus) return; if (!this.abInit || !this.bus) return;
this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM); this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM);
/* /*
* TODO: Consider an option to retain this data and give the user a way of restoring the initial contents. * NOTE: We now retain this data, so that reset() can return the RAM to its predefined state.
*
* delete this.abInit;
*/ */
delete this.abInit;
} }
this.setReady(); this.setReady();
} }
@ -229,22 +238,26 @@ RAMPDP11.prototype.initRAM = function()
*/ */
RAMPDP11.prototype.reset = function() RAMPDP11.prototype.reset = function()
{ {
/* if (this.fAllocated) {
* If you want to zero RAM on reset, then this would be a good place to do it. this.bus.zeroMemory(this.addrRAM, this.sizeRAM);
*/ if (this.abInit) {
this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM, true);
}
}
}; };
/** /**
* loadImage(aBytes, addrLoad, addrExec, addrInit) * loadImage(aBytes, addrLoad, addrExec, addrInit, fReset)
* *
* @this {RAMPDP11} * @this {RAMPDP11}
* @param {Array|Uint8Array} aBytes * @param {Array|Uint8Array} aBytes
* @param {number|null} [addrLoad] * @param {number|null} [addrLoad]
* @param {number|null} [addrExec] * @param {number|null} [addrExec]
* @param {number|null} [addrInit] * @param {number|null} [addrInit]
* @param {boolean} [fReset]
* @return {boolean} (true if loaded, false if not) * @return {boolean} (true if loaded, false if not)
*/ */
RAMPDP11.prototype.loadImage = function(aBytes, addrLoad, addrExec, addrInit) RAMPDP11.prototype.loadImage = function(aBytes, addrLoad, addrExec, addrInit, fReset)
{ {
var fLoaded = false; var fLoaded = false;
/* /*
@ -315,7 +328,7 @@ RAMPDP11.prototype.loadImage = function(aBytes, addrLoad, addrExec, addrInit)
if (addr & 0x1) { if (addr & 0x1) {
this.cpu.stopCPU(); this.cpu.stopCPU();
} else { } else {
this.cpu.setReset(addr); this.cpu.setReset(addr, fReset);
} }
} else { } else {
while (cbData--) { while (cbData--) {
@ -331,7 +344,7 @@ RAMPDP11.prototype.loadImage = function(aBytes, addrLoad, addrExec, addrInit)
for (var i = 0; i < aBytes.length; i++) { for (var i = 0; i < aBytes.length; i++) {
this.cpu.setByteDirect(addrLoad + i, aBytes[i]); this.cpu.setByteDirect(addrLoad + i, aBytes[i]);
} }
if (addrExec != null) this.cpu.setReset(addrExec); if (addrExec != null) this.cpu.setReset(addrExec, fReset);
fLoaded = true; fLoaded = true;
} }
} }

View file

@ -35,240 +35,241 @@ function ua(a,b){return(a+" ").slice(0,b)
function ya(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}var za=Date.now||function(){return+new Date};function Aa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ya(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}var za=Date.now||function(){return+new Date};function Aa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
function Ba(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== function Ba(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}
function Ca(a,b){var c,d={ia:null,la:null,Ua:null,Ta:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ua=g.load;d.Ta=g.exec;if(e=g.bytes)d.ia=e;else if(e=g.words)for(d.ia=Array(2*e.length),f=c=0;c<e.length;c++)d.ia[f++]=e[c]&255,d.ia[f++]=e[c]>>8&255;else if(e=g.data)for(d.ia=Array(4*e.length),f=c=0;c<e.length;c++)d.ia[f++]= function Ca(a,b){var c,d={ka:null,fa:null,Ia:null,Ha:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ia=g.load;d.Ha=g.exec;if(e=g.bytes)d.ka=e;else if(e=g.words)for(d.ka=Array(2*e.length),f=c=0;c<e.length;c++)d.ka[f++]=e[c]&255,d.ka[f++]=e[c]>>8&255;else if(e=g.data)for(d.ka=Array(4*e.length),f=c=0;c<e.length;c++)d.ka[f++]=
e[c]&255,d.ia[f++]=e[c]>>8&255,d.ia[f++]=e[c]>>16&255,d.ia[f++]=e[c]>>24&255;else d.ia=g;d.la=g.symbols;d.ia.length?1==d.ia.length&&(n(d.ia[0]),d=null):(n("Empty resource: "+a),d=null)}catch(h){n("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){n("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.ia=e)}return d} e[c]&255,d.ka[f++]=e[c]>>8&255,d.ka[f++]=e[c]>>16&255,d.ka[f++]=e[c]>>24&255;else d.ka=g;d.fa=g.symbols;d.ka.length?1==d.ka.length&&(n(d.ka[0]),d=null):(n("Empty resource: "+a),d=null)}catch(h){n("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){n("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.ka=e)}return d}
function ra(){return"http://"+(window?window.location.host:"www.pcjs.org")}function n(a){window&&window.alert(a)}function Da(a){var b=!1;window&&(b=window.confirm(a));return b}var Ea=null;function Ia(){if(null==Ea){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}Ea=a}return Ea} function ra(){return"http://"+(window?window.location.host:"www.pcjs.org")}function n(a){window&&window.alert(a)}function Da(a){var b=!1;window&&(b=window.confirm(a));return b}var Ea=null;function Fa(){if(null==Ea){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}Ea=a}return Ea}
function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(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 Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()} function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(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 Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
function Na(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Oa={init:[],show:[],exit:[]},Pa=!1,Qa=!1,Ra=!0;function Sa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ta(a){Oa.init.push(a)} function Na(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Oa={init:[],show:[],exit:[]},Pa=!1,Qa=!1,Ra=!0;function Sa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ta(a){Oa.init.push(a)}
function Ua(a){if(Ra)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){n(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Va(a){!Ra&&a?(Ra=!0,Pa&&Wa("init"),Qa&&Wa("show")):Ra=a}function Wa(a){Oa[a]&&Ua(Oa[a])}Sa("onload",function(){Pa=!0;Ua(Oa.init)});Sa("onpageshow",function(){Qa=!0;Ua(Oa.show)});Sa(La("Opera")||La("iOS")?"onunload":"onbeforeunload",function(){Ua(Oa.exit)}); function Ua(a){if(Ra)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){n(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Va(a){!Ra&&a?(Ra=!0,Pa&&Wa("init"),Qa&&Wa("show")):Ra=a}function Wa(a){Oa[a]&&Ua(Oa[a])}Sa("onload",function(){Pa=!0;Ua(Oa.init)});Sa("onpageshow",function(){Qa=!0;Ua(Oa.show)});Sa(La("Opera")||La("iOS")?"onunload":"onbeforeunload",function(){Ua(Oa.exit)});
function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Zb=b.comment;this.tc=b;b=this.id.indexOf(".");0>b?this.Za=this.id:(this.Ra=this.id.substr(0,b),this.Za=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Ia:!1,Lb:!1,ga:!1,error:!1};this.Bb=null;this.v.error=!1;this.I={};this.i=null;this.ma=d||0;t.push(this)}var cb=void 0,db={}; function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Xb=b.comment;this.tc=b;b=this.id.indexOf(".");0>b?this.Za=this.id:(this.Sa=this.id.substr(0,b),this.Za=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Ja:!1,Kb:!1,ja:!1,error:!1};this.Bb=null;this.v.error=!1;this.I={};this.i=null;this.ma=d||0;t.push(this)}var cb=void 0,db={};
if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<t.length;b++){var d=t[b];a&&d.id.indexOf(a)||c.push(d)}return c} function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<t.length;b++){var d=t[b];a&&d.id.indexOf(a)||c.push(d)}return c}
function lb(a){if(void 0!==a){var b;for(b=0;b<t.length;b++)if(t[b].id===a)return t[b]}return null}function mb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<t.length;d++)if(c)c==t[d]&&(c=null);else if(!(a!=t[d].type||b&&t[d].id.indexOf(b)))return t[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){n(c.message+" ("+a+")")}return b} function lb(a){if(void 0!==a){var b;for(b=0;b<t.length;b++)if(t[b].id===a)return t[b]}return null}function mb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<t.length;d++)if(c)c==t[d]&&(c=null);else if(!(a!=t[d].type||b&&t[d].id.indexOf(b)))return t[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){n(c.message+" ("+a+")")}return b}
function A(a,b){b=B(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),m=0;m<h.length;m++)switch(g=h[m],g){case "pdp11-binding":(g=z(f))&&g.binding&&a.ra(g.type,g.binding,f,g.value),m=h.length}}}} function A(a,b){b=C(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),m=0;m<h.length;m++)switch(g=h[m],g){case "pdp11-binding":(g=z(f))&&g.binding&&a.qa(g.type,g.binding,f,g.value),m=h.length}}}}
function B(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c} function C(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},ra:function(a,b,c){switch(b){case "clear":return this.I[b]||(this.I[b]=c,c.onclick=function(a){return function(){a.I.print&&(a.I.print.value="")}}(this)),!0;case "print":return this.I[b]||(this.Va=this.I[b]=c,c.value="",this.j=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c), r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},qa:function(a,b,c){switch(b){case "clear":return this.I[b]||(this.I[b]=c,c.onclick=function(a){return function(){a.I.print&&(a.I.print.value="")}}(this)),!0;case "print":return this.I[b]||(this.Da=this.I[b]=c,c.value="",this.j=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
this.ka=function(a){this.j(a,this.Za)}),!0;default:return!1}},log:function(){},j:function(){},status:function(a){this.j(this.Za+": "+a)},ka:function(a,b,c){c=c||this.type;b||n((c?c+": ":"")+a)},Aa:function(){return this.v.ga=!0},za:function(a,b){b&&(this.v.ga=!1);return!0}};function C(a,b,c,d){a.i&&(!0===c||D(a,c|0))&&a.i.message(b,d)}function D(a,b){if(a.i){a===a.i?b|=0:b=b||a.ma;var c=a.i.ma&b;return!!b&&c===b||!!(c&a.i.nc)}return!1} this.ia=function(a){this.j(a,this.Za)}),!0;default:return!1}},log:function(){},j:function(){},status:function(a){this.j(this.Za+": "+a)},ia:function(a,b,c){c=c||this.type;b||n((c?c+": ":"")+a)},ya:function(){return this.v.ja=!0},xa:function(a,b){b&&(this.v.ja=!1);return!0}};function D(a,b,c,d){a.i&&(!0===c||E(a,c|0))&&a.i.message(b,d)}function E(a,b){if(a.i){a===a.i?b|=0:b=b||a.ma;var c=a.i.ma&b;return!!b&&c===b||!!(c&a.i.nc)}return!1}
function nb(a,b){if(a.v.Lb)return a.v.Ia=!1,a.v.Lb=!1;if(a.v.error)return a.j(a.toString()+" error"),!1;a.v.Ia=b;return a.v.Ia}function ob(a,b){a.v.Ia&&(b?a.v.Lb=!0:void 0===b&&a.j(a.toString()+" busy"));return a.v.Ia}function H(a){if(!a.v.error&&(a.v.ready=!0,a.v.ready)){var b=a.Bb;a.Bb=null;b&&b()}}function pb(a,b){b&&(a.v.ready?b():a.Bb=b);return a.v.ready}function qb(a){return a.v.error?(a.j(a.toString()+" error"),!0):!1}function rb(a,b){a.v.error=!0;a.ka(b)} function nb(a,b){if(a.v.Kb)return a.v.Ja=!1,a.v.Kb=!1;if(a.v.error)return a.j(a.toString()+" error"),!1;a.v.Ja=b;return a.v.Ja}function ob(a,b){a.v.Ja&&(b?a.v.Kb=!0:void 0===b&&a.j(a.toString()+" busy"));return a.v.Ja}function H(a){if(!a.v.error&&(a.v.ready=!0,a.v.ready)){var b=a.Bb;a.Bb=null;b&&b()}}function pb(a,b){b&&(a.v.ready?b():a.Bb=b);return a.v.ready}function qb(a){return a.v.error?(a.j(a.toString()+" error"),!0):!1}function rb(a,b){a.v.error=!0;a.ia(b)}
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1}); Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b}); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var sb="undefined"!==typeof ArrayBuffer,tb={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 ub(a){r.call(this,"Panel",a,ub);this.f=0;this.v.Xb=!0}u(ub);k=ub.prototype; var sb="undefined"!==typeof ArrayBuffer,tb={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 ub(a){r.call(this,"Panel",a,ub);this.f=0;this.v.Vb=!0}u(ub);k=ub.prototype;
k.ra=function(a,b,c,d){if(this.D&&this.D.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d)||this.i&&this.i.ra(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.I[b]=c,this.f++,!0;default:return"rled"==a?(this.I[b]=c,this.f++,!0):this.parent.ra.call(this,a,b,c,d)}};k.Ca=function(a,b,c,d){this.D=a;this.w=b;this.b=c;this.i=d};k.Aa=function(a,b){b||vb();return!0};k.za=function(){return!0}; k.qa=function(a,b,c,d){if(this.B&&this.B.qa(a,b,c,d)||this.b&&this.b.qa(a,b,c,d)||this.i&&this.i.qa(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.I[b]=c,this.f++,!0;default:return"rled"==a?(this.I[b]=c,this.f++,!0):this.parent.qa.call(this,a,b,c,d)}};k.Ca=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.i=d};k.ya=function(a,b){b||vb();return!0};k.xa=function(){return!0};
function wb(a,b,c,d){if(a.I[b]){void 0===c&&(rb(a,"Value for "+b+" is invalid"),a.b.ca());var e=a.i&&a.i.ha||8;c=!a.b.v.ea||a.v.Xb?8==e?na(c,d):l(c,d):"--------".substr(0,d||4);a.I[b].textContent!=c&&(a.I[b].textContent=c)}}function Kb(a,b,c,d){for(var e=0;e<d;e++){var f=a.I[b+e];f&&(f.style.backgroundColor=c&1<<e?"#ff0000":"#000000")}} function wb(a,b,c,d){if(a.I[b]){void 0===c&&(rb(a,"Value for "+b+" is invalid"),a.b.ca());var e=a.i&&a.i.Y||8;c=!a.b.v.da||a.v.Vb?8==e?na(c,d):l(c,d):"--------".substr(0,d||4);a.I[b].textContent!=c&&(a.I[b].textContent=c)}}function Kb(a,b,c,d){for(var e=0;e<d;e++){var f=a.I[b+e];f&&(f.style.backgroundColor=c&1<<e?"#ff0000":"#000000")}}
k.ba=function(a){if(this.f&&(a||!this.b.v.ea||this.v.Xb)){for(a=0;a<this.b.u.length;a++)wb(this,"R"+a,this.b.u[a]);a=Lb(this.b);wb(this,"PS",a);wb(this,"NF",a&8?1:0,1);wb(this,"ZF",a&4?1:0,1);wb(this,"VF",a&2?1:0,1);wb(this,"CF",a&1?1:0,1);Kb(this,"D",this.b.u[0],16);Kb(this,"A",this.b.u[7],22)}};function vb(){for(var a=!1,b=B(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=lb(e.id);f||(a=!0,f=new ub(e));A(f,d);a&&H(f)}}Ta(vb); k.ba=function(a){if(this.f&&(a||!this.b.v.da||this.v.Vb)){for(a=0;a<this.b.u.length;a++)wb(this,"R"+a,this.b.u[a]);a=Lb(this.b);wb(this,"PS",a);wb(this,"NF",a&8?1:0,1);wb(this,"ZF",a&4?1:0,1);wb(this,"VF",a&2?1:0,1);wb(this,"CF",a&1?1:0,1);Kb(this,"D",this.b.u[0],16);Kb(this,"A",this.b.u[7],22)}};function vb(){for(var a=!1,b=C(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=lb(e.id);f||(a=!0,f=new ub(e));A(f,d);a&&H(f)}}Ta(vb);
function Mb(a,b,c){r.call(this,"Bus",a,Mb,64);this.b=b;this.i=c;this.M=a.busWidth||16;this.g=0;this.K=[];this.F=null;this.H=Math.pow(2,this.M);this.f=this.H-1|0;this.ua=Nb;this.ja=Math.log2(this.ua);this.J=this.ua>>2;this.w=this.ua-1;this.C=this.H/this.ua|0;this.Ha=[];this.A=0;this.D=[];this.mc=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.Y=Array(this.C);for(b=0;b<this.C;b++)this.Y[b]=a;H(this)}u(Mb);var Nb=8192,Tb=Nb-1; function Mb(a,b,c){r.call(this,"Bus",a,Mb,64);this.b=b;this.i=c;this.M=a.busWidth||16;this.B=0;this.K=[];this.F=null;this.H=Math.pow(2,this.M);this.g=this.H-1|0;this.ta=Nb;this.ha=Math.log2(this.ta);this.J=this.ta>>2;this.A=this.ta-1;this.D=this.H/this.ta|0;this.Ga=[];this.f=0;this.w=[];this.mc=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.V=Array(this.D);for(b=0;b<this.D;b++)this.V[b]=a;H(this)}u(Mb);var Nb=8192,Tb=Nb-1;
function Ob(a,b){var c=-1,d=this.controller,e=d.Ha[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.Ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&D(this.i,64)&&C(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&D(this.i,64)&&C(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} function Ob(a,b){var c=-1,d=this.controller,e=d.Ga[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&D(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&E(this.i,64)&&D(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c}
function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&D(this.i,64)&&C(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&D(this.i,64)&&C(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&D(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&E(this.i,64)&&D(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))}
function Qb(a,b){var c=-1,d=this.controller;(a=d.Ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&D(this.i,64)&&C(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&D(this.i,64)&&C(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} function Qb(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));if(0<=c)return this.i&&E(this.i,64)&&D(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&E(this.i,64)&&D(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c}
function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&D(this.i,64)&&C(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&D(this.i,64)&&C(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} function Rb(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?this.i&&E(this.i,64)&&D(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&E(this.i,64)&&D(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))}
function Vb(a,b){if(b!=a.g){var c;a.g&&(c=(1<<a.g)-Nb,Wb(a,c,Nb,a.K),a.g=0);b&&(a.g=b,c=(1<<b)-Nb,a.K=Xb(a,c,Nb),a.F?Wb(a,c,Nb,a.F):(Yb(a,c,Nb,Zb,a),a.F=Xb(a,c,Nb)))}}k=Mb.prototype;k.reset=function(){for(var a=0;a<this.D.length;a++)this.D[a]();Vb(this,16)};function Ub(a,b,c,d){if(a.i&&D(a.i,536870912)&&(C(a.i,"warning: unknown I/O access ("+J(a.i,b)+","+J(a.i,d,c?1:2)+")",!0,!0),$b(a.i)))return 0;a.A||a.b.fa(4,b);return 0}k.Aa=function(a,b){b||this.reset();return!0}; function Vb(a,b){if(b!=a.B){var c;a.B&&(c=(1<<a.B)-Nb,Wb(a,c,Nb,a.K),a.B=0);b&&(a.B=b,c=(1<<b)-Nb,a.K=Xb(a,c,Nb),a.F?Wb(a,c,Nb,a.F):(Yb(a,c,Nb,Zb,a),a.F=Xb(a,c,Nb)))}}k=Mb.prototype;k.reset=function(){for(var a=0;a<this.w.length;a++)this.w[a]();Vb(this,16)};function Ub(a,b,c,d){if(a.i&&E(a.i,536870912)&&(D(a.i,"warning: unknown I/O access ("+J(a.i,b)+","+J(a.i,d,c?1:2)+")",!0,!0),$b(a.i)))return 0;a.f||a.b.ga(4,b);return 0}k.ya=function(a,b){b||this.reset();return!0};
function Yb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ja;0<g&&h<a.Y.length;){var m=a.Y[h],p=h*a.ua,q=a.ua-(f-p);q>g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.B)return m.xb+=m.B-f,m.B=f,!0;if(f>=m.B+m.xb){q=m.size-(f-p);q>g&&(q=g);m.xb=f-m.B+q;f=p+a.ua;g-=q;h++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.ua,d,e);Sb(f,a.i,m);a.Y[h++]=f;f=p+a.ua;g-=q}if(0>=g){c/=1024;var v;e="";v?10<v&&(v=10):v=c&-65536?10:5;if(null==c||isNaN(c))for(;0<v--;)e="?"+e;else for(;0<v--;)e=String.fromCharCode(c%10+48)+e,c/= function Yb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ha;0<g&&h<a.V.length;){var m=a.V[h],p=h*a.ta,q=a.ta-(f-p);q>g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.C)return m.xb+=m.C-f,m.C=f,!0;if(f>=m.C+m.xb){q=m.size-(f-p);q>g&&(q=g);m.xb=f-m.C+q;f=p+a.ta;g-=q;h++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.ta,d,e);Sb(f,a.i,m);a.V[h++]=f;f=p+a.ta;g-=q}if(0>=g){c/=1024;var v;e="";v?10<v&&(v=10):v=c&-65536?10:5;if(null==c||isNaN(c))for(;0<v--;)e="?"+e;else for(;0<v--;)e=String.fromCharCode(c%10+48)+e,c/=
10;a.status(e+"Kb "+bc[d]+" at "+na(b));return!0}return ac(2,b,c)}function Xb(a,b,c){var d=[];for(b>>>=a.ja;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-=a.ua;return d}function Wb(a,b,c,d){var e=0;for(b>>>=a.ja;0<c&&b<a.Y.length;){var f=d[e++];if(!f)break;a.Y[b++]=f;c-=a.ua}}k.rb=function(a){return this.Y[(a&this.f)>>>this.ja].Hb(a&this.w,a)};k.Db=function(a){this.A++;a=this.Y[(a&this.f)>>>this.ja].Nb(a&this.w,a);this.A--;return a};k.na=function(a){return this.Y[(a&this.f)>>>this.ja].oa(a&this.w,a)}; 10;a.status(e+"Kb "+bc[d]+" at "+na(b));return!0}return ac(2,b,c)}function Xb(a,b,c){var d=[];for(b>>>=a.ha;0<c&&b<a.V.length;)d.push(a.V[b++]),c-=a.ta;return d}function Wb(a,b,c,d){var e=0;for(b>>>=a.ha;0<c&&b<a.V.length;){var f=d[e++];if(!f)break;a.V[b++]=f;c-=a.ta}}k.sb=function(a){return this.V[(a&this.g)>>>this.ha].Fb(a&this.A,a)};k.Db=function(a){this.f++;a=this.V[(a&this.g)>>>this.ha].Mb(a&this.A,a);this.f--;return a};k.na=function(a){return this.V[(a&this.g)>>>this.ha].oa(a&this.A,a)};
k.fb=function(a){var b=a&this.w,c=(a&this.f)>>>this.ja;this.A++;a=this.Y[c].Ob(b,a);this.A--;return a};k.Ib=function(a,b){this.Y[(a&this.f)>>>this.ja].Kb(a&this.w,b&255,a)};k.Xa=function(a,b){this.A++;this.Y[(a&this.f)>>>this.ja].Tb(a&this.w,b&255,a);this.A--};k.Ya=function(a,b){this.Y[(a&this.f)>>>this.ja].yb(a&this.w,b&65535,a)};k.Jb=function(a,b){var c=a&this.w,d=(a&this.f)>>>this.ja;this.A++;this.Y[d].Ub(c,b&65535,a);this.A--}; k.eb=function(a){var b=a&this.A,c=(a&this.g)>>>this.ha;this.f++;a=this.V[c].Nb(b,a);this.f--;return a};k.Gb=function(a,b){this.V[(a&this.g)>>>this.ha].Ib(a&this.A,b&255,a)};k.Xa=function(a,b){this.f++;this.V[(a&this.g)>>>this.ha].Jb(a&this.A,b&255,a);this.f--};k.Ya=function(a,b){this.V[(a&this.g)>>>this.ha].yb(a&this.A,b&65535,a)};k.Hb=function(a,b){var c=a&this.A,d=(a&this.g)>>>this.ha;this.f++;this.V[d].Sb(c,b&65535,a);this.f--};
function cc(a){for(var b=0,c=[],d=0;d<a.C;d++){var e=a.Y[d];if(e.Ja||e.pc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,m=[];g<e.length;){for(var p=e[g],q=g+1;q<e.length&&e[q]===p;)q++;m[h++]=q-g;m[h++]=p;g=q}m.length<e.length&&(e=m)}c[f]=e}}return c}function dc(a,b,c,d,e,f,g,h){for(;b<=c;b+=2){var m=b&Tb;void 0!==a.Ha[m]?n("I/O address already registered: "+l(b,8,!0)):a.Ha[m]=[d,e,f,g,h||"unknown",!1]}} function cc(a){for(var b=0,c=[],d=0;d<a.D;d++){var e=a.V[d];if(e.Ka||e.pc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,m=[];g<e.length;){for(var p=e[g],q=g+1;q<e.length&&e[q]===p;)q++;m[h++]=q-g;m[h++]=p;g=q}m.length<e.length&&(e=m)}c[f]=e}}return c}function dc(a,b,c,d,e,f,g,h){for(;b<=c;b+=2){var m=b&Tb;void 0!==a.Ga[m]?n("I/O address already registered: "+l(b,8,!0)):a.Ga[m]=[d,e,f,g,h||"unknown",!1]}}
function ec(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.gb)){var g=f[0]?f[0].bind(b):null,h=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)),!h&&p&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));dc(a,e,e,g,h,m,p,f[4])}}}function fc(a,b){a.D.push(b)} function ec(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.fb)){var g=f[0]?f[0].bind(b):null,h=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)),!h&&p&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));dc(a,e,e,g,h,m,p,f[4])}}}function fc(a,b){a.w.push(b)}
function gc(a,b){a.A||(a.i&&D(a.i,536870912)&&C(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.fa(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Sd:0,Gb:20,gd:0};this.f={Td:0,Sb:-1}}u(K);k=K.prototype; function gc(a,b){a.f||(a.i&&E(a.i,536870912)&&D(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ga(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Sd:0,Eb:20,gd:0};this.f={Td:0,Rb:-1}}u(K);k=K.prototype;
k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.Sb=hc(c,function(){e.f.Ka|=128;e.f.Ka&64&&(ic(e.b,e.f.hd),jc(e.b,e.f.Sb,1E3/60))});this.f.hd=kc(64,6);ec(b,this,L);fc(b,this.reset.bind(this));H(this)};k.reset=function(){this.g.Gb=this.g.Gb&-120|20;this.f.Ka=0};k.Dc=function(){var a=this.f.Ka;this.f.Ka&=-129;return a};k.rd=function(a){this.f.Ka=a;a&64&&jc(this.b,this.f.Sb,1E3/60);this.f.Ka=a&-129};k.wc=function(a){return(a?this.g.gd:this.g.data)&65535}; k.Ca=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Rb=hc(c,function(){e.f.La|=128;e.f.La&64&&(ic(e.b,e.f.hd),jc(e.b,e.f.Rb,1E3/60))});this.f.hd=kc(64,6);ec(b,this,L);fc(b,this.reset.bind(this));H(this)};k.reset=function(){this.g.Eb=this.g.Eb&-120|20;this.f.La=0};k.Dc=function(){var a=this.f.La;this.f.La&=-129;return a};k.rd=function(a){this.f.La=a;a&64&&jc(this.b,this.f.Rb,1E3/60);this.f.La=a&-129};k.wc=function(a){return(a?this.g.gd:this.g.data)&65535};
k.kd=function(a){this.g.data=a};k.Fc=function(){var a=this.b;return a.F&62337|a.wa<<5|a.xa<<1};k.td=function(a){var b=this.b;a&=62337;if(b.F!=a){b.F=a;b.wa=a>>5&3;b.xa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.La!=c&&(b.La=c,tc(b))}uc(this)};k.Gc=function(){var a=this.b.Na;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.Hc=function(){return this.b.vb};k.Ic=function(){return this.b.Oa}; k.kd=function(a){this.g.data=a};k.Fc=function(){var a=this.b;return a.D&62337|a.wa<<5|a.za<<1};k.td=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.wa=a>>5&3;b.za=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ma!=c&&(b.Ma=c,uc(b))}vc(this)};k.Gc=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.Hc=function(){return this.b.wb};k.Ic=function(){return this.b.Pa};
k.ud=function(a){var b=this.b;1170>b.gb&&(a&=-49);b.Oa!=a&&(b.Oa=a,a&16?(b.bb=4194303,b.ya=3915776):(b.bb=262143,b.ya=253952),tc(b));uc(this)};function uc(a){a.g.Gb=a.g.Gb&-8|(a.b.La?a.b.Oa&16?1:2:4)}k.Wc=function(a){return this.b.U[1][a>>1&7]};k.Id=function(a,b){this.b.U[1][b>>1&7]=a&65295};k.Uc=function(a){return this.b.U[1][(a>>1&7)+8]};k.Gd=function(a,b){this.b.U[1][(b>>1&7)+8]=a&65295};k.Vc=function(a){return this.b.ta[1][a>>1&7]}; k.ud=function(a){var b=this.b;1170>b.fb&&(a&=-49);b.Pa!=a&&(b.Pa=a,a&16?(b.qb=4194303,b.Aa=3915776):(b.qb=262143,b.Aa=253952),uc(b));vc(this)};function vc(a){a.g.Eb=a.g.Eb&-8|(a.b.Ma?a.b.Pa&16?1:2:4)}k.Wc=function(a){return this.b.T[1][a>>1&7]};k.Id=function(a,b){this.b.T[1][b>>1&7]=a&65295};k.Uc=function(a){return this.b.T[1][(a>>1&7)+8]};k.Gd=function(a,b){this.b.T[1][(b>>1&7)+8]=a&65295};k.Vc=function(a){return this.b.sa[1][a>>1&7]};
k.Hd=function(a,b){b=b>>1&7;this.b.ta[1][b]=a;this.b.U[1][b]&=65295};k.Tc=function(a){return this.b.ta[1][(a>>1&7)+8]};k.Fd=function(a,b){b=(b>>1&7)+8;this.b.ta[1][b]=a;this.b.U[1][b]&=65295};k.Cc=function(a){return this.b.U[0][a>>1&7]};k.qd=function(a,b){this.b.U[0][b>>1&7]=a&65295};k.Ac=function(a){return this.b.U[0][(a>>1&7)+8]};k.od=function(a,b){this.b.U[0][(b>>1&7)+8]=a&65295};k.Bc=function(a){return this.b.ta[0][a>>1&7]};k.pd=function(a,b){b=b>>1&7;this.b.ta[0][b]=a;this.b.U[0][b]&=65295}; k.Hd=function(a,b){b=b>>1&7;this.b.sa[1][b]=a;this.b.T[1][b]&=65295};k.Tc=function(a){return this.b.sa[1][(a>>1&7)+8]};k.Fd=function(a,b){b=(b>>1&7)+8;this.b.sa[1][b]=a;this.b.T[1][b]&=65295};k.Cc=function(a){return this.b.T[0][a>>1&7]};k.qd=function(a,b){this.b.T[0][b>>1&7]=a&65295};k.Ac=function(a){return this.b.T[0][(a>>1&7)+8]};k.od=function(a,b){this.b.T[0][(b>>1&7)+8]=a&65295};k.Bc=function(a){return this.b.sa[0][a>>1&7]};k.pd=function(a,b){b=b>>1&7;this.b.sa[0][b]=a;this.b.T[0][b]&=65295};
k.zc=function(a){return this.b.ta[0][(a>>1&7)+8]};k.nd=function(a,b){b=(b>>1&7)+8;this.b.ta[0][b]=a;this.b.U[0][b]&=65295};k.bd=function(a){return this.b.U[3][a>>1&7]};k.Od=function(a,b){this.b.U[3][b>>1&7]=a&65295};k.$c=function(a){return this.b.U[3][(a>>1&7)+8]};k.Md=function(a,b){this.b.U[3][(b>>1&7)+8]=a&65295};k.ad=function(a){return this.b.ta[3][a>>1&7]};k.Nd=function(a,b){b=b>>1&7;this.b.ta[3][b]=a;this.b.U[3][b]&=65295};k.Zc=function(a){return this.b.ta[3][(a>>1&7)+8]}; k.zc=function(a){return this.b.sa[0][(a>>1&7)+8]};k.nd=function(a,b){b=(b>>1&7)+8;this.b.sa[0][b]=a;this.b.T[0][b]&=65295};k.bd=function(a){return this.b.T[3][a>>1&7]};k.Od=function(a,b){this.b.T[3][b>>1&7]=a&65295};k.$c=function(a){return this.b.T[3][(a>>1&7)+8]};k.Md=function(a,b){this.b.T[3][(b>>1&7)+8]=a&65295};k.ad=function(a){return this.b.sa[3][a>>1&7]};k.Nd=function(a,b){b=b>>1&7;this.b.sa[3][b]=a;this.b.T[3][b]&=65295};k.Zc=function(a){return this.b.sa[3][(a>>1&7)+8]};
k.Ld=function(a,b){b=(b>>1&7)+8;this.b.ta[3][b]=a;this.b.U[3][b]&=65295};k.kb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};k.ob=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};k.Nc=function(){return this.b.L&49152?this.b.va[0]:this.b.u[6]};k.zd=function(a){this.b.L&49152?this.b.va[0]=a:this.b.u[6]=a};k.Qc=function(){return this.b.u[7]};k.Cd=function(a){this.b.u[7]=a};k.lb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]}; k.Ld=function(a,b){b=(b>>1&7)+8;this.b.sa[3][b]=a;this.b.T[3][b]&=65295};k.jb=function(a){a&=7;return this.b.L&2048?this.b.Fa[a]:this.b.u[a]};k.ob=function(a,b){b&=7;this.b.L&2048?this.b.Fa[b]=a:this.b.u[b]=a};k.Nc=function(){return this.b.L&49152?this.b.va[0]:this.b.u[6]};k.zd=function(a){this.b.L&49152?this.b.va[0]=a:this.b.u[6]=a};k.Qc=function(){return this.b.u[7]};k.Cd=function(a){this.b.u[7]=a};k.kb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Fa[a]};
k.pb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};k.Oc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[1]};k.Ad=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[1]=a};k.Pc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[3]};k.Bd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[3]=a};k.yc=function(a){return this.b.gc[a-65504>>1]};k.md=function(a,b){this.b.gc[b-65504>>1]=a};k.dc=function(a){return 65520==a?61183:0};k.jc=function(){}; k.pb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Fa[b]=a};k.Oc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[1]};k.Ad=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[1]=a};k.Pc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.va[3]};k.Bd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.va[3]=a};k.yc=function(a){return this.b.gc[a-65504>>1]};k.md=function(a,b){this.b.gc[b-65504>>1]=a};k.dc=function(a){return 65520==a?61183:0};k.jc=function(){};
k.Yc=function(){return 1};k.Kd=function(){};k.xc=function(){return this.b.aa};k.ld=function(){this.b.aa=0};k.Ec=function(){return this.b.fc};k.sd=function(a,b){b&1||(a&=255);this.b.fc=a};k.Jc=function(a){return a?this.b.Qb:0};k.vd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Qb=a;b.G|=2};k.Xc=function(a){return a?this.b.Pa&65280:0};k.Jd=function(a){this.b.Pa=a|255};k.Mc=function(){return Lb(this.b)};k.yd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.G|=128}; k.Yc=function(){return 1};k.Kd=function(){};k.xc=function(){return this.b.aa};k.ld=function(){this.b.aa=0};k.Ec=function(){return this.b.fc};k.sd=function(a,b){b&1||(a&=255);this.b.fc=a};k.Jc=function(a){return a?this.b.Pb:0};k.vd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Pb=a;b.G|=2};k.Xc=function(a){return a?this.b.Qa&65280:0};k.Jd=function(a){this.b.Qa=a|255};k.Mc=function(){return Lb(this.b)};k.yd=function(a){wc(this.b,a&-1809|Lb(this.b)&1808);this.b.G|=128};
k.ic=function(a,b){D(this)&&C(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; k.ic=function(a,b){E(this)&&D(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
var M={},L=(M[62592]=[null,null,K.prototype.Wc,K.prototype.Id,"SISDR",1145],M[62608]=[null,null,K.prototype.Uc,K.prototype.Gd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Vc,K.prototype.Hd,"SISAR",1145],M[62640]=[null,null,K.prototype.Tc,K.prototype.Fd,"SDSAR",1145],M[62656]=[null,null,K.prototype.Cc,K.prototype.qd,"KISDR",1145],M[62672]=[null,null,K.prototype.Ac,K.prototype.od,"KDSDR",1145],M[62688]=[null,null,K.prototype.Bc,K.prototype.pd,"KISAR",1145],M[62704]=[null,null,K.prototype.zc,K.prototype.nd, var M={},L=(M[62592]=[null,null,K.prototype.Wc,K.prototype.Id,"SISDR",1145],M[62608]=[null,null,K.prototype.Uc,K.prototype.Gd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Vc,K.prototype.Hd,"SISAR",1145],M[62640]=[null,null,K.prototype.Tc,K.prototype.Fd,"SDSAR",1145],M[62656]=[null,null,K.prototype.Cc,K.prototype.qd,"KISDR",1145],M[62672]=[null,null,K.prototype.Ac,K.prototype.od,"KDSDR",1145],M[62688]=[null,null,K.prototype.Bc,K.prototype.pd,"KISAR",1145],M[62704]=[null,null,K.prototype.zc,K.prototype.nd,
"KDSAR",1145],M[62798]=[null,null,K.prototype.Ic,K.prototype.ud,"MMR3",1145],M[65382]=[null,null,K.prototype.Dc,K.prototype.rd,"LKS"],M[65400]=[null,null,K.prototype.wc,K.prototype.kd,"CNSL"],M[65402]=[null,null,K.prototype.Fc,K.prototype.td,"MMR0",1145],M[65404]=[null,null,K.prototype.Gc,K.prototype.ic,"MMR1",1145],M[65406]=[null,null,K.prototype.Hc,K.prototype.ic,"MMR2",1145],M[65408]=[null,null,K.prototype.bd,K.prototype.Od,"UISDR",1145],M[65424]=[null,null,K.prototype.$c,K.prototype.Md,"UDSDR", "KDSAR",1145],M[62798]=[null,null,K.prototype.Ic,K.prototype.ud,"MMR3",1145],M[65382]=[null,null,K.prototype.Dc,K.prototype.rd,"LKS"],M[65400]=[null,null,K.prototype.wc,K.prototype.kd,"CNSL"],M[65402]=[null,null,K.prototype.Fc,K.prototype.td,"MMR0",1145],M[65404]=[null,null,K.prototype.Gc,K.prototype.ic,"MMR1",1145],M[65406]=[null,null,K.prototype.Hc,K.prototype.ic,"MMR2",1145],M[65408]=[null,null,K.prototype.bd,K.prototype.Od,"UISDR",1145],M[65424]=[null,null,K.prototype.$c,K.prototype.Md,"UDSDR",
1145],M[65440]=[null,null,K.prototype.ad,K.prototype.Nd,"UISAR",1145],M[65456]=[null,null,K.prototype.Zc,K.prototype.Ld,"UDSAR",1145],M[65472]=[null,null,K.prototype.kb,K.prototype.ob,"R0SET0"],M[65473]=[null,null,K.prototype.kb,K.prototype.ob,"R1SET0"],M[65474]=[null,null,K.prototype.kb,K.prototype.ob,"R2SET0"],M[65475]=[null,null,K.prototype.kb,K.prototype.ob,"R3SET0"],M[65476]=[null,null,K.prototype.kb,K.prototype.ob,"R4SET0"],M[65477]=[null,null,K.prototype.kb,K.prototype.ob,"R5SET0"],M[65478]= 1145],M[65440]=[null,null,K.prototype.ad,K.prototype.Nd,"UISAR",1145],M[65456]=[null,null,K.prototype.Zc,K.prototype.Ld,"UDSAR",1145],M[65472]=[null,null,K.prototype.jb,K.prototype.ob,"R0SET0"],M[65473]=[null,null,K.prototype.jb,K.prototype.ob,"R1SET0"],M[65474]=[null,null,K.prototype.jb,K.prototype.ob,"R2SET0"],M[65475]=[null,null,K.prototype.jb,K.prototype.ob,"R3SET0"],M[65476]=[null,null,K.prototype.jb,K.prototype.ob,"R4SET0"],M[65477]=[null,null,K.prototype.jb,K.prototype.ob,"R5SET0"],M[65478]=
[null,null,K.prototype.Nc,K.prototype.zd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Qc,K.prototype.Cd,"R7KERNEL"],M[65480]=[null,null,K.prototype.lb,K.prototype.pb,"R0SET1",1145],M[65481]=[null,null,K.prototype.lb,K.prototype.pb,"R1SET1",1145],M[65482]=[null,null,K.prototype.lb,K.prototype.pb,"R2SET1",1145],M[65483]=[null,null,K.prototype.lb,K.prototype.pb,"R3SET1",1145],M[65484]=[null,null,K.prototype.lb,K.prototype.pb,"R4SET1",1145],M[65485]=[null,null,K.prototype.lb,K.prototype.pb,"R5SET1",1145], [null,null,K.prototype.Nc,K.prototype.zd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Qc,K.prototype.Cd,"R7KERNEL"],M[65480]=[null,null,K.prototype.kb,K.prototype.pb,"R0SET1",1145],M[65481]=[null,null,K.prototype.kb,K.prototype.pb,"R1SET1",1145],M[65482]=[null,null,K.prototype.kb,K.prototype.pb,"R2SET1",1145],M[65483]=[null,null,K.prototype.kb,K.prototype.pb,"R3SET1",1145],M[65484]=[null,null,K.prototype.kb,K.prototype.pb,"R4SET1",1145],M[65485]=[null,null,K.prototype.kb,K.prototype.pb,"R5SET1",1145],
M[65486]=[null,null,K.prototype.Oc,K.prototype.Ad,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Pc,K.prototype.Bd,"R6USER",1145],M[65504]=[null,null,K.prototype.yc,K.prototype.md,"CTRL",1170],M[65520]=[null,null,K.prototype.dc,K.prototype.jc,"LSIZE",1170],M[65522]=[null,null,K.prototype.dc,K.prototype.jc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Yc,K.prototype.Kd,"SYSID",1170],M[65526]=[null,null,K.prototype.xc,K.prototype.ld,"CPUERR",1170],M[65528]=[null,null,K.prototype.Ec,K.prototype.sd, M[65486]=[null,null,K.prototype.Oc,K.prototype.Ad,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Pc,K.prototype.Bd,"R6USER",1145],M[65504]=[null,null,K.prototype.yc,K.prototype.md,"CTRL",1170],M[65520]=[null,null,K.prototype.dc,K.prototype.jc,"LSIZE",1170],M[65522]=[null,null,K.prototype.dc,K.prototype.jc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Yc,K.prototype.Kd,"SYSID",1170],M[65526]=[null,null,K.prototype.xc,K.prototype.ld,"CPUERR",1170],M[65528]=[null,null,K.prototype.Ec,K.prototype.sd,
"MB",1170],M[65530]=[null,null,K.prototype.Jc,K.prototype.vd,"PIR"],M[65532]=[null,null,K.prototype.Xc,K.prototype.Jd,"SL"],M[65534]=[null,null,K.prototype.Mc,K.prototype.yd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; "MB",1170],M[65530]=[null,null,K.prototype.Jc,K.prototype.vd,"PIR"],M[65532]=[null,null,K.prototype.Xc,K.prototype.Jd,"SL"],M[65534]=[null,null,K.prototype.Mc,K.prototype.yd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];
L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; L[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[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];
L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];Ta(function(){for(var a=B(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=z(d);switch(c.type){case "default":c=new K(c);A(c,d);break;case "pc11":c=new wc(c),A(c,d)}}});var xc; L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];Ta(function(){for(var a=C(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=z(d);switch(c.type){case "default":c=new K(c);A(c,d);break;case "pc11":c=new xc(c),A(c,d)}}});var yc;
if(sb){var yc=new ArrayBuffer(2);(new DataView(yc)).setUint16(0,256,!0);xc=256===(new Uint16Array(yc))[0]}else xc=!1;var zc=xc; if(sb){var zc=new ArrayBuffer(2);(new DataView(zc)).setUint16(0,256,!0);yc=256===(new Uint16Array(zc))[0]}else yc=!1;var Ac=yc;
function I(a,b,c,d,e,f){this.w=a;this.id=Ac+=2;this.b=null;this.B=b;this.xb=c;this.size=d||0;this.type=e||Bc;this.f=e==Cc;this.controller=null;Sb(this);this.Ja=this.pc=!1;if(d)if(f)this.controller=f,this.b=null,Dc(this,f.mc);else if(sb)this.A=new ArrayBuffer(d),this.F=new DataView(this.A,0,d),this.C=new Uint8Array(this.A,0,d),this.J=new Uint16Array(this.A,0,d>>1),this.b=new Int32Array(this.A,0,d>>2),Dc(this,zc?Ec:Fc);else{this.b=Array(d>>2);for(a=0;a<this.b.length;a++)this.b[a]=0;Dc(this,Gc)}else Dc(this)} function I(a,b,c,d,e,f){this.A=a;this.id=Bc+=2;this.b=null;this.C=b;this.xb=c;this.size=d||0;this.type=e||Cc;this.g=e==Dc;this.controller=null;Sb(this);this.Ka=this.pc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Ec(this,f.mc);else if(sb)this.D=new ArrayBuffer(this.size),this.F=new DataView(this.D,0,this.size),this.f=new Uint8Array(this.D,0,this.size),this.J=new Uint16Array(this.D,0,this.size>>1),this.b=new Int32Array(this.D,0,this.size>>2),Ec(this,Ac?Fc:Gc);else{a=this.b=Array(this.size>>
var Bc=0,Cc=2,Zb=4,bc=["NONE","RAM","ROM","VID","H/W"],Ac=0; 2);for(f=0;f<a.length;f++)a[f]=0;Ec(this,Hc)}else Ec(this)}var Cc=0,Dc=2,Zb=4,bc=["NONE","RAM","ROM","VID","H/W"],Bc=0;
I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(sb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(sb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.Ja=!0}return!1},Sa:function(a,b){b?this.I++||Hc(this,Ic,!1):this.g++||Jc(this,Ic,!1)},K:function(){this.i&&D(this.i,128)&&(C(this.i,"attempt to read invalid block %"+ I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(sb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(sb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.Ka=!0}return!1},Va:function(a,b){b?this.B++||Ic(this,Jc,!1):this.I++||Kc(this,Jc,!1)},K:function(){this.i&&E(this.i,128)&&(D(this.i,"attempt to read invalid block %"+
l(this.B),!0),this.i.ca());return 255},D:function(a,b){this.i&&D(this.i,128)&&(C(this.i,"attempt to write "+l(b,4,!0)+" to invalid block %"+l(this.B),!0),this.i.ca())},M:function(a,b){return this.Hb(a++,b++)|this.Hb(a,b)<<8},H:function(a,b,c){this.Kb(a++,b&255,c++);this.Kb(a,b>>8,c)},R:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&gc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= l(this.C),!0),this.i.ca());return 255},w:function(a,b){this.i&&E(this.i,128)&&(D(this.i,"attempt to write "+l(b,4,!0)+" to invalid block %"+l(this.C),!0),this.i.ca())},M:function(a,b){return this.Fb(a++,b++)|this.Fb(a,b)<<8},H:function(a,b,c){this.Ib(a++,b&255,c++);this.Ib(a,b>>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&gc(this.A,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},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=
this.b[c]&~(255<<a)|b<<a;this.Ja=!0},Za:function(a,b,c){a&1&&gc(this.w,c);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ja=!0},O:function(a,b){if(this.i&&null!=this.B){var c=this.i;Kc(c,this.B+a,1,c.M)&&c.ca(!0)}return this.Nb(a,b)},X:function(a,b){if(this.i&&null!=this.B){var c=this.i;Kc(c,this.B+a,2,c.M)&&c.ca(!0)}return this.Ob(a,b)},qa:function(a,b,c){if(this.i&&null!=this.B){var d=this.i;Kc(d,this.B+a,1, this.b[c]&~(255<<a)|b<<a;this.Ka=!0},Aa:function(a,b,c){a&1&&gc(this.A,c);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ka=!0},O:function(a,b){if(this.i&&null!=this.C){var c=this.i;Lc(c,this.C+a,1,c.M)&&c.ca(!0)}return this.Mb(a,b)},Y:function(a,b){if(this.i&&null!=this.C){var c=this.i;Lc(c,this.C+a,2,c.M)&&c.ca(!0)}return this.Nb(a,b)},ra:function(a,b,c){if(this.i&&null!=this.C){var d=this.i;Lc(d,this.C+a,1,
d.C)&&d.ca(!0)}this.f?this.D(a,b,c):this.Tb(a,b,c)},xa:function(a,b,c){if(this.i&&null!=this.B){var d=this.i;Kc(d,this.B+a,2,d.C)&&d.ca(!0)}this.f?this.D(a,b,c):this.Ub(a,b,c)},N:function(a){return this.C[a]},P:function(a,b){a=this.C[a];this.i&&D(this.i,128)&&C(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},W:function(a,b){a&1&&gc(this.w,b);return this.F.getUint16(a,!0)},da:function(a,b){a&1&&gc(this.w,b);a=this.J[a>>1];this.i&&D(this.i,128)&&C(this.i,"Memory.readWord("+J(this.i, d.D)&&d.ca(!0)}this.g?this.w(a,b,c):this.Jb(a,b,c)},Za:function(a,b,c){if(this.i&&null!=this.C){var d=this.i;Lc(d,this.C+a,2,d.D)&&d.ca(!0)}this.g?this.w(a,b,c):this.Sb(a,b,c)},N:function(a){return this.f[a]},P:function(a,b){a=this.f[a];this.i&&E(this.i,128)&&D(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},X:function(a,b){a&1&&gc(this.A,b);return this.F.getUint16(a,!0)},ea:function(a,b){a&1&&gc(this.A,b);a=this.J[a>>1];this.i&&E(this.i,128)&&D(this.i,"Memory.readWord("+J(this.i,
b)+"): "+J(this.i,a),!0);return a},pa:function(a,b){this.C[a]=b;this.Ja=!0},Ra:function(a,b,c){this.C[a]=b;this.Ja=!0;this.i&&D(this.i,128)&&C(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&gc(this.w,c);this.F.setUint16(a,b,!0);this.Ja=!0},ya:function(a,b,c){a&1&&gc(this.w,c);this.J[a>>1]=b;this.Ja=!0;this.i&&D(this.i,128)&&C(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; b)+"): "+J(this.i,a),!0);return a},pa:function(a,b){this.f[a]=b;this.Ka=!0},Sa:function(a,b,c){this.f[a]=b;this.Ka=!0;this.i&&E(this.i,128)&&D(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&gc(this.A,c);this.F.setUint16(a,b,!0);this.Ka=!0},za:function(a,b,c){a&1&&gc(this.A,c);this.J[a>>1]=b;this.Ka=!0;this.i&&E(this.i,128)&&D(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}};
function Sb(a,b,c){a.i=b;a.g=a.I=0;c&&((a.g=c.g)&&Jc(a,Ic,!1),(a.I=c.I)&&Hc(a,Ic,!1))}function Lc(a,b){b?--a.I||(a.Kb=a.f?a.D:a.Tb,a.yb=a.f?a.H:a.Ub):--a.g||(a.Hb=a.Nb,a.oa=a.Ob)}function Hc(a,b,c){c&&a.I||(a.Kb=!a.f&&b[1]||a.D,a.yb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Tb=b[1]||a.D,a.Ub=b[3]||a.H}function Jc(a,b,c){c&&a.g||(a.Hb=b[0]||a.K,a.oa=b[2]||a.M);if(c||void 0===c)a.Nb=b[0]||a.K,a.Ob=b[2]||a.M}function Dc(a,b){b||(b=Mc);Jc(a,b,void 0);Hc(a,b,void 0)} function Sb(a,b,c){a.i=b;a.I=a.B=0;c&&((a.I=c.I)&&Kc(a,Jc,!1),(a.B=c.B)&&Ic(a,Jc,!1))}function Mc(a,b){b?--a.B||(a.Ib=a.g?a.w:a.Jb,a.yb=a.g?a.H:a.Sb):--a.I||(a.Fb=a.Mb,a.oa=a.Nb)}function Ic(a,b,c){c&&a.B||(a.Ib=!a.g&&b[1]||a.w,a.yb=!a.g&&b[3]||a.H);if(c||void 0===c)a.Jb=b[1]||a.w,a.Sb=b[3]||a.H}function Kc(a,b,c){c&&a.I||(a.Fb=b[0]||a.K,a.oa=b[2]||a.M);if(c||void 0===c)a.Mb=b[0]||a.K,a.Nb=b[2]||a.M}function Ec(a,b){b||(b=Nc);Kc(a,b,void 0);Ic(a,b,void 0)}
var Mc=[],Gc=[I.prototype.R,I.prototype.sa,I.prototype.ha,I.prototype.Za],Ic=[I.prototype.O,I.prototype.qa,I.prototype.X,I.prototype.xa];if(sb)var Fc=[I.prototype.N,I.prototype.pa,I.prototype.W,I.prototype.wa],Ec=[I.prototype.P,I.prototype.Ra,I.prototype.da,I.prototype.ya]; var Nc=[],Hc=[I.prototype.U,I.prototype.ua,I.prototype.la,I.prototype.Aa],Jc=[I.prototype.O,I.prototype.ra,I.prototype.Y,I.prototype.Za];if(sb)var Gc=[I.prototype.N,I.prototype.pa,I.prototype.X,I.prototype.wa],Fc=[I.prototype.P,I.prototype.Sa,I.prototype.ea,I.prototype.za];
function Nc(a,b){r.call(this,"CPU",a,Nc,1);var c=a.multiplier||1;this.Ga=a.cycles||b;this.Ma=c;this.ab=Math.round(this.Ga/1E4)/100;this.Wa=this.ab*this.Ma;this.v.ea=!1;this.v.Rb=!1;this.v.qb=a.autoStart;this.v.cb=!1;this.sb=this.ha=0;this.tb=a.csStart;this.hb=a.csInterval;this.ib=a.csStop;this.K=[];this.Fb=this.fd.bind(this);H(this)}u(Nc);var Oc=["power","reset"];k=Nc.prototype; function Oc(a,b){r.call(this,"CPU",a,Oc,1);var c=a.multiplier||1;this.Ua=a.cycles||b;this.Na=c;this.bb=Math.round(this.Ua/1E4)/100;this.Wa=this.bb*this.Na;this.v.da=!1;this.v.Qb=!1;this.v.ab=a.autoStart;this.v.cb=!1;this.tb=this.la=0;this.ub=a.csStart;this.gb=a.csInterval;this.hb=a.csStop;this.J=[];this.bc=this.fd.bind(this);H(this)}u(Oc);var Pc=["power","reset"];k=Oc.prototype;
k.Ca=function(a,b,c,d){this.D=a;this.w=b;this.i=d;for(b=0;b<Oc.length;b++)(c=this.I[Oc[b]])&&this.D.ra(null,Oc[b],c);a=Pc(a,"autoStart");null!=a&&(this.v.qb="true"==a?!0:"false"==a?!1:!!a);H(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1}; k.Ca=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b<Pc.length;b++)(c=this.I[Pc[b]])&&this.B.qa(null,Pc[b],c);a=Qc(a,"autoStart");null!=a&&(this.v.ab="true"==a?!0:"false"==a?!1:!!a);H(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
k.Aa=function(a,b){if(!b){if(a&&this.restore){Qc(this);if(!this.restore(a))return!1;Rc(this)}else this.reset();this.i?(a=this.i,a.$a=!0,a.j("Type ? for help with PDP11 Debugger commands"),a.ba(),a.Ga&&(b=a.Ga,a.Ga=null,Sc(a,b))):this.j("No debugger detected")}this.D.ba();return!0};k.za=function(a){return a?this.save():!0};k.qb=function(){return this.v.qb||!this.i&&void 0===this.I.run?(this.mb(!0),!0):!1};k.$b=function(){return 0}; k.ya=function(a,b){if(!b){if(a&&this.restore){Rc(this);if(!this.restore(a))return!1;Sc(this)}else this.reset();this.i?(a=this.i,b=this.v.ab,a.Ua=!0,a.j("Type ? for help with PDP11 Debugger commands"),a.ba(),b||a.lb(),a.Aa&&(b=a.Aa,a.Aa=null,Tc(a,b))):this.j("No debugger detected")}this.B.ba();return!0};k.xa=function(a){return a?this.save():!0};k.ab=function(){return this.v.ab||!this.i&&void 0===this.I.run?(this.mb(!0),!0):!1};k.Yb=function(){return 0};
function Rc(a){void 0===a.tb&&(a.tb=0);void 0===a.hb&&(a.hb=-1);void 0===a.ib&&(a.ib=-1);a.v.cb=0<=a.tb&&0<a.hb;a.v.cb&&(a.sb=0,a.ha=a.tb-a.da)}function Tc(a,b){if(a.v.cb){var c=!1;a.sb=a.sb+a.$b()|0;a.ha-=b;0>=a.ha&&(a.ha+=a.hb,c=!0);0<=a.ib&&a.ib<=Uc(a)&&(a.hb=a.ib=-1,Rc(a),a.ca(),c=!0);c&&a.j(Uc(a)+" cycles: checksum="+l(a.sb))}} function Sc(a){void 0===a.ub&&(a.ub=0);void 0===a.gb&&(a.gb=-1);void 0===a.hb&&(a.hb=-1);a.v.cb=0<=a.ub&&0<a.gb;a.v.cb&&(a.tb=0,a.la=a.ub-a.ea)}function Uc(a,b){if(a.v.cb){var c=!1;a.tb=a.tb+a.Yb()|0;a.la-=b;0>=a.la&&(a.la+=a.gb,c=!0);0<=a.hb&&a.hb<=Vc(a)&&(a.gb=a.hb=-1,Sc(a),a.ca(),c=!0);c&&a.j(Vc(a)+" cycles: checksum="+l(a.tb))}}
k.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ga)a=!0;else{var b=null,c,h=kb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.v.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.v.ga);c++);c==h.length&&(b=a);n("The "+b.type+" component ("+b.id+") is not "+(b.v.ready?"powered yet":"ready yet"+(b.Bb?" (waiting for notification)":""))+".");a=!1}a&&(d.v.ea?d.ca():d.mb())}, k.qa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ja)a=!0;else{var b=null,c,h=kb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.v.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.v.ja);c++);c==h.length&&(b=a);n("The "+b.type+" component ("+b.id+") is not "+(b.v.ready?"powered yet":"ready yet"+(b.Bb?" (waiting for notification)":""))+".");a=!1}a&&(d.v.da?d.ca():d.mb())},
!0;case "speed":return this.I[b]=c,!0;case "setSpeed":return this.I[b]=c,c.onclick=function(){Vc(d,d.Ma<<1,!0)},c.textContent=this.Wa.toFixed(2)+"Mhz",!0}return!1};k.ba=function(){var a=this.I.speed;a&&(a.textContent=this.v.ea&&this.R?this.R.toFixed(2)+"Mhz":"Stopped")};function Wc(a,b,c){a.da+=b;c&&(a.X=a.b=0)}function Xc(a,b){var c=1;b&&1<a.Ma&&a.R&&(c=a.R/a.ab);a.Cb=Math.round(1E3/30);a.Qa=Math.floor(a.Ga/30*c);b||(a.pa=a.Qa);a.eb=0}function Uc(a){return a.da+a.O+a.X-a.b} !0;case "speed":return this.I[b]=c,!0;case "setSpeed":return this.I[b]=c,c.onclick=function(){Wc(d,d.Na<<1,!0)},c.textContent=this.Wa.toFixed(2)+"Mhz",!0}return!1};k.ba=function(){var a=this.I.speed;a&&(a.textContent=this.v.da&&this.U?this.U.toFixed(2)+"Mhz":"Stopped")};function Xc(a,b,c){a.ea+=b;c&&(a.Y=a.b=0)}function Yc(a,b){var c=1;b&&1<a.Na&&a.U&&(c=a.U/a.bb);a.Cb=Math.round(1E3/30);a.Ra=Math.floor(a.Ua/30*c);b||(a.pa=a.Ra);a.rb=0}function Vc(a){return a.ea+a.O+a.Y-a.b}
function Qc(a){a.R=0;a.Eb=0;a.da=a.O=a.X=a.b=0;Rc(a);Vc(a,1)}function Vc(a,b,c){var d=!1;if(void 0!==b){.8>a.R/a.Wa?b=1:d=!0;a.Ma=b;b=a.ab*a.Ma;if(a.Wa!=b){a.Wa=b;b=a.Wa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.D&&a.D.wb()}Wc(a,a.O);a.O=0;a.N=za();a.W=0;Xc(a);return d}function hc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function jc(a,b,c){0<=b&&b<a.K.length&&0>a.K[b][0]&&(c=a.Ga*a.Ma/1E3*c|0,a.K[b][0]=c+Yc(a))} function Rc(a){a.U=0;a.ac=0;a.ea=a.O=a.Y=a.b=0;Sc(a);Wc(a,1)}function Wc(a,b,c){var d=!1;if(void 0!==b){.8>a.U/a.Wa?b=1:d=!0;a.Na=b;b=a.bb*a.Na;if(a.Wa!=b){a.Wa=b;b=a.Wa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.lb()}Xc(a,a.O);a.O=0;a.N=za();a.X=0;Yc(a);return d}function hc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function jc(a,b,c){0<=b&&b<a.J.length&&0>a.J[b][0]&&(c=a.Ua*a.Na/1E3*c|0,a.J[b][0]=c+Zc(a))}
function Zc(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function $c(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Yc(a,b){var c=a.X-=a.b;a.b=0;b&&(a.X=0);return c} function $c(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ad(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Zc(a,b){var c=a.Y-=a.b;a.b=0;b&&(a.Y=0);return c}
k.fd=function(){if(this.v.ea){this.eb>=this.Ga&&Xc(this,!0);this.sa=0;this.Fa=za();if(this.W){var a=this.Fa-this.W;a>this.Cb&&(this.N+=a,this.N>this.Fa&&(this.N=this.Fa))}try{do{var b=Zc(this,this.v.cb?1:this.Qa);try{this.nb(b)}catch(e){if("number"!=typeof e)throw e;}b=Yc(this,!0);this.sa+=b;this.O+=b;Tc(this,b);$c(this,b);this.pa-=b;if(0>=this.pa){this.pa+=this.Qa;15<=++this.Eb&&(this.D&&this.D.ba(),this.Eb=0);break}}while(this.v.ea)}catch(e){this.ca();this.D&&this.D.stop(za(),Uc(this));rb(this, k.fd=function(){if(this.v.da){this.rb>=this.Ua&&Yc(this,!0);this.ua=0;this.Ta=za();if(this.X){var a=this.Ta-this.X;a>this.Cb&&(this.N+=a,this.N>this.Ta&&(this.N=this.Ta))}try{do{var b=$c(this,this.v.cb?1:this.Ra);try{this.nb(b)}catch(e){if("number"!=typeof e)throw e;}b=Zc(this,!0);this.ua+=b;this.O+=b;Uc(this,b);ad(this,b);this.pa-=b;if(0>=this.pa){this.pa+=this.Ra;15<=++this.ac&&(this.B&&this.B.ba(),this.ac=0);break}}while(this.v.da)}catch(e){this.ca();this.B&&this.B.stop(za(),Vc(this));rb(this,
e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.Fb;this.W=za();var c=this.Cb;this.sa&&(c=Math.round(c*this.sa/this.Qa));var c=c-(this.W-this.Fa),d=this.W-this.N;d&&(this.R=Math.round(this.O/(10*d))/100,864E5<=d&&(this.da=0,Vc(this)));if(0>c||this.R<this.Wa)-1E3>c&&(this.N-=c),c=0;this.eb+=this.sa;this.W+=c;a(b,c)}}}; e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.bc;this.X=za();var c=this.Cb;this.ua&&(c=Math.round(c*this.ua/this.Ra));var c=c-(this.X-this.Ta),d=this.X-this.N;d&&(this.U=Math.round(this.O/(10*d))/100,864E5<=d&&(this.ea=0,Wc(this)));if(0>c||this.U<this.Wa)-1E3>c&&(this.N-=c),c=0;this.rb+=this.ua;this.X+=c;a(b,c)}}};
k.mb=function(a){if(qb(this))return!1;if(this.v.ea)return this.j(this.toString()+" busy"),!1;Vc(this);this.v.ea=!0;this.v.Rb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.wb(!0),this.D.start(this.N,Uc(this)));setTimeout(this.Fb,0);return!0};k.nb=function(){return 0};k.ca=function(a){if(this.v.ea){Yc(this);Wc(this,this.O);this.O=0;this.v.ea=!1;var b=this.I.run;b&&(b.textContent="Run");this.D&&this.D.stop(za(),Uc(this))}this.v.complete=a}; k.mb=function(a){if(qb(this))return!1;if(this.v.da)return this.j(this.toString()+" busy"),!1;Wc(this);this.v.da=!0;this.v.Qb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.lb(!0),this.B.start(this.N,Vc(this)));setTimeout(this.bc,0);return!0};k.nb=function(){return 0};k.ca=function(a){if(this.v.da){Zc(this);Xc(this,this.O);this.O=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(za(),Vc(this))}this.v.complete=a};
function ad(a){this.gb=+a.model||1170;this.zb=a.addrReset||0;Nc.call(this,a,6666667);this.decode=1120==this.gb?bd.bind(this):cd.bind(this);dd(this);this.A=0;this.P=null;this.v.complete=this.v.oc=!1}u(ad,Nc);k=ad.prototype;k.reset=function(){this.status("model "+this.gb);this.v.ea&&this.ca();dd(this);Qc(this);this.v.error=!1;this.parent.reset.call(this)}; function bd(a){this.fb=+a.model||1170;this.zb=a.addrReset||0;Oc.call(this,a,6666667);this.decode=1120==this.fb?cd.bind(this):dd.bind(this);ed(this);this.K=0;this.P=null;this.v.complete=this.v.oc=!1}u(bd,Oc);k=bd.prototype;k.reset=function(){this.status("model "+this.fb);this.v.da&&this.ca();ed(this);Rc(this);this.v.error=!1;this.parent.reset.call(this)};
function dd(a){a.S=65536;a.T=32768;a.Z=65535;a.V=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.zb];a.Ea=[0,0,0,0,0,0];a.va=[0,0,0,0];a.C=0;a.xa=0;a.sc=[4,2,0,1];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ta=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.uc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, function ed(a){a.R=65536;a.S=32768;a.Z=65535;a.W=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.zb];a.Fa=[0,0,0,0,0,0];a.va=[0,0,0,0];a.w=0;a.za=0;a.sc=[4,2,0,1];a.T=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.sa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.uc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.gc=[0,0,0,0,0,0,0,0];a.fc=0;a.G=0;a.H=a.J=0;a.g=a.f=a.$a=0;a.qa=-1;ed(a)}function ed(a){a.Pa=255;a.aa=0;a.Qb=0;a.F=0;a.Na=0;a.vb=0;a.Oa=0;a.La=0;a.wa=0;a.bb=262143;a.ya=253952;a.G|=2;a.w&&tc(a)}function tc(a){a.La?(a.M=65536,a.$=a.rc,a.oa=a.cd,a.yb=a.Pd,Vb(a.w,a.Oa&16?22:18)):(a.M=0,a.$=a.qc,a.oa=a.ec,a.yb=a.kc,Vb(a.w,16))}function fd(a,b){a.zb=b;N(a,b);a.i&&(a.ca(),a.i.ba())}k.$b=function(){return 0}; 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.gc=[0,0,0,0,0,0,0,0];a.fc=0;a.G=0;a.F=a.H=0;a.g=a.f=a.$a=0;a.ra=-1;fd(a)}function fd(a){a.Qa=255;a.aa=0;a.Pb=0;a.D=0;a.Oa=0;a.wb=0;a.Pa=0;a.Ma=0;a.wa=0;a.qb=262143;a.Aa=253952;a.G|=2;a.A&&uc(a)}function uc(a){a.Ma?(a.M=65536,a.$=a.rc,a.oa=a.cd,a.yb=a.Pd,Vb(a.A,a.Pa&16?22:18)):(a.M=0,a.$=a.qc,a.oa=a.ec,a.yb=a.kc,Vb(a.A,16))}function gd(a,b,c){a.zb=b;N(a,b);!c&&a.i&&(a.ca(),a.i.ba())}k.Yb=function(){return 0};
k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.da,this.Ma]);a.set(2,cc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.da=b[1];Vc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.J){for(var f=0,g=Array(b.J),h=0;h<e.length-1;)for(var m=e[h++],p=e[h++];m--;)g[f++]=p;e=g}f=b.Y[d];if(!f||!f.restore(e)){n("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function gd(a){return a.S&65536?1:0} k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Na]);a.set(2,cc(this.A));return a.data()};k.restore=function(a){var b=a[1];this.ea=b[1];Wc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.J){for(var f=0,g=Array(b.J),h=0;h<e.length-1;)for(var m=e[h++],p=e[h++];m--;)g[f++]=p;e=g}f=b.V[d];if(!f||!f.restore(e)){n("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function hd(a){return a.R&65536?1:0}
function hd(a){return a.T&32768?2:0}function id(a){return a.Z&65535?0:4}k.Da=function(){return this.V&32768?8:0};function jd(a){var b=a.u[7];a.F&57344||(a.Na=0,a.vb=b);a.u[7]=b+2&65535;return a.oa(b)}function Dd(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function N(a,b){a.u[7]=b&65535}function kc(a,b){return{jd:a,jb:b,next:null}}function ic(a,b){if(b!=a.P){var c=a.P;if(!c||c.jb<=b.jb)b.next=c,a.P=b;else{do{var d=c.next;if(!d||d.jb<=b.jb){b.next=d;c.next=b;break}c=d}while(c)}}a.G|=2} function id(a){return a.S&32768?2:0}function jd(a){return a.Z&65535?0:4}k.Ea=function(){return this.W&32768?8:0};function kd(a){var b=a.u[7];a.D&57344||(a.Oa=0,a.wb=b);a.u[7]=b+2&65535;return a.oa(b)}function ld(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function N(a,b){a.u[7]=b&65535}function kc(a,b){return{jd:a,ib:b,next:null}}function ic(a,b){if(b!=a.P){var c=a.P;if(!c||c.ib<=b.ib)b.next=c,a.P=b;else{do{var d=c.next;if(!d||d.ib<=b.ib){b.next=d;c.next=b;break}c=d}while(c)}}a.G|=2}
function Lb(a){return a.L=a.L&63728|a.Da()|id(a)|hd(a)|gd(a)}function vc(a,b){a.V=b<<12;a.Z=~b&4;a.T=b<<14;a.S=b<<16;if((b^a.L)&2048)for(var c=a.Ea.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ea[c];a.Ea[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.va[c]=a.u[6],a.u[6]=a.va[a.C]);a.L=b;a.G|=2}function P(a,b){a.G&128||(a.V=a.Z=b,a.T=0)}function Ed(a,b,c){a.G&128||(a.V=a.Z=a.S=b,a.T=c||0)}function Fd(a,b,c,d){a.G&128||(a.V=a.Z=a.S=b,a.T=(c^b)&(d^b))}function Gd(a,b){a.G&128||(a.V=a.Z=a.S=b,a.T=a.V^a.S>>1)} function Lb(a){return a.L=a.L&63728|a.Ea()|jd(a)|id(a)|hd(a)}function wc(a,b){a.W=b<<12;a.Z=~b&4;a.S=b<<14;a.R=b<<16;if((b^a.L)&2048)for(var c=a.Fa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Fa[c];a.Fa[c]=d}a.w=b>>14&3;c=a.L>>14&3;a.w!=c&&(a.va[c]=a.u[6],a.u[6]=a.va[a.w]);a.L=b;a.G|=2}function P(a,b){a.G&128||(a.W=a.Z=b,a.S=0)}function Ed(a,b,c){a.G&128||(a.W=a.Z=a.R=b,a.S=c||0)}function Fd(a,b,c,d){a.G&128||(a.W=a.Z=a.R=b,a.S=(c^b)&(d^b))}function Gd(a,b){a.G&128||(a.W=a.Z=a.R=b,a.S=a.W^a.R>>1)}
function Hd(a,b,c,d){a.G&128||(a.V=a.Z=a.S=b,a.T=(c^d)&(d^b))}k.fa=function(a,b){if(!this.A){var c=!1;0>this.qa?this.qa=Lb(this):this.C||(a=4,c=!0);this.F&57344||(this.Na=63222,this.vb=a);this.C=0;var d=this.oa(a|this.M),e=this.oa(a+2&65535|this.M);vc(this,e&-12289|this.qa>>2&12288);c&&(this.aa|=4,this.u[6]=4);Id(this,this.qa);Id(this,this.u[7]);N(this,d);this.G&=-113;this.qa=-1;if(26!=b)throw a;}};function Jd(a){var b=Kd(a),c=Kd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);N(a,b);vc(a,c);a.G&=-17} function Hd(a,b,c,d){a.G&128||(a.W=a.Z=a.R=b,a.S=(c^d)&(d^b))}k.ga=function(a,b){if(!this.K){var c=!1;0>this.ra?this.ra=Lb(this):this.w||(a=4,c=!0);this.D&57344||(this.Oa=63222,this.wb=a);this.w=0;var d=this.oa(a|this.M),e=this.oa(a+2&65535|this.M);wc(this,e&-12289|this.ra>>2&12288);c&&(this.aa|=4,this.u[6]=4);Id(this,this.ra);Id(this,this.u[7]);N(this,d);this.G&=-113;this.ra=-1;if(26!=b)throw a;}};function Jd(a){var b=Kd(a),c=Kd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);N(a,b);wc(a,c);a.G&=-17}
function Ld(a,b,c){var d,e,f,g=0;d=b>>13;a.Oa&a.sc[a.C]||(d&=7);e=a.U[a.C][d];f=(a.ta[a.C][d]<<6)+(b&8191)&a.bb;if(f<a.ya)f&1&&!(c&1)&&(a.aa|=64,a.fa(4,10));else if(a.Oa&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var h=f>>13&31;31>h?a.Oa&32&&(f=a.uc[h]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.ya&&4186112>f&&(a.aa|=32,a.fa(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& function Ld(a,b,c){var d,e,f,g=0;d=b>>13;a.Pa&a.sc[a.w]||(d&=7);e=a.T[a.w][d];f=(a.sa[a.w][d]<<6)+(b&8191)&a.qb;if(f<a.Aa)f&1&&!(c&1)&&(a.aa|=64,a.ga(4,10));else if(a.Pa&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var h=f>>13&31;31>h?a.Pa&32&&(f=a.uc[h]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Aa&&4186112>f&&(a.aa|=32,a.ga(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.U[a.C][d]=e;if(4194170!==f||a.C)a.wa=a.C,a.xa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.fa(168,16)),a.F&61440||!(4191360>f||4194239<f)||(a.F|=4096,a.F&512&&(a.G|=32)));return f}function Md(a,b){return a.w.rb(b)}function Nd(a,b,c){b&1&&a.b--;a.w.Ib(b,c&255)}function Kd(a){var b=a.oa(a.u[6]|a.M);a.u[6]=a.u[6]+2&65535;return b} 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.T[a.w][d]=e;if(4194170!==f||a.w)a.wa=a.w,a.za=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.D&57344||(a.D=a.D|g|a.wa<<5|a.za<<1),a.ga(168,16)),a.D&61440||!(4191360>f||4194239<f)||(a.D|=4096,a.D&512&&(a.G|=32)));return f}function Md(a,b){return a.A.sb(b)}function Nd(a,b,c){b&1&&a.b--;a.A.Gb(b,c&255)}function Kd(a){var b=a.oa(a.u[6]|a.M);a.u[6]=a.u[6]+2&65535;return b}
function Id(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.F&57344||(a.Na=a.Na<<8|246);!a.C&&c<=a.Pa&&4<c&&(c<=a.Pa-32?(a.aa|=4,a.u[6]=4,a.fa(4,18)):(a.aa|=8,a.G|=4));a.yb(c,b)} function Id(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.D&57344||(a.Oa=a.Oa<<8|246);!a.w&&c<=a.Qa&&4<c&&(c<=a.Qa-32?(a.aa|=4,a.u[6]=4,a.ga(4,18)):(a.aa|=8,a.G|=4));a.yb(c,b)}
function Od(a,b,c,d){var e,f,g=d&8?0:a.M;switch(b){case 0:return a.fa(4,20),0;case 1:return 6===c&&!a.C&&d&4&&(a.u[6]<=a.Pa||65534<=a.u[6])&&(a.u[6]<=a.Pa-32||65534<=a.u[6]?(a.aa|=4,a.u[6]=4,a.fa(4,22)):(a.aa|=8,a.G|=64)),a.b-=3,7===c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];7!==c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.oa(e)| function Od(a,b,c,d){var e,f,g=d&8?0:a.M;switch(b){case 0:return a.ga(4,20),0;case 1:return 6===c&&!a.w&&d&4&&(a.u[6]<=a.Qa||65534<=a.u[6])&&(a.u[6]<=a.Qa-32||65534<=a.u[6]?(a.aa|=4,a.u[6]=4,a.ga(4,22)):(a.aa|=8,a.G|=64)),a.b-=3,7===c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];7!==c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.oa(e)|
g;a.b-=8;break;case 6:return e=a.oa(Dd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.oa(Dd(a,2)),e=e+a.u[c]&65535,e=a.oa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Na=a.Na<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Pa||65534<=a.u[6])&&(a.u[6]<=a.Pa-32?(a.aa|=4,a.u[6]=4,a.fa(4,24)):(a.aa|=8,a.G|=64));return e}k.Db=function(a){if(!this.La)return this.w.Db(a);this.A++;a=Md(this,Ld(this,a,3));this.A--;return a}; g;a.b-=8;break;case 6:return e=a.oa(ld(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.oa(ld(a,2)),e=e+a.u[c]&65535,e=a.oa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.u[6]<=a.Qa||65534<=a.u[6])&&(a.u[6]<=a.Qa-32?(a.aa|=4,a.u[6]=4,a.ga(4,24)):(a.aa|=8,a.G|=64));return e}k.Db=function(a){if(!this.Ma)return this.A.Db(a);this.K++;a=Md(this,Ld(this,a,3));this.K--;return a};
k.fb=function(a){if(!this.La)return this.w.fb(a);this.A++;a=this.ec(Ld(this,a,2));this.A--;return a};k.Xa=function(a,b){this.La?(this.A++,Nd(this,Ld(this,a,5),b),this.A--):this.w.Xa(a,b)};k.Jb=function(a,b){this.La?(this.A++,this.kc(Ld(this,a,4),b),this.A--):this.w.Jb(a,b)};k.qc=function(a,b,c){return Od(this,a,b,c)};k.rc=function(a,b,c){return Ld(this,Od(this,a,b,c),c)};k.ec=function(a){return this.w.na(a)};k.cd=function(a){return this.w.na(Ld(this,a,2))};k.kc=function(a,b){this.w.Ya(a,b&65535)}; k.eb=function(a){if(!this.Ma)return this.A.eb(a);this.K++;a=this.ec(Ld(this,a,2));this.K--;return a};k.Xa=function(a,b){this.Ma?(this.K++,Nd(this,Ld(this,a,5),b),this.K--):this.A.Xa(a,b)};k.Hb=function(a,b){this.Ma?(this.K++,this.kc(Ld(this,a,4),b),this.K--):this.A.Hb(a,b)};k.qc=function(a,b,c){return Od(this,a,b,c)};k.rc=function(a,b,c){return Ld(this,Od(this,a,b,c),c)};k.ec=function(a){return this.A.na(a)};k.cd=function(a){return this.A.na(Ld(this,a,2))};k.kc=function(a,b){this.A.Ya(a,b&65535)};
k.Pd=function(a,b){this.w.Ya(Ld(this,a,4),b)};function Pd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Od(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.oa(d|c&a.M),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.va[a.L>>12&3];return c}function Qd(a,b,c,d){a.F&57344||(a.Na=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Od(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=Ld(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ya(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.va[a.L>>12&3]=d} k.Pd=function(a,b){this.A.Ya(Ld(this,a,4),b)};function Pd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Od(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.w=a.L>>12&3,c=a.oa(d|c&a.M),a.w=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.va[a.L>>12&3];return c}function Qd(a,b,c,d){a.D&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Od(a,b,e,4),c&65536||(e&=65535),a.w=a.L>>12&3,e=Ld(a,e|c&65536,4),a.w=a.L>>14&3,a.A.Ya(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.va[a.L>>12&3]=d}
function Rd(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Sd(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?a.w.na(a.$(b,c,2)):a.u[c]}function Td(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Od(a,b,c,8)}function Ud(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Vd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.na(a.$(b,c,2)):a.u[c]} function Rd(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Sd(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.A.na(a.$(b,c,2)):a.u[c]}function Td(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Od(a,b,c,8)}function Ud(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Vd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.A.na(a.$(b,c,2)):a.u[c]}
function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.$a=a.$(b,e,7),Nd(a,e,d.call(a,c,Md(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.$(b,e,6),a.w.Ya(e,d.call(a,c,a.w.na(e)))):a.u[e]=d.call(a,c,a.u[e])}function Wd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Nd(a,a.$(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.Ya(a.$(b,d,4),c):a.u[d]=c&65535;return c} function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.$a=a.$(b,e,7),Nd(a,e,d.call(a,c,Md(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.$(b,e,6),a.A.Ya(e,d.call(a,c,a.A.na(e)))):a.u[e]=d.call(a,c,a.u[e])}function Wd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Nd(a,a.$(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.A.Ya(a.$(b,d,4),c):a.u[d]=c&65535;return c}
function S(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} function S(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
k.nb=function(a){this.v.complete=!0;var b=this.v.oc=this.i&&Yd(this.i),c=a?this.v.Rb?0:1:-1;this.v.Rb=!1;this.X=this.b=a;do{if(b){if(Zd(this.i,this.u[7],c)){this.ca();break}c=1}if(this.G&&(this.G&112&&(this.G&32?this.fa(168,28):this.G&64?this.fa(4,30):this.G&16&&this.fa(12,32),this.G&=-113),this.G&7))if(this.G&2){this.G&=-3;var d=160,e=(this.Qb&224)>>5;if(a=this.P&&this.P.jb>e?this.P:null)d=a.jd,e=a.jb;e>(this.L&224)>>5?(this.G&4&&(Dd(this,2),this.G&=-5),this.fa(d,26),e=!0):e=!1;if(e&&a)if(e=this.P, k.nb=function(a){this.v.complete=!0;var b=this.v.oc=this.i&&Yd(this.i),c=a?this.v.Qb?0:1:-1;this.v.Qb=!1;this.Y=this.b=a;do{if(b){if(Zd(this.i,this.u[7],c)){this.ca();break}c=1}if(this.G&&(this.G&112&&(this.G&32?this.ga(168,28):this.G&64?this.ga(4,30):this.G&16&&this.ga(12,32),this.G&=-113),this.G&7))if(this.G&2){this.G&=-3;var d=160,e=(this.Pb&224)>>5;if(a=this.P&&this.P.ib>e?this.P:null)d=a.jd,e=a.ib;e>(this.L&224)>>5?(this.G&4&&(ld(this,2),this.G&=-5),this.ga(d,26),e=!0):e=!1;if(e&&a)if(e=this.P,
e==a)this.P=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.G&1&&this.G++;this.G=this.G&7|this.L&16;this.decode(jd(this))}while(0<this.b);return this.v.complete?this.X-this.b:void 0===this.v.complete?0:-1};Ta(function(){for(var a=B(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ad(d);A(d,c)}});function $d(a,b){var c=b+a;Fd(this,c,a,b);return c&65535}function ae(a,b){var c=b+a;Fd(this,c<<8,a<<8,b<<8);return c&255} e==a)this.P=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.G&1&&this.G++;this.G=this.G&7|this.L&16;this.decode(kd(this))}while(0<this.b);return this.v.complete?this.Y-this.b:void 0===this.v.complete?0:-1};Ta(function(){for(var a=C(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new bd(d);A(d,c)}});function $d(a,b){var c=b+a;Fd(this,c,a,b);return c&65535}function ae(a,b){var c=b+a;Fd(this,c<<8,a<<8,b<<8);return c&255}
function be(a,b){a=b<<1;Gd(this,a);return a&65535}function ce(a,b){a=b<<1;Gd(this,a<<8);return a&255}function de(a,b){a=b&32768|b>>1|b<<16;Gd(this,a);return a&65535}function ee(a,b){a=b&2048|b>>1|b<<8;Gd(this,a<<8);return a&255}function fe(a,b){a=b&~a;P(this,a);return a}function ge(a,b){a=b&~a;P(this,a<<8);return a}function he(a,b){a|=b;P(this,a);return a}function ie(a,b){a|=b;P(this,a<<8);return a}function je(a,b){a=~b|65536;Ed(this,a);return a&65535} function be(a,b){a=b<<1;Gd(this,a);return a&65535}function ce(a,b){a=b<<1;Gd(this,a<<8);return a&255}function de(a,b){a=b&32768|b>>1|b<<16;Gd(this,a);return a&65535}function ee(a,b){a=b&2048|b>>1|b<<8;Gd(this,a<<8);return a&255}function fe(a,b){a=b&~a;P(this,a);return a}function ge(a,b){a=b&~a;P(this,a<<8);return a}function he(a,b){a|=b;P(this,a);return a}function ie(a,b){a|=b;P(this,a<<8);return a}function je(a,b){a=~b|65536;Ed(this,a);return a&65535}
function ke(a,b){a=~b|256;Ed(this,a<<8);return a&255}function le(a,b){a=b-a;this.G&128||(this.V=this.Z=a,this.T=b&(b^a));return a&65535}function me(a,b){a=b-a;var c=a<<8;b<<=8;this.G&128||(this.V=this.Z=c,this.T=b&(b^c));return a&255}function ne(a,b){a=b+a;this.G&128||(this.V=this.Z=a,this.T=a&(b^a));return a&65535}function oe(a,b){a=b+a;var c=a<<8;this.G&128||(this.V=this.Z=c,this.T=c&(b<<8^c));return a&255}function pe(a,b){a=-b;Ed(this,a,a&b&32768);return a&65535} function ke(a,b){a=~b|256;Ed(this,a<<8);return a&255}function le(a,b){a=b-a;this.G&128||(this.W=this.Z=a,this.S=b&(b^a));return a&65535}function me(a,b){a=b-a;var c=a<<8;b<<=8;this.G&128||(this.W=this.Z=c,this.S=b&(b^c));return a&255}function ne(a,b){a=b+a;this.G&128||(this.W=this.Z=a,this.S=a&(b^a));return a&65535}function oe(a,b){a=b+a;var c=a<<8;this.G&128||(this.W=this.Z=c,this.S=c&(b<<8^c));return a&255}function pe(a,b){a=-b;Ed(this,a,a&b&32768);return a&65535}
function qe(a,b){a=-b;Ed(this,a<<8,(a&b&128)<<8);return a&255}function re(a,b){a=b<<1|this.S>>16&1;Gd(this,a);return a&65535}function se(a,b){a=b<<1|this.S>>16&1;Gd(this,a<<8);return a&255}function te(a,b){a=(this.S&65536|b)>>1|b<<16;Gd(this,a);return a&65535}function ue(a,b){a=((this.S&65536)>>8|b)>>1|b<<8;Gd(this,a<<8);return a&255}function ve(a,b){var c=b-a;Hd(this,c,a,b);return c&65535}function we(a,b){var c=b-a;Hd(this,c<<8,a<<8,b<<8);return c&255} function qe(a,b){a=-b;Ed(this,a<<8,(a&b&128)<<8);return a&255}function re(a,b){a=b<<1|this.R>>16&1;Gd(this,a);return a&65535}function se(a,b){a=b<<1|this.R>>16&1;Gd(this,a<<8);return a&255}function te(a,b){a=(this.R&65536|b)>>1|b<<16;Gd(this,a);return a&65535}function ue(a,b){a=((this.R&65536)>>8|b)>>1|b<<8;Gd(this,a<<8);return a&255}function ve(a,b){var c=b-a;Hd(this,c,a,b);return c&65535}function we(a,b){var c=b-a;Hd(this,c<<8,a<<8,b<<8);return c&255}
function xe(a,b){this.G&128||(this.V=this.Z=b&65280,this.T=this.S=0);return(b<<8|b>>8)&65535}function ye(a,b){a^=b;P(this,a);return a&65535}function ze(a){R(this,a,Sd(this,a),$d);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function xe(a,b){this.G&128||(this.W=this.Z=b&65280,this.S=this.R=0);return(b<<8|b>>8)&65535}function ye(a,b){a^=b;P(this,a);return a&65535}function ze(a){R(this,a,Sd(this,a),$d);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
function Ae(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.S=this.T=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.S=c<<17-b,c>>=b;else if(b)if(16<b)this.T=c,c=0;else{this.S=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.T=32768)}this.u[a]=c&65535;this.V=this.Z=c;this.b-=(this.g?6:7)+b} function Ae(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.R=this.S=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.R=c<<17-b,c>>=b;else if(b)if(16<b)this.S=c,c=0;else{this.R=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.S=32768)}this.u[a]=c&65535;this.W=this.Z=c;this.b-=(this.g?6:7)+b}
function Be(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.S=this.T=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.S=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.S=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.T=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.V=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function Ce(a){S(this,a,!gd(this))}function De(a){S(this,a,gd(this))} function Be(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.R=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.R=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.S=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.W=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function Ce(a){S(this,a,!hd(this))}function De(a){S(this,a,hd(this))}
function Ee(a){R(this,a,Sd(this,a),fe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Rd(this,a),ge);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ge(a){R(this,a,Sd(this,a),he);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function He(a){Q(this,a,Rd(this,a),ie);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function Ee(a){R(this,a,Sd(this,a),fe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Rd(this,a),ge);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ge(a){R(this,a,Sd(this,a),he);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function He(a){Q(this,a,Rd(this,a),ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
function Ie(a){P(this,Sd(this,a)&Vd(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Je(a){P(this,(Rd(this,a)&Ud(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ke(a){S(this,a,id(this))}function Le(a){S(this,a,!this.Da()==!hd(this))}function Me(a){S(this,a,!id(this)&&!this.Da()==!hd(this))}function Ne(a){S(this,a,!gd(this)&&!id(this))}function Oe(a){S(this,a,id(this)||!this.Da()!=!hd(this))} function Ie(a){P(this,Sd(this,a)&Vd(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Je(a){P(this,(Rd(this,a)&Ud(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ke(a){S(this,a,jd(this))}function Le(a){S(this,a,!this.Ea()==!id(this))}function Me(a){S(this,a,!jd(this)&&!this.Ea()==!id(this))}function Ne(a){S(this,a,!hd(this)&&!jd(this))}function Oe(a){S(this,a,jd(this)||!this.Ea()!=!id(this))}
function Pe(a){S(this,a,gd(this)||id(this))}function Qe(a){S(this,a,!this.Da()!=!hd(this))}function Re(a){S(this,a,this.Da())}function Se(a){S(this,a,!id(this))}function Te(a){S(this,a,!this.Da())}function Ue(){this.fa(12,1);this.b-=5}function Ve(a){S(this,a,!0)}function We(a){S(this,a,!hd(this))}function Xe(a){S(this,a,hd(this))}function T(a){a&1&&(this.S=0);a&2&&(this.T=0);a&4&&(this.Z=1);a&8&&(this.V=0);this.b-=5} function Pe(a){S(this,a,hd(this)||jd(this))}function Qe(a){S(this,a,!this.Ea()!=!id(this))}function Re(a){S(this,a,this.Ea())}function Se(a){S(this,a,!jd(this))}function Te(a){S(this,a,!this.Ea())}function Ue(){this.ga(12,1);this.b-=5}function Ve(a){S(this,a,!0)}function We(a){S(this,a,!id(this))}function Xe(a){S(this,a,id(this))}function T(a){a&1&&(this.R=0);a&2&&(this.S=0);a&4&&(this.Z=1);a&8&&(this.W=0);this.b-=5}
function Ye(a){var b=Sd(this,a);a=Vd(this,a);Hd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ze(a){var b=Rd(this,a)<<8;a=Ud(this,a)<<8;Hd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} function Ye(a){var b=Sd(this,a);a=Vd(this,a);Hd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ze(a){var b=Rd(this,a)<<8;a=Ud(this,a)<<8;Hd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
function $e(a){var b=Vd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.S=this.T=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.Z=d>>16|d,this.V=d>>16):(this.T=32768,this.Z=d>>15|d,this.V=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.V=0,this.T=32768,this.S=65536,this.b-=7}function af(){this.fa(24,2);this.b-=25} function $e(a){var b=Vd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=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.Z=d>>16|d,this.W=d>>16):(this.S=32768,this.Z=d>>15|d,this.W=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.W=0,this.S=32768,this.R=65536,this.b-=7}function af(){this.ga(24,2);this.b-=25}
function bf(){this.L&49152?(this.aa|=128,this.fa(4,3)):this.i?$b(this.i):this.ca();this.b-=7}function cf(){this.fa(16,4);this.b-=25}var df=[0,7,7,10,7,11,9,13];function ef(a){var b=this.b;N(this,Td(this,a));this.b=b-df[this.g]}var ff=[0,14,14,17,14,18,16,20];function gf(a){var b=this.b,c=Td(this,a);a=a>>6&7;Id(this,this.u[a]);this.u[a]=this.u[7];N(this,c);this.b=b-ff[this.g]}var hf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function bf(){this.L&49152?(this.aa|=128,this.ga(4,3)):this.i?$b(this.i):this.ca();this.b-=7}function cf(){this.ga(16,4);this.b-=25}var df=[0,7,7,10,7,11,9,13];function ef(a){var b=this.b;N(this,Td(this,a));this.b=b-df[this.g]}var ff=[0,14,14,17,14,18,16,20];function gf(a){var b=this.b,c=Td(this,a);a=a>>6&7;Id(this,this.u[a]);this.u[a]=this.u[7];N(this,c);this.b=b-ff[this.g]}var hf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
function jf(a){var b=Sd(this,a),c=this.b;P(this,Xd(this,a,b));this.b=c-hf[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)}function kf(a){var b=Rd(this,a);P(this,Wd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var lf=[7,13,13,17,14,18,17,21]; function jf(a){var b=Sd(this,a),c=this.b;P(this,Xd(this,a,b));this.b=c-hf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function kf(a){var b=Rd(this,a);P(this,Wd(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var lf=[7,13,13,17,14,18,17,21];
function mf(a){var b=Vd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.G&128||(this.V=b>>16,this.Z=this.V|b,this.T=0,this.S=-32768>b||32767<b?65536:0);this.b-=23}function nf(){this.b-=5}function of(){this.L&49152||(ed(this),this.w.reset());this.b-=667}function pf(){Jd(this);this.G|=this.L&16;this.b-=13}function qf(a){if(a&8)V.call(this,a);else{var b=Kd(this);a&=7;N(this,this.u[a]);this.u[a]=b;this.b-=9}} function mf(a){var b=Vd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.G&128||(this.W=b>>16,this.Z=this.W|b,this.S=0,this.R=-32768>b||32767<b?65536:0);this.b-=23}function nf(){this.b-=5}function of(){this.L&49152||(fd(this),this.A.reset());this.b-=667}function pf(){Jd(this);this.G|=this.L&16;this.b-=13}
function W(a){a&1&&(this.S=65536);a&2&&(this.T=32768);a&4&&(this.Z=0);a&8&&(this.V=32768);this.b-=5}function rf(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function sf(a){R(this,a,Sd(this,a),ve);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function tf(a){R(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)}function uf(){this.fa(28,5);this.b-=5}function vf(){this.G&4||this.D.ba();this.G|=4;Dd(this,-2);this.b-=3} function qf(a){if(a&8)U.call(this,a);else{var b=Kd(this);a&=7;7==a?N(this,b):(N(this,this.u[a]),this.u[a]=b);this.b-=9}}function W(a){a&1&&(this.R=65536);a&2&&(this.S=32768);a&4&&(this.Z=0);a&8&&(this.W=32768);this.b-=5}function rf(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function sf(a){R(this,a,Sd(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
function wf(a){R(this,a,Sd(this,a),ye);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,C(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.fa(8,6)}function bd(a){xf[a>>12].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)}function Af(a){Bf[a>>6&3].call(this,a)}function Cf(a){Df[a>>6&3].call(this,a)}function Ef(a){Ff[a&15].call(this,a)}function Gf(a){Hf[a&15].call(this,a)}function If(a){Jf[a>>6&3].call(this,a)}function Kf(a){Lf[a>>6&3].call(this,a)} function tf(a){R(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)}function uf(){this.ga(28,5);this.b-=5}function vf(){this.G&4||this.B.ba();this.G|=4;ld(this,-2);this.b-=3}function wf(a){R(this,a,Sd(this,a),ye);this.b-=this.g?9:3+(7==this.f?2:0)}function U(a){var b;if(b=this.i)b=this.i,D(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ga(8,6)}function cd(a){xf[a>>12].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)}function Af(a){Bf[a>>6&3].call(this,a)}
function Mf(a){Nf[a>>6&3].call(this,a)} function Cf(a){Df[a>>6&3].call(this,a)}function Ef(a){Ff[a&15].call(this,a)}function Gf(a){Hf[a&15].call(this,a)}function If(a){Jf[a>>6&3].call(this,a)}function Kf(a){Lf[a>>6&3].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}
var xf=[function(a){Of[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,V,function(a){Pf[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,V],Of=[function(a){Qf[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,V,V,V],zf=[function(a){Ed(this,Xd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.g?9:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0, var xf=[function(a){Of[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,U,function(a){Pf[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,U],Of=[function(a){Qf[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,U,U,U],zf=[function(a){Ed(this,Xd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.g?9:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0,
pe);this.b-=this.g?11:6},function(a){R(this,a,gd(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,gd(this)?1:0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Vd(this,a);Ed(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Df=[function(a){R(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)}], pe);this.b-=this.g?11:6},function(a){R(this,a,hd(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,hd(this)?1:0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Vd(this,a);Ed(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Df=[function(a){R(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)}],
Qf=[function(a){Rf[a&15].call(this,a)},V,V,V,ef,ef,ef,ef,qf,V,Ef,Gf,tf,tf,tf,tf],Rf=[bf,vf,pf,Ue,cf,of,V,V,V,V,V,V,V,V,V,V],Ff=[nf,function(){this.S=0;this.b-=5},function(){this.T=0;this.b-=5},T,function(){this.Z=1;this.b-=5},T,T,T,function(){this.V=0;this.b-=5},T,T,T,T,T,T,T],Hf=[nf,function(){this.S=65536;this.b-=5},function(){this.T=32768;this.b-=5},W,function(){this.Z=0;this.b-=5},W,W,W,function(){this.V=32768;this.b-=5},W,W,W,W,W,W,W],Pf=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,V,V,V],Jf=[function(a){Ed(this, Qf=[function(a){Rf[a&15].call(this,a)},U,U,U,ef,ef,ef,ef,qf,U,Ef,Gf,tf,tf,tf,tf],Rf=[bf,vf,pf,Ue,cf,of,U,U,U,U,U,U,U,U,U,U],Ff=[nf,function(){this.R=0;this.b-=5},function(){this.S=0;this.b-=5},T,function(){this.Z=1;this.b-=5},T,T,T,function(){this.W=0;this.b-=5},T,T,T,T,T,T,T],Hf=[nf,function(){this.R=65536;this.b-=5},function(){this.S=32768;this.b-=5},W,function(){this.Z=0;this.b-=5},W,W,W,function(){this.W=32768;this.b-=5},W,W,W,W,W,W,W],Pf=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,U,U,U],Jf=[function(a){Ed(this,
Wd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.g?9:3+(7==this.f?2:0)}],Lf=[function(a){Q(this,a,0,qe);this.b-=this.g?11:6},function(a){Q(this,a,gd(this)?1:0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,gd(this)?1:0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ud(this,a);Ed(this,a<<8);this.b-=this.g?4:3+(7== Wd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.g?9:3+(7==this.f?2:0)}],Lf=[function(a){Q(this,a,0,qe);this.b-=this.g?11:6},function(a){Q(this,a,hd(this)?1:0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,hd(this)?1:0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ud(this,a);Ed(this,a<<8);this.b-=this.g?4:3+(7==
this.f?2:0)}],Nf=[function(a){Q(this,a,0,ue);this.b-=this.g?9+(this.$a&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ee);this.b-=this.g?9+(this.$a&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)}];function cd(a){kg[a>>12].call(this,a)} this.f?2:0)}],Nf=[function(a){Q(this,a,0,ue);this.b-=this.g?9+(this.$a&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ee);this.b-=this.g?9+(this.$a&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)}];function dd(a){Sf[a>>12].call(this,a)}
var kg=[function(a){lg[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,V],lg=[function(a){og[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.oa(a|this.M);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Pd(this,a,0);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this),c= var Sf=[function(a){lg[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,U],lg=[function(a){og[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,function(a){pg[a>>6&3].call(this,a)},U,U],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.oa(a|this.M);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Pd(this,a,0);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this),c=
this.b;Qd(this,a,0,b);P(this,b);this.b=c-lf[this.g]},function(a){P(this,Xd(this,a,this.Da?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,ef,ef,ef,ef,qf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.G|=1),this.b-=5):V.call(this,a)},Ef,Gf,tf,tf,tf,tf],qg=[bf,vf,pf,Ue,cf,of,function(){Jd(this);this.b-=13},V,V,V,V,V,V,V,V,V],mg=[mf,mf,$e,$e,Ae,Ae,Be,Be,wf,wf,V,V,V,V,rf,rf],ng=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,function(a){rg[a>>6&3].call(this, this.b;Qd(this,a,0,b);P(this,b);this.b=c-lf[this.g]},function(a){P(this,Xd(this,a,this.Ea?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},U,U,U,ef,ef,ef,ef,qf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.G|=1),this.b-=5):U.call(this,a)},Ef,Gf,tf,tf,tf,tf],qg=[bf,vf,pf,Ue,cf,of,function(){Jd(this);this.b-=13},U,U,U,U,U,U,U,U,U],mg=[mf,mf,$e,$e,Ae,Ae,Be,Be,wf,wf,U,U,U,U,rf,rf],ng=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,function(a){rg[a>>6&3].call(this,
a)},V,V],rg=[V,function(a){a=Pd(this,a,65536);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this),c=this.b;Qd(this,a,65536,b);P(this,b);this.b=c-lf[this.g]},V]; a)},U,U],rg=[U,function(a){a=Pd(this,a,65536);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this),c=this.b;Qd(this,a,65536,b);P(this,b);this.b=c-lf[this.g]},U];
function sg(a){r.call(this,"ROM",a,sg);this.la=this.f=null;this.C=a.addr;this.g=a.size;this.A=a.alias;this.D=a.file;this.F=oa(this.D);if(this.D){a=this.D;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.D+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ka("Unable to load ROM resource (error "+f+": "+a+")"):(jb(c.Ra,a,b),(a=Ca(a,b))?(c.f=a.ia,c.la=a.la):c.D=null,tg(c))})}}u(sg);sg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)}; function sg(a){r.call(this,"ROM",a,sg);this.fa=this.f=null;this.D=a.addr;this.g=a.size;this.w=a.alias;this.B=a.file;this.F=oa(this.B);if(this.B){a=this.B;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ia("Unable to load ROM resource (error "+f+": "+a+")"):(jb(c.Sa,a,b),(a=Ca(a,b))?(c.f=a.ka,c.fa=a.fa):c.B=null,tg(c))})}}u(sg);sg.prototype.Ca=function(a,b,c,d){this.A=b;this.b=c;this.i=d;tg(this)};
sg.prototype.Aa=function(){if(this.la){if(this.i){var a=this.i,b=this.id,c=this.C,d=this.g,e=this.la,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var m=h.o,p=h.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=ya(q,m,a.Wb);0>v&&q.splice(-(v+1),0,m)}p&&(h.a=p.replace(/''/g,'"'))}a.F.push({Ud:b,B:c,vc:d,la:e,Vb:f})}delete this.la}return!0};sg.prototype.za=function(){return!0}; sg.prototype.ya=function(){this.fa&&(this.i&&ug(this.i,this.id,this.D,this.g,this.fa),delete this.fa);return!0};sg.prototype.xa=function(){return!0};
function tg(a){if(!pb(a)){if(a.D){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)rb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(Yb(a.w,b,a.g,Cc)){var c;for(c=0;c<a.f.length;c++)a.w.Xa(b+c,a.f[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.A?b.push(a.A):null!=a.A&&a.A.length&&(b=a.A);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Xb(d.w,d.C,d.g);Wb(d.w,e,d.g,f)}delete a.f}}}H(a)}} function tg(a){if(!pb(a)){if(a.B){if(!a.f||!a.A)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)rb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.D;if(Yb(a.A,b,a.g,Dc)){var c;for(c=0;c<a.f.length;c++)a.A.Xa(b+c,a.f[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.w?b.push(a.w):null!=a.w&&a.w.length&&(b=a.w);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Xb(d.A,d.D,d.g);Wb(d.A,e,d.g,f)}delete a.f}}}H(a)}}
Ta(function(){for(var a=B(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new sg(d);A(d,c)}}); Ta(function(){for(var a=C(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new sg(d);A(d,c)}});
function ug(a){r.call(this,"RAM",a,ug);this.la=this.g=null;this.A=a.addr;this.C=a.size;this.Ua=a.load;this.Ta=a.exec;this.D=!1;this.f=a.file;this.F=oa(this.f);if(this.f){a=this.f;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ka("Unable to load RAM resource (error "+f+": "+a+")"):(jb(c.Ra,a,b),(a=Ca(a,b))?(c.g=a.ia,c.la=a.la,null==c.Ua&&(c.Ua=a.Ua),null==c.Ta&&(c.Ta=a.Ta)):c.f=null,vg(c))})}}u(ug); function vg(a){r.call(this,"RAM",a,vg);this.fa=this.g=null;this.B=a.addr;this.D=a.size;this.Ia=a.load;this.Ha=a.exec;this.w=!1;this.f=a.file;this.F=oa(this.f);if(this.f){a=this.f;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ia("Unable to load RAM resource (error "+f+": "+a+")"):(jb(c.Sa,a,b),(a=Ca(a,b))?(c.g=a.ka,c.fa=a.fa,null==c.Ia&&(c.Ia=a.Ia),null==c.Ha&&(c.Ha=a.Ha)):c.f=null,wg(c))})}}u(vg);
ug.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;vg(this)};ug.prototype.Aa=function(){return!0};ug.prototype.za=function(){return!0};function vg(a){if(a.w&&(!a.D&&a.C&&Yb(a.w,a.A,a.C,1)&&(a.D=!0),!pb(a))){if(!a.D)n("No RAM allocated");else if(a.f){if(!a.g||!a.w)return;wg(a,a.g,a.Ua,a.Ta,a.A);delete a.g}H(a)}}ug.prototype.reset=function(){}; vg.prototype.Ca=function(a,b,c,d){this.A=b;this.b=c;this.i=d;wg(this)};vg.prototype.ya=function(){this.fa&&(this.i&&ug(this.i,this.id,this.B,this.D,this.fa),delete this.fa);return!0};vg.prototype.xa=function(){return!0};function wg(a){if(a.A&&(!a.w&&a.D&&Yb(a.A,a.B,a.D,1)&&(a.w=!0),!pb(a))){if(!a.w)n("No RAM allocated");else if(a.f){if(!a.g||!a.A)return;xg(a,a.g,a.Ia,a.Ha,a.B)}H(a)}}
function wg(a,b,c,d,e){var f=!1;if(null==c)for(var g=0;g<b.length-1;){var h=b[g]&255|(b[g+1]&255)<<8;if(h)if(h&255){if(1!=h)break;if(g+6>=b.length)break;for(var g=g+2,m=b[g++]&255|(b[g++]&255)<<8,p=b[g++]&255|(b[g++]&255)<<8,h=h+((m&255)+(m>>8)+(p&255)+(p>>8)),q=g,v=m-=6;0<m&&g<b.length;)h+=b[g++]&255,m--;if(m||g>=b.length)break;h+=b[g++]&255;if(h&255)break;if(v)for(;v--;)a.b.Xa(p++,b[q++]&255);else p&1?a.b.ca():fd(a.b,p);f=!0}else g++;else g+=2}if(!f&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)a.b.Xa(c+ vg.prototype.reset=function(){if(this.w){for(var a=this.A,b=this.B,c=this.D,d=b&a.A,b=b>>>a.ha;0<c&&b<a.V.length;){var e=a.V[b],f=c,g,d=d||0;void 0===f&&(f=e.size);if(sb)for(g=d;f--&&g<e.f.length;g++)e.f[g]=0;else for(g=d;f--&&g<e.size;g++)e.Jb(d,0,e.C+d);c-=a.ta;b++;d=0}this.g&&xg(this,this.g,this.Ia,this.Ha,this.B,!0)}};
e,b[e]);null!=d&&fd(a.b,d);f=!0}return f}Ta(function(){for(var a=B(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ug(d);A(d,c)}});function xg(a){r.call(this,"Keyboard",a,xg,65536);H(this)}u(xg);xg.prototype.ra=function(){return!1};xg.prototype.Ca=function(a,b,c,d){this.D=a;this.b=c;this.i=d};Ta(function(){for(var a=B(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new xg(d);A(d,c)}}); function xg(a,b,c,d,e,f){var g=!1;if(null==c)for(var h=0;h<b.length-1;){var m=b[h]&255|(b[h+1]&255)<<8;if(m)if(m&255){if(1!=m)break;if(h+6>=b.length)break;for(var h=h+2,p=b[h++]&255|(b[h++]&255)<<8,q=b[h++]&255|(b[h++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),v=h,w=p-=6;0<p&&h<b.length;)m+=b[h++]&255,p--;if(p||h>=b.length)break;m+=b[h++]&255;if(m&255)break;if(w)for(;w--;)a.b.Xa(q++,b[v++]&255);else q&1?a.b.ca():gd(a.b,q,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)a.b.Xa(c+
function X(a){this.M=a.baudReceive||9600;this.O=a.baudTransmit||9600;this.A=this.F=null;this.R=a.tabSize;this.N=a.charBOL;this.H=0;r.call(this,"SerialPort",a,X,8388608);var b=a.binding;if("console"==b)this.F="";else{var c;a=yg;b&&(void 0===c&&(c="Panel"),(c=mb(c,this.id))&&(b=c.I[b])&&this.ra(null,a,b))}this.J=this.K=null;this.exports={connect:this.cc,receiveData:this.Pb}}u(X);var yg="buffer";k=X.prototype; e,b[e]);null!=d&&gd(a.b,d,f);g=!0}return g}Ta(function(){for(var a=C(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new vg(d);A(d,c)}});function yg(a){r.call(this,"Keyboard",a,yg,65536);H(this)}u(yg);yg.prototype.qa=function(){return!1};yg.prototype.Ca=function(a,b,c,d){this.B=a;this.b=c;this.i=d};Ta(function(){for(var a=C(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new yg(d);A(d,c)}});
k.ra=function(a,b,c){var d=this;switch(b){case yg:return this.I[b]=this.A=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Pb(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Pb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1}; function X(a){this.M=a.baudReceive||9600;this.O=a.baudTransmit||9600;this.w=this.F=null;this.U=a.tabSize;this.N=a.charBOL;this.H=0;r.call(this,"SerialPort",a,X,8388608);var b=a.binding;if("console"==b)this.F="";else{var c;a=zg;b&&(void 0===c&&(c="Panel"),(c=mb(c,this.id))&&(b=c.I[b])&&this.qa(null,a,b))}this.J=this.K=null;this.exports={connect:this.cc,receiveData:this.Ob}}u(X);var zg="buffer";k=X.prototype;
k.Ca=function(a,b,c,d){this.D=a;this.w=b;this.b=c;this.i=d;var e=this;this.da=kc(48,4);this.W=hc(this.b,function(){e.f&128||!e.C.length||(e.P=e.C.shift()&255,e.f|=128,e.f&64&&ic(e.b,e.da))});this.ha=kc(52,4);this.X=hc(this.b,function(){e.g|=128;e.g&64&&ic(e.b,e.ha)});ec(b,this,zg);H(this)}; k.qa=function(a,b,c){var d=this;switch(b){case zg:return this.I[b]=this.w=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Ob(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Ob(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
k.cc=function(){if(!this.J){var a=Pc(this.D,"connection");if(a){var b=a.split("->");if(2==b.length){var c=va(b[0]);if(c!=this.Za)return;b=va(b[1]);if(this.J=lb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.Ra+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Aa=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ca=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.i=d;var e=this;this.ea=kc(48,4);this.X=hc(this.b,function(){e.f&128||!e.D.length||(e.P=e.D.shift()&255,e.f|=128,e.f&64&&ic(e.b,e.ea))});this.la=kc(52,4);this.Y=hc(this.b,function(){e.g|=128;e.g&64&&ic(e.b,e.la)});ec(b,this,Ag);H(this)};
k.za=function(a){return a?this.save():!0};k.reset=function(){Ag(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Ag(this)};function Ag(a){a.P=0;a.f=0;a.g=128;a.C=[];return!0}k.Pb=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.C.push(a.charCodeAt(b));else this.C=this.C.concat(a);jc(this.b,this.W,1E3/Math.round(this.M/10));return!0};k.Sc=function(){return this.f&65534}; k.cc=function(){if(!this.J){var a=Qc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=va(b[0]);if(c!=this.Za)return;b=va(b[1]);if(this.J=lb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ya=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
k.Ed=function(a){this.f=this.f&-112|a&111};k.Rc=function(){this.f&=-129;0<this.C.length&&jc(this.b,this.W,1E3/Math.round(this.M/10));return this.P};k.Dd=function(){};k.ed=function(){return this.g};k.Rd=function(a){128==(this.g&192)&&a&64&&jc(this.b,this.X,1E3/Math.round(this.O/10));this.g=this.g&-70|a&69};k.dd=function(){return 0}; k.xa=function(a){return a?this.save():!0};k.reset=function(){Bg(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Bg(this)};function Bg(a){a.P=0;a.f=0;a.g=128;a.D=[];return!0}k.Ob=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.D.push(a.charCodeAt(b));else this.D=this.D.concat(a);jc(this.b,this.X,1E3/Math.round(this.M/10));return!0};k.Sc=function(){return this.f&65534};
k.Qd=function(a){if(a&=255){C(this,"transmitByte("+l(a,2,!0)+")");this.K&&this.K.call(this.J,a);if(this.A)if(13==a)this.H=0;else if(8==a)this.A.value=this.A.value.slice(0,-1),0<this.H&&this.H--;else{var b;b=(b=wa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.R||8,c=a-this.H%a,this.R&&(b=ua("",c)));this.N&&!this.H&&c&&(b=String.fromCharCode(this.N)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), k.Ed=function(a){this.f=this.f&-112|a&111};k.Rc=function(){this.f&=-129;0<this.D.length&&jc(this.b,this.X,1E3/Math.round(this.M/10));return this.P};k.Dd=function(){};k.ed=function(){return this.g};k.Rd=function(a){128==(this.g&192)&&a&64&&jc(this.b,this.Y,1E3/Math.round(this.O/10));this.g=this.g&-70|a&69};k.dd=function(){return 0};
this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;jc(this.b,this.X,1E3/Math.round(this.O/10))}};var Bg={},zg=(Bg[65392]=[null,null,X.prototype.Sc,X.prototype.Ed,"RCSR"],Bg[65394]=[null,null,X.prototype.Rc,X.prototype.Dd,"RBUF"],Bg[65396]=[null,null,X.prototype.ed,X.prototype.Rd,"XCSR"],Bg[65398]=[null,null,X.prototype.dd,X.prototype.Qd,"XBUF"],Bg);Ta(function(){for(var a=B(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new X(d);A(d,c)}}); k.Qd=function(a){if(a&=255){D(this,"transmitByte("+l(a,2,!0)+")");this.K&&this.K.call(this.J,a);if(this.w)if(13==a)this.H=0;else if(8==a)this.w.value=this.w.value.slice(0,-1),0<this.H&&this.H--;else{var b;b=(b=wa[a])?"<"+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=ua("",c)));this.N&&!this.H&&c&&(b=String.fromCharCode(this.N)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F),
function wc(a){r.call(this,"PC11",a,wc);this.g=a.autoMount||null;this.C=0;this.W=a.baudReceive||3600;this.K=this.M=this.f=0;this.J=[];this.H=Cg;this.A=Dg;this.F="";this.O=-1;this.N=!La("Mobi")&&window&&"FileReader"in window}u(wc);var Cg="",Dg=0;k=wc.prototype; this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;jc(this.b,this.Y,1E3/Math.round(this.O/10))}};var Cg={},Ag=(Cg[65392]=[null,null,X.prototype.Sc,X.prototype.Ed,"RCSR"],Cg[65394]=[null,null,X.prototype.Rc,X.prototype.Dd,"RBUF"],Cg[65396]=[null,null,X.prototype.ed,X.prototype.Rd,"XCSR"],Cg[65398]=[null,null,X.prototype.dd,X.prototype.Qd,"XBUF"],Cg);Ta(function(){for(var a=C(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new X(d);A(d,c)}});
k.ra=function(a,b,c){var d=this,e=Dg;switch(b){case "listTapes":return this.I[b]=c,c.onchange=function(){var a=d.I.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(m){n("PC11 option error: "+m.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.I[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.I[b]=c,c.onclick= function xc(a){r.call(this,"PC11",a,xc);this.g=a.autoMount||null;this.D=0;this.X=a.baudReceive||3600;this.K=this.M=this.f=0;this.J=[];this.H=Dg;this.w=Eg;this.F="";this.O=-1;this.N=!La("Mobi")&&window&&"FileReader"in window}u(xc);var Dg="",Eg=0;k=xc.prototype;
function(){var a=d.I.listTapes;a&&Eg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.N){c.parentNode.removeChild(c);break}this.I[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Eg(d,oa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.I[b]=c,!0}return!1}; k.qa=function(a,b,c){var d=this,e=Eg;switch(b){case "listTapes":return this.I[b]=c,c.onchange=function(){var a=d.I.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(m){n("PC11 option error: "+m.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.I[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.I[b]=c,c.onclick=
k.Ca=function(a,b,c,d){this.D=a;this.w=b;this.b=c;this.i=d;this.P=Fg(a);var e=this;if((this.g=Pc(this.D,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){n("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.R=kc(56,4);this.X=hc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.J.length&&(e.M=e.J[e.K++]&255,Gg(e,e.K/e.J.length*100),e.f|=128,e.f&=-2049,e.f&64&&ic(e.b,e.R))});ec(b,this,Hg);Ig(this,"None",Cg,!0);this.N&&Ig(this,"Local Tape","?"); function(){var a=d.I.listTapes;a&&Fg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.N){c.parentNode.removeChild(c);break}this.I[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Fg(d,oa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.I[b]=c,!0}return!1};
Ig(this,"Remote Tape","??");Jg(this)||H(this)};k.Aa=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.za=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.M=0};function Jg(a){a.C=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.I.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=oa(b,!0)}b&&c?Kg(a,c,b,1,!0):Lg(a)}return!!a.C} k.Ca=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.i=d;this.P=Gg(a);var e=this;if((this.g=Qc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){n("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.U=kc(56,4);this.Y=hc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.J.length&&(e.M=e.J[e.K++]&255,Hg(e,e.K/e.J.length*100),e.f|=128,e.f&=-2049,e.f&64&&ic(e.b,e.U))});ec(b,this,Ig);Jg(this,"None",Dg,!0);this.N&&Jg(this,"Local Tape","?");
function Eg(a,b,c,d,e){if(c)if("?"==c)a.ka('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=oa(c);a.status("Attempting to load "+c+' as "'+b+'"');a.H="??"}else a.H=c;Kg(a,b,c,d,!1,e)}else Mg(a,!1)} Jg(this,"Remote Tape","??");Kg(this)||H(this)};k.ya=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.xa=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.M=0};function Kg(a){a.D=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.I.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=oa(b,!0)}b&&c?Lg(a,c,b,1,!0):Mg(a)}return!!a.D}
function Kg(a,b,c,d,e,f){var g=-1;if(a.F.toLowerCase()!=c.toLowerCase()||a.A!=d)g++,Mg(a,!0),a.v.Ia?a.ka("PC11 busy"):(e&&(a.C++,D(a)&&C(a,"auto-loading tape: "+b)),Ng(a,b,c,d,f)?g++:a.v.Ia=!0);g&&a.status(1==a.A?"tape attached":"tape loaded")} function Fg(a,b,c,d,e){if(c)if("?"==c)a.ia('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=oa(c);a.status("Attempting to load "+c+' as "'+b+'"');a.H="??"}else a.H=c;Lg(a,b,c,d,!1,e)}else Ng(a,!1)}
function Ng(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Og(a,b,c,d,e),a.H="?");Lg(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=pa(c),f="json"==e||"gz"==e?encodeURI(c):ra()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ba(f,null,!0,function(e,f,g){var h=0>g&&a.D&&!a.D.v.ga;g?a.ka('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(jb(a.Ra,e,f),(e=Ca(e,f))&&Og(a,b,c,d,e.ia,e.Ua, function Lg(a,b,c,d,e,f){var g=-1;if(a.F.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Ng(a,!0),a.v.Ja?a.ia("PC11 busy"):(e&&(a.D++,E(a)&&D(a,"auto-loading tape: "+b)),Og(a,b,c,d,f)?g++:a.v.Ja=!0);g&&a.status(1==a.w?"tape attached":"tape loaded")}
e.Ta));a.v.Ia=!1;a.C&&(a.C--,a.C||H(a));Lg(a)})}function Ig(a,b,c,d){if((a=a.I.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}} function Og(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Pg(a,b,c,d,e),a.H="?");Mg(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=pa(c),f="json"==e||"gz"==e?encodeURI(c):ra()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ba(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.v.ja;g?a.ia('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(jb(a.Sa,e,f),(e=Ca(e,f))&&Pg(a,b,c,d,e.ka,e.Ia,
function Lg(a){var b=a.I.listTapes;if(b&&b.options){a=a.H||a.F;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function Gg(a,b){b|=0;if(b!==a.O){var c=a.I.readProgress;c&&(c=(c=B(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.O=b}} e.Ha));a.v.Ja=!1;a.D&&(a.D--,a.D||H(a));Mg(a)})}function Jg(a,b,c,d){if((a=a.I.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
function Og(a,b,c,d,e,f,g){a.F=c;a.A=d;2==d?a.P&&wg(a.P,e,f,g)?a.status("tape loaded: "+b):(a.F="",a.H=Cg,a.A=Dg,a.status("error loading tape: "+b)):(a.K=0,a.J=e,a.status("tape attached: "+b),Gg(a,0))}function Mg(a,b){if(a.F||!1===b)a.F="",b||(a.A&&a.status(1==a.A?"tape detached":"tape unloaded"),a.H=Cg,a.A=Dg,Lg(a))}k.save=function(){return(new O(this)).data()};k.restore=function(){return!0};k.Lc=function(){return this.f&65534}; function Mg(a){var b=a.I.listTapes;if(b&&b.options){a=a.H||a.F;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function Hg(a,b){b|=0;if(b!==a.O){var c=a.I.readProgress;c&&(c=(c=C(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.O=b}}
k.xd=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&ic(this.b,this.R)):(this.f&=-129,this.f|=2048,this.M=0,jc(this.b,this.X,1E3/Math.round(this.W/10))));this.f=this.f&-66|a&65};k.Kc=function(){this.f&=-129;this.f|=2048;return this.M};k.wd=function(){};var Pg={},Hg=(Pg[65384]=[null,null,wc.prototype.Lc,wc.prototype.xd,"PRS"],Pg[65386]=[null,null,wc.prototype.Kc,wc.prototype.wd,"PRB"],Pg); function Pg(a,b,c,d,e,f,g){a.F=c;a.w=d;2==d?a.P&&xg(a.P,e,f,g)?a.status("tape loaded: "+b):(a.F="",a.H=Dg,a.w=Eg,a.ia("No load address available for tape: "+b)):(a.K=0,a.J=e,a.status("tape attached: "+b),Hg(a,0))}function Ng(a,b){if(a.F||!1===b)a.F="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.H=Dg,a.w=Eg,Mg(a))}k.save=function(){return(new O(this)).data()};k.restore=function(){return!0};k.Lc=function(){return this.f&65534};
function Qg(a){r.call(this,"Debugger",a,Qg);this.ha=a.base||16;this.ya=!1;this.N=this.xa=this.H=0;this.P=!1;this.A=-1;this.g=[];this.W={}}u(Qg);var Rg={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Qg.prototype.ac=function(){return-1};Qg.prototype.bc=function(){}; k.xd=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&ic(this.b,this.U)):(this.f&=-129,this.f|=2048,this.M=0,jc(this.b,this.Y,1E3/Math.round(this.X/10))));this.f=this.f&-66|a&65};k.Kc=function(){this.f&=-129;this.f|=2048;return this.M};k.wd=function(){};var Qg={},Ig=(Qg[65384]=[null,null,xc.prototype.Lc,xc.prototype.xd,"PRS"],Qg[65386]=[null,null,xc.prototype.Kc,xc.prototype.wd,"PRB"],Qg);
function Sg(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(va(b.substring(c,f))),c=f+1}}return a} function Rg(a){r.call(this,"Debugger",a,Rg);this.Y=a.base||16;this.wa=!1;this.J=0;this.O=!1;this.w=-1;this.g=[];this.U={}}u(Rg);var Sg={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Rg.prototype.Zb=function(){return-1};Rg.prototype.$b=function(){};
function Tg(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<<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;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?1:0;break;case "&":d=f&e;break; function Tg(a,b,c,d){if(c)if(b){0>a.w&&a.g.length&&(a.w=0);if(0>a.w||b!=a.g[a.w])a.g.splice(0,0,b),a.w=0;a.w--}else a.O?b="end":b=a.g[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(va(b.substring(c,f))),c=f+1}}return a}
function Ug(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<<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;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?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} 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 Ug(a,b,c){var d;if(b){b=Vg(a,b);for(var e=0,f=!1,g=b,h=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<p.length;){var q=p[e++],v=q.length,q=va(q);if(!q){f=!0;break}q=Wg(a,q,null,!1===c);if(void 0===q){f=!0;c=!1;break}h.push(q);if(e==p.length)break;var q=p[e++],w=q.length;m.length&&Rg[q]<Rg[m[m.length-1]]&&Tg(h,m,1);m.push(q);b=b.substr(v+w)}Tg(h,m)&&1==h.length||(f=!0);f?c&&a.j("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&Xg(a,null, function Vg(a,b,c){var d;if(b){b=Wg(a,b);for(var e=0,f=!1,g=b,h=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<p.length;){var q=p[e++],v=q.length,q=va(q);if(!q){f=!0;break}q=Xg(a,q,null,!1===c);if(void 0===q){f=!0;c=!1;break}h.push(q);if(e==p.length)break;var q=p[e++],w=q.length;m.length&&Sg[q]<Sg[m[m.length-1]]&&Ug(h,m,1);m.push(q);b=b.substr(v+w)}Ug(h,m)&&1==h.length||(f=!0);f?c&&a.j("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&Yg(a,null,
d))}return d}function Vg(a,b){for(var c,d=a.ya?"(":"{",e=a.ya?")":"}",f=new RegExp(a.ya?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=Ug(a,c[1]);b=b.replace(d+c[1]+e,null!=g?J(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.N-a.xa}if(null==d)break;b=b.replace(c[0],d.toString())}return b} d))}return d}function Wg(a,b){for(var c,d=a.wa?"(":"{",e=a.wa?")":"}",f=new RegExp(a.wa?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=Vg(a,c[1]);b=b.replace(d+c[1]+e,null!=g?J(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(a=b;b=a.match(/\$([a-z]+)/i);){c=null;switch(b[1].toLowerCase()){case "ops":c=0}if(null==c)break;a=a.replace(b[0],c.toString())}return a}
function Wg(a,b,c,d){var e;if(null!=b){e=a.ac(b);if(0<=e)e=a.bc(e);else if(e=a.W[b],null==e){e=b;var f=a.ha,g;if(e){f||(f=10);var h=e.charAt(0),m=0<e.indexOf(",");m&&(e=e.replace(/,/g,""));"#"==h?(f=8,h=null):"$"==h&&(f=16,h=null);null==h?e=e.substr(1):("0"==h&&(h=e.charAt(1),"b"==h&&m&&(f=2,h=null),"o"==h?(f=8,h=null):"x"==h&&(f=16,h=null)),null==h?e=e.substr(2):(h=e.charAt(e.length-1).toLowerCase(),"y"==h?(f=2,h=null):"."==h?(f=10,h=null):"h"==h&&(f=16,h=null),null==h&&(e=e.substr(0,e.length-1)))); function Xg(a,b,c,d){var e;if(null!=b){e=a.Zb(b);if(0<=e)e=a.$b(e);else if(e=a.U[b],null==e){e=b;var f=a.Y,g;if(e){f||(f=10);var h=e.charAt(0),m=0<e.indexOf(",");m&&(e=e.replace(/,/g,""));"#"==h?(f=8,h=null):"$"==h&&(f=16,h=null);null==h?e=e.substr(1):("0"==h&&(h=e.charAt(1),"b"==h&&m&&(f=2,h=null),"o"==h?(f=8,h=null):"x"==h&&(f=16,h=null)),null==h?e=e.substr(2):(h=e.charAt(e.length-1).toLowerCase(),"y"==h?(f=2,h=null):"."==h?(f=10,h=null):"h"==h&&(f=16,h=null),null==h&&(e=e.substr(0,e.length-1))));
var p,h=e;((m=f)&&10!=m?16==m?h.match(/^[0-9a-f]+$/i):8==m?h.match(/^[0-7]+$/):2==m&&h.match(/^[01]+$/):h.match(/^[0-9]+$/))&&!isNaN(p=parseInt(e,f))&&(g=p|0)}e=g}null!=e||d||a.j("invalid "+(c?c:"value")+": "+b)}else d||a.j("missing "+(c||"value"));return e} var p,h=e;((m=f)&&10!=m?16==m?h.match(/^[0-9a-f]+$/i):8==m?h.match(/^[0-7]+$/):2==m&&h.match(/^[01]+$/):h.match(/^[0-9]+$/))&&!isNaN(p=parseInt(e,f))&&(g=p|0)}e=g}null!=e||d||a.j("invalid "+(c?c:"value")+": "+b)}else d||a.j("missing "+(c||"value"));return e}
function Xg(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var m=d&255,p=8,q="";p?32<p&&(p=32):p=32;if(null==m||isNaN(m))for(;0<p--;)q="?"+q;else for(;0<p--;)q=(m&1?"1":"0")+q,m>>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Yg(a,b){if(b)return Xg(a,b,a.W[b]);var c=0;for(b in a.W)Xg(a,b,a.W[b]),c++;return 0<c} function Yg(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var m=d&255,p=8,q="";p?32<p&&(p=32):p=32;if(null==m||isNaN(m))for(;0<p--;)q="?"+q;else for(;0<p--;)q=(m&1?"1":"0")+q,m>>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Zg(a,b){if(b)return Yg(a,b,a.U[b]);var c=0;for(b in a.U)Yg(a,b,a.U[b]),c++;return 0<c}
function J(a,b,c,d){switch(a.ha){case 8:a=na(b,3*c);break;case 10:a=b.toString();break;default:a=l(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d} function J(a,b,c,d){switch(a.Y){case 8:a=na(b,3*c);break;case 10:a=b.toString();break;default:a=l(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d}
function Zg(a){Qg.call(this,a);this.$a=!1;this.ya=!0;this.K=Z(0);this.Qa=Z(0);this.O=Z(0);this.F=[];this.f=this.M=this.C=[];$g(this);this.qa=0;ah(this);this.Fa={};bh(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Sc(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Sc(b,a)})}u(Zg,Qg); function $g(a){Rg.call(this,a);this.Ua=!1;this.wa=!0;this.K=Z(0);this.Ta=Z(0);this.N=Z(0);this.H=[];this.f=this.M=this.D=[];ah(this);this.la=0;bh(this);this.za={};ch(this,a.messages);this.Aa=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Tc(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Tc(b,a)})}u($g,Rg);
var ch={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},dh=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "), var dh={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},eh=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
eh={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096], fh={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],
33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106],35072:[107]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72, 33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,
63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},fh=[0],gh=[58,60,65,96, 63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},gh=[0],hh=
108,110,100,101,102,103,104,105,59,64];k=Zg.prototype; [58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=$g.prototype;
k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.D=a;(a=Pc(a,"messages"))&&bh(this,a);this.eb=eh;this.zb=1145>this.b.gb?gh:[];hh(this,function(a){a:{var b=d.w.Y,c=a[0],e=a=0,m=b.length;if(c){a=d.$(ih(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ja;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.j("..."):(c=q.type,p=bc[c],q&&d.j(l(q.id,8)+" %"+l(e<<d.w.ja, k.Ca=function(a,b,c,d){this.A=b;this.b=c;this.B=a;(a=Qc(a,"messages"))&&ch(this,a);this.bb=fh;this.qb=1145>this.b.fb?hh:[];ih(this,function(a){a:{var b=d.A.V,c=a[0],e=a=0,m=b.length;if(c){a=d.$(jh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.A.ha;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.j("..."):(c=q.type,p=bc[c],q&&d.j(l(q.id,8)+" %"+l(e<<d.A.ha,
8)+" %%"+l(q.B,8)+" "+l(q.xb,4,!0)+" "+l(q.size,4,!0)+" "+p),c!=Bc&&(c=-1),p=0);a+=d.w.ua;e++}}});H(this)}; 8)+" %%"+l(q.C,8)+" "+l(q.xb,4,!0)+" "+l(q.size,4,!0)+" "+p),c!=Cc&&(c=-1),p=0);a+=d.A.ta;e++}}});H(this)};
k.ra=function(a,b,c){var d=this;switch(b){case "debugInput":return this.pa=this.I[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Sc(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.g.length-1&&(b=d.g[++d.A])):40==a.keyCode&&(0<d.A?b=d.g[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.I[b]=c,Na(c,function(){if(d.pa){var a=d.pa.value; k.qa=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ea=this.I[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Tc(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.w<d.g.length-1&&(b=d.g[++d.w])):40==a.keyCode&&(0<d.w?b=d.g[--d.w]:(b="",d.w=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.I[b]=c,Na(c,function(){if(d.ea){var a=d.ea.value;
d.pa.value="";Sc(d,a,!0);return!0}return!1}),!0;case "step":return this.I[b]=c,Na(c,function(a){var b=!1;ob(d,!0)||(nb(d,!0),b=d.nb(a?1:0),nb(d,!1));return b}),!0}return!1};k.wb=function(){this.pa&&this.pa.focus()};k.$=function(a){a=a&&a.B;null==a&&(a=-1);return a};k.rb=function(a,b){var c=255,d=this.$(a,!1,1);-1!==d&&(c=a.Ab?this.w.Db(d):this.b.Db(d),b&&jh(a,b));return c};k.na=function(a,b){var c=65535,d=this.$(a,!1,2);-1!==d&&(c=a.Ab?this.w.fb(d):this.b.fb(d),b&&jh(a,b));return c}; d.ea.value="";Tc(d,a,!0);return!0}return!1}),!0;case "step":return this.I[b]=c,Na(c,function(a){var b=!1;ob(d,!0)||(nb(d,!0),b=d.nb(a?1:0),nb(d,!1));return b}),!0}return!1};k.lb=function(){this.ea&&this.ea.focus()};k.$=function(a){a=a&&a.C;null==a&&(a=-1);return a};k.sb=function(a,b){var c=255,d=this.$(a,!1,1);-1!==d&&(c=a.Ab?this.A.Db(d):this.b.Db(d),b&&kh(a,b));return c};k.na=function(a,b){var c=65535,d=this.$(a,!1,2);-1!==d&&(c=a.Ab?this.A.eb(d):this.b.eb(d),b&&kh(a,b));return c};
k.Ib=function(a,b,c){var d=this.$(a,!0,1);-1!==d&&(a.Ab?this.w.Xa(d,b):this.b.Xa(d,b),c&&jh(a,c),this.D.ba(!0))};k.Ya=function(a,b,c){var d=this.$(a,!0,2);-1!==d&&(a.Ab?this.w.Jb(d,b):this.b.Jb(d,b),c&&jh(a,c),this.D.ba(!0))};function Z(a,b){return{B:a,Ab:b,Ba:!1}}function kh(a){return[a.B,a.Ba]}function lh(a){return{B:a[0],Ba:a[1]}} k.Gb=function(a,b,c){var d=this.$(a,!0,1);-1!==d&&(a.Ab?this.A.Xa(d,b):this.b.Xa(d,b),c&&kh(a,c),this.B.ba(!0))};k.Ya=function(a,b,c){var d=this.$(a,!0,2);-1!==d&&(a.Ab?this.A.Hb(d,b):this.b.Hb(d,b),c&&kh(a,c),this.B.ba(!0))};function Z(a,b){return{C:a,Ab:b,Ba:!1}}function lh(a){return[a.C,a.Ba]}function mh(a){return{C:a[0],Ba:a[1]}}
function ih(a,b,c){var d,e=(c?a.K:a.Qa).B;c=!1;if(void 0!==b){b=Vg(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.F.length;e++){var g=a.F[e].la[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Z(d));break}}if(d=f)return d;e=Ug(a,b,void 0)}null!=e&&(d=Z(e,c));return d}function mh(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.lc=Sg(a,b.hc=c[2]))}function jh(a,b){null!=a.B&&(a.B+=b||1)} function jh(a,b,c){var d,e=(c?a.K:a.Ta).C;c=!1;if(void 0!==b){b=Wg(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.H.length;e++){var g=a.H[e].fa[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Z(d));break}}if(d=f)return d;e=Vg(a,b,void 0)}null!=e&&(d=Z(e,c));return d}function nh(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.lc=Tg(a,b.hc=c[2]))}function kh(a,b){null!=a.C&&(a.C+=b||1)}
function bh(a,b){a.i=a;a.ma=a.nc=536870912;a.sa=null;a.wa=[];b=Sg(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in tb){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ma|=tb[c],a.j(c+" messages enabled"))}}function hh(a,b){for(var c in tb)if(64==tb[c]){a.Fa[c]=b;break}} function ch(a,b){a.i=a;a.ma=a.nc=536870912;a.pa=null;a.ra=[];b=Tg(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in tb){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ma|=tb[c],a.j(c+" messages enabled"))}}function ih(a,b){for(var c in tb)if(64==tb[c]){a.za[c]=b;break}}
k.ac=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b)&&(b=-1)}return b};function nh(a){return 6>a?"R"+a:6==a?"SP":"PC"}k.bc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.va[a-16]:20==a&&(b=Lb(this.b)));return b}; k.Zb=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b)&&(b=-1)}return b};function oh(a){return 6>a?"R"+a:6==a?"SP":"PC"}k.$b=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Fa[a-8]:20>a?b=this.b.va[a-16]:20==a&&(b=Lb(this.b)));return b};
k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.vb).B));this.ma&1073741824?this.wa.push(a):this.sa&&a==this.sa||(this.sa=a,this.ma&-2147483648&&(this.ca(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,Yc(a),a.pa=0,a.D.ba()))}; k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.wb).C));this.ma&1073741824?this.ra.push(a):this.pa&&a==this.pa||(this.pa=a,this.ma&-2147483648&&(this.ca(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,Zc(a),a.pa=0,a.B.ba()))};function bh(a){var b;if(!Yd(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.X=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b<a.F.length;b++)a.F[b]=Z();a.X=0;a.j("instruction history buffer allocated")}}
function ah(a){var b;if(Yd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b<a.J.length;b++)a.J[b]=Z();a.da=0;a.j("instruction history buffer allocated")}if(!a.X||!a.X.length)for(a.X=Array(256),b=0;b<a.X.length;b++)a.X[b]=[b,0]}else a.J&&a.J.length&&a.j("instruction history buffer freed"),a.da=0,a.J=[],a.X=[]}k.mb=function(a,b){if(!oh(this,b))return!1;this.b.mb(a);return!0}; k.mb=function(a,b){if(!ph(this,b))return!1;this.b.mb(a);return!0};k.nb=function(a,b,c){if(!ph(this))return!1;this.J=0;a||Yd(this)&&Zd(this,this.b.u[7],0);try{a=$c(this.b,a);var d=this.b.nb(a);0<d&&(ad(this.b,a),this.J+=d,Xc(this.b,d,!0),Uc(this.b,d),this.ua++)}catch(e){"number"!=typeof e&&(this.J=0,rb(this.b,e.stack||e.message))}!1!==c&&this.B.ba();this.ba(b||!1);return 0<this.J};k.ca=function(a){this.b&&this.b.ca(a)};
k.nb=function(a,b,c){if(!oh(this))return!1;this.H=0;a||Yd(this)&&Zd(this,this.b.u[7],0);try{a=Zc(this.b,a);var d=this.b.nb(a);0<d&&($c(this.b,a),this.H+=d,Wc(this.b,d,!0),Tc(this.b,d),this.N++)}catch(e){"number"!=typeof e&&(this.H=0,rb(this.b,e.stack||e.message))}!1!==c&&this.D.ba();this.ba(b||!1);return 0<this.H};k.ca=function(a){this.b&&this.b.ca(a)};k.ba=function(a){this.$a&&(void 0===a&&(a=!0),this.K=Z(this.b.u[7]),a&&1!=this.R?ph(this):qh(this))}; k.ba=function(a){this.Ua&&(void 0===a&&(a=!0),this.K=Z(this.b.u[7]),a&&1!=this.P?qh(this):rh(this))};function ph(a,b){var c;(c=!a.b||!pb(a.b))||(c=a.b,c.v.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.da?(b||a.j("cpu busy or unavailable, command ignored"),!1):!qb(a.b)}k.ya=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};k.xa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};
function oh(a,b){var c;(c=!a.b||!pb(a.b))||(c=a.b,c.v.ga?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.ea?(b||a.j("cpu busy or unavailable, command ignored"),!1):!qb(a.b)}k.Aa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};k.za=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ah(this);this.N=this.xa=0;this.sa=null;this.H=0;this.K=Z(this.b.u[7]);this.v.ea=!1;rh(this);a||this.ba()}; k.reset=function(a){bh(this);this.ua=0;this.pa=null;this.J=0;this.K=Z(this.b.u[7]);this.v.da=!1;sh(this);a||this.ba()};k.save=function(){var a=new O(this);a.set(0,lh(this.K));a.set(1,lh(this.N));a.set(2,[this.g,this.O,this.ma]);a.set(3,this.H);return a.data()};k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=mh(a[b++]),this.N=mh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.O=a[b][1],this.ma|=a[b][2]);a[3]&&(this.H=a[3]);return!0};
k.save=function(){var a=new O(this);a.set(0,kh(this.K));a.set(1,kh(this.O));a.set(2,[this.g,this.P,this.ma]);a.set(3,this.F);return a.data()};k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=lh(a[b++]),this.O=lh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.ma|=a[b][2]);a[3]&&(this.F=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.v.ea=!0;this.Cb=a;this.Eb=b}; k.start=function(a,b){this.P||this.j("running");this.v.da=!0;this.rb=a;this.zb=b};k.stop=function(a,b){if(this.v.da){this.v.da=!1;this.J=b-this.zb;if(!this.P){b="stopped";if(this.J){a-=this.rb;var c=0<a?Math.round(1E3*this.J/a):0;b+=" (";Yd(this)&&(b+=this.ua+" instructions, ",this.ua=0);b+=this.J+" cycles, "+a+" ms, "+c+" hz)"}else E(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.j(b)}this.ba(!0);this.lb();sh(this,this.b.u[7])}};
k.stop=function(a,b){if(this.v.ea){this.v.ea=!1;this.H=b-this.Eb;if(!this.R){b="stopped";if(this.H){a-=this.Cb;var c=0<a?Math.round(1E3*this.H/a):0;b+=" (";Yd(this)&&(b+=this.N+" opcodes, ",this.xa-=this.N,this.N=0);b+=this.H+" cycles, "+a+" ms, "+c+" hz)"}else D(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.j(b)}this.ba(!0);this.wb();rh(this,this.b.u[7])}};function Yd(a){return 1<a.f.length||!!a.qa} function Yd(a){return 1<a.f.length||!!a.la}function Zd(a,b,c){var d=-1;c||(d=a.b.eb(b),0==d&&(b=ld(a.b,2)));if(0<c&&(a.la&&!--a.la||Lc(a,b,1,a.f)))return!0;0<=c&&a.F.length&&(a.ua++,0>d&&(d=a.b.eb(b)),65535!=(d&65535)&&(c=a.F[a.X],c.C=b,c.Ba=!1,++a.X==a.F.length&&(a.X=0)));return!1}function $b(a){var b=a.b;if(b.v.da)throw N(b,a.b.wb),a.ca(),-1;return!1}
function Zd(a,b,c){var d=-1,e=a.b;c||(d=a.b.fb(b),0==d&&Dd(a.b,2));if(0<c&&(a.qa&&!--a.qa||Kc(a,b,1,a.f)))return!0;0<=c&&a.X.length&&(a.N++,0>d&&(d=a.b.fb(b)),null!=d&&(b=a.J[a.da],b.B=e.u[7],b.Ba=!1,++a.da==a.J.length&&(a.da=0)));return!1}function $b(a){var b=a.b;if(b.v.ea)throw N(b,a.b.vb),a.ca(),-1;return!1} function ah(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b<a.M.length;b++){c=a.M[b];var d=a.A;c=a.$(c);Mc(d.V[c>>>d.ha],!1)}a.M=["br"];if(a.D)for(b=1;b<a.D.length;b++)c=a.D[b],d=a.A,c=a.$(c),Mc(d.V[c>>>d.ha],!0);a.D=["bw"];a.Ra=0}k.Va=function(a,b,c){var d=!0;c||th(this,a,b,!1,!0);if(a!=this.f){var e=this.$(b);if(-1===e)this.j("invalid address: "+J(this,b.C)),d=!1;else{var f=this.A;f.V[e>>>f.ha].Va(e&f.A,a==this.D)}}d&&(a.push(b),c?b.Ba=!0:(uh(this,a,a.length-1,"set"),bh(this)));return d};
function $g(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b<a.M.length;b++){c=a.M[b];var d=a.w;c=a.$(c);Lc(d.Y[c>>>d.ja],!1)}a.M=["br"];if(a.C)for(b=1;b<a.C.length;b++)c=a.C[b],d=a.w,c=a.$(c),Lc(d.Y[c>>>d.ja],!0);a.C=["bw"];a.ab=0}k.Sa=function(a,b,c){var d=!0;c||sh(this,a,b,!1,!0);if(a!=this.f){var e=this.$(b);if(-1===e)this.j("invalid address: "+J(this,b.B)),d=!1;else{var f=this.w;f.Y[e>>>f.ja].Sa(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Ba=!0:(th(this,a,a.length-1,"set"),ah(this)));return d}; function th(a,b,c,d,e){var f=!1;c=a.$(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.$(h)&&(!d||h.Ba)){f=!0;h.Ba||e||uh(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.A,Mc(d.V[c>>>d.ha],b==a.D));h.Ba||bh(a);break}}return f}function vh(a,b){for(var c=1;c<b.length;c++)uh(a,b,c);return b.length-1}function uh(a,b,c,d){c=b[c];a.j(b[0]+" "+J(a,c.C)+(d?" "+d:c.hc?' "'+c.hc+'"':""))}
function sh(a,b,c,d,e){var f=!1;c=a.$(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.$(h)&&(!d||h.Ba)){f=!0;h.Ba||e||th(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.w,Lc(d.Y[c>>>d.ja],b==a.C));h.Ba||ah(a);break}}return f}function uh(a,b){for(var c=1;c<b.length;c++)th(a,b,c);return b.length-1}function th(a,b,c,d){c=b[c];a.j(b[0]+" "+J(a,c.B)+(d?" "+d:c.hc?' "'+c.hc+'"':""))} function sh(a,b){if(void 0!==b)Lc(a,b,1,a.f,!0),a.P=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ba){if(!th(a,a.f,c,!0))break;b=0}}}
function rh(a,b){if(void 0!==b)Kc(a,b,1,a.f,!0),a.R=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ba){if(!sh(a,a.f,c,!0))break;b=0}}} function Lc(a,b,c,d,e){var f=!1;if(!a.Ra++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ba)for(var m=a.$(h),p=0;p<c;p++)if(b+p==m){var q,f=!0;h.Ba&&(th(a,d,h,!0),e=!0);if(q=h.lc){for(var f=!1,v=0;v<q.length;v++)if(!wh(a,q[v],!0)){if(q[v].indexOf("if")){f=!0;break}for(var w=v+1;w<q.length&&q[w].indexOf("else");w++)v++;if(w==q.length){f=!0;break}}a.b.v.da||(f=!0)}if(f){e||uh(a,d,g,"hit");break}}}a.Ra--;return f}
function Kc(a,b,c,d,e){var f=!1;if(!a.ab++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ba)for(var m=a.$(h),p=0;p<c;p++)if(b+p==m){var q,f=!0;h.Ba&&(sh(a,d,h,!0),e=!0);if(q=h.lc){for(var f=!1,v=0;v<q.length;v++)if(!vh(a,q[v],!0)){if(q[v].indexOf("if")){f=!0;break}for(var w=v+1;w<q.length&&q[w].indexOf("else");w++)v++;if(w==q.length){f=!0;break}}a.b.v.ea||(f=!0)}if(f){e||th(a,d,g,"hit");break}}}a.ab--;return f} function xh(a,b,c,d){var e=Z(b.C),f=a.na(b,2),g,h;for(h in a.bb)if(g=a.bb[h][f&h])break;g||(g=gh);var m=g[0];0<=a.qb.indexOf(m)&&(g=gh,m=g[0]);var p=h="",q=eh[m],v=g.length-1;m||v||(h=J(a,f));for(m=1;m<=v;m++){var w=g[m];if(void 0!==w){var x;x=a;var F=w,w=b,y="",B=F&61440;if(4096==B)w=w.C+((f&255)<<24>>23)&65535,y=J(x,w);else if(8192==B)w=w.C-((f&63)<<1)&65535,y=J(x,w);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&F,F&4032&&(B>>=6,F>>=6),
function wh(a,b,c,d){var e=Z(b.B),f=a.na(b,2),g,h;for(h in a.eb)if(g=a.eb[h][f&h])break;g||(g=fh);var m=g[0];0<=a.zb.indexOf(m)&&(g=fh,m=g[0]);var p=h="",q=dh[m],v=g.length-1;m||v||(h=J(a,f));for(m=1;m<=v;m++){var w=g[m];if(void 0!==w){var x;x=a;var E=w,w=b,y="",F=E&61440;if(4096==F)w=w.B+((f&255)<<24>>23)&65535,y=J(x,w);else if(8192==F)w=w.B-((f&63)<<1)&65535,y=J(x,w);else if(12288==F)y=J(x,f&7,1);else if(24576==F)y=J(x,f&63,1);else if(F=f&E,E&4032&&(F>>=6,E>>=6),E&63)switch(E=F&7,F&56){case 0:y= F&63)switch(F=B&7,B&56){case 0:y=oh(F);break;case 8:y="@"+oh(F);break;case 16:7>F?y="("+oh(F)+")+":(B=x.na(w,2),y="#"+J(x,B,0,!0));break;case 24:7>F?y="@("+oh(F)+")+":(B=x.na(w,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+oh(F)+")";break;case 40:y="@-("+oh(F)+")";break;case 48:B=x.na(w,2);y=J(x,B,0,!0)+"("+oh(F)+")";7==F&&(y=[y,J(x,B+w.C&65535)]);break;case 56:B=x.na(w,2),y="@"+J(x,B)+"("+oh(F)+")",7==F&&(y=[y,J(x,B+w.C&65535)])}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(p=x[1],x=
nh(E);break;case 8:y="@"+nh(E);break;case 16:7>E?y="("+nh(E)+")+":(F=x.na(w,2),y="#"+J(x,F,0,!0));break;case 24:7>E?y="@("+nh(E)+")+":(F=x.na(w,2),y="@#"+J(x,F,0,!0));break;case 32:y="-("+nh(E)+")";break;case 40:y="@-("+nh(E)+")";break;case 48:F=x.na(w,2);y=J(x,F,0,!0)+"("+nh(E)+")";7==E&&(y=[y,J(x,F+w.B&65535)]);break;case 56:F=x.na(w,2),y="@"+J(x,F)+"("+nh(E)+")",7==E&&(y=[y,J(x,F+w.B&65535)])}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0<h.length&&(h+=",");h+=x|| x[0]);0<h.length&&(h+=",");h+=x||"???"}}f="";g=J(a,e.C)+":";if(-1!==e.C&&-1!==b.C){do if(f+=" "+J(a,a.na(e,2)),null==e.C)break;while(e.C!=b.C)}g+=ua(f,24);g+=ua(q,5);h&&(g+=" "+h);if(c||p)g=ua(g,60)+";"+(c||""),g=a.b.v.cb?g+("cycles="+Vc(a.b).toString()+" cs="+l(a.b.tb)):g+(null!=d?"="+d.toString():""),p&&(g+=" @"+p);return g}
"???"}}f="";g=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(f+=" "+J(a,a.na(e,2)),null==e.B)break;while(e.B!=b.B)}g+=ua(f,24);g+=ua(q,5);h&&(g+=" "+h);if(c||p)g=ua(g,60)+";"+(c||""),g=a.b.v.cb?g+("cycles="+Uc(a.b).toString()+" cs="+l(a.b.sb)):g+(null!=d?"="+d.toString():""),p&&(g+=" @"+p);return g}function xh(a,b){switch(b){case "N":a=a.b.Da();break;case "Z":a=id(a.b);break;case "V":a=hd(a.b);break;case "C":a=gd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "} function yh(a,b){switch(b){case "N":a=a.b.Ea();break;case "Z":a=jd(a.b);break;case "V":a=id(a.b);break;case "C":a=hd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}function zh(a,b){var c="",d=a.b;8>b?(c=oh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Fa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.va[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}
function yh(a,b){var c="",d=a.b;8>b?(c=nh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.va[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function zh(a){var b,c="";for(b=0;6>b;b++)c+=yh(a,b);c=c+"\n"+(yh(a,6)+yh(a,7)+yh(a,20));return c+=xh(a,"T")+xh(a,"N")+xh(a,"Z")+xh(a,"V")+xh(a,"C")}k.Wb=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0}; function Ah(a){var b,c="";for(b=0;6>b;b++)c+=zh(a,b);c=c+"\n"+(zh(a,6)+zh(a,7)+zh(a,20));return c+=yh(a,"T")+yh(a,"N")+yh(a,"Z")+yh(a,"V")+yh(a,"C")}k.Ub=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};function ug(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var m=h.o,p=h.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=ya(q,m,a.Ub);0>v&&q.splice(-(v+1),0,m)}p&&(h.a=p.replace(/''/g,'"'))}a.H.push({Ud:b,C:c,vc:d,fa:e,Tb:f})}
function Ah(a,b,c){var d=[],e=a.$(b)>>>0;for(b=0;b<a.F.length;b++){var f=a.F[b],g=f.B>>>0,h=f.vc;if(e>=g&&e<g+h){e=ya(f.Vb,[e-g],a.Wb);0<=e?Bh(a,b,e,d):c&&(e=~e,Bh(a,b,e-1,d),Bh(a,b,e,d));break}}return d}function Bh(a,b,c,d){var e={},f=a.F[b].Vb,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].la[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)} function Bh(a,b,c){var d=[],e=a.$(b)>>>0;for(b=0;b<a.H.length;b++){var f=a.H[b],g=f.C>>>0,h=f.vc;if(e>=g&&e<g+h){e=ya(f.Tb,[e-g],a.Ub);0<=e?Ch(a,b,e,d):c&&(e=~e,Ch(a,b,e-1,d),Ch(a,b,e,d));break}}return d}function Ch(a,b,c,d){var e={},f=a.H[b].Tb,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.H[b].fa[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
function Ch(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Yg(a)||a.j("no variables"),!0;if(!c[2])return Yg(a,c[1]);if(!c[3])return delete a.W[c[1]],!0;b=Ug(a,c[3]);return void 0!==b?(a.W[c[1]]=b,!0):!1}a.j("invalid assignment:"+b);return!1} function Dh(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Zg(a)||a.j("no variables"),!0;if(!c[2])return Zg(a,c[1]);if(!c[3])return delete a.U[c[1]],!0;b=Vg(a,c[3]);return void 0!==b?(a.U[c[1]]=b,!0):!1}a.j("invalid assignment:"+b);return!1}
function Dh(a,b,c){var d=null;if(b=ih(a,b,!0)){a.$(b);var e=Ah(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.B-e[1])&&(g=" + "+l(f,4,!0)),f=e[0]+" ("+J(a,e[1])+")"+g,c&&a.j(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.B)&&(g=" - "+l(f,4,!0)),f=e[4]+" ("+J(a,e[5])+")"+g,c&&a.j(f),d||(d=f))}else c&&a.j("no symbols")}return d} function Eh(a,b,c){var d=null;if(b=jh(a,b,!0)){a.$(b);var e=Bh(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.C-e[1])&&(g=" + "+l(f,4,!0)),f=e[0]+" ("+J(a,e[1])+")"+g,c&&a.j(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.C)&&(g=" - "+l(f,4,!0)),f=e[4]+" ("+J(a,e[5])+")"+g,c&&a.j(f),d||(d=f))}else c&&a.j("no symbols")}return d}
function ph(a,b){var c;if(b&&"?"==b[1])a.j("register commands:"),a.j("\tr\tdump registers"),a.j("\trx [#]\tset flag or register x to [#]");else{var d=a.b;null==c&&(c=!0);if(b&&1<b.length){var e=b[1],f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.j("missing value for "+b[1]);return}f=Ug(a,b);if(void 0===f)return;b=e.toUpperCase();switch(b){case "SP":case "R6":d.u[6]=f&65535;break;case "PC":case "R7":N(d,f);a.K=Z(d.u[7]);break;case "N":d.V=f?32768:0;break;case "Z":d.Z= function qh(a,b){var c;if(b&&"?"==b[1])a.j("register commands:"),a.j("\tr\tdump registers"),a.j("\trx [#]\tset flag or register x to [#]");else{var d=a.b;null==c&&(c=!0);if(b&&1<b.length){var e=b[1],f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.j("missing value for "+b[1]);return}f=Vg(a,b);if(void 0===f)return;b=e.toUpperCase();switch(b){case "SP":case "R6":d.u[6]=f&65535;break;case "PC":case "R7":N(d,f);a.K=Z(d.u[7]);break;case "N":d.W=f?32768:0;break;case "Z":d.Z=
f?0:1;break;case "V":d.T=f?32768:0;break;case "C":d.S=f?65536:0;break;default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.D.ba();a.j("updated registers:")}a.j(zh(a));c&&(a.K=Z(d.u[7]),qh(a,J(a,a.K.B)))}}function Eh(a,b){b=va(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.j(c[2]):Xg(a,null,c[2].charCodeAt(0)):Ug(a,b,!0)} f?0:1;break;case "V":d.S=f?32768:0;break;case "C":d.R=f?65536:0;break;default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.ba();a.j("updated registers:")}a.j(Ah(a));c&&(a.K=Z(d.u[7]),rh(a,J(a,a.K.C)))}}function Fh(a,b){b=va(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.j(c[2]):Yg(a,null,c[2].charCodeAt(0)):Vg(a,b,!0)}
function Fh(a,b,c){var d="t"!=b;c=Wg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ma(c,function(){return nb(a,!0)&&a.nb(e,d,!1)},function(){a.D.ba();nb(a,!1)})} function Gh(a,b,c){var d="t"!=b;c=Xg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ma(c,function(){return nb(a,!0)&&a.nb(e,d,!1)},function(){a.B.ba();nb(a,!1)})}
function qh(a,b,c,d){if(b=ih(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=Wg(a,c.substr(1)),null!=c&&(d=c);else{d=ih(a,c,!0);if(!d||d.B<b.B)return;e=d.B-b.B;if(256<e){a.j("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=ob(a,!1)||a.R?a.H:null;var g=null!=f?"cycles":null,h=Ah(a,b),m=b.B;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.j(p)}h[3]&&(g=h[3],f=null);f=wh(a,b,g,f);a.j(f);a.K=b;e-=b.B-m;c++}}} function rh(a,b,c,d){if(b=jh(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=Xg(a,c.substr(1)),null!=c&&(d=c);else{d=jh(a,c,!0);if(!d||d.C<b.C)return;e=d.C-b.C;if(256<e){a.j("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=ob(a,!1)||a.P?a.J:null;var g=null!=f?"cycles":null,h=Bh(a,b),m=b.C;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.j(p)}h[3]&&(g=h[3],f=null);f=xh(a,b,g,f);a.j(f);a.K=b;e-=b.C-m;c++}}}
function vh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.O.B)),a.K=a.O,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(pb(a)&&0<b.length){a.P&&(b="a "+J(a,a.O.B)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],m=h.charAt(0),p=1;p<h.length;p++){var q=h.charAt(p);if("?"==m||"r"==m||"a">q||"z"<q){g[0]=h.substr(p);g.unshift(h.substr(0,p));break}}g[0]=g[0].toLowerCase();switch(g[0].charAt(0)){case "a":var v= function wh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.O&&(a.j("ended assemble at "+J(a,a.N.C)),a.K=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.pa=null;if(pb(a)&&0<b.length){a.O&&(b="a "+J(a,a.N.C)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],m=h.charAt(0),p=1;p<h.length;p++){var q=h.charAt(p);if("?"==m||"r"==m||"a">q||"z"<q){g[0]=h.substr(p);g.unshift(h.substr(0,p));break}}switch(g[0].charAt(0)){case "a":var v=
ih(a,g[1],!0);if(v)if(a.O=v,void 0===g[2])a.j("begin assemble at "+J(a,v.B)),a.P=!0,a.D.ba();else{var w;a.j("not supported yet");w=[];if(w.length){for(var x=0;x<w.length;x++)a.Ib(v,w[x],1);a.j(wh(a,a.O))}}break;case "b":a:{var E=g[0],y=g[1],F=b;if("?"==y)a.j("breakpoint commands:"),a.j("\tbp [a]\tset exec breakpoint at addr [a]"),a.j("\tbr [a]\tset read breakpoint at addr [a]"),a.j("\tbw [a]\tset write breakpoint at addr [a]"),a.j("\tbc [a]\tclear breakpoint at addr [a]"),a.j("\tbl\tlist all breakpoints"), jh(a,g[1],!0);if(v)if(a.N=v,void 0===g[2])a.j("begin assemble at "+J(a,v.C)),a.O=!0,a.B.ba();else{var w;a.j("not supported yet");w=[];if(w.length){for(var x=0;x<w.length;x++)a.Gb(v,w[x],1);a.j(xh(a,a.N))}}break;case "b":a:{var F=g[0],y=g[1],B=b;if("?"==y)a.j("breakpoint commands:"),a.j("\tbp [a]\tset exec breakpoint at addr [a]"),a.j("\tbr [a]\tset read breakpoint at addr [a]"),a.j("\tbw [a]\tset write breakpoint at addr [a]"),a.j("\tbc [a]\tclear breakpoint at addr [a]"),a.j("\tbl\tlist all breakpoints"),
a.j("\tbn [n]\tbreak after [n] instruction(s)");else{var Fa=E.charAt(1);if("l"==Fa){var kd;kd=0+uh(a,a.f);kd+=uh(a,a.M);(kd+=uh(a,a.C))||a.j("no breakpoints")}else if("n"==Fa)a.qa=Wg(a,y),a.j("break after "+a.qa+" instruction(s)");else if(void 0===y)a.j("missing breakpoint address");else{var U=Z();if("*"!=y&&(U=ih(a,y,!0),!U))break a;"c"==Fa?null==U.B?($g(a),a.j("all breakpoints cleared")):sh(a,a.f,U)||sh(a,a.M,U)||sh(a,a.C,U)||a.j("breakpoint missing: "+J(a,U.B)):null!=U.B&&(mh(a,U,F),"p"==Fa?a.Sa(a.f, a.j("\tbn [n]\tbreak after [n] instruction(s)");else{var Ga=F.charAt(1);if("l"==Ga){var md;md=0+vh(a,a.f);md+=vh(a,a.M);(md+=vh(a,a.D))||a.j("no breakpoints")}else if("n"==Ga)a.la=Xg(a,y),a.j("break after "+a.la+" instruction(s)");else if(void 0===y)a.j("missing breakpoint address");else{var V=Z();if("*"!=y&&(V=jh(a,y,!0),!V))break a;"c"==Ga?null==V.C?(ah(a),a.j("all breakpoints cleared")):th(a,a.f,V)||th(a,a.M,V)||th(a,a.D,V)||a.j("breakpoint missing: "+J(a,V.C)):null!=V.C&&(nh(a,V,B),"p"==Ga?a.Va(a.f,
U):"r"==Fa?a.Sa(a.M,U):"w"==Fa?a.Sa(a.C,U):a.j("unknown breakpoint command: "+Fa))}}}break;case "c":a.Va&&(a.Va.value="");break;case "d":a:{var Xa,Ya=g[0],ja=g[1],Ga=g[2],Yh=g[3];if("?"==ja){var Za="";for(Xa in tb)a.Fa[Xa]&&(Za&&(Za+=","),Za+=Xa);Za+=",state,symbols";a.j("dump memory commands:");a.j("\tdb [a] [#] dump # bytes at address a");a.j("\tdw [a] [#] dump # words at address a");a.j("\tdd [a] [#] dump # dwords at address a");a.j("\tdh [#] [#] dump # instructions from history"); V):"r"==Ga?a.Va(a.M,V):"w"==Ga?a.Va(a.D,V):a.j("unknown breakpoint command: "+Ga))}}}break;case "c":a.Da&&(a.Da.value="");break;case "d":a:{var Xa,Ya=g[0],ja=g[1],Ha=g[2],Zh=g[3];if("?"==ja){var Za="";for(Xa in tb)a.za[Xa]&&(Za&&(Za+=","),Za+=Xa);Za+=",state,symbols";a.j("dump memory commands:");a.j("\tdb [a] [#] dump # bytes at address a");a.j("\tdw [a] [#] dump # words at address a");a.j("\tdd [a] [#] dump # dwords at address a");a.j("\tdh [#] [#] dump # instructions from history");
Za.length&&a.j("dump extension commands:\n\t"+Za)}else if("state"==ja){var Sf=Gh(a.D,!0);"console"==Ga?console.log(Sf):(a.Va&&(a.Va.value=""),a.j(Sf))}else if("symbols"==ja)for(var ld=0;ld<a.F.length;ld++){var md=a.F[ld],$a;for($a in md.la)if("."!=$a.charAt(0)){var Tf=md.la[$a].o;if(void 0!==Tf){var Uf=md.la[$a].l;Uf&&($a=Uf);a.j(J(a,Tf)+" "+$a)}}}else{if("d"==Ya){for(Xa in tb)if(g[1]==Xa){var Vf=a.Fa[Xa];Vf?(g.shift(),g.shift(),Vf(g)):a.j("no dump registered for "+ja);break a}ja||(Ya=a.Fb||"db")}else a.Fb= Za.length&&a.j("dump extension commands:\n\t"+Za)}else if("state"==ja){var Tf=Hh(a.B,!0);"console"==Ha?console.log(Tf):(a.Da&&(a.Da.value=""),a.j(Tf))}else if("symbols"==ja)for(var nd=0;nd<a.H.length;nd++){var od=a.H[nd],$a;for($a in od.fa)if("."!=$a.charAt(0)){var Uf=od.fa[$a].o;if(void 0!==Uf){var Vf=od.fa[$a].l;Vf&&($a=Vf);a.j(J(a,Uf)+" "+$a)}}}else{if("d"==Ya){for(Xa in tb)if(g[1]==Xa){var Wf=a.za[Xa];Wf?(g.shift(),g.shift(),Wf(g)):a.j("no dump registered for "+ja);break a}ja||(Ya=a.Cb||"db")}else a.Cb=
Ya;if("dh"==Ya){var Wf=ja,Xf=Ga,Yf="",Zf=0,ca=a.da,ka=a.J;if(ka.length){var Y=+Wf||a.bb,xb=+Xf||10;isNaN(Y)?Y=xb:Yf="more ";Y>ka.length&&(a.j("note: only "+ka.length+" available"),Y=ka.length);ca-=Y;0>ca&&(null==ka[ka.length-1].B?(Y=ca+Y,ca=0):ca+=ka.length);var nd=[];"call"==Xf&&(xb=1E5,nd=["CALL"]);for(void 0!==Wf&&a.j(Y+" instructions earlier:");0<xb&&ca!=a.da;){var $f=ka[ca++];if(null==$f.B)break;var yb=Z($f.B),Zh=Y--,ag=wh(a,yb,"history",Zh);(!nd.length||0<=ag.indexOf(nd[0]))&&a.j(ag);yb.Mb&& Ya;if("dh"==Ya){var Xf=ja,Yf=Ha,Zf="",$f=0,ca=a.X,ka=a.F;if(ka.length){var Y=+Xf||a.$a,xb=+Yf||10;isNaN(Y)?Y=xb:Zf="more ";Y>ka.length&&(a.j("note: only "+ka.length+" available"),Y=ka.length);ca-=Y;0>ca&&(null==ka[ka.length-1].C?(Y=ca+Y,ca=0):ca+=ka.length);var pd=[];"call"==Yf&&(xb=1E5,pd=["CALL"]);for(void 0!==Xf&&a.j(Y+" instructions earlier:");0<xb&&ca!=a.X;){var ag=ka[ca++];if(null==ag.C)break;var yb=Z(ag.C),$h=Y--,bg=xh(a,yb,"history",$h);(!pd.length||0<=bg.indexOf(pd[0]))&&a.j(bg);yb.Lb&&(ca+=
(ca+=yb.Mb,xb-=yb.Mb,Y-=yb.Mb);ca>=ka.length&&(ca=0);a.bb=Y;Zf++;xb--}}Zf||(a.j("no "+Yf+"history available"),a.bb=void 0)}else{var zb=ih(a,ja);if(zb){var lc=0;Ga&&("l"==Ga.charAt(0)&&(Ga=Ga.substr(1)||Yh),lc=Wg(a,Ga)>>>0,65536<lc&&(lc=65536));for(var Ab="",ab="dd"==Ya?4:"dw"==Ya?2:1,mc=ab*lc||128,$h=mc+15>>4||1;$h--&&0<mc;){var nc=0,Bb=0,Cb,od="",bg="",ja=J(a,zb.B);for(Cb=4==ab?16:a.ha;0<Cb&&0<mc;Cb--){var pd,oc=2==ab?a.na(zb,pd=2):a.rb(zb,pd=1),nc=nc|oc<<(Bb<<3),Bb=Bb+pd;Bb==ab&&(od+=J(a,nc,ab), yb.Lb,xb-=yb.Lb,Y-=yb.Lb);ca>=ka.length&&(ca=0);a.$a=Y;$f++;xb--}}$f||(a.j("no "+Zf+"history available"),a.$a=void 0)}else{var zb=jh(a,ja);if(zb){var lc=0;Ha&&("l"==Ha.charAt(0)&&(Ha=Ha.substr(1)||Zh),lc=Xg(a,Ha)>>>0,65536<lc&&(lc=65536));for(var Ab="",ab="dd"==Ya?4:"dw"==Ya?2:1,mc=ab*lc||128,ai=mc+15>>4||1;ai--&&0<mc;){var nc=0,Bb=0,Cb,qd="",cg="",ja=J(a,zb.C);for(Cb=4==ab?16:a.Y;0<Cb&&0<mc;Cb--){var oc=1,pc=1==ab?a.sb(zb,oc):a.na(zb,oc=2),nc=nc|pc<<(Bb<<3),Bb=Bb+oc;Bb==ab&&(qd+=J(a,nc,ab),qd+=1==
od+=1==ab?9==Cb?"-":" ":" ",nc=Bb=0);bg+=32<=oc&&128>oc?String.fromCharCode(oc):".";mc--}Ab&&(Ab+="\n");Ab+=ja+" "+od+(0==Cb?" "+bg:"")}Ab&&a.j(Ab);a.Qa=zb}}}}break;case "e":if("else"==g[0])break;var bb,qd,rd,sd,td=g[0],ud=g[1];"eb"==td?(bb=1,qd=255,rd=a.rb,sd=a.Ib):"e"==td||"ew"==td?(bb=2,qd=65535,rd=a.na,sd=a.Ya):ud=null;if(null==ud)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var pc=ih(a,ud);if(pc)for(var qc=2;qc< ab?9==Cb?"-":" ":" ",nc=Bb=0);cg+=32<=pc&&128>pc?String.fromCharCode(pc):".";mc-=oc}Ab&&(Ab+="\n");Ab+=ja+" "+qd+(0==Cb?" "+cg:"")}Ab&&a.j(Ab);a.Ta=zb}}}}break;case "e":if("else"==g[0])break;var bb,rd,sd,td,ud=g[0],vd=g[1];"eb"==ud?(bb=1,rd=255,sd=a.sb,td=a.Gb):"e"==ud||"ew"==ud?(bb=2,rd=65535,sd=a.na,td=a.Ya):vd=null;if(null==vd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var qc=jh(a,vd);if(qc)for(var rc=2;rc<g.length;rc++){var Db=
g.length;qc++){var Db=Ug(a,g[qc]);if(void 0===Db){a.j("unrecognized value: "+g[qc]);break}Db&~qd&&a.j("warning: "+l(Db)+" exceeds "+bb+"-byte value");var ai=rd.call(a,pc);a.j("changing "+J(a,pc.B)+" from "+J(a,ai,bb)+" to "+J(a,Db,bb));sd.call(a,pc,Db,bb)}}break;case "g":a:{var cg=g[1],bi=b;if(void 0!==cg){var vd=ih(a,cg,!0);if(!vd)break a;mh(a,vd,bi);a.Sa(a.f,vd,!0)}a.mb(!0,c)}break;case "h":a.v.ea?(c||a.j("halting"),a.ca()):ob(a,!0)||c||a.j("already halted");break;case "i":if("if"==g[0]){var wd; Vg(a,g[rc]);if(void 0===Db){a.j("unrecognized value: "+g[rc]);break}Db&~rd&&a.j("warning: "+l(Db)+" exceeds "+bb+"-byte value");var bi=sd.call(a,qc);a.j("changing "+J(a,qc.C)+" from "+J(a,bi,bb)+" to "+J(a,Db,bb));td.call(a,qc,Db,bb)}}break;case "g":a:{var dg=g[1],ci=b;if(void 0!==dg){var wd=jh(a,dg,!0);if(!wd)break a;nh(a,wd,ci);a.Va(a.f,wd,!0)}a.mb(!0,c)}break;case "h":a.v.da?(c||a.j("halting"),a.ca()):ob(a,!0)||c||a.j("already halted");break;case "i":if("if"==g[0]){var xd;var Eb=b.substr(2),Eb=
var Eb=b.substr(2),Eb=va(Eb);Ug(a,Eb)?(c||a.j("true: "+Eb),wd=!0):(c||a.j("false: "+Eb),wd=!1);wd||(d=!1);break}f=!0;break;case "k":var ci=g[0];if("?"==g[1])a.j("stack trace commands:"),a.j("\tk\tshow frame addresses"),a.j("\tks\tshow symbol information");else{var xd=0,yd=Z(),Fb=Z(a.b.u[6]);for(a.j("stack trace for "+J(a,Fb.B));10>xd;){for(var Ha=null,di=256;65536>Fb.B>>>0;){yd.B=a.na(Fb,2);if(null==Fb.B||!di--)break;if(!(yd.B&1)){for(var ei=a,rc=yd,dg=null,Gb=rc.B,eg=Gb,zd=1;6>=zd&&Gb;zd++){if(2< va(Eb);Vg(a,Eb)?(c||a.j("true: "+Eb),xd=!0):(c||a.j("false: "+Eb),xd=!1);xd||(d=!1);break}f=!0;break;case "k":var di=g[0];if("?"==g[1])a.j("stack trace commands:"),a.j("\tk\tshow frame addresses"),a.j("\tks\tshow symbol information");else{var yd=0,zd=Z(),Fb=Z(a.b.u[6]);for(a.j("stack trace for "+J(a,Fb.C));10>yd;){for(var Ia=null,ei=256;65536>Fb.C>>>0;){zd.C=a.na(Fb,2);if(null==Fb.C||!ei--)break;if(!(zd.C&1)){for(var fi=a,sc=zd,eg=null,Gb=sc.C,fg=Gb,Ad=1;6>=Ad&&Gb;Ad++){if(2<Ad){sc.C=Gb;var tc=xh(fi,
zd){rc.B=Gb;var sc=wh(ei,rc);if(0<=sc.indexOf("JSR")){var fg=sc.indexOf(" ");if(Gb+(sc.indexOf(" ",fg+1)-fg-1)/2==eg){dg=sc;break}}}Gb-=2}rc.B=eg;if(Ha=dg)break}}if(!Ha||null==Ha)break;var gg=null;if("ks"==ci){var hg=Ha.match(/[0-9A-F]+$/);hg&&(gg=Dh(a,hg[0]))}Ha=ua(Ha,50)+" ;"+(gg||"stack="+J(a,Fb.B));a.j(Ha);xd++}xd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){Dh(a,g[1],!0);break}f=!0;break;case "m":a:{var la,ma=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var xa=0;if("all"== sc);if(0<=tc.indexOf("JSR")){var gg=tc.indexOf(" ");if(Gb+(tc.indexOf(" ",gg+1)-gg-1)/2==fg){eg=tc;break}}}Gb-=2}sc.C=fg;if(Ia=eg)break}}if(!Ia||null==Ia)break;var hg=null;if("ks"==di){var ig=Ia.match(/[0-9A-F]+$/);ig&&(hg=Eh(a,ig[0]))}Ia=ua(Ia,50)+" ;"+(hg||"stack="+J(a,Fb.C));a.j(Ia);yd++}yd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){Eh(a,g[1],!0);break}f=!0;break;case "m":a:{var la,ma=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var xa=0;if("all"==G)xa=1878917119,G=null;
G)xa=1878917119,G=null;else if("on"==G)ma=!0,G=null;else if("off"==G)ma=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(la in tb)if(G==la){xa=tb[la];ma=!!(a.ma&xa);break}if(!xa){a.j("unknown message category: "+G);break a}}if(xa)if("on"==g[2])a.ma|=xa,ma=!0;else if("off"==g[2]&&(a.ma&=~xa,ma=!1,1073741824==xa)){for(var Ad=0;Ad<a.wa.length;Ad++)a.j(a.wa[Ad]);a.wa=[]}}var fi=0,Hb="";for(la in tb)if(!G||G==la){var gi=!!(a.ma&tb[la]);if(null===ma||ma==gi)Hb&&(Hb+=","),++fi%10||(Hb+="\n\t"), else if("on"==G)ma=!0,G=null;else if("off"==G)ma=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(la in tb)if(G==la){xa=tb[la];ma=!!(a.ma&xa);break}if(!xa){a.j("unknown message category: "+G);break a}}if(xa)if("on"==g[2])a.ma|=xa,ma=!0;else if("off"==g[2]&&(a.ma&=~xa,ma=!1,1073741824==xa)){for(var Bd=0;Bd<a.ra.length;Bd++)a.j(a.ra[Bd]);a.ra=[]}}var gi=0,Hb="";for(la in tb)if(!G||G==la){var hi=!!(a.ma&tb[la]);if(null===ma||ma==hi)Hb&&(Hb+=","),++gi%10||(Hb+="\n\t"),"key"==la&&(la="keys"),
"key"==la&&(la="keys"),Hb+=la}void 0===G&&a.j("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.j((null!==ma?ma?"messages on: ":"messages off: ":"message categories:\n\t")+(Hb||"none"));ah(a)}break;case "p":if("print"==g[0]){Eh(a,b.substr(5));break}var hi="pr"==g[0]?1:0;if(a.R)a.j("step in progress");else{var ig=Z(a.b.u[7]);a.rb(ig);a.R?(a.Sa(a.f,ig,!0),a.mb()||(a.D&&a.D.wb(),a.R=0)):Fh(a,hi?"tr":"t")}break;case "r":if("reset"==b){a.D&&a.D.reset();break}ph(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Ib= Hb+=la}void 0===G&&a.j("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.j((null!==ma?ma?"messages on: ":"messages off: ":"message categories:\n\t")+(Hb||"none"));bh(a)}break;case "p":if("print"==g[0]){Fh(a,b.substr(5));break}var ii="pr"==g[0]?1:0;if(a.P)a.j("step in progress");else{var jg=Z(a.b.u[7]);a.sb(jg);a.P?(a.Va(a.f,jg,!0),a.mb()||(a.B&&a.B.lb(),a.P=0)):Gh(a,ii?"tr":"t")}break;case "r":if("reset"==b){a.B&&a.B.reset();break}qh(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Ib=
+g[2];if(8==Ib||10==Ib||16==Ib)a.ha=Ib;else{a.j("invalid base: "+Ib);break}}a.j("default base: "+a.ha);break;case "cs":var Jb;void 0!==g[3]&&(Jb=+g[3]);switch(g[2]){case "int":a.b.hb=Jb;break;case "start":a.b.tb=Jb;break;case "stop":a.b.ib=Jb;break;default:a.j("unknown cs option");break a}void 0!==Jb&&Rc(a.b);a.j("checksums "+(a.b.v.cb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Vc(a.b,+g[2])||a.j("warning: using 1x multiplier, previous target not reached"));a.j("target speed: "+(a.b.Wa.toFixed(2)+ +g[2];if(8==Ib||10==Ib||16==Ib)a.Y=Ib;else{a.j("invalid base: "+Ib);break}}a.j("default base: "+a.Y);break;case "cs":var Jb;void 0!==g[3]&&(Jb=+g[3]);switch(g[2]){case "int":a.b.gb=Jb;break;case "start":a.b.ub=Jb;break;case "stop":a.b.hb=Jb;break;default:a.j("unknown cs option");break a}void 0!==Jb&&Sc(a.b);a.j("checksums "+(a.b.v.cb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Wc(a.b,+g[2])||a.j("warning: using 1x multiplier, previous target not reached"));a.j("target speed: "+(a.b.Wa.toFixed(2)+
"Mhz")+" ("+a.b.Ma+"x)");break;default:if(g[1]){a.j("unknown option: "+g[1]);break}case "?":a.j("debugger options:"),a.j("\tbase #\t\tset default base to #"),a.j("\tcs int #\tset checksum cycle interval to #"),a.j("\tcs start #\tset checksum cycle start count to #"),a.j("\tcs stop #\tset checksum cycle stop count to #"),a.j("\tsp #\t\tset speed multiplier to #")}break;case "t":Fh(a,g[0],g[1]);break;case "u":qh(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Ch(a,b.substr(3))||(d=!1);break}if("ver"== "Mhz")+" ("+a.b.Na+"x)");break;default:if(g[1]){a.j("unknown option: "+g[1]);break}case "?":a.j("debugger options:"),a.j("\tbase #\t\tset default base to #"),a.j("\tcs int #\tset checksum cycle interval to #"),a.j("\tcs start #\tset checksum cycle start count to #"),a.j("\tcs stop #\tset checksum cycle stop count to #"),a.j("\tsp #\t\tset speed multiplier to #")}break;case "t":Gh(a,g[0],g[1]);break;case "u":rh(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Dh(a,b.substr(3))||(d=!1);break}if("ver"==
g[0]){a.j("PDPjs version 1.30.1 ("+a.b.gb+",RELEASE"+(sb?",TYPEDARRAYS":",LONGARRAYS")+")");a.j(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Eh(a,b.substr(1));break}var Bd="commands:",Cd;for(Cd in ch)Bd+="\n"+ua(Cd,9)+ch[Cd];Yd(a)||(Bd+="\nnote: history disabled if no exec breakpoints");a.j(Bd);break;default:f=!0}f&&(a.j("unknown command: "+b),d=!1)}}catch(jg){a.j("debugger error: "+(jg.stack||jg.message)),d=!1}return d} g[0]){a.j("PDPjs version 1.30.1 ("+a.b.fb+",RELEASE"+(sb?",TYPEDARRAYS":",LONGARRAYS")+")");a.j(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Fh(a,b.substr(1));break}var Cd="commands:",Dd;for(Dd in dh)Cd+="\n"+ua(Dd,9)+dh[Dd];Yd(a)||(Cd+="\nnote: history disabled if no exec breakpoints");a.j(Cd);break;default:f=!0}f&&(a.j("unknown command: "+b),d=!1)}}catch(kg){a.j("debugger error: "+(kg.stack||kg.message)),d=!1}return d}
function Sc(a,b,c){b=Sg(a,b,c);for(var d in b)if(!vh(a,b[+d]))return!1;return!0}Ta(function(){for(var a=B(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Zg(d);A(d,c)}}); function Tc(a,b,c){b=Tg(a,b,c);for(var d in b)if(!wh(a,b[+d]))return!1;return!0}Ta(function(){for(var a=C(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new $g(d);A(d,c)}});
function Hh(a,b,c){r.call(this,"Computer",a,Hh,67108864);this.v.ga=!1;Ih(this,b);this.M=Pc(this,"autoPower",a);this.D=0;this.W=a.busWidth||a.buswidth;this.f=Jh;this.J=null;this.F=this.P=!1;this.X=Pc(this,"url")||"";(Math.random()+.1).toString(36);this.g=Kh(this);if(this.b=mb("CPU",this.id)){this.i=mb("Debugger",this.id);this.w=new Mb({id:this.Ra+".bus",busWidth:this.W},this.b,this.i);var d,e=kb(this.id);if((this.A=mb("Panel",this.id))&&this.A.Va)for(b=0;b<e.length;b++)d=e[b],d.ka=this.A.ka,d.j=this.A.j, function Ih(a,b,c){r.call(this,"Computer",a,Ih,67108864);this.v.ja=!1;Jh(this,b);this.M=Qc(this,"autoPower",a);this.B=0;this.X=a.busWidth||a.buswidth;this.f=Kh;this.J=null;this.F=this.P=!1;this.Y=Qc(this,"url")||"";(Math.random()+.1).toString(36);this.g=Lh(this);if(this.b=mb("CPU",this.id)){this.i=mb("Debugger",this.id);this.A=new Mb({id:this.Sa+".bus",busWidth:this.X},this.b,this.i);var d,e=kb(this.id);if((this.w=mb("Panel",this.id))&&this.w.Da)for(b=0;b<e.length;b++)d=e[b],d.ia=this.w.ia,d.j=this.w.j,
d.Va=this.A.Va;this.j("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ca&&d.Ca(this,this.w,this.b,this.i);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=Pc(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.F=!0,this.f=Jh),this.f&&(this.K= d.Da=this.w.Da;this.j("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ca&&d.Ca(this,this.A,this.b,this.i);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=Qc(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.F=!0,this.f=Kh),this.f&&(this.K=
new O(this,"1.30.1"),Lh(this.K)?b=null:delete this.K);!b&&this.f&&(b=Mh(this))&&(this.F=!0);if(b){var g=this;Ba(b,null,!0,function(a,b,c){c?(g.H=null,g.F=!1,g.ka("Unable to load machine state from server (error "+c+(b?": "+va(b):"")+")")):(g.J=b,g.P=!0);H(g)})}else H(this);this.I.power||(this.M=!0);!c&&this.M&&Nh(this,this.ub)}else n("Unable to find CPU component")}u(Hh);var Jh=0; new O(this,"1.30.1"),Mh(this.K)?b=null:delete this.K);!b&&this.f&&(b=Nh(this))&&(this.F=!0);if(b){var g=this;Ba(b,null,!0,function(a,b,c){c?(g.H=null,g.F=!1,g.ia("Unable to load machine state from server (error "+c+(b?": "+va(b):"")+")")):(g.J=b,g.P=!0);H(g)})}else H(this);this.I.power||(this.M=!0);!c&&this.M&&Oh(this,this.vb)}else n("Unable to find CPU component")}u(Ih);var Kh=0;
function Ih(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){n(d.message+" ("+c+")")}}a.R=b}function Pc(a,b,c){var d=b.toLowerCase(),d=db[b]||db[d];void 0===d&&a.R&&(d=a.R[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Nh(a,b,c){for(var d=kb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!pb(f)){pb(f,function(){Nh(a,b,c)});return}}b.call(a,c)} function Jh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){n(d.message+" ("+c+")")}}a.U=b}function Qc(a,b,c){var d=b.toLowerCase(),d=db[b]||db[d];void 0===d&&a.U&&(d=a.U[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Oh(a,b,c){for(var d=kb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!pb(f)){pb(f,function(){Oh(a,b,c)});return}}b.call(a,c)}
function Oh(a,b){var c=new O(a,"1.30.1","validate");if(Lh(c)&&Ph(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.ka("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Hh.prototype; function Ph(a,b){var c=new O(a,"1.30.1","validate");if(Mh(c)&&Qh(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.ia("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Ih.prototype;
k.ub=function(a){void 0===a&&(a=this.f||(this.J?1:Jh));if(!this.D){this.D++;var b=!1,c=!1;this.O=!1;var d=this.K||new O(this,"1.30.1");if(-1==a)b=!0;else if(a>Jh){if(Lh(d,this.J)){this.C=new O(this,"1.30.1","failsafe");Lh(this.C)&&(Qh(this,d),a=2,Rh(this.C));this.C.set("timestamp",Aa());Sh(this.C);var e=this.f&&!this.F;if(1==a||Da("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ph(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Lh(d,g):("error"== k.vb=function(a){void 0===a&&(a=this.f||(this.J?1:Kh));if(!this.B){this.B++;var b=!1,c=!1;this.O=!1;var d=this.K||new O(this,"1.30.1");if(-1==a)b=!0;else if(a>Kh){if(Mh(d,this.J)){this.D=new O(this,"1.30.1","failsafe");Mh(this.D)&&(Rh(this,d),a=2,Sh(this.D));this.D.set("timestamp",Aa());Th(this.D);var e=this.f&&!this.F;if(1==a||Da("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Qh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Mh(d,g):("error"==
f&&"no machine state"!=g?(this.ka("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.g=null)):this.j(f+": "+g),Rh(d),Lh(d)?(c=Ph(d),e=!0):c=!1))}e&&Oh(this,c?d:null)}else 2==a&&d.clear()}else Oh(this);delete this.J;delete this.K}e=kb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=Th(this,g,d,b,c));b=[d,a,c];-1!=a?Nh(this,this.Yb,b):this.Yb(b)}}; f&&"no machine state"!=g?(this.ia("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.g=null)):this.j(f+": "+g),Sh(d),Mh(d)?(c=Qh(d),e=!0):c=!1))}e&&Ph(this,c?d:null)}else 2==a&&d.clear()}else Ph(this);delete this.J;delete this.K}e=kb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=Uh(this,g,d,b,c));b=[d,a,c];-1!=a?Oh(this,this.Wb,b):this.Wb(b)}};
function Th(a,b,c,d,e){if(!b.v.ga){b.v.ga=!0;if(b.Aa){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Aa(f,d)&&f&&(n("Unable to restore state for "+b.type),a.N&&!a.P?(c.clear(),a.f=Jh,window&&window.location.reload()):a.O=!0,b.Aa(null),e=!1)}if(!d&&b.Zb)for(a=b.Zb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e} function Uh(a,b,c,d,e){if(!b.v.ja){b.v.ja=!0;if(b.ya){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ya(f,d)&&f&&(n("Unable to restore state for "+b.type),a.N&&!a.P?(c.clear(),a.f=Kh,window&&window.location.reload()):a.O=!0,b.ya(null),e=!1)}if(!d&&b.Xb)for(a=b.Xb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
k.Yb=function(a){var b=a[0],c=0>a[1];a=a[2];this.da=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(Th(this,this.b,b,c,a),this.b.qb());this.O&&(Qh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.D=0}; k.Wb=function(a){var b=a[0],c=0>a[1];a=a[2];this.ea=!0;this.v.ja=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(Uh(this,this.b,b,c,a),this.b.ab());this.O&&(Rh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0};
function Qh(a,b){if(Da("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.X;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}} function Rh(a,b){if(Da("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.Y;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}}
function Gh(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=Aa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ca(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var h=kb(a.id),m=0;m<h.length;m++){var p=h[m];p.v.ga&&(p.za&&(d=p.za(b,c),"object"===typeof d&&f.set(p.id, function Hh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=Aa();g.set("timestamp",h);f.set("timestamp",h);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.ca(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ja=!1,!1===d&&(e=null)));for(var h=kb(a.id),m=0;m<h.length;m++){var p=h[m];p.v.ja&&(p.xa&&(d=p.xa(b,c),"object"===typeof d&&f.set(p.id,
d)),c&&(p.v.ga=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.g&&Uh(a,a.g,f.toString()),Sh(g)&&Sh(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.v.ga=!1,b=a.I.power)&&(b.textContent="Power");a.D=0;return e}k.reset=function(){this.w&&this.w.reset&&(C(this,"Resetting "+this.w.type),this.w.reset());for(var a=kb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.w&&c.reset&&(C(this,"Resetting "+c.type),c.reset())}}; d)),c&&(p.v.ja=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.g&&Vh(a,a.g,f.toString()),Th(g)&&Th(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.v.ja=!1,b=a.I.power)&&(b.textContent="Power");a.B=0;return e}k.reset=function(){this.A&&this.A.reset&&(D(this,"Resetting "+this.A.type),this.A.reset());for(var a=kb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.A&&c.reset&&(D(this,"Resetting "+c.type),c.reset())}};
k.start=function(a,b){for(var c=kb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.ba(!0)};k.stop=function(a,b){for(var c=kb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.ba(!0)}; k.start=function(a,b){for(var c=kb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.ba(!0)};k.stop=function(a,b){for(var c=kb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.ba(!0)};
k.ra=function(a,b,c){var d=this;switch(b){case "power":return this.I[b]=c,c.onclick=function(){d.D||(d.v.ga?Gh(d,!1,!0):Nh(d,d.ub))},!0;case "reset":return this.I[b]=c,c.onclick=function(){if(d.v.ga&&!d.D)if(d.f&&!d.H){var a=Da("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Gh(d,a,!0);!a&&d.N?window&&window.location.reload():d.ub(Jh)}else d.reset(),d.b&&d.b.qb()},!0;case "save":if(qa())c.parentNode.removeChild(c);else return this.I[b]= k.qa=function(a,b,c){var d=this;switch(b){case "power":return this.I[b]=c,c.onclick=function(){d.B||(d.v.ja?Hh(d,!1,!0):Oh(d,d.vb))},!0;case "reset":return this.I[b]=c,c.onclick=function(){if(d.v.ja&&!d.B)if(d.f&&!d.H){var a=Da("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Hh(d,a,!0);!a&&d.N?window&&window.location.reload():d.vb(Kh)}else d.reset(),d.b&&d.b.ab()},!0;case "save":if(qa())c.parentNode.removeChild(c);else return this.I[b]=
c,c.onclick=function(){var a=Kh(d,!0);if(a){var b=!!(d.f&&!d.H||d.N),c=Gh(d,b);b?Uh(d,a,c):d.ka("Resume disabled, machine state not saved")}},!0}return!1}; c,c.onclick=function(){var a=Lh(d,!0);if(a){var b=!!(d.f&&!d.H||d.N),c=Hh(d,b);b?Vh(d,a,c):d.ia("Resume disabled, machine state not saved")}},!0}return!1};
function Kh(a,b){var c=a.g;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Vh(a,c))||a.ka("The user ID is invalid.")):b&&a.ka("Browser local storage is not available"));return c} function Lh(a,b){var c=a.g;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Wh(a,c))||a.ia("The user ID is invalid.")):b&&a.ia("Browser local storage is not available"));return c}
function Vh(a,b){a.g=null;b=Ba(ra()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.g=b.data)}catch(d){n(d.message+" ("+c+")")}return a.g}function Mh(a){var b=null;a.g&&(b=ra()+"/api/v1/user?req=load&user="+a.g+"&state="+Wh(a,"1.30.1"));return b} function Wh(a,b){a.g=null;b=Ba(ra()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.g=b.data)}catch(d){n(d.message+" ("+c+")")}return a.g}function Nh(a){var b=null;a.g&&(b=ra()+"/api/v1/user?req=load&user="+a.g+"&state="+Xh(a,"1.30.1"));return b}
function Uh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Wh(a,"1.30.1");d.data=c;b=Ba(ra()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.ka("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.ka(c),Ka("user",""),a.g=null)}} function Vh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Xh(a,"1.30.1");d.data=c;b=Ba(ra()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.ia("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.ia(c),Ka("user",""),a.g=null)}}
function Fg(a){var b;a=kb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.wb=function(){};k.ba=function(a){this.b&&this.b.ba(a);this.A&&this.A.ba(a)};Ta(function(){for(var a=B(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=B(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=z(f),g=new Hh(g,d,!0);A(g,f);g.M&&Nh(g,g.ub)}}); function Gg(a){var b;a=kb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.lb=function(){this.Da&&this.Da.focus()};k.ba=function(a){this.b&&this.b.ba(a);this.w&&this.w.ba(a)};Ta(function(){for(var a=C(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=C(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=z(f),g=new Ih(g,d,!0);A(g,f);g.M&&Oh(g,g.vb)}});
Oa.show.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=mb("Computer",c.id))&&c.da&&!c.v.ga&&c.ub(-1)}});Oa.exit.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=mb("Computer",c.id))&&c.v.ga&&Gh(c,!(!c.f||c.H),!0)}});function O(a,b,c){this.id=a.id;this.key=Wh(a,b,c);this.i=a.i;Rh(this,a.tc)}function Wh(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a} Oa.show.push(function(){for(var a=C(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=mb("Computer",c.id))&&c.ea&&!c.v.ja&&c.vb(-1)}});Oa.exit.push(function(){for(var a=C(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=mb("Computer",c.id))&&c.v.ja&&Hh(c,!(!c.f||c.H),!0)}});function O(a,b,c){this.id=a.id;this.key=Xh(a,b,c);this.i=a.i;Sh(this,a.tc)}function Xh(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){Rh(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c, O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){Sh(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
1);c=0}}};function Rh(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function Sh(a){var b=!0;if(Ia()){var c=JSON.stringify(a[a.id]);Ka(a.key,c)||(n("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function Ph(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){n(c.message||c),b=!1}return b}function Lh(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ia()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var Xh=0; 1);c=0}}};function Sh(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function Th(a){var b=!0;if(Fa()){var c=JSON.stringify(a[a.id]);Ka(a.key,c)||(n("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function Qh(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){n(c.message||c),b=!1}return b}function Mh(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Fa()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var Yh=0;
function ii(a,b,c,d,e,f){e("Loading "+a+"...");Ba(a,null,!0,function(g,h,m){m?(h||(h="unable to load "+a+" ("+m+")"),f(h,null)):ji(h,a,b,c,d,e,f)})} function ji(a,b,c,d,e,f){e("Loading "+a+"...");Ba(a,null,!0,function(g,h,m){m?(h||(h="unable to load "+a+" ("+m+")"),f(h,null)):ki(h,a,b,c,d,e,f)})}
function ji(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(jb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"), function ki(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(jb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?ki(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)} a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?li(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function ki(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ba(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=h[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, function li(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ba(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=h[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
"");a=a.replace(d[0],g);ki(a,b,c)}})}else c(a,null)} "");a=a.replace(d[0],g);li(a,b,c)}})}else c(a,null)}
function li(a,b,c,d){function e(a){if(void 0===h){var b=g&&B(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ta(a))}function f(a){e("Error: "+a);m&&(--Xh||Va(!0));m=!1}var g,h,m=!0;Xh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| function mi(a,b,c,d){function e(a){if(void 0===h){var b=g&&C(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ta(a))}function f(a){e("Error: "+a);m&&(--Yh||Va(!0));m=!1}var g,h,m=!0;Yh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c||
(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,h){h?ii(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--Xh||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Xh||Va(!0)):f("invalid machine element: "+ (c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,h){h?ji(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--Yh||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Yh||Va(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ii(b,a,d,!0,e,p):ji(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){Va(!1);return li(a,b,c,d)};window.enableEvents=Va;window.sendEvent=Wa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ji(b,a,d,!0,e,p):ki(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){Va(!1);return mi(a,b,c,d)};window.enableEvents=Va;window.sendEvent=Wa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map

View file

@ -34,163 +34,165 @@ function ka(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexO
function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={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"},sa=Date.now||function(){return+new Date}; function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={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"},sa=Date.now||function(){return+new Date};
function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
function k(a,b,c,d){var e=0,f=null,h=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)}),h;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"== function k(a,b,c,d){var e=0,f=null,h=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)}),h;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 n="",r;for(r in b)b.hasOwnProperty(r)&&(n&&(n+="&"),n+=r+"="+encodeURIComponent(b[r]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}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),h=[f,e]);return h} typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}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),h=[f,e]);return h}
function ua(a,b){var c,d={N:null,Y:null,va:null,ua:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,h;if("<"==b.substr(0,1))throw Error(b);h=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.va=h.load;d.ua=h.exec;if(e=h.bytes)d.N=e;else if(e=h.words)for(d.N=Array(2*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255,d.N[f++]=e[c]>>8&255;else if(e=h.data)for(d.N=Array(4*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255, function ua(a,b){var c,d={N:null,T:null,la:null,ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,h;if("<"==b.substr(0,1))throw Error(b);h=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.la=h.load;d.ka=h.exec;if(e=h.bytes)d.N=e;else if(e=h.words)for(d.N=Array(2*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255,d.N[f++]=e[c]>>8&255;else if(e=h.data)for(d.N=Array(4*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255,
d.N[f++]=e[c]>>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=h;d.Y=h.symbols;d.N.length?1==d.N.length&&(m(d.N[0]),d=null):(m("Empty resource: "+a),d=null)}catch(l){m("Resource data error ("+a+"): "+l.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){m("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.N=e)}return d} d.N[f++]=e[c]>>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=h;d.T=h.symbols;d.N.length?1==d.N.length&&(m(d.N[0]),d=null):(m("Empty resource: "+a),d=null)}catch(l){m("Resource data error ("+a+"): "+l.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){m("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.N=e)}return d}
function na(){return"http://"+(window?window.location.host:"www.pcjs.org")}function m(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 na(){return"http://"+(window?window.location.host:"www.pcjs.org")}function m(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 za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Aa(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 p={init:[],show:[],exit:[]},Ba=!1,Ca=!1,Da=!0; function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Aa(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 p={init:[],show:[],exit:[]},Ba=!1,Ca=!1,Da=!0;
function Ea(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function q(a){p.init.push(a)}function Fa(a){if(Da)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){m(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ga(a){!Da&&a?(Da=!0,Ba&&Ha("init"),Ca&&Ha("show")):Da=a}function Ha(a){p[a]&&Fa(p[a])}Ea("onload",function(){Ba=!0;Fa(p.init)});Ea("onpageshow",function(){Ca=!0;Fa(p.show)}); function Ea(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function r(a){p.init.push(a)}function Fa(a){if(Da)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){m(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ga(a){!Da&&a?(Da=!0,Ba&&Ha("init"),Ca&&Ha("show")):Da=a}function Ha(a){p[a]&&Fa(p[a])}Ea("onload",function(){Ba=!0;Fa(p.init)});Ea("onpageshow",function(){Ca=!0;Fa(p.show)});
Ea(Aa("Opera")||Aa("iOS")?"onunload":"onbeforeunload",function(){Fa(p.exit)});function u(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.pb=b.comment;this.Hb=b;b=this.id.indexOf(".");0>b?this.Ka=this.id:(this.ra=this.id.substr(0,b),this.Ka=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Ya:!1,gd:!1,O:!1,error:!1};this.Ua=null;this.i.error=!1;this.s={};this.F=null;v.push(this)}var Ia=void 0,Ja={}; Ea(Aa("Opera")||Aa("iOS")?"onunload":"onbeforeunload",function(){Fa(p.exit)});function u(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.qb=b.comment;this.Hb=b;b=this.id.indexOf(".");0>b?this.Ka=this.id:(this.sa=this.id.substr(0,b),this.Ka=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Ya:!1,gd:!1,O:!1,error:!1};this.Ua=null;this.i.error=!1;this.u={};this.D=null;v.push(this)}var Ia=void 0,Ja={};
if(window){Ia||(Ia=window.location.search.substr(1));for(var Ka,La=/\+/g,Ma=/([^&=]+)=?([^&]*)/g;Ka=Ma.exec(Ia);)Ja[decodeURIComponent(Ka[1].replace(La," "))]=decodeURIComponent(Ka[2].replace(La," "))}function Na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} if(window){Ia||(Ia=window.location.search.substr(1));for(var Ka,La=/\+/g,Ma=/([^&=]+)=?([^&]*)/g;Ka=Ma.exec(Ia);)Ja[decodeURIComponent(Ka[1].replace(La," "))]=decodeURIComponent(Ka[2].replace(La," "))}function Na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
function w(a,b){b||(b=u);a.prototype=Na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Oa=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Oa={},v=[];function Pa(a,b,c){Oa[a]&&b&&(Oa[a][b]=c)}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<v.length;b++){var d=v[b];a&&d.id.indexOf(a)||c.push(d)}return c} function w(a,b){b||(b=u);a.prototype=Na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Oa=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Oa={},v=[];function Pa(a,b,c){Oa[a]&&b&&(Oa[a][b]=c)}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<v.length;b++){var d=v[b];a&&d.id.indexOf(a)||c.push(d)}return c}
function Qa(a){if(void 0!==a){var b;for(b=0;b<v.length;b++)if(v[b].id===a)return v[b]}return null}function Ra(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<v.length;d++)if(c)c==v[d]&&(c=null);else if(!(a!=v[d].type||b&&v[d].id.indexOf(b)))return v[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){m(c.message+" ("+a+")")}return b} function Qa(a){if(void 0!==a){var b;for(b=0;b<v.length;b++)if(v[b].id===a)return v[b]}return null}function Sa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<v.length;d++)if(c)c==v[d]&&(c=null);else if(!(a!=v[d].type||b&&v[d].id.indexOf(b)))return v[d]}return null}function y(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){m(c.message+" ("+a+")")}return b}
function A(a,b){b=B(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var h=f.getAttribute("class");if(h)for(var l=h.split(" "),n=0;n<l.length;n++)switch(h=l[n],h){case "pdp11-binding":(h=z(f))&&h.binding&&a.W(h.type,h.binding,f,h.value),n=l.length}}}} function A(a,b){b=B(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var h=f.getAttribute("class");if(h)for(var l=h.split(" "),n=0;n<l.length;n++)switch(h=l[n],h){case "pdp11-binding":(h=y(f))&&h.binding&&a.X(h.type,h.binding,f,h.value),n=l.length}}}}
function B(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c} function B(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
u.prototype={constructor:u,parent:null,toString:function(){return this.name?this.name:this.id||this.type},W:function(a,b,c){switch(b){case "clear":return this.s[b]||(this.s[b]=c,c.onclick=function(a){return function(){a.s.print&&(a.s.print.value="")}}(this)),!0;case "print":return this.s[b]||(this.Za=this.s[b]=c,c.value="",this.R=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c), u.prototype={constructor:u,parent:null,toString:function(){return this.name?this.name:this.id||this.type},X:function(a,b,c){switch(b){case "clear":return this.u[b]||(this.u[b]=c,c.onclick=function(a){return function(){a.u.print&&(a.u.print.value="")}}(this)),!0;case "print":return this.u[b]||(this.wa=this.u[b]=c,c.value="",this.R=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
this.K=function(a){this.R(a,this.Ka)}),!0;default:return!1}},log:function(){},R:function(){},status:function(a){this.R(this.Ka+": "+a)},K:function(a,b,c){c=c||this.type;b||m((c?c+": ":"")+a)},$:function(){return this.i.O=!0},Z:function(a,b){b&&(this.i.O=!1);return!0}};function C(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.Ua;a.Ua=null;b&&b()}}function Sa(a,b){b&&(a.i.ready?b():a.Ua=b);return a.i.ready} this.K=function(a){this.R(a,this.Ka)}),!0;default:return!1}},log:function(){},R:function(){},status:function(a){this.R(this.Ka+": "+a)},K:function(a,b,c){c=c||this.type;b||m((c?c+": ":"")+a)},Z:function(){return this.i.O=!0},Y:function(a,b){b&&(this.i.O=!1);return!0}};function C(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.Ua;a.Ua=null;b&&b()}}function Ta(a,b){b&&(a.i.ready?b():a.Ua=b);return a.i.ready}
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1}); Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ta="undefined"!==typeof ArrayBuffer;function Ua(a){u.call(this,"Panel",a,Ua);this.b=0;this.i.kb=!0}w(Ua);g=Ua.prototype; Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ua="undefined"!==typeof ArrayBuffer;function Va(a){u.call(this,"Panel",a,Va);this.b=0;this.i.lb=!0}w(Va);g=Va.prototype;
g.W=function(a,b,c,d){if(this.A&&this.A.W(a,b,c,d)||this.a&&this.a.W(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.s[b]=c,this.b++,!0;default:return"rled"==a?(this.s[b]=c,this.b++,!0):this.parent.W.call(this,a,b,c,d)}};g.fa=function(a,b,c,d){this.A=a;this.m=b;this.a=c;this.F=d};g.$=function(a,b){b||Va();return!0};g.Z=function(){return!0}; g.X=function(a,b,c,d){if(this.o&&this.o.X(a,b,c,d)||this.a&&this.a.X(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.u[b]=c,this.b++,!0;default:return"rled"==a?(this.u[b]=c,this.b++,!0):this.parent.X.call(this,a,b,c,d)}};g.ea=function(a,b,c,d){this.o=a;this.j=b;this.a=c;this.D=d};g.Z=function(a,b){b||Wa();return!0};g.Y=function(){return!0};
function Wa(a,b,c,d){if(a.s[b]){void 0===c&&(a.i.error=!0,a.K("Value for "+b+" is invalid"),D(a.a));var e=a.F&&a.F.b||8;c=!a.a.i.V||a.i.kb?8==e?ia(c,d):ja(c,d):"--------".substr(0,d||4);a.s[b].textContent!=c&&(a.s[b].textContent=c)}}function Xa(a,b,c,d){for(var e=0;e<d;e++){var f=a.s[b+e];f&&(f.style.backgroundColor=c&1<<e?"#ff0000":"#000000")}} function Xa(a,b,c,d){if(a.u[b]){void 0===c&&(a.i.error=!0,a.K("Value for "+b+" is invalid"),D(a.a));var e=a.D&&a.D.b||8;c=!a.a.i.W||a.i.lb?8==e?ia(c,d):ja(c,d):"--------".substr(0,d||4);a.u[b].textContent!=c&&(a.u[b].textContent=c)}}function Ya(a,b,c,d){for(var e=0;e<d;e++){var f=a.u[b+e];f&&(f.style.backgroundColor=c&1<<e?"#ff0000":"#000000")}}
g.ba=function(a){if(this.b&&(a||!this.a.i.V||this.i.kb)){for(a=0;a<this.a.f.length;a++)Wa(this,"R"+a,this.a.f[a]);a=Ya(this.a);Wa(this,"PS",a);Wa(this,"NF",a&8?1:0,1);Wa(this,"ZF",a&4?1:0,1);Wa(this,"VF",a&2?1:0,1);Wa(this,"CF",a&1?1:0,1);Xa(this,"D",this.a.f[0],16);Xa(this,"A",this.a.f[7],22)}};function Va(){for(var a=!1,b=B(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=Qa(e.id);f||(a=!0,f=new Ua(e));A(f,d);a&&C(f)}}q(Va); g.aa=function(a){if(this.b&&(a||!this.a.i.W||this.i.lb)){for(a=0;a<this.a.f.length;a++)Xa(this,"R"+a,this.a.f[a]);a=Za(this.a);Xa(this,"PS",a);Xa(this,"NF",a&8?1:0,1);Xa(this,"ZF",a&4?1:0,1);Xa(this,"VF",a&2?1:0,1);Xa(this,"CF",a&1?1:0,1);Ya(this,"D",this.a.f[0],16);Ya(this,"A",this.a.f[7],22)}};function Wa(){for(var a=!1,b=B(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=y(d),f=Qa(e.id);f||(a=!0,f=new Va(e));A(f,d);a&&C(f)}}r(Wa);
function Za(a,b,c){u.call(this,"Bus",a,Za);this.a=b;this.F=c;this.G=a.busWidth||16;this.j=0;this.C=[];this.u=null;this.w=Math.pow(2,this.G);this.h=this.w-1|0;this.c=E;this.m=Math.log2(this.c);this.B=this.c>>2;this.g=this.c-1;this.A=this.w/this.c|0;this.ka=[];this.P=0;this.o=[];this.Bb=[$a,ab,bb,cb];a=new F(this);db(a,this.F);this.b=Array(this.A);for(b=0;b<this.A;b++)this.b[b]=a;C(this)}w(Za);var E=8192,eb=E-1; function $a(a,b,c){u.call(this,"Bus",a,$a);this.a=b;this.D=c;this.H=a.busWidth||16;this.o=0;this.G=[];this.w=null;this.B=Math.pow(2,this.H);this.h=this.B-1|0;this.c=E;this.j=Math.log2(this.c);this.C=this.c>>2;this.g=this.c-1;this.v=this.B/this.c|0;this.ja=[];this.m=0;this.s=[];this.Bb=[ab,bb,cb,db];a=new F(this);eb(a,this.D);this.b=Array(this.v);for(b=0;b<this.v;b++)this.b[b]=a;C(this)}w($a);var E=8192,fb=E-1;
function $a(a,b){var c=-1,d=this.controller,e=d.ka[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=fb(d,b)}function ab(a,b,c){var d=!1,e=this.controller,f=e.ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||fb(e,c)} function ab(a,b){var c=-1,d=this.controller,e=d.ja[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.ja[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=gb(d,b)}function bb(a,b,c){var d=!1,e=this.controller,f=e.ja[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ja[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||gb(e,c)}
function bb(a,b){var c=-1,d=this.controller;(a=d.ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=fb(d,b)}function cb(a,b,c){var d=!1,e=this.controller;if(a=e.ka[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||fb(e,c)}function gb(a,b){if(b!=a.j){var c;a.j&&(c=(1<<a.j)-E,hb(a,c,E,a.C),a.j=0);b&&(a.j=b,c=(1<<b)-E,a.C=ib(a,c,E),a.u?hb(a,c,E,a.u):(jb(a,c,E,kb,a),a.u=ib(a,c,E)))}} function cb(a,b){var c=-1,d=this.controller;(a=d.ja[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=gb(d,b)}function db(a,b,c){var d=!1,e=this.controller;if(a=e.ja[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||gb(e,c)}function hb(a,b){if(b!=a.o){var c;a.o&&(c=(1<<a.o)-E,ib(a,c,E,a.G),a.o=0);b&&(a.o=b,c=(1<<b)-E,a.G=jb(a,c,E),a.w?ib(a,c,E,a.w):(kb(a,c,E,lb,a),a.w=jb(a,c,E)))}}
Za.prototype.reset=function(){for(var a=0;a<this.o.length;a++)this.o[a]();gb(this,16)};function fb(a,b){a.P||G(a.a,4,b);return 0}Za.prototype.$=function(a,b){b||this.reset();return!0}; $a.prototype.reset=function(){for(var a=0;a<this.s.length;a++)this.s[a]();hb(this,16)};function gb(a,b){a.m||G(a.a,4,b);return 0}$a.prototype.Z=function(a,b){b||this.reset();return!0};
function jb(a,b,c,d,e){for(var f=b,h=c,l=f>>>a.m;0<h&&l<a.b.length;){var n=a.b[l],r=l*a.c,t=a.c-(f-r);t>h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.Ea)return n.Wa+=n.Ea-f,n.Ea=f,!0;if(f>=n.Ea+n.Wa){t=n.size-(f-r);t>h&&(t=h);n.Wa=f-n.Ea+t;f=r+a.c;h-=t;l++;continue}}return lb(1,f,h)}f=new F(a,f,t,a.c,d,e);db(f,a.F,n);a.b[l++]=f;f=r+a.c;h-=t}if(0>=h){c/=1024;var y;e="";y?10<y&&(y=10):y=c&-65536?10:5;if(null==c||isNaN(c))for(;0<y--;)e="?"+e;else for(;0<y--;)e=String.fromCharCode(c%10+48)+e,c/= function kb(a,b,c,d,e){for(var f=b,h=c,l=f>>>a.j;0<h&&l<a.b.length;){var n=a.b[l],q=l*a.c,t=a.c-(f-q);t>h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Wa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Wa){t=n.size-(f-q);t>h&&(t=h);n.Wa=f-n.ya+t;f=q+a.c;h-=t;l++;continue}}return mb(1,f,h)}f=new F(a,f,t,a.c,d,e);eb(f,a.D,n);a.b[l++]=f;f=q+a.c;h-=t}if(0>=h){c/=1024;var z;e="";z?10<z&&(z=10):z=c&-65536?10:5;if(null==c||isNaN(c))for(;0<z--;)e="?"+e;else for(;0<z--;)e=String.fromCharCode(c%10+48)+e,c/=
10;a.status(e+"Kb "+mb[d]+" at "+ia(b));return!0}return lb(2,b,c)}function ib(a,b,c){var d=[];for(b>>>=a.m;0<c&&b<a.b.length;)d.push(a.b[b++]),c-=a.c;return d}function hb(a,b,c,d){var e=0;for(b>>>=a.m;0<c&&b<a.b.length;){var f=d[e++];if(!f)break;a.b[b++]=f;c-=a.c}}function nb(a,b){return a.b[(b&a.h)>>>a.m].eb(b&a.g,b)}function ob(a,b){return a.b[(b&a.h)>>>a.m].S(b&a.g,b)}Za.prototype.Ia=function(a,b){this.P++;this.b[(a&this.h)>>>this.m].yb(a&this.g,b&255,a);this.P--}; 10;a.status(e+"Kb "+nb[d]+" at "+ia(b));return!0}return mb(2,b,c)}function jb(a,b,c){var d=[];for(b>>>=a.j;0<c&&b<a.b.length;)d.push(a.b[b++]),c-=a.c;return d}function ib(a,b,c,d){var e=0;for(b>>>=a.j;0<c&&b<a.b.length;){var f=d[e++];if(!f)break;a.b[b++]=f;c-=a.c}}function ob(a,b){return a.b[(b&a.h)>>>a.j].eb(b&a.g,b)}function pb(a,b){return a.b[(b&a.h)>>>a.j].S(b&a.g,b)}$a.prototype.Ia=function(a,b){this.m++;this.b[(a&this.h)>>>this.j].kb(a&this.g,b&255,a);this.m--};
function pb(a,b,c){a.b[(b&a.h)>>>a.m].Xa(b&a.g,c&65535,b)}function qb(a){for(var b=0,c=[],d=0;d<a.A;d++){var e=a.b[d];if(e.la||e.Db){c[b++]=d;var f=b++;if(e=e.save()){for(var h=0,l=0,n=[];h<e.length;){for(var r=e[h],t=h+1;t<e.length&&e[t]===r;)t++;n[l++]=t-h;n[l++]=r;h=t}n.length<e.length&&(e=n)}c[f]=e}}return c}function rb(a,b,c,d,e,f,h,l){for(;b<=c;b+=2){var n=b&eb;void 0!==a.ka[n]?m("I/O address already registered: "+ja(b,8,!0)):a.ka[n]=[d,e,f,h,l||"unknown",!1]}} function qb(a,b,c){a.b[(b&a.h)>>>a.j].Xa(b&a.g,c&65535,b)}function rb(a){for(var b=0,c=[],d=0;d<a.v;d++){var e=a.b[d];if(e.ma||e.Db){c[b++]=d;var f=b++;if(e=e.save()){for(var h=0,l=0,n=[];h<e.length;){for(var q=e[h],t=h+1;t<e.length&&e[t]===q;)t++;n[l++]=t-h;n[l++]=q;h=t}n.length<e.length&&(e=n)}c[f]=e}}return c}function sb(a,b,c,d,e,f,h,l){for(;b<=c;b+=2){var n=b&fb;void 0!==a.ja[n]?m("I/O address already registered: "+ja(b,8,!0)):a.ja[n]=[d,e,f,h,l||"unknown",!1]}}
function sb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.a.Ja)){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,r=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&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));rb(a,e,e,h,l,n,r,f[4])}}}function tb(a,b){a.o.push(b)}function ub(a,b){a.P||G(a.a,4,b)} function tb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.a.Oa)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));sb(a,e,e,h,l,n,q,f[4])}}}function ub(a,b){a.s.push(b)}function vb(a,b){a.m||G(a.a,4,b)}
function lb(a,b,c){m("Memory block error ("+a+": "+ja(b)+","+ja(c)+")");return!1}function H(a){u.call(this,"Device",a,H);this.c={data:0,fd:0,Va:20,uc:0};this.b={hd:0,ib:-1}}w(H);g=H.prototype;g.fa=function(a,b,c,d){this.m=b;this.a=c;this.F=d;var e=this;this.b.ib=vb(c,function(){e.b.na|=128;e.b.na&64&&(wb(e.a,e.b.vc),xb(e.a,e.b.ib,1E3/60))});this.b.vc=yb(64,6);sb(b,this,I);tb(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Va=this.c.Va&-120|20;this.b.na=0}; function mb(a,b,c){m("Memory block error ("+a+": "+ja(b)+","+ja(c)+")");return!1}function H(a){u.call(this,"Device",a,H);this.c={data:0,fd:0,Va:20,uc:0};this.b={hd:0,ib:-1}}w(H);g=H.prototype;g.ea=function(a,b,c,d){this.j=b;this.a=c;this.D=d;var e=this;this.b.ib=wb(c,function(){e.b.oa|=128;e.b.oa&64&&(xb(e.a,e.b.vc),yb(e.a,e.b.ib,1E3/60))});this.b.vc=zb(64,6);tb(b,this,I);ub(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Va=this.c.Va&-120|20;this.b.oa=0};
g.Qb=function(){var a=this.b.na;this.b.na&=-129;return a};g.Ec=function(a){this.b.na=a;a&64&&xb(this.a,this.b.ib,1E3/60);this.b.na=a&-129};g.Jb=function(a){return(a?this.c.uc:this.c.data)&65535};g.xc=function(a){this.c.data=a};g.Sb=function(){var a=this.a;return a.w&62337|a.La<<5|a.Ma<<1};g.Gc=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.La=a>>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ga!=c&&(b.Ga=c,zb(b))}Ab(this)}; g.Qb=function(){var a=this.b.oa;this.b.oa&=-129;return a};g.Ec=function(a){this.b.oa=a;a&64&&yb(this.a,this.b.ib,1E3/60);this.b.oa=a&-129};g.Jb=function(a){return(a?this.c.uc:this.c.data)&65535};g.xc=function(a){this.c.data=a};g.Sb=function(){var a=this.a;return a.w&62337|a.La<<5|a.Ma<<1};g.Gc=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.La=a>>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ga!=c&&(b.Ga=c,Ab(b))}Bb(this)};
g.Tb=function(){var a=this.a.oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Ub=function(){return this.a.gb};g.Vb=function(){return this.a.pa};g.Hc=function(a){var b=this.a;1170>b.Ja&&(a&=-49);b.pa!=a&&(b.pa=a,a&16?(b.bb=4194303,b.Na=3915776):(b.bb=262143,b.Na=253952),zb(b));Ab(this)};function Ab(a){a.c.Va=a.c.Va&-8|(a.a.Ga?a.a.pa&16?1:2:4)}g.ic=function(a){return this.a.D[1][a>>1&7]};g.Vc=function(a,b){this.a.D[1][b>>1&7]=a&65295};g.gc=function(a){return this.a.D[1][(a>>1&7)+8]}; g.Tb=function(){var a=this.a.pa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Ub=function(){return this.a.gb};g.Vb=function(){return this.a.qa};g.Hc=function(a){var b=this.a;1170>b.Oa&&(a&=-49);b.qa!=a&&(b.qa=a,a&16?(b.ab=4194303,b.Na=3915776):(b.ab=262143,b.Na=253952),Ab(b));Bb(this)};function Bb(a){a.c.Va=a.c.Va&-8|(a.a.Ga?a.a.qa&16?1:2:4)}g.ic=function(a){return this.a.F[1][a>>1&7]};g.Vc=function(a,b){this.a.F[1][b>>1&7]=a&65295};g.gc=function(a){return this.a.F[1][(a>>1&7)+8]};
g.Tc=function(a,b){this.a.D[1][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.T[1][a>>1&7]};g.Uc=function(a,b){b=b>>1&7;this.a.T[1][b]=a;this.a.D[1][b]&=65295};g.fc=function(a){return this.a.T[1][(a>>1&7)+8]};g.Sc=function(a,b){b=(b>>1&7)+8;this.a.T[1][b]=a;this.a.D[1][b]&=65295};g.Pb=function(a){return this.a.D[0][a>>1&7]};g.Dc=function(a,b){this.a.D[0][b>>1&7]=a&65295};g.Nb=function(a){return this.a.D[0][(a>>1&7)+8]};g.Bc=function(a,b){this.a.D[0][(b>>1&7)+8]=a&65295}; g.Tc=function(a,b){this.a.F[1][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.U[1][a>>1&7]};g.Uc=function(a,b){b=b>>1&7;this.a.U[1][b]=a;this.a.F[1][b]&=65295};g.fc=function(a){return this.a.U[1][(a>>1&7)+8]};g.Sc=function(a,b){b=(b>>1&7)+8;this.a.U[1][b]=a;this.a.F[1][b]&=65295};g.Pb=function(a){return this.a.F[0][a>>1&7]};g.Dc=function(a,b){this.a.F[0][b>>1&7]=a&65295};g.Nb=function(a){return this.a.F[0][(a>>1&7)+8]};g.Bc=function(a,b){this.a.F[0][(b>>1&7)+8]=a&65295};
g.Ob=function(a){return this.a.T[0][a>>1&7]};g.Cc=function(a,b){b=b>>1&7;this.a.T[0][b]=a;this.a.D[0][b]&=65295};g.Mb=function(a){return this.a.T[0][(a>>1&7)+8]};g.Ac=function(a,b){b=(b>>1&7)+8;this.a.T[0][b]=a;this.a.D[0][b]&=65295};g.oc=function(a){return this.a.D[3][a>>1&7]};g.ad=function(a,b){this.a.D[3][b>>1&7]=a&65295};g.mc=function(a){return this.a.D[3][(a>>1&7)+8]};g.Zc=function(a,b){this.a.D[3][(b>>1&7)+8]=a&65295};g.nc=function(a){return this.a.T[3][a>>1&7]}; g.Ob=function(a){return this.a.U[0][a>>1&7]};g.Cc=function(a,b){b=b>>1&7;this.a.U[0][b]=a;this.a.F[0][b]&=65295};g.Mb=function(a){return this.a.U[0][(a>>1&7)+8]};g.Ac=function(a,b){b=(b>>1&7)+8;this.a.U[0][b]=a;this.a.F[0][b]&=65295};g.oc=function(a){return this.a.F[3][a>>1&7]};g.ad=function(a,b){this.a.F[3][b>>1&7]=a&65295};g.mc=function(a){return this.a.F[3][(a>>1&7)+8]};g.Zc=function(a,b){this.a.F[3][(b>>1&7)+8]=a&65295};g.nc=function(a){return this.a.U[3][a>>1&7]};
g.$c=function(a,b){b=b>>1&7;this.a.T[3][b]=a;this.a.D[3][b]&=65295};g.lc=function(a){return this.a.T[3][(a>>1&7)+8]};g.Yc=function(a,b){b=(b>>1&7)+8;this.a.T[3][b]=a;this.a.D[3][b]&=65295};g.ya=function(a){a&=7;return this.a.v&2048?this.a.wa[a]:this.a.f[a]};g.Aa=function(a,b){b&=7;this.a.v&2048?this.a.wa[b]=a:this.a.f[b]=a};g.$b=function(){return this.a.v&49152?this.a.aa[0]:this.a.f[6]};g.Mc=function(a){this.a.v&49152?this.a.aa[0]=a:this.a.f[6]=a};g.cc=function(){return this.a.f[7]}; g.$c=function(a,b){b=b>>1&7;this.a.U[3][b]=a;this.a.F[3][b]&=65295};g.lc=function(a){return this.a.U[3][(a>>1&7)+8]};g.Yc=function(a,b){b=(b>>1&7)+8;this.a.U[3][b]=a;this.a.F[3][b]&=65295};g.Aa=function(a){a&=7;return this.a.A&2048?this.a.xa[a]:this.a.f[a]};g.Ca=function(a,b){b&=7;this.a.A&2048?this.a.xa[b]=a:this.a.f[b]=a};g.$b=function(){return this.a.A&49152?this.a.$[0]:this.a.f[6]};g.Mc=function(a){this.a.A&49152?this.a.$[0]=a:this.a.f[6]=a};g.cc=function(){return this.a.f[7]};
g.Pc=function(a){this.a.f[7]=a};g.za=function(a){a&=7;return this.a.v&2048?this.a.f[a]:this.a.wa[a]};g.Ba=function(a,b){b&=7;this.a.v&2048?this.a.f[b]=a:this.a.wa[b]=a};g.ac=function(){return 1==(this.a.v&49152)>>14?this.a.f[6]:this.a.aa[1]};g.Nc=function(a){1==(this.a.v&49152)>>14?this.a.f[6]=a:this.a.aa[1]=a};g.bc=function(){return 3==(this.a.v&49152)>>14?this.a.f[6]:this.a.aa[3]};g.Oc=function(a){3==(this.a.v&49152)>>14?this.a.f[6]=a:this.a.aa[3]=a};g.Lb=function(a){return this.a.vb[a-65504>>1]}; g.Pc=function(a){this.a.f[7]=a};g.Ba=function(a){a&=7;return this.a.A&2048?this.a.f[a]:this.a.xa[a]};g.Da=function(a,b){b&=7;this.a.A&2048?this.a.f[b]=a:this.a.xa[b]=a};g.ac=function(){return 1==(this.a.A&49152)>>14?this.a.f[6]:this.a.$[1]};g.Nc=function(a){1==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.$[1]=a};g.bc=function(){return 3==(this.a.A&49152)>>14?this.a.f[6]:this.a.$[3]};g.Oc=function(a){3==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.$[3]=a};g.Lb=function(a){return this.a.wb[a-65504>>1]};
g.zc=function(a,b){this.a.vb[b-65504>>1]=a};g.tb=function(a){return 65520==a?61183:0};g.Ab=function(){};g.kc=function(){return 1};g.Xc=function(){};g.Kb=function(){return this.a.H};g.yc=function(){this.a.H=0};g.Rb=function(){return this.a.ub};g.Fc=function(a,b){b&1||(a&=255);this.a.ub=a};g.Wb=function(a){return a?this.a.hb:0};g.Ic=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.hb=a;b.l|=2};g.jc=function(a){return a?this.a.qa&65280:0};g.Wc=function(a){this.a.qa=a|255}; g.zc=function(a,b){this.a.wb[b-65504>>1]=a};g.ub=function(a){return 65520==a?61183:0};g.Ab=function(){};g.kc=function(){return 1};g.Xc=function(){};g.Kb=function(){return this.a.I};g.yc=function(){this.a.I=0};g.Rb=function(){return this.a.vb};g.Fc=function(a,b){b&1||(a&=255);this.a.vb=a};g.Wb=function(a){return a?this.a.hb:0};g.Ic=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.hb=a;b.l|=2};g.jc=function(a){return a?this.a.ra&65280:0};g.Wc=function(a){this.a.ra=a|255};
g.Zb=function(){return Ya(this.a)};g.Lc=function(a){Bb(this.a,a&-1809|Ya(this.a)&1808);this.a.l|=128};g.zb=function(){}; g.Zb=function(){return Za(this.a)};g.Lc=function(a){Cb(this.a,a&-1809|Za(this.a)&1808);this.a.l|=128};g.zb=function(){};
var J={},I=(J[62592]=[null,null,H.prototype.ic,H.prototype.Vc,"SISDR",1145],J[62608]=[null,null,H.prototype.gc,H.prototype.Tc,"SDSDR",1145],J[62624]=[null,null,H.prototype.hc,H.prototype.Uc,"SISAR",1145],J[62640]=[null,null,H.prototype.fc,H.prototype.Sc,"SDSAR",1145],J[62656]=[null,null,H.prototype.Pb,H.prototype.Dc,"KISDR",1145],J[62672]=[null,null,H.prototype.Nb,H.prototype.Bc,"KDSDR",1145],J[62688]=[null,null,H.prototype.Ob,H.prototype.Cc,"KISAR",1145],J[62704]=[null,null,H.prototype.Mb,H.prototype.Ac, var J={},I=(J[62592]=[null,null,H.prototype.ic,H.prototype.Vc,"SISDR",1145],J[62608]=[null,null,H.prototype.gc,H.prototype.Tc,"SDSDR",1145],J[62624]=[null,null,H.prototype.hc,H.prototype.Uc,"SISAR",1145],J[62640]=[null,null,H.prototype.fc,H.prototype.Sc,"SDSAR",1145],J[62656]=[null,null,H.prototype.Pb,H.prototype.Dc,"KISDR",1145],J[62672]=[null,null,H.prototype.Nb,H.prototype.Bc,"KDSDR",1145],J[62688]=[null,null,H.prototype.Ob,H.prototype.Cc,"KISAR",1145],J[62704]=[null,null,H.prototype.Mb,H.prototype.Ac,
"KDSAR",1145],J[62798]=[null,null,H.prototype.Vb,H.prototype.Hc,"MMR3",1145],J[65382]=[null,null,H.prototype.Qb,H.prototype.Ec,"LKS"],J[65400]=[null,null,H.prototype.Jb,H.prototype.xc,"CNSL"],J[65402]=[null,null,H.prototype.Sb,H.prototype.Gc,"MMR0",1145],J[65404]=[null,null,H.prototype.Tb,H.prototype.zb,"MMR1",1145],J[65406]=[null,null,H.prototype.Ub,H.prototype.zb,"MMR2",1145],J[65408]=[null,null,H.prototype.oc,H.prototype.ad,"UISDR",1145],J[65424]=[null,null,H.prototype.mc,H.prototype.Zc,"UDSDR", "KDSAR",1145],J[62798]=[null,null,H.prototype.Vb,H.prototype.Hc,"MMR3",1145],J[65382]=[null,null,H.prototype.Qb,H.prototype.Ec,"LKS"],J[65400]=[null,null,H.prototype.Jb,H.prototype.xc,"CNSL"],J[65402]=[null,null,H.prototype.Sb,H.prototype.Gc,"MMR0",1145],J[65404]=[null,null,H.prototype.Tb,H.prototype.zb,"MMR1",1145],J[65406]=[null,null,H.prototype.Ub,H.prototype.zb,"MMR2",1145],J[65408]=[null,null,H.prototype.oc,H.prototype.ad,"UISDR",1145],J[65424]=[null,null,H.prototype.mc,H.prototype.Zc,"UDSDR",
1145],J[65440]=[null,null,H.prototype.nc,H.prototype.$c,"UISAR",1145],J[65456]=[null,null,H.prototype.lc,H.prototype.Yc,"UDSAR",1145],J[65472]=[null,null,H.prototype.ya,H.prototype.Aa,"R0SET0"],J[65473]=[null,null,H.prototype.ya,H.prototype.Aa,"R1SET0"],J[65474]=[null,null,H.prototype.ya,H.prototype.Aa,"R2SET0"],J[65475]=[null,null,H.prototype.ya,H.prototype.Aa,"R3SET0"],J[65476]=[null,null,H.prototype.ya,H.prototype.Aa,"R4SET0"],J[65477]=[null,null,H.prototype.ya,H.prototype.Aa,"R5SET0"],J[65478]= 1145],J[65440]=[null,null,H.prototype.nc,H.prototype.$c,"UISAR",1145],J[65456]=[null,null,H.prototype.lc,H.prototype.Yc,"UDSAR",1145],J[65472]=[null,null,H.prototype.Aa,H.prototype.Ca,"R0SET0"],J[65473]=[null,null,H.prototype.Aa,H.prototype.Ca,"R1SET0"],J[65474]=[null,null,H.prototype.Aa,H.prototype.Ca,"R2SET0"],J[65475]=[null,null,H.prototype.Aa,H.prototype.Ca,"R3SET0"],J[65476]=[null,null,H.prototype.Aa,H.prototype.Ca,"R4SET0"],J[65477]=[null,null,H.prototype.Aa,H.prototype.Ca,"R5SET0"],J[65478]=
[null,null,H.prototype.$b,H.prototype.Mc,"R6KERNEL"],J[65479]=[null,null,H.prototype.cc,H.prototype.Pc,"R7KERNEL"],J[65480]=[null,null,H.prototype.za,H.prototype.Ba,"R0SET1",1145],J[65481]=[null,null,H.prototype.za,H.prototype.Ba,"R1SET1",1145],J[65482]=[null,null,H.prototype.za,H.prototype.Ba,"R2SET1",1145],J[65483]=[null,null,H.prototype.za,H.prototype.Ba,"R3SET1",1145],J[65484]=[null,null,H.prototype.za,H.prototype.Ba,"R4SET1",1145],J[65485]=[null,null,H.prototype.za,H.prototype.Ba,"R5SET1",1145], [null,null,H.prototype.$b,H.prototype.Mc,"R6KERNEL"],J[65479]=[null,null,H.prototype.cc,H.prototype.Pc,"R7KERNEL"],J[65480]=[null,null,H.prototype.Ba,H.prototype.Da,"R0SET1",1145],J[65481]=[null,null,H.prototype.Ba,H.prototype.Da,"R1SET1",1145],J[65482]=[null,null,H.prototype.Ba,H.prototype.Da,"R2SET1",1145],J[65483]=[null,null,H.prototype.Ba,H.prototype.Da,"R3SET1",1145],J[65484]=[null,null,H.prototype.Ba,H.prototype.Da,"R4SET1",1145],J[65485]=[null,null,H.prototype.Ba,H.prototype.Da,"R5SET1",1145],
J[65486]=[null,null,H.prototype.ac,H.prototype.Nc,"R6SUPER",1145],J[65487]=[null,null,H.prototype.bc,H.prototype.Oc,"R6USER",1145],J[65504]=[null,null,H.prototype.Lb,H.prototype.zc,"CTRL",1170],J[65520]=[null,null,H.prototype.tb,H.prototype.Ab,"LSIZE",1170],J[65522]=[null,null,H.prototype.tb,H.prototype.Ab,"HSIZE",1170],J[65524]=[null,null,H.prototype.kc,H.prototype.Xc,"SYSID",1170],J[65526]=[null,null,H.prototype.Kb,H.prototype.yc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Rb,H.prototype.Fc, J[65486]=[null,null,H.prototype.ac,H.prototype.Nc,"R6SUPER",1145],J[65487]=[null,null,H.prototype.bc,H.prototype.Oc,"R6USER",1145],J[65504]=[null,null,H.prototype.Lb,H.prototype.zc,"CTRL",1170],J[65520]=[null,null,H.prototype.ub,H.prototype.Ab,"LSIZE",1170],J[65522]=[null,null,H.prototype.ub,H.prototype.Ab,"HSIZE",1170],J[65524]=[null,null,H.prototype.kc,H.prototype.Xc,"SYSID",1170],J[65526]=[null,null,H.prototype.Kb,H.prototype.yc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Rb,H.prototype.Fc,
"MB",1170],J[65530]=[null,null,H.prototype.Wb,H.prototype.Ic,"PIR"],J[65532]=[null,null,H.prototype.jc,H.prototype.Wc,"SL"],J[65534]=[null,null,H.prototype.Zb,H.prototype.Lc,"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]; "MB",1170],J[65530]=[null,null,H.prototype.Wb,H.prototype.Ic,"PIR"],J[65532]=[null,null,H.prototype.jc,H.prototype.Wc,"SL"],J[65534]=[null,null,H.prototype.Zb,H.prototype.Lc,"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[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[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];q(function(){for(var a=B(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=z(d);switch(c.type){case "default":c=new H(c);A(c,d);break;case "pc11":c=new K(c),A(c,d)}}});var Cb; 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];r(function(){for(var a=B(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=y(d);switch(c.type){case "default":c=new H(c);A(c,d);break;case "pc11":c=new K(c),A(c,d)}}});var Db;
if(Ta){var Db=new ArrayBuffer(2);(new DataView(Db)).setUint16(0,256,!0);Cb=256===(new Uint16Array(Db))[0]}else Cb=!1;var Eb=Cb; if(Ua){var Eb=new ArrayBuffer(2);(new DataView(Eb)).setUint16(0,256,!0);Db=256===(new Uint16Array(Eb))[0]}else Db=!1;var Fb=Db;
function F(a,b,c,d,e,f){this.m=a;this.id=Fb+=2;this.a=null;this.Ea=b;this.Wa=c;this.size=d||0;this.type=e||Gb;this.g=e==Hb;this.controller=null;db(this);this.la=this.Db=!1;if(d)if(f)this.controller=f,this.a=null,Ib(this,f.Bb);else if(Ta)this.b=new ArrayBuffer(d),this.s=new DataView(this.b,0,d),this.c=new Uint8Array(this.b,0,d),this.o=new Uint16Array(this.b,0,d>>1),this.a=new Int32Array(this.b,0,d>>2),Ib(this,Eb?Jb:Kb);else{this.a=Array(d>>2);for(a=0;a<this.a.length;a++)this.a[a]=0;Ib(this,Lb)}else Ib(this)} function F(a,b,c,d,e,f){this.j=a;this.id=Gb+=2;this.a=null;this.ya=b;this.Wa=c;this.size=d||0;this.type=e||Hb;this.g=e==Ib;this.controller=null;eb(this);this.ma=this.Db=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],Jb(this,f.Bb);else if(Ua)this.c=new ArrayBuffer(this.size),this.u=new DataView(this.c,0,this.size),this.b=new Uint8Array(this.c,0,this.size),this.m=new Uint16Array(this.c,0,this.size>>1),this.a=new Int32Array(this.c,0,this.size>>2),Jb(this,Fb?Kb:Lb);else{a=this.a=Array(this.size>>
var Gb=0,Hb=2,kb=4,mb=["NONE","RAM","ROM","VID","H/W"],Fb=0; 2);for(f=0;f<a.length;f++)a[f]=0;Jb(this,Mb)}else Jb(this)}var Hb=0,Ib=2,lb=4,nb=["NONE","RAM","ROM","VID","H/W"],Gb=0;
F.prototype={constructor:F,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ta)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.s.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Ta)for(b=0;b<a.length;b++)this.s.setInt32(b<<2,a[b],!0);else this.a=a;return this.la=!0}return!1},A:function(){return 255},w:function(){},u:function(a,b){return this.eb(a++,b++)|this.eb(a,b)<<8},B:function(a,b,c){this.jb(a++, F.prototype={constructor:F,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ua)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.u.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Ua)for(b=0;b<a.length;b++)this.u.setInt32(b<<2,a[b],!0);else this.a=a;return this.ma=!0}return!1},s:function(){return 255},w:function(){},v:function(a,b){return this.eb(a++,b++)|this.eb(a,b)<<8},B:function(a,b,c){this.jb(a++,
b&255,c++);this.jb(a,b>>8,c)},L:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&ub(this.m,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ha:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.la=!0},ta:function(a,b,c){a&1&&ub(this.m,c);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|b>>8);this.la=!0},G:function(a,b){return this.I(a,b)}, b&255,c++);this.jb(a,b>>8,c)},L:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&vb(this.j,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ha:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.ma=!0},va:function(a,b,c){a&1&&vb(this.j,c);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|b>>8);this.ma=!0},G:function(a,b){return this.H(a,b)},
P:function(a,b){return this.U(a,b)},ea:function(a,b,c){this.g||this.yb(a,b,c)},ja:function(a,b,c){this.g||this.ra(a,b,c)},C:function(a){return this.c[a]},J:function(a){return this.c[a]},M:function(a,b){a&1&&ub(this.m,b);return this.s.getUint16(a,!0)},X:function(a,b){a&1&&ub(this.m,b);return this.o[a>>1]},da:function(a,b){this.c[a]=b;this.la=!0},ga:function(a,b){this.c[a]=b;this.la=!0},ia:function(a,b,c){a&1&&ub(this.m,c);this.s.setUint16(a,b,!0);this.la=!0},sa:function(a,b,c){a&1&&ub(this.m,c);this.o[a>> P:function(a,b){return this.V(a,b)},fa:function(a,b,c){this.g||this.kb(a,b,c)},sa:function(a,b,c){this.g||this.ta(a,b,c)},C:function(a){return this.b[a]},J:function(a){return this.b[a]},M:function(a,b){a&1&&vb(this.j,b);return this.u.getUint16(a,!0)},ba:function(a,b){a&1&&vb(this.j,b);return this.m[a>>1]},da:function(a,b){this.b[a]=b;this.ma=!0},ga:function(a,b){this.b[a]=b;this.ma=!0},ia:function(a,b,c){a&1&&vb(this.j,c);this.u.setUint16(a,b,!0);this.ma=!0},ua:function(a,b,c){a&1&&vb(this.j,c);this.m[a>>
1]=b;this.la=!0}};function db(a,b,c){a.F=b;a.h=a.j=0;c&&((a.h=c.h)&&Mb(a,Nb,!1),(a.j=c.j)&&Ob(a,Nb,!1))}function Ob(a,b,c){c&&a.j||(a.jb=!a.g&&b[1]||a.w,a.Xa=!a.g&&b[3]||a.B);if(c||void 0===c)a.yb=b[1]||a.w,a.ra=b[3]||a.B}function Mb(a,b,c){c&&a.h||(a.eb=b[0]||a.A,a.S=b[2]||a.u);if(c||void 0===c)a.I=b[0]||a.A,a.U=b[2]||a.u}function Ib(a,b){b||(b=Pb);Mb(a,b,void 0);Ob(a,b,void 0)} 1]=b;this.ma=!0}};function eb(a,b,c){a.D=b;a.h=a.o=0;c&&((a.h=c.h)&&Nb(a,Ob,!1),(a.o=c.o)&&Pb(a,Ob,!1))}function Pb(a,b,c){c&&a.o||(a.jb=!a.g&&b[1]||a.w,a.Xa=!a.g&&b[3]||a.B);if(c||void 0===c)a.kb=b[1]||a.w,a.ta=b[3]||a.B}function Nb(a,b,c){c&&a.h||(a.eb=b[0]||a.s,a.S=b[2]||a.v);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.v}function Jb(a,b){b||(b=Qb);Nb(a,b,void 0);Pb(a,b,void 0)}
var Pb=[],Lb=[F.prototype.L,F.prototype.ha,F.prototype.ca,F.prototype.ta],Nb=[F.prototype.G,F.prototype.ea,F.prototype.P,F.prototype.ja];if(Ta)var Kb=[F.prototype.C,F.prototype.da,F.prototype.M,F.prototype.ia],Jb=[F.prototype.J,F.prototype.ga,F.prototype.X,F.prototype.sa]; var Qb=[],Mb=[F.prototype.L,F.prototype.ha,F.prototype.ca,F.prototype.va],Ob=[F.prototype.G,F.prototype.fa,F.prototype.P,F.prototype.sa];if(Ua)var Lb=[F.prototype.C,F.prototype.da,F.prototype.M,F.prototype.ia],Kb=[F.prototype.J,F.prototype.ga,F.prototype.ba,F.prototype.ua];
function Qb(a,b){u.call(this,"CPU",a,Qb);var c=a.multiplier||1;this.Sa=a.cycles||b;this.ea=c;this.ab=Math.round(this.Sa/1E4)/100;this.ga=this.ab*this.ea;this.i.V=!1;this.i.wb=!1;this.i.Fa=a.autoStart;this.i.Ra=!1;this.Pa=this.ia=0;this.Qa=a.csStart;this.sa=a.csInterval;this.ta=a.csStop;this.G=[];this.sb=this.tc.bind(this);C(this)}w(Qb);var Rb=["power","reset"];g=Qb.prototype; function Rb(a,b){u.call(this,"CPU",a,Rb);var c=a.multiplier||1;this.Ra=a.cycles||b;this.da=c;this.$a=Math.round(this.Ra/1E4)/100;this.fa=this.$a*this.da;this.i.W=!1;this.i.xb=!1;this.i.Fa=a.autoStart;this.i.Sa=!1;this.Pa=this.ha=0;this.Qa=a.csStart;this.ta=a.csInterval;this.ua=a.csStop;this.G=[];this.tb=this.tc.bind(this);C(this)}w(Rb);var Sb=["power","reset"];g=Rb.prototype;
g.fa=function(a,b,c,d){this.A=a;this.m=b;this.F=d;for(b=0;b<Rb.length;b++)(c=this.s[Rb[b]])&&this.A.W(null,Rb[b],c);a=Sb(a,"autoStart");null!=a&&(this.i.Fa="true"==a?!0:"false"==a?!1:!!a);C(this)};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.$=function(a,b){if(!b){if(a&&this.restore){Tb(this);if(!this.restore(a))return!1;Ub(this)}else this.reset();this.R("No debugger detected")}this.A.ba();return!0};g.Z=function(a){return a?this.save():!0}; g.ea=function(a,b,c,d){this.o=a;this.j=b;this.D=d;for(b=0;b<Sb.length;b++)(c=this.u[Sb[b]])&&this.o.X(null,Sb[b],c);a=Tb(a,"autoStart");null!=a&&(this.i.Fa="true"==a?!0:"false"==a?!1:!!a);C(this)};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.Z=function(a,b){if(!b){if(a&&this.restore){Ub(this);if(!this.restore(a))return!1;Vb(this)}else this.reset();this.R("No debugger detected")}this.o.aa();return!0};g.Y=function(a){return a?this.save():!0};
g.Fa=function(){return this.i.Fa||void 0===this.s.run?(Vb(this),!0):!1};g.mb=function(){return 0};function Ub(a){void 0===a.Qa&&(a.Qa=0);void 0===a.sa&&(a.sa=-1);void 0===a.ta&&(a.ta=-1);a.i.Ra=0<=a.Qa&&0<a.sa;a.i.Ra&&(a.Pa=0,a.ia=a.Qa-a.J)} g.Fa=function(){return this.i.Fa||void 0===this.u.run?(Wb(this,!0),!0):!1};g.nb=function(){return 0};function Vb(a){void 0===a.Qa&&(a.Qa=0);void 0===a.ta&&(a.ta=-1);void 0===a.ua&&(a.ua=-1);a.i.Sa=0<=a.Qa&&0<a.ta;a.i.Sa&&(a.Pa=0,a.ha=a.Qa-a.J)}
g.W=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.s[b]=c,!0;case "run":return this.s[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.O)a=!0;else{var b=null,c,l=x(a.id);for(c=0;c<l.length&&(b=l[c],b===a||b.i.ready);c++);if(c==l.length)for(c=0;c<l.length&&(b=l[c],b===a||b.i.O);c++);c==l.length&&(b=a);m("The "+b.type+" component ("+b.id+") is not "+(b.i.ready?"powered yet":"ready yet"+(b.Ua?" (waiting for notification)":""))+".");a=!1}a&&(d.i.V?D(d):Vb(d))},!0;case "speed":return this.s[b]= g.X=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.u[b]=c,!0;case "run":return this.u[b]=c,c.onclick=function(){var a;if(a=d.o)if(a=d.o,a.i.O)a=!0;else{var b=null,c,l=x(a.id);for(c=0;c<l.length&&(b=l[c],b===a||b.i.ready);c++);if(c==l.length)for(c=0;c<l.length&&(b=l[c],b===a||b.i.O);c++);c==l.length&&(b=a);m("The "+b.type+" component ("+b.id+") is not "+(b.i.ready?"powered yet":"ready yet"+(b.Ua?" (waiting for notification)":""))+".");a=!1}a&&(d.i.W?D(d):Wb(d))},!0;case "speed":return this.u[b]=
c,!0;case "setSpeed":return this.s[b]=c,c.onclick=function(){Wb(d,d.ea<<1)},c.textContent=this.ga.toFixed(2)+"Mhz",!0}return!1};g.ba=function(){var a=this.s.speed;a&&(a.textContent=this.i.V&&this.ca?this.ca.toFixed(2)+"Mhz":"Stopped")};function Xb(a,b){var c=1;b&&1<a.ea&&a.ca&&(c=a.ca/a.ab);a.qb=Math.round(1E3/30);a.Ta=Math.floor(a.Sa/30*c);b||(a.Ca=a.Ta);a.cb=0}function Yb(a){return a.J+a.U+a.ha-a.a}function Tb(a){a.ca=0;a.rb=0;a.J=a.U=a.ha=a.a=0;Ub(a);Wb(a,1)} c,!0;case "setSpeed":return this.u[b]=c,c.onclick=function(){Xb(d,d.da<<1,!0)},c.textContent=this.fa.toFixed(2)+"Mhz",!0}return!1};g.aa=function(){var a=this.u.speed;a&&(a.textContent=this.i.W&&this.ba?this.ba.toFixed(2)+"Mhz":"Stopped")};function Yb(a,b){var c=1;b&&1<a.da&&a.ba&&(c=a.ba/a.$a);a.rb=Math.round(1E3/30);a.Ta=Math.floor(a.Ra/30*c);b||(a.va=a.Ta);a.bb=0}function Zb(a){return a.J+a.P+a.ga-a.a}function Ub(a){a.ba=0;a.sb=0;a.J=a.P=a.ga=a.a=0;Vb(a);Xb(a,1)}
function Wb(a,b){if(void 0!==b&&(.8>a.ca/a.ga&&(b=1),a.ea=b,b=a.ab*a.ea,a.ga!=b)){a.ga=b;b=a.ga.toFixed(2)+"Mhz";var c=a.s.setSpeed;c&&(c.textContent=b);a.R("target speed: "+b)}a.J+=a.U;a.U=0;a.M=sa();a.da=0;Xb(a)}function vb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function xb(a,b,c){0<=b&&b<a.G.length&&0>a.G[b][0]&&(c=a.Sa*a.ea/1E3*c|0,a.G[b][0]=c+Zb(a))}function Zb(a,b){var c=a.ha-=a.a;a.a=0;b&&(a.ha=0);return c} function Xb(a,b,c){if(void 0!==b){.8>a.ba/a.fa&&(b=1);a.da=b;b=a.$a*a.da;if(a.fa!=b){a.fa=b;b=a.fa.toFixed(2)+"Mhz";var d=a.u.setSpeed;d&&(d.textContent=b);a.R("target speed: "+b)}c&&a.o&&(c=a.o,c.wa&&c.wa.focus())}a.J+=a.P;a.P=0;a.M=sa();a.ca=0;Yb(a)}function wb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function yb(a,b,c){0<=b&&b<a.G.length&&0>a.G[b][0]&&(c=a.Ra*a.da/1E3*c|0,a.G[b][0]=c+$b(a))}function $b(a,b){var c=a.ga-=a.a;a.a=0;b&&(a.ga=0);return c}
g.tc=function(){if(this.i.V){this.cb>=this.Sa&&Xb(this,!0);this.Da=0;this.Oa=sa();if(this.da){var a=this.Oa-this.da;a>this.qb&&(this.M+=a,this.M>this.Oa&&(this.M=this.Oa))}try{do{for(var b,c=this.i.Ra?1:this.Ta,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.xb(b)}catch(n){if("number"!=typeof n)throw n;}b=Zb(this,!0);this.Da+=b;this.U+=b;a=b;if(this.i.Ra){var f=!1;this.Pa=this.Pa+this.mb()|0;this.ia-=a;0>=this.ia&&(this.ia+=this.sa,f=!0);0<=this.ta&&this.ta<=Yb(this)&& g.tc=function(){if(this.i.W){this.bb>=this.Ra&&Yb(this,!0);this.Ea=0;this.Ja=sa();if(this.ca){var a=this.Ja-this.ca;a>this.rb&&(this.M+=a,this.M>this.Ja&&(this.M=this.Ja))}try{do{for(var b,c=this.i.Sa?1:this.Ta,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.yb(b)}catch(n){if("number"!=typeof n)throw n;}b=$b(this,!0);this.Ea+=b;this.P+=b;a=b;if(this.i.Sa){var f=!1;this.Pa=this.Pa+this.nb()|0;this.ha-=a;0>=this.ha&&(this.ha+=this.ta,f=!0);0<=this.ua&&this.ua<=Zb(this)&&
(this.sa=this.ta=-1,Ub(this),D(this),f=!0);f&&this.R(Yb(this)+" cycles: checksum="+ja(this.Pa))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Ca-=b;if(0>=this.Ca){this.Ca+=this.Ta;15<=++this.rb&&(this.A&&this.A.ba(),this.rb=0);break}}while(this.i.V)}catch(n){D(this);this.A&&this.A.stop(sa(),Yb(this));b=n.stack||n.message;this.i.error=!0;this.K(b);return}if(this.i.V){b=setTimeout;c=this.sb;this.da=sa();d=this.qb;this.Da&&(d=Math.round(d*this.Da/ (this.ta=this.ua=-1,Vb(this),D(this),f=!0);f&&this.R(Zb(this)+" cycles: checksum="+ja(this.Pa))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.va-=b;if(0>=this.va){this.va+=this.Ta;15<=++this.sb&&(this.o&&this.o.aa(),this.sb=0);break}}while(this.i.W)}catch(n){D(this);this.o&&this.o.stop(sa(),Zb(this));b=n.stack||n.message;this.i.error=!0;this.K(b);return}if(this.i.W){b=setTimeout;c=this.tb;this.ca=sa();d=this.rb;this.Ea&&(d=Math.round(d*this.Ea/
this.Ta));d-=this.da-this.Oa;if(e=this.da-this.M)this.ca=Math.round(this.U/(10*e))/100,864E5<=e&&(this.J=0,Wb(this));if(0>d||this.ca<this.ga)-1E3>d&&(this.M-=d),d=0;this.cb+=this.Da;this.da+=d;b(c,d)}}};function Vb(a){var b;a.i.error?(a.R(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.V)a.R(a.toString()+" busy");else{Wb(a);a.i.V=!0;a.i.wb=!0;if(b=a.s.run)b.textContent="Halt";a.A&&a.A.start(a.M,Yb(a));setTimeout(a.sb,0)}}g.xb=function(){return 0}; this.Ta));d-=this.ca-this.Ja;if(e=this.ca-this.M)this.ba=Math.round(this.P/(10*e))/100,864E5<=e&&(this.J=0,Xb(this));if(0>d||this.ba<this.fa)-1E3>d&&(this.M-=d),d=0;this.bb+=this.Ea;this.ca+=d;b(c,d)}}};function Wb(a,b){var c;a.i.error?(a.R(a.toString()+" error"),c=!0):c=!1;if(!c)if(a.i.W)a.R(a.toString()+" busy");else{Xb(a);a.i.W=!0;a.i.xb=!0;if(c=a.u.run)c.textContent="Halt";a.o&&(b&&(b=a.o,b.wa&&b.wa.focus()),a.o.start(a.M,Zb(a)));setTimeout(a.tb,0)}}g.yb=function(){return 0};
function D(a){if(a.i.V){Zb(a);a.J+=a.U;a.U=0;a.i.V=!1;var b=a.s.run;b&&(b.textContent="Run");a.A&&a.A.stop(sa(),Yb(a))}a.i.complete=void 0}function $b(a){this.Ja=+a.model||1170;this.ob=a.addrReset||0;Qb.call(this,a,6666667);this.decode=1120==this.Ja?ac.bind(this):bc.bind(this);cc(this);this.P=0;this.X=null;this.i.complete=this.i.Cb=!1}w($b,Qb);g=$b.prototype;g.reset=function(){this.status("model "+this.Ja);this.i.V&&D(this);cc(this);Tb(this);this.i.error=!1;this.parent.reset.call(this)}; function D(a){if(a.i.W){$b(a);a.J+=a.P;a.P=0;a.i.W=!1;var b=a.u.run;b&&(b.textContent="Run");a.o&&a.o.stop(sa(),Zb(a))}a.i.complete=void 0}function ac(a){this.Oa=+a.model||1170;this.pb=a.addrReset||0;Rb.call(this,a,6666667);this.decode=1120==this.Oa?bc.bind(this):cc.bind(this);dc(this);this.cb=0;this.V=null;this.i.complete=this.i.Cb=!1}w(ac,Rb);g=ac.prototype;g.reset=function(){this.status("model "+this.Oa);this.i.W&&D(this);dc(this);Ub(this);this.i.error=!1;this.parent.reset.call(this)};
function cc(a){a.j=65536;a.g=32768;a.h=65535;a.o=32768;a.v=15;a.f=[0,0,0,0,0,0,0,a.ob];a.wa=[0,0,0,0,0,0];a.aa=[0,0,0,0];a.u=0;a.Ma=0;a.Gb=[4,2,0,1];a.D=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.T=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ib=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, function dc(a){a.m=65536;a.g=32768;a.h=65535;a.s=32768;a.A=15;a.f=[0,0,0,0,0,0,0,a.pb];a.xa=[0,0,0,0,0,0];a.$=[0,0,0,0];a.v=0;a.Ma=0;a.Gb=[4,2,0,1];a.F=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ib=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.vb=[0,0,0,0,0,0,0,0];a.ub=0;a.l=0;a.B=a.C=0;a.c=a.b=a.$a=0;a.ja=-1;dc(a)}function dc(a){a.qa=255;a.H=0;a.hb=0;a.w=0;a.oa=0;a.gb=0;a.pa=0;a.Ga=0;a.La=0;a.bb=262143;a.Na=253952;a.l|=2;a.m&&zb(a)}function zb(a){a.Ga?(a.L=65536,a.I=a.Fb,a.S=a.qc,a.Xa=a.cd,gb(a.m,a.pa&16?22:18)):(a.L=0,a.I=a.Eb,a.S=a.pc,a.Xa=a.bd,gb(a.m,16))}function ec(a,b){a.ob=b;L(a,b);a.F&&(D(a),a.F.ba())}g.mb=function(){return 0}; 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.wb=[0,0,0,0,0,0,0,0];a.vb=0;a.l=0;a.B=a.C=0;a.c=a.b=a.Za=0;a.ia=-1;ec(a)}function ec(a){a.ra=255;a.I=0;a.hb=0;a.w=0;a.pa=0;a.gb=0;a.qa=0;a.Ga=0;a.La=0;a.ab=262143;a.Na=253952;a.l|=2;a.j&&Ab(a)}function Ab(a){a.Ga?(a.L=65536,a.H=a.Fb,a.S=a.qc,a.Xa=a.cd,hb(a.j,a.qa&16?22:18)):(a.L=0,a.H=a.Eb,a.S=a.pc,a.Xa=a.bd,hb(a.j,16))}function fc(a,b,c){a.pb=b;L(a,b);!c&&a.D&&(D(a),a.D.aa())}g.nb=function(){return 0};
g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.J,this.ea]);a.set(2,qb(this.m));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Wb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.B){for(var f=0,h=Array(b.B),l=0;l<e.length-1;)for(var n=e[l++],r=e[l++];n--;)h[f++]=r;e=h}f=b.b[d];if(!f||!f.restore(e)){m("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function N(a){return a.j&65536?1:0} g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.J,this.da]);a.set(2,rb(this.j));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Xb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.C){for(var f=0,h=Array(b.C),l=0;l<e.length-1;)for(var n=e[l++],q=e[l++];n--;)h[f++]=q;e=h}f=b.b[d];if(!f||!f.restore(e)){m("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function N(a){return a.m&65536?1:0}
g.ma=function(){return this.o&32768?8:0};function fc(a){var b=a.f[7];a.w&57344||(a.oa=0,a.gb=b);a.f[7]=b+2&65535;return a.S(b)}function gc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function L(a,b){a.f[7]=b&65535}function yb(a,b){return{wc:a,xa:b,next:null}}function wb(a,b){if(b!=a.X){var c=a.X;if(!c||c.xa<=b.xa)b.next=c,a.X=b;else{do{var d=c.next;if(!d||d.xa<=b.xa){b.next=d;c.next=b;break}c=d}while(c)}}a.l|=2}function Ya(a){return a.v=a.v&63728|a.ma()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)} g.na=function(){return this.s&32768?8:0};function gc(a){var b=a.f[7];a.w&57344||(a.pa=0,a.gb=b);a.f[7]=b+2&65535;return a.S(b)}function hc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function L(a,b){a.f[7]=b&65535}function zb(a,b){return{wc:a,za:b,next:null}}function xb(a,b){if(b!=a.V){var c=a.V;if(!c||c.za<=b.za)b.next=c,a.V=b;else{do{var d=c.next;if(!d||d.za<=b.za){b.next=d;c.next=b;break}c=d}while(c)}}a.l|=2}function Za(a){return a.A=a.A&63728|a.na()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)}
function Bb(a,b){a.o=b<<12;a.h=~b&4;a.g=b<<14;a.j=b<<16;if((b^a.v)&2048)for(var c=a.wa.length;0<=--c;){var d=a.f[c];a.f[c]=a.wa[c];a.wa[c]=d}a.u=b>>14&3;c=a.v>>14&3;a.u!=c&&(a.aa[c]=a.f[6],a.f[6]=a.aa[a.u]);a.v=b;a.l|=2}function O(a,b){a.l&128||(a.o=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.o=a.h=a.j=b,a.g=c||0)}function hc(a,b,c,d){a.l&128||(a.o=a.h=a.j=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.o=a.h=a.j=b,a.g=a.o^a.j>>1)}function ic(a,b,c,d){a.l&128||(a.o=a.h=a.j=b,a.g=(c^d)&(d^b))} function Cb(a,b){a.s=b<<12;a.h=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.A)&2048)for(var c=a.xa.length;0<=--c;){var d=a.f[c];a.f[c]=a.xa[c];a.xa[c]=d}a.v=b>>14&3;c=a.A>>14&3;a.v!=c&&(a.$[c]=a.f[6],a.f[6]=a.$[a.v]);a.A=b;a.l|=2}function O(a,b){a.l&128||(a.s=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.s=a.h=a.m=b,a.g=c||0)}function ic(a,b,c,d){a.l&128||(a.s=a.h=a.m=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.s=a.h=a.m=b,a.g=a.s^a.m>>1)}function jc(a,b,c,d){a.l&128||(a.s=a.h=a.m=b,a.g=(c^d)&(d^b))}
function G(a,b,c){if(!a.P){var d=!1;0>a.ja?a.ja=Ya(a):a.u||(b=4,d=!0);a.w&57344||(a.oa=63222,a.gb=b);a.u=0;var e=a.S(b|a.L),f=a.S(b+2&65535|a.L);Bb(a,f&-12289|a.ja>>2&12288);d&&(a.H|=4,a.f[6]=4);jc(a,a.ja);jc(a,a.f[7]);L(a,e);a.l&=-113;a.ja=-1;if(26!=c)throw b;}}function kc(a){var b=lc(a),c=lc(a)&-1793;a.v&49152&&(c=c&-225|a.v&63712);L(a,b);Bb(a,c);a.l&=-17} function G(a,b,c){if(!a.cb){var d=!1;0>a.ia?a.ia=Za(a):a.v||(b=4,d=!0);a.w&57344||(a.pa=63222,a.gb=b);a.v=0;var e=a.S(b|a.L),f=a.S(b+2&65535|a.L);Cb(a,f&-12289|a.ia>>2&12288);d&&(a.I|=4,a.f[6]=4);kc(a,a.ia);kc(a,a.f[7]);L(a,e);a.l&=-113;a.ia=-1;if(26!=c)throw b;}}function lc(a){var b=mc(a),c=mc(a)&-1793;a.A&49152&&(c=c&-225|a.A&63712);L(a,b);Cb(a,c);a.l&=-17}
function mc(a,b,c){var d,e,f,h=0;d=b>>13;a.pa&a.Gb[a.u]||(d&=7);e=a.D[a.u][d];f=(a.T[a.u][d]<<6)+(b&8191)&a.bb;if(f<a.Na)f&1&&!(c&1)&&(a.H|=64,G(a,4,10));else if(a.pa&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.pa&32&&(f=a.Ib[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Na&&4186112>f&&(a.H|=32,G(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: function nc(a,b,c){var d,e,f,h=0;d=b>>13;a.qa&a.Gb[a.v]||(d&=7);e=a.F[a.v][d];f=(a.U[a.v][d]<<6)+(b&8191)&a.ab;if(f<a.Na)f&1&&!(c&1)&&(a.I|=64,G(a,4,10));else if(a.qa&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.qa&32&&(f=a.Ib[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Na&&4186112>f&&(a.I|=32,G(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:
128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.D[a.u][d]=e;if(4194170!==f||a.u)a.La=a.u,a.Ma=d;h&&(h&57344&&(0<=a.ja&&(h|=128),a.w&57344||(a.w=a.w|h|a.La<<5|a.Ma<<1),G(a,168,16)),a.w&61440||!(4191360>f||4194239<f)||(a.w|=4096,a.w&512&&(a.l|=32)));return f}function nc(a,b,c){b&1&&a.a--;a=a.m;a.b[(b&a.h)>>>a.m].jb(b&a.g,c&255,b)}function lc(a){var b=a.S(a.f[6]|a.L);a.f[6]=a.f[6]+2&65535;return b} 128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.F[a.v][d]=e;if(4194170!==f||a.v)a.La=a.v,a.Ma=d;h&&(h&57344&&(0<=a.ia&&(h|=128),a.w&57344||(a.w=a.w|h|a.La<<5|a.Ma<<1),G(a,168,16)),a.w&61440||!(4191360>f||4194239<f)||(a.w|=4096,a.w&512&&(a.l|=32)));return f}function oc(a,b,c){b&1&&a.a--;a=a.j;a.b[(b&a.h)>>>a.j].jb(b&a.g,c&255,b)}function mc(a){var b=a.S(a.f[6]|a.L);a.f[6]=a.f[6]+2&65535;return b}
function jc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.oa=a.oa<<8|246);!a.u&&c<=a.qa&&4<c&&(c<=a.qa-32?(a.H|=4,a.f[6]=4,G(a,4,18)):(a.H|=8,a.l|=4));a.Xa(c,b)} function kc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.pa=a.pa<<8|246);!a.v&&c<=a.ra&&4<c&&(c<=a.ra-32?(a.I|=4,a.f[6]=4,G(a,4,18)):(a.I|=8,a.l|=4));a.Xa(c,b)}
function oc(a,b,c,d){var e,f,h=d&8?0:a.L;switch(b){case 0:return G(a,4,20),0;case 1:return 6===c&&!a.u&&d&4&&(a.f[6]<=a.qa||65534<=a.f[6])&&(a.f[6]<=a.qa-32||65534<=a.f[6]?(a.H|=4,a.f[6]=4,G(a,4,22)):(a.H|=8,a.l|=64)),a.a-=3,7===c?a.f[c]:a.f[c]|h;case 2:f=2;e=a.f[c];7!==c&&(e|=h,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.S(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.S(e)|h;a.a-= function pc(a,b,c,d){var e,f,h=d&8?0:a.L;switch(b){case 0:return G(a,4,20),0;case 1:return 6===c&&!a.v&&d&4&&(a.f[6]<=a.ra||65534<=a.f[6])&&(a.f[6]<=a.ra-32||65534<=a.f[6]?(a.I|=4,a.f[6]=4,G(a,4,22)):(a.I|=8,a.l|=64)),a.a-=3,7===c?a.f[c]:a.f[c]|h;case 2:f=2;e=a.f[c];7!==c&&(e|=h,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.S(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.S(e)|h;a.a-=
8;break;case 6:return e=a.S(gc(a,2)),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=a.S(gc(a,2)),e=e+a.f[c]&65535,e=a.S(e|a.L)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.w&57344||(a.oa=a.oa<<8|f<<3&248|c);6==c&&!a.u&&d&4&&0>=f&&(a.f[6]<=a.qa||65534<=a.f[6])&&(a.f[6]<=a.qa-32?(a.H|=4,a.f[6]=4,G(a,4,24)):(a.H|=8,a.l|=64));return e}g.Ia=function(a,b){this.Ga?(this.P++,nc(this,mc(this,a,5),b),this.P--):this.m.Ia(a,b)};g.Eb=function(a,b,c){return oc(this,a,b,c)}; 8;break;case 6:return e=a.S(hc(a,2)),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=a.S(hc(a,2)),e=e+a.f[c]&65535,e=a.S(e|a.L)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.w&57344||(a.pa=a.pa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.ra||65534<=a.f[6])&&(a.f[6]<=a.ra-32?(a.I|=4,a.f[6]=4,G(a,4,24)):(a.I|=8,a.l|=64));return e}g.Ia=function(a,b){this.Ga?(this.cb++,oc(this,nc(this,a,5),b),this.cb--):this.j.Ia(a,b)};g.Eb=function(a,b,c){return pc(this,a,b,c)};
g.Fb=function(a,b,c){return mc(this,oc(this,a,b,c),c)};g.pc=function(a){return ob(this.m,a)};g.qc=function(a){return ob(this.m,mc(this,a,2))};g.bd=function(a,b){pb(this.m,a,b&65535)};g.cd=function(a,b){pb(this.m,mc(this,a,4),b)};function pc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=oc(a,b,d,2),c&65536||61440!==(a.v&61440)&&(d&=65535),a.u=a.v>>12&3,c=a.S(d|c&a.L),a.u=a.v>>14&3):c=6!=d||(a.v>>2&12288)===(a.v&12288)?a.f[d]:a.aa[a.v>>12&3];return c} g.Fb=function(a,b,c){return nc(this,pc(this,a,b,c),c)};g.pc=function(a){return pb(this.j,a)};g.qc=function(a){return pb(this.j,nc(this,a,2))};g.bd=function(a,b){qb(this.j,a,b&65535)};g.cd=function(a,b){qb(this.j,nc(this,a,4),b)};function qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=pc(a,b,d,2),c&65536||61440!==(a.A&61440)&&(d&=65535),a.v=a.A>>12&3,c=a.S(d|c&a.L),a.v=a.A>>14&3):c=6!=d||(a.A>>2&12288)===(a.A&12288)?a.f[d]:a.$[a.A>>12&3];return c}
function qc(a,b,c,d){a.w&57344||(a.oa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=oc(a,b,e,4),c&65536||(e&=65535),a.u=a.v>>12&3,e=mc(a,e|c&65536,4),a.u=a.v>>14&3,pb(a.m,e,d)):6!=e||(a.v>>2&12288)===(a.v&12288)?a.f[e]=d:a.aa[a.v>>12&3]=d}function rc(a,b){b>>=6;var c=a.C=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=nb(a.m,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.C=b&7;return(b=a.B=(b&56)>>3)?ob(a.m,a.I(b,c,2)):a.f[c]}function sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return oc(a,b,c,8)} function rc(a,b,c,d){a.w&57344||(a.pa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=pc(a,b,e,4),c&65536||(e&=65535),a.v=a.A>>12&3,e=nc(a,e|c&65536,4),a.v=a.A>>14&3,qb(a.j,e,d)):6!=e||(a.A>>2&12288)===(a.A&12288)?a.f[e]=d:a.$[a.A>>12&3]=d}function sc(a,b){b>>=6;var c=a.C=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=ob(a.j,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.C=b&7;return(b=a.B=(b&56)>>3)?pb(a.j,a.H(b,c,2)):a.f[c]}function tc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return pc(a,b,c,8)}
function tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=nb(a.m,c)):a=a.f[c]&255;return a}function uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?ob(a.m,a.I(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.$a=a.I(b,e,7),nc(a,e,d.call(a,c,nb(a.m,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.I(b,e,6),pb(a.m,e,d.call(a,c,ob(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} function uc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=ob(a.j,c)):a=a.f[c]&255;return a}function vc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?pb(a.j,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Za=a.H(b,e,7),oc(a,e,d.call(a,c,ob(a.j,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),qb(a.j,e,d.call(a,c,pb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])}
function vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?nc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?pb(a.m,a.I(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(L(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} function wc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?oc(a,a.H(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?qb(a.j,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(L(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
g.xb=function(a){this.i.complete=!0;this.i.Cb=!1;this.i.wb=!1;this.ha=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?G(this,168,28):this.l&64?G(this,4,30):this.l&16&&G(this,12,32),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;var b=160,c=(this.hb&224)>>5;if(a=this.X&&this.X.xa>c?this.X:null)b=a.wc,c=a.xa;c>(this.v&224)>>5?(this.l&4&&(gc(this,2),this.l&=-5),G(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.X,c==a)this.X=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.l&1&&this.l++; g.yb=function(a){this.i.complete=!0;this.i.Cb=!1;this.i.xb=!1;this.ga=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?G(this,168,28):this.l&64?G(this,4,30):this.l&16&&G(this,12,32),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;var b=160,c=(this.hb&224)>>5;if(a=this.V&&this.V.za>c?this.V:null)b=a.wc,c=a.za;c>(this.A&224)>>5?(this.l&4&&(hc(this,2),this.l&=-5),G(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.V,c==a)this.V=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.l&1&&this.l++;
this.l=this.l&7|this.v&16;this.decode(fc(this))}while(0<this.a);return this.i.complete?this.ha-this.a:void 0===this.i.complete?0:-1};q(function(){for(var a=B(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new $b(d);A(d,c)}});function xc(a,b){var c=b+a;hc(this,c,a,b);return c&65535}function yc(a,b){var c=b+a;hc(this,c<<8,a<<8,b<<8);return c&255}function zc(a,b){a=b<<1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1;Q(this,a<<8);return a&255} this.l=this.l&7|this.A&16;this.decode(gc(this))}while(0<this.a);return this.i.complete?this.ga-this.a:void 0===this.i.complete?0:-1};r(function(){for(var a=B(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new ac(d);A(d,c)}});function yc(a,b){var c=b+a;ic(this,c,a,b);return c&65535}function zc(a,b){var c=b+a;ic(this,c<<8,a<<8,b<<8);return c&255}function Ac(a,b){a=b<<1;Q(this,a);return a&65535}function Bc(a,b){a=b<<1;Q(this,a<<8);return a&255}
function Bc(a,b){a=b&32768|b>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){a=b&~a;O(this,a);return a}function Ec(a,b){a=b&~a;O(this,a<<8);return a}function Fc(a,b){a|=b;O(this,a);return a}function Gc(a,b){a|=b;O(this,a<<8);return a}function Hc(a,b){a=~b|65536;P(this,a);return a&65535}function Ic(a,b){a=~b|256;P(this,a<<8);return a&255}function Jc(a,b){a=b-a;this.l&128||(this.o=this.h=a,this.g=b&(b^a));return a&65535} function Cc(a,b){a=b&32768|b>>1|b<<16;Q(this,a);return a&65535}function Dc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function Ec(a,b){a=b&~a;O(this,a);return a}function Fc(a,b){a=b&~a;O(this,a<<8);return a}function Gc(a,b){a|=b;O(this,a);return a}function Hc(a,b){a|=b;O(this,a<<8);return a}function Ic(a,b){a=~b|65536;P(this,a);return a&65535}function Jc(a,b){a=~b|256;P(this,a<<8);return a&255}function Kc(a,b){a=b-a;this.l&128||(this.s=this.h=a,this.g=b&(b^a));return a&65535}
function Kc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.h=c,this.g=b&(b^c));return a&255}function Lc(a,b){a=b+a;this.l&128||(this.o=this.h=a,this.g=a&(b^a));return a&65535}function Mc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.h=c,this.g=c&(b<<8^c));return a&255}function Nc(a,b){a=-b;P(this,a,a&b&32768);return a&65535}function Oc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function Pc(a,b){a=b<<1|this.j>>16&1;Q(this,a);return a&65535} function Lc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.s=this.h=c,this.g=b&(b^c));return a&255}function Mc(a,b){a=b+a;this.l&128||(this.s=this.h=a,this.g=a&(b^a));return a&65535}function Nc(a,b){a=b+a;var c=a<<8;this.l&128||(this.s=this.h=c,this.g=c&(b<<8^c));return a&255}function Oc(a,b){a=-b;P(this,a,a&b&32768);return a&65535}function Pc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function Qc(a,b){a=b<<1|this.m>>16&1;Q(this,a);return a&65535}
function Qc(a,b){a=b<<1|this.j>>16&1;Q(this,a<<8);return a&255}function Rc(a,b){a=(this.j&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Sc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Tc(a,b){var c=b-a;ic(this,c,a,b);return c&65535}function Uc(a,b){var c=b-a;ic(this,c<<8,a<<8,b<<8);return c&255}function Vc(a,b){this.l&128||(this.o=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535}function Wc(a,b){a^=b;O(this,a);return a&65535} function Rc(a,b){a=b<<1|this.m>>16&1;Q(this,a<<8);return a&255}function Sc(a,b){a=(this.m&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Tc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Uc(a,b){var c=b-a;jc(this,c,a,b);return c&65535}function Vc(a,b){var c=b-a;jc(this,c<<8,a<<8,b<<8);return c&255}function Wc(a,b){this.l&128||(this.s=this.h=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Xc(a,b){a^=b;O(this,a);return a&65535}
function Xc(a){T(this,a,R(this,a),xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Yc(a){var b=uc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.j=c<<17-b,c>>=b;else if(b)if(16<b)this.g=c,c=0;else{this.j=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.h=c;this.a-=(this.c?6:7)+b} function Yc(a){T(this,a,R(this,a),yc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Zc(a){var b=vc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.m=c<<17-b,c>>=b;else if(b)if(16<b)this.g=c,c=0;else{this.m=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.s=this.h=c;this.a-=(this.c?6:7)+b}
function Zc(a){var b=uc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.j=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.j=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.g=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.o=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function $c(a){U(this,a,!N(this))}function ad(a){U(this,a,N(this))} function $c(a){var b=vc(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&&(b=32);var d=c>>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.m=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.g=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function ad(a){U(this,a,!N(this))}function bd(a){U(this,a,N(this))}
function bd(a){T(this,a,R(this,a),Dc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function cd(a){S(this,a,rc(this,a),Ec);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function dd(a){T(this,a,R(this,a),Fc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ed(a){S(this,a,rc(this,a),Gc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} function cd(a){T(this,a,R(this,a),Ec);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function dd(a){S(this,a,sc(this,a),Fc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ed(a){T(this,a,R(this,a),Gc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function fd(a){S(this,a,sc(this,a),Hc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}
function fd(a){O(this,R(this,a)&uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function gd(a){O(this,(rc(this,a)&tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function hd(a){U(this,a,this.h&65535?0:4)}function id(a){U(this,a,!this.ma()==!(this.g&32768))}function jd(a){U(this,a,!!(this.h&65535)&&!this.ma()==!(this.g&32768))}function kd(a){U(this,a,!N(this)&&!!(this.h&65535))} function gd(a){O(this,R(this,a)&vc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function hd(a){O(this,(sc(this,a)&uc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function id(a){U(this,a,this.h&65535?0:4)}function jd(a){U(this,a,!this.na()==!(this.g&32768))}function kd(a){U(this,a,!!(this.h&65535)&&!this.na()==!(this.g&32768))}function ld(a){U(this,a,!N(this)&&!!(this.h&65535))}
function ld(a){U(this,a,(this.h&65535?0:4)||!this.ma()!=!(this.g&32768))}function md(a){U(this,a,N(this)||(this.h&65535?0:4))}function nd(a){U(this,a,!this.ma()!=!(this.g&32768))}function od(a){U(this,a,this.ma())}function pd(a){U(this,a,!!(this.h&65535))}function qd(a){U(this,a,!this.ma())}function rd(){G(this,12,1);this.a-=5}function sd(a){U(this,a,!0)}function td(a){U(this,a,!(this.g&32768))}function ud(a){U(this,a,this.g&32768?2:0)} function md(a){U(this,a,(this.h&65535?0:4)||!this.na()!=!(this.g&32768))}function nd(a){U(this,a,N(this)||(this.h&65535?0:4))}function od(a){U(this,a,!this.na()!=!(this.g&32768))}function pd(a){U(this,a,this.na())}function qd(a){U(this,a,!!(this.h&65535))}function rd(a){U(this,a,!this.na())}function sd(){G(this,12,1);this.a-=5}function td(a){U(this,a,!0)}function ud(a){U(this,a,!(this.g&32768))}function vd(a){U(this,a,this.g&32768?2:0)}
function V(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.o=0);this.a-=5}function vd(a){var b=R(this,a);a=uc(this,a);ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function wd(a){var b=rc(this,a)<<8;a=tc(this,a)<<8;ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.s=0);this.a-=5}function wd(a){var b=R(this,a);a=vc(this,a);jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function xd(a){var b=sc(this,a)<<8;a=uc(this,a)<<8;jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}
function xd(a){var b=uc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.o=d>>16):(this.g=32768,this.h=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.h=this.o=0,this.g=32768,this.j=65536,this.a-=7}function yd(){G(this,24,2);this.a-=25} function yd(a){var b=vc(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.h=d>>16|d,this.s=d>>16):(this.g=32768,this.h=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.s=0,this.g=32768,this.m=65536,this.a-=7}function zd(){G(this,24,2);this.a-=25}
function zd(){this.v&49152?(this.H|=128,G(this,4,3)):this.F?this.F.c():D(this);this.a-=7}function Ad(){G(this,16,4);this.a-=25}var Bd=[0,7,7,10,7,11,9,13];function W(a){var b=this.a;L(this,sc(this,a));this.a=b-Bd[this.c]}var Cd=[0,14,14,17,14,18,16,20];function Dd(a){var b=this.a,c=sc(this,a);a=a>>6&7;jc(this,this.f[a]);this.f[a]=this.f[7];L(this,c);this.a=b-Cd[this.c]}var Ed=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function Ad(){this.A&49152?(this.I|=128,G(this,4,3)):this.D?this.D.c():D(this);this.a-=7}function Bd(){G(this,16,4);this.a-=25}var Cd=[0,7,7,10,7,11,9,13];function W(a){var b=this.a;L(this,tc(this,a));this.a=b-Cd[this.c]}var Dd=[0,14,14,17,14,18,16,20];function Ed(a){var b=this.a,c=tc(this,a);a=a>>6&7;kc(this,this.f[a]);this.f[a]=this.f[7];L(this,c);this.a=b-Dd[this.c]}var Fd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
function Fd(a){var b=R(this,a),c=this.a;O(this,wc(this,a,b));this.a=c-Ed[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Gd(a){var b=rc(this,a);O(this,vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Hd=[7,13,13,17,14,18,17,21]; function Gd(a){var b=R(this,a),c=this.a;O(this,xc(this,a,b));this.a=c-Fd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Hd(a){var b=sc(this,a);O(this,wc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Id=[7,13,13,17,14,18,17,21];
function Id(a){var b=uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.h=this.o|b,this.g=0,this.j=-32768>b||32767<b?65536:0);this.a-=23}function Jd(){this.a-=5}function Kd(){this.v&49152||(dc(this),this.m.reset());this.a-=667}function Ld(){kc(this);this.l|=this.v&16;this.a-=13}function Md(a){if(a&8)G(this,8,6);else{var b=lc(this);a&=7;L(this,this.f[a]);this.f[a]=b;this.a-=9}} function Jd(a){var b=vc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.s=b>>16,this.h=this.s|b,this.g=0,this.m=-32768>b||32767<b?65536:0);this.a-=23}function Kd(){this.a-=5}function Ld(){this.A&49152||(ec(this),this.j.reset());this.a-=667}function Md(){lc(this);this.l|=this.A&16;this.a-=13}
function X(a){a&1&&(this.j=65536);a&2&&(this.g=32768);a&4&&(this.h=0);a&8&&(this.o=32768);this.a-=5}function Nd(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)L(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Od(a){T(this,a,R(this,a),Tc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Pd(a){T(this,a,0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}function Qd(){G(this,28,5);this.a-=5}function Rd(){this.l&4||this.A.ba();this.l|=4;gc(this,-2);this.a-=3} function Nd(a){if(a&8)G(this,8,6);else{var b=mc(this);a&=7;7==a?L(this,b):(L(this,this.f[a]),this.f[a]=b);this.a-=9}}function X(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a&4&&(this.h=0);a&8&&(this.s=32768);this.a-=5}function Od(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)L(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Pd(a){T(this,a,R(this,a),Uc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}
function Sd(a){T(this,a,R(this,a),Wc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){G(this,8,6)}function ac(a){Td[a>>12].call(this,a)}function Ud(a){Vd[a>>6&3].call(this,a)}function Wd(a){Xd[a>>6&3].call(this,a)}function Yd(a){Zd[a>>6&3].call(this,a)}function ae(a){be[a&15].call(this,a)}function ce(a){de[a&15].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)}function ie(a){je[a>>6&3].call(this,a)} function Qd(a){T(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rd(){G(this,28,5);this.a-=5}function Sd(){this.l&4||this.o.aa();this.l|=4;hc(this,-2);this.a-=3}function Td(a){T(this,a,R(this,a),Xc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){G(this,8,6)}function bc(a){Ud[a>>12].call(this,a)}function Vd(a){Wd[a>>6&3].call(this,a)}function Xd(a){Yd[a>>6&3].call(this,a)}function Zd(a){$d[a>>6&3].call(this,a)}function ae(a){be[a&15].call(this,a)}function ce(a){de[a&15].call(this,a)}
var Td=[function(a){ke[a>>8&15].call(this,a)},Fd,vd,fd,bd,dd,Xc,Y,function(a){le[a>>8&15].call(this,a)},Gd,wd,gd,cd,ed,Od,Y],ke=[function(a){me[a>>4&15].call(this,a)},sd,pd,hd,id,nd,jd,ld,Dd,Dd,Ud,Wd,Yd,Y,Y,Y],Vd=[function(a){P(this,wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}],Xd=[function(a){T(this,a,0,Nc); function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)}function ie(a){je[a>>6&3].call(this,a)}
this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=uc(this,a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zd=[function(a){T(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)}],me=[function(a){ne[a& var Ud=[function(a){ke[a>>8&15].call(this,a)},Gd,wd,gd,cd,ed,Yc,Y,function(a){le[a>>8&15].call(this,a)},Hd,xd,hd,dd,fd,Pd,Y],ke=[function(a){me[a>>4&15].call(this,a)},td,qd,id,jd,od,kd,md,Ed,Ed,Vd,Xd,Zd,Y,Y,Y],Wd=[function(a){P(this,xc(this,a,0));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,1,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yd=[function(a){T(this,a,0,Oc);
15].call(this,a)},Y,Y,Y,W,W,W,W,Md,Y,ae,ce,Pd,Pd,Pd,Pd],ne=[zd,Rd,Ld,rd,Ad,Kd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],be=[Jd,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.h=1;this.a-=5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],de=[Jd,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.o=32768;this.a-=5},X,X,X,X,X,X,X],le=[qd,od,kd,md,td,ud,$c,ad,yd,Qd,ee,ge,ie,Y,Y,Y],fe=[function(a){P(this,vc(this,a, this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=vc(this,a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$d=[function(a){T(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)}],me=[function(a){ne[a&
0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}],he=[function(a){S(this,a,0,Oc);this.a-=this.c?11:6},function(a){S(this,a,N(this)?1:0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,N(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=tc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}], 15].call(this,a)},Y,Y,Y,W,W,W,W,Nd,Y,ae,ce,Qd,Qd,Qd,Qd],ne=[Ad,Sd,Md,sd,Bd,Ld,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],be=[Kd,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.h=1;this.a-=5},V,V,V,function(){this.s=0;this.a-=5},V,V,V,V,V,V,V],de=[Kd,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],le=[rd,pd,ld,nd,ud,vd,ad,bd,zd,Rd,ee,ge,ie,Y,Y,Y],fe=[function(a){P(this,wc(this,a,
je=[function(a){S(this,a,0,Sc);this.a-=this.c?9+(this.$a&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Cc);this.a-=this.c?9+(this.$a&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)}];function bc(a){oe[a>>12].call(this,a)} 0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Lc);this.a-=this.c?9:3+(7==this.b?2:0)}],he=[function(a){S(this,a,0,Pc);this.a-=this.c?11:6},function(a){S(this,a,N(this)?1:0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,N(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=uc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],
var oe=[function(a){pe[a>>8&15].call(this,a)},Fd,vd,fd,bd,dd,Xc,function(a){qe[a>>8&15].call(this,a)},function(a){re[a>>8&15].call(this,a)},Gd,wd,gd,cd,ed,Od,Y],pe=[function(a){se[a>>4&15].call(this,a)},sd,pd,hd,id,nd,jd,ld,Dd,Dd,Ud,Wd,Yd,function(a){te[a>>6&3].call(this,a)},Y,Y],te=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.L);L(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=pc(this,a,0);jc(this,a);O(this,a);this.a-=11},function(a){var b=lc(this),c=this.a; je=[function(a){S(this,a,0,Tc);this.a-=this.c?9+(this.Za&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Dc);this.a-=this.c?9+(this.Za&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)}];function cc(a){oe[a>>12].call(this,a)}
qc(this,a,0,b);O(this,b);this.a=c-Hd[this.c]},function(a){O(this,wc(this,a,this.ma?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],se=[function(a){ue[a&15].call(this,a)},Y,Y,Y,W,W,W,W,Md,function(a){a&8?(this.v&49152||(this.v=this.v&-2017|(a&7)<<5,this.l|=1),this.a-=5):G(this,8,6)},ae,ce,Pd,Pd,Pd,Pd],ue=[zd,Rd,Ld,rd,Ad,Kd,function(){kc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],qe=[Id,Id,xd,xd,Yc,Yc,Zc,Zc,Sd,Sd,Y,Y,Y,Y,Nd,Nd],re=[qd,od,kd,md,td,ud,$c,ad,yd,Qd,ee,ge,ie,function(a){ve[a>>6&3].call(this,a)}, var oe=[function(a){pe[a>>8&15].call(this,a)},Gd,wd,gd,cd,ed,Yc,function(a){qe[a>>8&15].call(this,a)},function(a){re[a>>8&15].call(this,a)},Hd,xd,hd,dd,fd,Pd,Y],pe=[function(a){se[a>>4&15].call(this,a)},td,qd,id,jd,od,kd,md,Ed,Ed,Vd,Xd,Zd,function(a){te[a>>6&3].call(this,a)},Y,Y],te=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.L);L(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=qc(this,a,0);kc(this,a);O(this,a);this.a-=11},function(a){var b=mc(this),c=this.a;
Y,Y],ve=[Y,function(a){a=pc(this,a,65536);jc(this,a);O(this,a);this.a-=11},function(a){var b=lc(this),c=this.a;qc(this,a,65536,b);O(this,b);this.a=c-Hd[this.c]},Y]; rc(this,a,0,b);O(this,b);this.a=c-Id[this.c]},function(a){O(this,xc(this,a,this.na?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],se=[function(a){ue[a&15].call(this,a)},Y,Y,Y,W,W,W,W,Nd,function(a){a&8?(this.A&49152||(this.A=this.A&-2017|(a&7)<<5,this.l|=1),this.a-=5):G(this,8,6)},ae,ce,Qd,Qd,Qd,Qd],ue=[Ad,Sd,Md,sd,Bd,Ld,function(){lc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],qe=[Jd,Jd,yd,yd,Zc,Zc,$c,$c,Td,Td,Y,Y,Y,Y,Od,Od],re=[rd,pd,ld,nd,ud,vd,ad,bd,zd,Rd,ee,ge,ie,function(a){ve[a>>6&3].call(this,a)},
function we(a){u.call(this,"ROM",a,we);this.Y=this.b=null;this.j=a.addr;this.c=a.size;this.h=a.alias;this.g=a.file;this.o=ka(this.g);if(this.g){a=this.g;var b=la(this.o);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;k(a,null,!0,function(a,b,f){f?c.K("Unable to load ROM resource (error "+f+": "+a+")"):(Pa(c.ra,a,b),(a=ua(a,b))?(c.b=a.N,c.Y=a.Y):c.g=null,xe(c))})}}w(we);we.prototype.fa=function(a,b,c,d){this.m=b;this.a=c;this.F=d;xe(this)}; Y,Y],ve=[Y,function(a){a=qc(this,a,65536);kc(this,a);O(this,a);this.a-=11},function(a){var b=mc(this),c=this.a;rc(this,a,65536,b);O(this,b);this.a=c-Id[this.c]},Y];
we.prototype.$=function(){this.Y&&(this.F&&this.F.a(this.id,this.j,this.c,this.Y),delete this.Y);return!0};we.prototype.Z=function(){return!0}; function we(a){u.call(this,"ROM",a,we);this.T=this.b=null;this.o=a.addr;this.c=a.size;this.h=a.alias;this.g=a.file;this.m=ka(this.g);if(this.g){a=this.g;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;k(a,null,!0,function(a,b,f){f?c.K("Unable to load ROM resource (error "+f+": "+a+")"):(Pa(c.sa,a,b),(a=ua(a,b))?(c.b=a.N,c.T=a.T):c.g=null,xe(c))})}}w(we);we.prototype.ea=function(a,b,c,d){this.j=b;this.a=c;this.D=d;xe(this)};
function xe(a){if(!Sa(a)){if(a.g){if(!a.b||!a.m)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+ja(a.b.length,8,!0)+") does not match specified size ("+ja(a.c,8,!0)+")";a.i.error=!0;a.K(b)}else{b=a.j;if(jb(a.m,b,a.c,Hb)){var c;for(c=0;c<a.b.length;c++)a.m.Ia(b+c,a.b[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.h?b.push(a.h):null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){var d=a,e=b[c],f=ib(d.m,d.j,d.c);hb(d.m,e,d.c,f)}delete a.b}}}C(a)}} we.prototype.Z=function(){this.T&&(this.D&&this.D.a(this.id,this.o,this.c,this.T),delete this.T);return!0};we.prototype.Y=function(){return!0};
q(function(){for(var a=B(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new we(d);A(d,c)}}); function xe(a){if(!Ta(a)){if(a.g){if(!a.b||!a.j)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+ja(a.b.length,8,!0)+") does not match specified size ("+ja(a.c,8,!0)+")";a.i.error=!0;a.K(b)}else{b=a.o;if(kb(a.j,b,a.c,Ib)){var c;for(c=0;c<a.b.length;c++)a.j.Ia(b+c,a.b[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.h?b.push(a.h):null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){var d=a,e=b[c],f=jb(d.j,d.o,d.c);ib(d.j,e,d.c,f)}delete a.b}}}C(a)}}
function ye(a){u.call(this,"RAM",a,ye);this.Y=this.c=null;this.h=a.addr;this.j=a.size;this.va=a.load;this.ua=a.exec;this.g=!1;this.b=a.file;this.o=ka(this.b);if(this.b){a=this.b;var b=la(this.o);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;k(a,null,!0,function(a,b,f){f?c.K("Unable to load RAM resource (error "+f+": "+a+")"):(Pa(c.ra,a,b),(a=ua(a,b))?(c.c=a.N,c.Y=a.Y,null==c.va&&(c.va=a.va),null==c.ua&&(c.ua=a.ua)):c.b=null,ze(c))})}}w(ye); r(function(){for(var a=B(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new we(d);A(d,c)}});
ye.prototype.fa=function(a,b,c,d){this.m=b;this.a=c;this.F=d;ze(this)};ye.prototype.$=function(){return!0};ye.prototype.Z=function(){return!0};function ze(a){if(a.m&&(!a.g&&a.j&&jb(a.m,a.h,a.j,1)&&(a.g=!0),!Sa(a))){if(!a.g)m("No RAM allocated");else if(a.b){if(!a.c||!a.m)return;Ae(a,a.c,a.va,a.ua,a.h);delete a.c}C(a)}}ye.prototype.reset=function(){}; function ye(a){u.call(this,"RAM",a,ye);this.T=this.c=null;this.g=a.addr;this.o=a.size;this.la=a.load;this.ka=a.exec;this.h=!1;this.b=a.file;this.m=ka(this.b);if(this.b){a=this.b;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;k(a,null,!0,function(a,b,f){f?c.K("Unable to load RAM resource (error "+f+": "+a+")"):(Pa(c.sa,a,b),(a=ua(a,b))?(c.c=a.N,c.T=a.T,null==c.la&&(c.la=a.la),null==c.ka&&(c.ka=a.ka)):c.b=null,ze(c))})}}w(ye);
function Ae(a,b,c,d,e){var f=!1;if(null==c)for(var h=0;h<b.length-1;){var l=b[h]&255|(b[h+1]&255)<<8;if(l)if(l&255){if(1!=l)break;if(h+6>=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,y=n-=6;0<n&&h<b.length;)l+=b[h++]&255,n--;if(n||h>=b.length)break;l+=b[h++]&255;if(l&255)break;if(y)for(;y--;)a.a.Ia(r++,b[t++]&255);else r&1?D(a.a):ec(a.a,r);f=!0}else h++;else h+=2}if(!f&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)a.a.Ia(c+ ye.prototype.ea=function(a,b,c,d){this.j=b;this.a=c;this.D=d;ze(this)};ye.prototype.Z=function(){this.T&&(this.D&&this.D.a(this.id,this.g,this.o,this.T),delete this.T);return!0};ye.prototype.Y=function(){return!0};function ze(a){if(a.j&&(!a.h&&a.o&&kb(a.j,a.g,a.o,1)&&(a.h=!0),!Ta(a))){if(!a.h)m("No RAM allocated");else if(a.b){if(!a.c||!a.j)return;Ae(a,a.c,a.la,a.ka,a.g)}C(a)}}
e,b[e]);null!=d&&ec(a.a,d);f=!0}return f}q(function(){for(var a=B(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ye(d);A(d,c)}});function Be(a){u.call(this,"Keyboard",a,Be);C(this)}w(Be);Be.prototype.W=function(){return!1};Be.prototype.fa=function(a,b,c,d){this.A=a;this.a=c;this.F=d};q(function(){for(var a=B(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Be(d);A(d,c)}}); ye.prototype.reset=function(){if(this.h){for(var a=this.j,b=this.g,c=this.o,d=b&a.g,b=b>>>a.j;0<c&&b<a.b.length;){var e=a.b[b],f=c,h,d=d||0;void 0===f&&(f=e.size);if(Ua)for(h=d;f--&&h<e.b.length;h++)e.b[h]=0;else for(h=d;f--&&h<e.size;h++)e.kb(d,0,e.ya+d);c-=a.c;b++;d=0}this.c&&Ae(this,this.c,this.la,this.ka,this.g,!0)}};
function Z(a){this.B=a.baudReceive||9600;this.G=a.baudTransmit||9600;this.g=this.j=null;this.J=a.tabSize;this.C=a.charBOL;this.o=0;u.call(this,"SerialPort",a,Z);var b=a.binding;if("console"==b)this.j="";else{var c;a=Ce;b&&(void 0===c&&(c="Panel"),(c=Ra(c,this.id))&&(b=c.s[b])&&this.W(null,a,b))}this.u=this.w=null;this.exports={connect:this.nb,receiveData:this.fb}}w(Z);var Ce="buffer";g=Z.prototype; function Ae(a,b,c,d,e,f){var h=!1;if(null==c)for(var l=0;l<b.length-1;){var n=b[l]&255|(b[l+1]&255)<<8;if(n)if(n&255){if(1!=n)break;if(l+6>=b.length)break;for(var l=l+2,q=b[l++]&255|(b[l++]&255)<<8,t=b[l++]&255|(b[l++]&255)<<8,n=n+((q&255)+(q>>8)+(t&255)+(t>>8)),z=l,Ra=q-=6;0<q&&l<b.length;)n+=b[l++]&255,q--;if(q||l>=b.length)break;n+=b[l++]&255;if(n&255)break;if(Ra)for(;Ra--;)a.a.Ia(t++,b[z++]&255);else t&1?D(a.a):fc(a.a,t,f);h=!0}else l++;else l+=2}if(!h&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)a.a.Ia(c+
g.W=function(a,b,c){var d=this;switch(b){case Ce:return this.s[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.fb(b);return!0},c.onkeypress=function(a){a=a||window.event;d.fb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1}; e,b[e]);null!=d&&fc(a.a,d,f);h=!0}return h}r(function(){for(var a=B(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new ye(d);A(d,c)}});function Be(a){u.call(this,"Keyboard",a,Be);C(this)}w(Be);Be.prototype.X=function(){return!1};Be.prototype.ea=function(a,b,c,d){this.o=a;this.a=c;this.D=d};r(function(){for(var a=B(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new Be(d);A(d,c)}});
g.fa=function(a,b,c,d){this.A=a;this.m=b;this.a=c;this.F=d;var e=this;this.P=yb(48,4);this.L=vb(this.a,function(){e.b&128||!e.h.length||(e.I=e.h.shift()&255,e.b|=128,e.b&64&&wb(e.a,e.P))});this.U=yb(52,4);this.M=vb(this.a,function(){e.c|=128;e.c&64&&wb(e.a,e.U)});sb(b,this,De);C(this)}; function Z(a){this.B=a.baudReceive||9600;this.G=a.baudTransmit||9600;this.g=this.m=null;this.J=a.tabSize;this.C=a.charBOL;this.s=0;u.call(this,"SerialPort",a,Z);var b=a.binding;if("console"==b)this.m="";else{var c;a=Ce;b&&(void 0===c&&(c="Panel"),(c=Sa(c,this.id))&&(b=c.u[b])&&this.X(null,a,b))}this.v=this.w=null;this.exports={connect:this.ob,receiveData:this.fb}}w(Z);var Ce="buffer";g=Z.prototype;
g.nb=function(){if(!this.u){var a=Sb(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=qa(b[0]);if(c!=this.Ka)return;b=qa(b[1]);if(this.u=Qa(b)){var d=this.u.exports;if(d){var e=d.connect;e&&e.call(this.u);if(this.w=d.receiveData){this.status(this.ra+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.$=function(a,b){if(!b)if(this.nb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; g.X=function(a,b,c){var d=this;switch(b){case Ce:return this.u[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.fb(b);return!0},c.onkeypress=function(a){a=a||window.event;d.fb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
g.Z=function(a){return a?this.save():!0};g.reset=function(){Ee(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return Ee(this)};function Ee(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}g.fb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.h.push(a.charCodeAt(b));else this.h=this.h.concat(a);xb(this.a,this.L,1E3/Math.round(this.B/10));return!0};g.ec=function(){return this.b&65534}; g.ea=function(a,b,c,d){this.o=a;this.j=b;this.a=c;this.D=d;var e=this;this.P=zb(48,4);this.L=wb(this.a,function(){e.b&128||!e.h.length||(e.H=e.h.shift()&255,e.b|=128,e.b&64&&xb(e.a,e.P))});this.V=zb(52,4);this.M=wb(this.a,function(){e.c|=128;e.c&64&&xb(e.a,e.V)});tb(b,this,De);C(this)};
g.Rc=function(a){this.b=this.b&-112|a&111};g.dc=function(){this.b&=-129;0<this.h.length&&xb(this.a,this.L,1E3/Math.round(this.B/10));return this.I};g.Qc=function(){};g.sc=function(){return this.c};g.ed=function(a){128==(this.c&192)&&a&64&&xb(this.a,this.M,1E3/Math.round(this.G/10));this.c=this.c&-70|a&69};g.rc=function(){return 0}; g.ob=function(){if(!this.v){var a=Tb(this.o,"connection");if(a){var b=a.split("->");if(2==b.length){var c=qa(b[0]);if(c!=this.Ka)return;b=qa(b[1]);if(this.v=Qa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.Z=function(a,b){if(!b)if(this.ob(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
g.dd=function(a){if(a&=255){this.w&&this.w.call(this.u,a);if(this.g)if(13==a)this.o=0;else if(8==a)this.g.value=this.g.value.slice(0,-1),0<this.o&&this.o--;else{var b;b=(b=ra[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.o%a,this.J&&(b=" ".slice(0,c)));this.C&&!this.o&&c&&(b=String.fromCharCode(this.C)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.R(this.j), g.Y=function(a){return a?this.save():!0};g.reset=function(){Ee(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return Ee(this)};function Ee(a){a.H=0;a.b=0;a.c=128;a.h=[];return!0}g.fb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.h.push(a.charCodeAt(b));else this.h=this.h.concat(a);yb(this.a,this.L,1E3/Math.round(this.B/10));return!0};g.ec=function(){return this.b&65534};
this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;xb(this.a,this.M,1E3/Math.round(this.G/10))}};var Fe={},De=(Fe[65392]=[null,null,Z.prototype.ec,Z.prototype.Rc,"RCSR"],Fe[65394]=[null,null,Z.prototype.dc,Z.prototype.Qc,"RBUF"],Fe[65396]=[null,null,Z.prototype.sc,Z.prototype.ed,"XCSR"],Fe[65398]=[null,null,Z.prototype.rc,Z.prototype.dd,"XBUF"],Fe);q(function(){for(var a=B(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Z(d);A(d,c)}}); g.Rc=function(a){this.b=this.b&-112|a&111};g.dc=function(){this.b&=-129;0<this.h.length&&yb(this.a,this.L,1E3/Math.round(this.B/10));return this.H};g.Qc=function(){};g.sc=function(){return this.c};g.ed=function(a){128==(this.c&192)&&a&64&&yb(this.a,this.M,1E3/Math.round(this.G/10));this.c=this.c&-70|a&69};g.rc=function(){return 0};
function K(a){u.call(this,"PC11",a,K);this.c=a.autoMount||null;this.h=0;this.L=a.baudReceive||3600;this.w=this.B=this.b=0;this.u=[];this.o=Ge;this.g=He;this.j="";this.G=-1;this.C=!Aa("Mobi")&&window&&"FileReader"in window}w(K);var Ge="",He=0;g=K.prototype; g.dd=function(a){if(a&=255){this.w&&this.w.call(this.v,a);if(this.g)if(13==a)this.s=0;else if(8==a)this.g.value=this.g.value.slice(0,-1),0<this.s&&this.s--;else{var b;b=(b=ra[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.C&&!this.s&&c&&(b=String.fromCharCode(this.C)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.R(this.m),
g.W=function(a,b,c){var d=this,e=He;switch(b){case "listTapes":return this.s[b]=c,c.onchange=function(){var a=d.s.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(n){m("PC11 option error: "+n.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.s[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.s[b]=c,c.onclick=function(){var a= this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;yb(this.a,this.M,1E3/Math.round(this.G/10))}};var Fe={},De=(Fe[65392]=[null,null,Z.prototype.ec,Z.prototype.Rc,"RCSR"],Fe[65394]=[null,null,Z.prototype.dc,Z.prototype.Qc,"RBUF"],Fe[65396]=[null,null,Z.prototype.sc,Z.prototype.ed,"XCSR"],Fe[65398]=[null,null,Z.prototype.rc,Z.prototype.dd,"XBUF"],Fe);r(function(){for(var a=B(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new Z(d);A(d,c)}});
d.s.listTapes;a&&Ie(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.C){c.parentNode.removeChild(c);break}this.s[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ie(d,ka(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.s[b]=c,!0}return!1}; function K(a){u.call(this,"PC11",a,K);this.c=a.autoMount||null;this.h=0;this.L=a.baudReceive||3600;this.w=this.B=this.b=0;this.v=[];this.s=Ge;this.g=He;this.m="";this.G=-1;this.C=!Aa("Mobi")&&window&&"FileReader"in window}w(K);var Ge="",He=0;g=K.prototype;
g.fa=function(a,b,c,d){this.A=a;this.m=b;this.a=c;this.F=d;this.I=Je(a);var e=this;if((this.c=Sb(this.A,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){m("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.J=yb(56,4);this.M=vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.w<e.u.length&&(e.B=e.u[e.w++]&255,Ke(e,e.w/e.u.length*100),e.b|=128,e.b&=-2049,e.b&64&&wb(e.a,e.J))});sb(b,this,Le);Me(this,"None",Ge,!0);this.C&&Me(this,"Local Tape","?"); g.X=function(a,b,c){var d=this,e=He;switch(b){case "listTapes":return this.u[b]=c,c.onchange=function(){var a=d.u.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(n){m("PC11 option error: "+n.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.u[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.u[b]=c,c.onclick=function(){var a=
Me(this,"Remote Tape","??");Ne(this)||C(this)};g.$=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Z=function(a){return a?this.save():!0};g.reset=function(){this.b&=-2241;this.B=0};function Ne(a){a.h=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.s.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=ka(b,!0)}b&&c?Oe(a,c,b,1,!0):Pe(a)}return!!a.h} d.u.listTapes;a&&Ie(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.C){c.parentNode.removeChild(c);break}this.u[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ie(d,ka(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.u[b]=c,!0}return!1};
function Ie(a,b,c,d,e){if(c)if("?"==c)a.K('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=ka(c);a.status("Attempting to load "+c+' as "'+b+'"');a.o="??"}else a.o=c;Oe(a,b,c,d,!1,e)}else Qe(a,!1)} g.ea=function(a,b,c,d){this.o=a;this.j=b;this.a=c;this.D=d;this.H=Je(a);var e=this;if((this.c=Tb(this.o,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){m("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.J=zb(56,4);this.M=wb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.w<e.v.length&&(e.B=e.v[e.w++]&255,Ke(e,e.w/e.v.length*100),e.b|=128,e.b&=-2049,e.b&64&&xb(e.a,e.J))});tb(b,this,Le);Me(this,"None",Ge,!0);this.C&&Me(this,"Local Tape","?");
function Oe(a,b,c,d,e,f){var h=-1;if(a.j.toLowerCase()!=c.toLowerCase()||a.g!=d)h++,Qe(a,!0),a.i.Ya?a.K("PC11 busy"):(e&&a.h++,Re(a,b,c,d,f)?h++:a.i.Ya=!0);h&&a.status(1==a.g?"tape attached":"tape loaded")} Me(this,"Remote Tape","??");Ne(this)||C(this)};g.Z=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Y=function(a){return a?this.save():!0};g.reset=function(){this.b&=-2241;this.B=0};function Ne(a){a.h=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.u.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=ka(b,!0)}b&&c?Oe(a,c,b,1,!0):Pe(a)}return!!a.h}
function Re(a,b,c,d,e){var f=c;if(e){var h=new FileReader;h.onload=function(){var e=h.result;e&&(e=new Uint8Array(e,0,e.byteLength),Se(a,b,c,d,e),a.o="?");Pe(a)};h.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):na()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!k(f,null,!0,function(e,f,h){var l=0>h&&a.A&&!a.A.i.O;h?a.K('Unable to load tape "'+b+'" (error '+h+": "+e+")",l):(Pa(a.ra,e,f),(e=ua(e,f))&&Se(a,b,c,d,e.N,e.va,e.ua)); function Ie(a,b,c,d,e){if(c)if("?"==c)a.K('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=ka(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;Oe(a,b,c,d,!1,e)}else Qe(a,!1)}
a.i.Ya=!1;a.h&&(a.h--,a.h||C(a));Pe(a)})}function Me(a,b,c,d){if((a=a.s.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function Pe(a){var b=a.s.listTapes;if(b&&b.options){a=a.o||a.j;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}} function Oe(a,b,c,d,e,f){var h=-1;if(a.m.toLowerCase()!=c.toLowerCase()||a.g!=d)h++,Qe(a,!0),a.i.Ya?a.K("PC11 busy"):(e&&a.h++,Re(a,b,c,d,f)?h++:a.i.Ya=!0);h&&a.status(1==a.g?"tape attached":"tape loaded")}
function Ke(a,b){b|=0;if(b!==a.G){var c=a.s.readProgress;c&&(c=(c=B(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.G=b}}function Se(a,b,c,d,e,f,h){a.j=c;a.g=d;2==d?a.I&&Ae(a.I,e,f,h)?a.status("tape loaded: "+b):(a.j="",a.o=Ge,a.g=He,a.status("error loading tape: "+b)):(a.w=0,a.u=e,a.status("tape attached: "+b),Ke(a,0))}function Qe(a,b){if(a.j||!1===b)a.j="",b||(a.g&&a.status(1==a.g?"tape detached":"tape unloaded"),a.o=Ge,a.g=He,Pe(a))}g.save=function(){return(new M(this)).data()}; function Re(a,b,c,d,e){var f=c;if(e){var h=new FileReader;h.onload=function(){var e=h.result;e&&(e=new Uint8Array(e,0,e.byteLength),Se(a,b,c,d,e),a.s="?");Pe(a)};h.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):na()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!k(f,null,!0,function(e,f,h){var l=0>h&&a.o&&!a.o.i.O;h?a.K('Unable to load tape "'+b+'" (error '+h+": "+e+")",l):(Pa(a.sa,e,f),(e=ua(e,f))&&Se(a,b,c,d,e.N,e.la,e.ka));
g.restore=function(){return!0};g.Yb=function(){return this.b&65534};g.Kc=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&wb(this.a,this.J)):(this.b&=-129,this.b|=2048,this.B=0,xb(this.a,this.M,1E3/Math.round(this.L/10))));this.b=this.b&-66|a&65};g.Xb=function(){this.b&=-129;this.b|=2048;return this.B};g.Jc=function(){};var Te={},Le=(Te[65384]=[null,null,K.prototype.Yb,K.prototype.Kc,"PRS"],Te[65386]=[null,null,K.prototype.Xb,K.prototype.Jc,"PRB"],Te); a.i.Ya=!1;a.h&&(a.h--,a.h||C(a));Pe(a)})}function Me(a,b,c,d){if((a=a.u.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function Pe(a){var b=a.u.listTapes;if(b&&b.options){a=a.s||a.m;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}
function Ue(a,b,c){u.call(this,"Computer",a,Ue);this.i.O=!1;Ve(this,b);this.B=Sb(this,"autoPower",a);this.g=0;this.L=a.busWidth||a.buswidth;this.b=We;this.u=null;this.o=this.I=!1;this.M=Sb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Xe(this);if(this.a=Ra("CPU",this.id)){this.F=Ra("Debugger",this.id);this.m=new Za({id:this.ra+".bus",busWidth:this.L},this.a,this.F);var d,e=x(this.id);if((this.h=Ra("Panel",this.id))&&this.h.Za)for(b=0;b<e.length;b++)d=e[b],d.K=this.h.K,d.R=this.h.R,d.Za=this.h.Za; function Ke(a,b){b|=0;if(b!==a.G){var c=a.u.readProgress;c&&(c=(c=B(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.G=b}}function Se(a,b,c,d,e,f,h){a.m=c;a.g=d;2==d?a.H&&Ae(a.H,e,f,h)?a.status("tape loaded: "+b):(a.m="",a.s=Ge,a.g=He,a.K("No load address available for tape: "+b)):(a.w=0,a.v=e,a.status("tape attached: "+b),Ke(a,0))}function Qe(a,b){if(a.m||!1===b)a.m="",b||(a.g&&a.status(1==a.g?"tape detached":"tape unloaded"),a.s=Ge,a.g=He,Pe(a))}g.save=function(){return(new M(this)).data()};
this.R("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.fa&&d.fa(this,this.m,this.a,this.F);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.A=d:this.b=parseInt(d,10));var f;if(a=Sb(this,"state")||(f=!0,a.state))b=this.C=a,f||(this.o=!0,this.b=We),this.b&&(this.w=new M(this, g.restore=function(){return!0};g.Yb=function(){return this.b&65534};g.Kc=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&xb(this.a,this.J)):(this.b&=-129,this.b|=2048,this.B=0,yb(this.a,this.M,1E3/Math.round(this.L/10))));this.b=this.b&-66|a&65};g.Xb=function(){this.b&=-129;this.b|=2048;return this.B};g.Jc=function(){};var Te={},Le=(Te[65384]=[null,null,K.prototype.Yb,K.prototype.Kc,"PRS"],Te[65386]=[null,null,K.prototype.Xb,K.prototype.Jc,"PRB"],Te);
"1.30.1"),Ye(this.w)?b=null:delete this.w);!b&&this.b&&(b=Ze(this))&&(this.o=!0);if(b){var h=this;k(b,null,!0,function(a,b,c){c?(h.A=null,h.o=!1,h.K("Unable to load machine state from server (error "+c+(b?": "+qa(b):"")+")")):(h.u=b,h.I=!0);C(h)})}else C(this);this.s.power||(this.B=!0);!c&&this.B&&$e(this,this.Ha)}else m("Unable to find CPU component")}w(Ue);var We=0; function Ue(a,b,c){u.call(this,"Computer",a,Ue);this.i.O=!1;Ve(this,b);this.B=Tb(this,"autoPower",a);this.g=0;this.L=a.busWidth||a.buswidth;this.b=We;this.v=null;this.m=this.H=!1;this.M=Tb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Xe(this);if(this.a=Sa("CPU",this.id)){this.D=Sa("Debugger",this.id);this.j=new $a({id:this.sa+".bus",busWidth:this.L},this.a,this.D);var d,e=x(this.id);if((this.h=Sa("Panel",this.id))&&this.h.wa)for(b=0;b<e.length;b++)d=e[b],d.K=this.h.K,d.R=this.h.R,d.wa=this.h.wa;
function Ve(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){m(d.message+" ("+c+")")}}a.J=b}function Sb(a,b,c){var d=b.toLowerCase(),d=Ja[b]||Ja[d];void 0===d&&a.J&&(d=a.J[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function $e(a,b,c){for(var d=x(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Sa(f)){Sa(f,function(){$e(a,b,c)});return}}b.call(a,c)} this.R("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.ea&&d.ea(this,this.j,this.a,this.D);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.s=d:this.b=parseInt(d,10));var f;if(a=Tb(this,"state")||(f=!0,a.state))b=this.C=a,f||(this.m=!0,this.b=We),this.b&&(this.w=new M(this,
"1.30.1"),Ye(this.w)?b=null:delete this.w);!b&&this.b&&(b=Ze(this))&&(this.m=!0);if(b){var h=this;k(b,null,!0,function(a,b,c){c?(h.s=null,h.m=!1,h.K("Unable to load machine state from server (error "+c+(b?": "+qa(b):"")+")")):(h.v=b,h.H=!0);C(h)})}else C(this);this.u.power||(this.B=!0);!c&&this.B&&$e(this,this.Ha)}else m("Unable to find CPU component")}w(Ue);var We=0;
function Ve(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){m(d.message+" ("+c+")")}}a.J=b}function Tb(a,b,c){var d=b.toLowerCase(),d=Ja[b]||Ja[d];void 0===d&&a.J&&(d=a.J[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function $e(a,b,c){for(var d=x(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ta(f)){Ta(f,function(){$e(a,b,c)});return}}b.call(a,c)}
function af(a,b){var c=new M(a,"1.30.1","validate");if(Ye(c)&&bf(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.K("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}g=Ue.prototype; function af(a,b){var c=new M(a,"1.30.1","validate");if(Ye(c)&&bf(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.K("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}g=Ue.prototype;
g.Ha=function(a){void 0===a&&(a=this.b||(this.u?1:We));if(!this.g){this.g++;var b=!1,c=!1;this.G=!1;var d=this.w||new M(this,"1.30.1");if(-1==a)b=!0;else if(a>We){if(Ye(d,this.u)){this.j=new M(this,"1.30.1","failsafe");Ye(this.j)&&(cf(this,d),a=2,df(this.j));this.j.set("timestamp",ta());ef(this.j);var e=this.b&&!this.o;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=bf(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?Ye(d,h):("error"== g.Ha=function(a){void 0===a&&(a=this.b||(this.v?1:We));if(!this.g){this.g++;var b=!1,c=!1;this.G=!1;var d=this.w||new M(this,"1.30.1");if(-1==a)b=!0;else if(a>We){if(Ye(d,this.v)){this.o=new M(this,"1.30.1","failsafe");Ye(this.o)&&(cf(this,d),a=2,df(this.o));this.o.set("timestamp",ta());ef(this.o);var e=this.b&&!this.m;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=bf(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?Ye(d,h):("error"==
f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(za("user",""),this.c=null)):this.R(f+": "+h),df(d),Ye(d)?(c=bf(d),e=!0):c=!1))}e&&af(this,c?d:null)}else 2==a&&d.clear()}else af(this);delete this.u;delete this.w}e=x(this.id);for(f=0;f<e.length;f++)h=e[f],h!==this&&h!=this.a&&(c=ff(this,h,d,b,c));b=[d,a,c];-1!=a?$e(this,this.lb,b):this.lb(b)}}; f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(za("user",""),this.c=null)):this.R(f+": "+h),df(d),Ye(d)?(c=bf(d),e=!0):c=!1))}e&&af(this,c?d:null)}else 2==a&&d.clear()}else af(this);delete this.v;delete this.w}e=x(this.id);for(f=0;f<e.length;f++)h=e[f],h!==this&&h!=this.a&&(c=ff(this,h,d,b,c));b=[d,a,c];-1!=a?$e(this,this.mb,b):this.mb(b)}};
function ff(a,b,c,d,e){if(!b.i.O){b.i.O=!0;if(b.$){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.$(f,d)&&f&&(m("Unable to restore state for "+b.type),a.C&&!a.I?(c.clear(),a.b=We,window&&window.location.reload()):a.G=!0,b.$(null),e=!1)}if(!d&&b.pb)for(a=b.pb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e} function ff(a,b,c,d,e){if(!b.i.O){b.i.O=!0;if(b.Z){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Z(f,d)&&f&&(m("Unable to restore state for "+b.type),a.C&&!a.H?(c.clear(),a.b=We,window&&window.location.reload()):a.G=!0,b.Z(null),e=!1)}if(!d&&b.qb)for(a=b.qb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
g.lb=function(a){var b=a[0],c=0>a[1];a=a[2];this.P=!0;this.i.O=!0;var d=this.s.power;d&&(d.textContent="Shutdown");this.a&&(ff(this,this.a,b,c,a),this.a.Fa());this.G&&(cf(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; g.mb=function(a){var b=a[0],c=0>a[1];a=a[2];this.P=!0;this.i.O=!0;var d=this.u.power;d&&(d.textContent="Shutdown");this.a&&(ff(this,this.a,b,c,a),this.a.Fa());this.G&&(cf(this,b),b.clear());!c&&this.o&&(this.o.clear(),delete this.o);this.g=0};
function cf(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.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.M;d.user=c;d.type="bug";d.data=b;k("http://www.pcjs.org/api/v1/report",d,!0)}} function cf(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.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.M;d.user=c;d.type="bug";d.data=b;k("http://www.pcjs.org/api/v1/report",d,!0)}}
function gf(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),h=new M(a,"1.30.1","validate"),l=ta();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.Z&&(c&&D(a.a),d=a.a.Z(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.O=!1,!1===d&&(e=null)));for(var l=x(a.id),n=0;n<l.length;n++){var r=l[n];r.i.O&&(r.Z&&(d=r.Z(b,c),"object"===typeof d&&f.set(r.id, function gf(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),h=new M(a,"1.30.1","validate"),l=ta();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.Y&&(c&&D(a.a),d=a.a.Y(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.O=!1,!1===d&&(e=null)));for(var l=x(a.id),n=0;n<l.length;n++){var q=l[n];q.i.O&&(q.Y&&(d=q.Y(b,c),"object"===typeof d&&f.set(q.id,
d)),c&&(r.i.O=!1,!1===d&&(e=null)))}e&&(c?(l=d=!1,b?(a.c&&hf(a,a.c,f.toString()),ef(h)&&ef(f)||(e=null,d=l=!0)):a.b&&(d=!0,l=3==a.b),d&&f.clear(l)):e=f.toString());c&&(a.i.O=!1,b=a.s.power)&&(b.textContent="Power");a.g=0;return e}g.reset=function(){this.m&&this.m.reset&&this.m.reset();for(var a=x(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.m&&c.reset&&c.reset()}};g.start=function(a,b){for(var c=x(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.ba(!0)}; d)),c&&(q.i.O=!1,!1===d&&(e=null)))}e&&(c?(l=d=!1,b?(a.c&&hf(a,a.c,f.toString()),ef(h)&&ef(f)||(e=null,d=l=!0)):a.b&&(d=!0,l=3==a.b),d&&f.clear(l)):e=f.toString());c&&(a.i.O=!1,b=a.u.power)&&(b.textContent="Power");a.g=0;return e}g.reset=function(){this.j&&this.j.reset&&this.j.reset();for(var a=x(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.j&&c.reset&&c.reset()}};g.start=function(a,b){for(var c=x(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.aa(!0)};
g.stop=function(a,b){for(var c=x(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.ba(!0)}; g.stop=function(a,b){for(var c=x(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.aa(!0)};
g.W=function(a,b,c){var d=this;switch(b){case "power":return this.s[b]=c,c.onclick=function(){d.g||(d.i.O?gf(d,!1,!0):$e(d,d.Ha))},!0;case "reset":return this.s[b]=c,c.onclick=function(){if(d.i.O&&!d.g)if(d.b&&!d.A){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");gf(d,a,!0);!a&&d.C?window&&window.location.reload():d.Ha(We)}else d.reset(),d.a&&d.a.Fa()},!0;case "save":if(ma())c.parentNode.removeChild(c);else return this.s[b]= g.X=function(a,b,c){var d=this;switch(b){case "power":return this.u[b]=c,c.onclick=function(){d.g||(d.i.O?gf(d,!1,!0):$e(d,d.Ha))},!0;case "reset":return this.u[b]=c,c.onclick=function(){if(d.i.O&&!d.g)if(d.b&&!d.s){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");gf(d,a,!0);!a&&d.C?window&&window.location.reload():d.Ha(We)}else d.reset(),d.a&&d.a.Fa()},!0;case "save":if(ma())c.parentNode.removeChild(c);else return this.u[b]=
c,c.onclick=function(){var a=Xe(d,!0);if(a){var b=!!(d.b&&!d.A||d.C),c=gf(d,b);b?hf(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1}; c,c.onclick=function(){var a=Xe(d,!0);if(a){var b=!!(d.b&&!d.s||d.C),c=gf(d,b);b?hf(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1};
function Xe(a,b){var c=a.c;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=jf(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c} function Xe(a,b){var c=a.c;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=jf(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c}
function jf(a,b){a.c=null;b=k(na()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(za("user",b.data),a.c=b.data)}catch(d){m(d.message+" ("+c+")")}return a.c}function Ze(a){var b=null;a.c&&(b=na()+"/api/v1/user?req=load&user="+a.c+"&state="+kf(a,"1.30.1"));return b} function jf(a,b){a.c=null;b=k(na()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(za("user",b.data),a.c=b.data)}catch(d){m(d.message+" ("+c+")")}return a.c}function Ze(a){var b=null;a.c&&(b=na()+"/api/v1/user?req=load&user="+a.c+"&state="+kf(a,"1.30.1"));return b}
function hf(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=kf(a,"1.30.1");d.data=c;b=k(na()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.K("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.K(c),za("user",""),a.c=null)}} function hf(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=kf(a,"1.30.1");d.data=c;b=k(na()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.K("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.K(c),za("user",""),a.c=null)}}
function Je(a){var b;a=x(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}g.ba=function(a){this.a&&this.a.ba(a);this.h&&this.h.ba(a)};q(function(){for(var a=B(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=B(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],h=z(f),h=new Ue(h,d,!0);A(h,f);h.B&&$e(h,h.Ha)}}); function Je(a){var b;a=x(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}g.aa=function(a){this.a&&this.a.aa(a);this.h&&this.h.aa(a)};r(function(){for(var a=B(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=y(c),c=B(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],h=y(f),h=new Ue(h,d,!0);A(h,f);h.B&&$e(h,h.Ha)}});
p.show.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ra("Computer",c.id))&&c.P&&!c.i.O&&c.Ha(-1)}});p.exit.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ra("Computer",c.id))&&c.i.O&&gf(c,!(!c.b||c.A),!0)}});function M(a,b,c){this.id=a.id;this.key=kf(a,b,c);this.F=a.F;df(this,a.Hb)}function kf(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a} p.show.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=y(a[b]);(c=Sa("Computer",c.id))&&c.P&&!c.i.O&&c.Ha(-1)}});p.exit.push(function(){for(var a=B(document,"pdp11","computer"),b=0;b<a.length;b++){var c=y(a[b]);(c=Sa("Computer",c.id))&&c.i.O&&gf(c,!(!c.b||c.s),!0)}});function M(a,b,c){this.id=a.id;this.key=kf(a,b,c);this.D=a.D;df(this,a.Hb)}function kf(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
M.prototype={constructor:M,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){df(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c, M.prototype={constructor:M,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){df(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
1);c=0}}};function df(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function ef(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);za(a.key,c)||(m("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function bf(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){m(c.message||c),b=!1}return b}function Ye(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.a=!0):!1}var lf=0; 1);c=0}}};function df(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function ef(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);za(a.key,c)||(m("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function bf(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){m(c.message||c),b=!1}return b}function Ye(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.a=!0):!1}var lf=0;
function mf(a,b,c,d,e,f){e("Loading "+a+"...");k(a,null,!0,function(h,l,n){n?(l||(l="unable to load "+a+" ("+n+")"),f(l,null)):nf(l,a,b,c,d,e,f)})} function mf(a,b,c,d,e,f){e("Loading "+a+"...");k(a,null,!0,function(h,l,n){n?(l||(l="unable to load "+a+" ("+n+")"),f(l,null)):nf(l,a,b,c,d,e,f)})}
function nf(a,b,c,d,e,f,h){function l(a,f){if(f)h(f,null);else{c&&(Pa(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"), function nf(a,b,c,d,e,f,h){function l(a,f){if(f)h(f,null);else{c&&(Pa(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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(t){f=null,a=t.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);h(a,f)}}a?e?of(a,f,l):l(a,null):h("no data"+(b?" for file: "+b:""),null)} a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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(t){f=null,a=t.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);h(a,f)}}a?e?of(a,f,l):l(a,null):h("no data"+(b?" for file: "+b:""),null)}
function of(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");k(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, function of(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");k(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,
"");a=a.replace(d[0],h);of(a,b,c)}})}else c(a,null)} "");a=a.replace(d[0],h);of(a,b,c)}})}else c(a,null)}
function pf(a,b,c,d){function e(a){if(void 0===l){var b=h&&B(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--lf||Ga(!0));n=!1}var h,l,n=!0;lf++;Oa[a]={};try{if(h=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=r:y.appendChild(document.createTextNode(r));t.appendChild(y)}c|| function pf(a,b,c,d){function e(a){if(void 0===l){var b=h&&B(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--lf||Ga(!0));n=!1}var h,l,n=!0;lf++;Oa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=q:z.appendChild(document.createTextNode(q));t.appendChild(z)}c||
(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?mf(c,null,null,!1,e,function(d,n){n?(Pa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--lf||Ga(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--lf||Ga(!0)):f("invalid machine element: "+ (c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?mf(c,null,null,!1,e,function(d,n){n?(Pa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--lf||Ga(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--lf||Ga(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mf(b,a,d,!0,e,r):nf(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch($d){f($d.message)}return n}window.embedPDP11=function(a,b,c,d){Ga(!1);return pf(a,b,c,d)};window.enableEvents=Ga;window.sendEvent=Ha;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mf(b,a,d,!0,e,q):nf(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ra){f(Ra.message)}return n}window.embedPDP11=function(a,b,c,d){Ga(!1);return pf(a,b,c,d)};window.enableEvents=Ga;window.sendEvent=Ha;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map