diff --git a/devices/pdp11/machine/1170/4mb/README.md b/devices/pdp11/machine/1170/4mb/README.md
new file mode 100644
index 000000000..316da4bc9
--- /dev/null
+++ b/devices/pdp11/machine/1170/4mb/README.md
@@ -0,0 +1,13 @@
+---
+layout: page
+title: PDP-11/70 with 4Mb and Front Panel
+permalink: /devices/pdp11/machine/1170/4mb/debugger/
+machines:
+ - id: test1170
+ type: pdp11
+ autoMount:
+ RL0:
+ path: http://archive.pcjs.org/disks/dec/rl01k/RL01K-RSTS-V70.json
+---
+
+{% include machine.html id="test1170" %}
diff --git a/devices/pdp11/machine/1170/4mb/debugger/README.md b/devices/pdp11/machine/1170/4mb/debugger/README.md
new file mode 100644
index 000000000..1096956fe
--- /dev/null
+++ b/devices/pdp11/machine/1170/4mb/debugger/README.md
@@ -0,0 +1,15 @@
+---
+layout: page
+title: PDP-11/70 with 4Mb, Front Panel, and Debugger
+permalink: /devices/pdp11/machine/1170/4mb/debugger/
+machines:
+ - id: test1170
+ type: pdp11
+ debugger: true
+ autoStart: true
+ autoMount:
+ RL0:
+ path: http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json
+---
+
+{% include machine.html id="test1170" %}
diff --git a/devices/pdp11/machine/1170/4mb/debugger/machine.xml b/devices/pdp11/machine/1170/4mb/debugger/machine.xml
new file mode 100644
index 000000000..5665aa6bc
--- /dev/null
+++ b/devices/pdp11/machine/1170/4mb/debugger/machine.xml
@@ -0,0 +1,15 @@
+
+
+
+ PDP-11/70 with 4Mb, Front Panel and Debugger
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devices/pdp11/machine/1170/4mb/machine.xml b/devices/pdp11/machine/1170/4mb/machine.xml
new file mode 100644
index 000000000..9317a3b51
--- /dev/null
+++ b/devices/pdp11/machine/1170/4mb/machine.xml
@@ -0,0 +1,14 @@
+
+
+
+ PDP-11/70 with 4Mb, Front Panel and Debugger
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js
index 95ae13c45..a49303d25 100644
--- a/modules/pdp11/lib/bus.js
+++ b/modules/pdp11/lib/bus.js
@@ -103,6 +103,9 @@ function BusPDP11(parmsBus, cpu, dbg)
this.nBlockMask = this.nBlockTotal - 1;
this.assert(this.nBlockMask <= BusPDP11.BlockInfo.num.mask);
+ this.iBlockIOPageDefault = ((this.addrTotal - BusPDP11.IOPAGE_LENGTH) & this.nBusMask) >>> this.nBlockShift;
+ this.iBlockIOPageActive = this.iBlockIOPageDefault;
+
/*
* aIOHandlers is an array (ie, a hash) of I/O notification handlers, indexed by address, where each
* entry contains an array:
@@ -171,7 +174,6 @@ BusPDP11.IOPAGE_LENGTH = 0x2000; // ie, 8Kb
BusPDP11.IOPAGE_MASK = BusPDP11.IOPAGE_LENGTH - 1;
BusPDP11.UNIBUS_22BIT = 0x3C0000; /*017000000*/
-BusPDP11.MAX_MEMORY = BusPDP11.UNIBUS_22BIT - 16384; // Maximum memory address (need less memory for BSD 2.9 boot)
BusPDP11.ERROR = {
RANGE_INUSE: 1,
@@ -497,6 +499,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange)
addr = (1 << nRange);
this.nBusMask = (addr - 1);
addr -= BusPDP11.IOPAGE_LENGTH;
+ this.iBlockIOPageActive = (addr & this.nBusMask) >>> this.nBlockShift;
this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
if (this.aIOPageBlocks) {
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPageBlocks);
@@ -922,17 +925,33 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
*/
BusPDP11.prototype.getByte = function(addr)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr);
};
+/**
+ * getBlockDirect(addr)
+ *
+ * This checks for block requests matching the active IOPAGE block and redirects to the original block;
+ * conversely, if the request is for the default IOPAGE block, then the request is redirected to the active
+ * IOPAGE block.
+ *
+ * @this {BusPDP11}
+ * @param {number} addr is a physical address
+ * @return {MemoryPDP11}
+ */
+BusPDP11.prototype.getBlockDirect = function(addr)
+{
+ var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
+ var block = this.aMemBlocks[iBlock];
+ if (iBlock == this.iBlockIOPageActive && this.aIOPrevBlocks.length) {
+ block = this.aIOPrevBlocks[0];
+ } else if (iBlock == this.iBlockIOPageDefault) {
+ block = this.aMemBlocks[this.iBlockIOPageActive];
+ }
+ return block;
+};
+
/**
* getByteDirect(addr)
*
@@ -944,17 +963,10 @@ BusPDP11.prototype.getByte = function(addr)
*/
BusPDP11.prototype.getByteDirect = function(addr)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
this.fFault = false;
this.nDisableFaults++;
- var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr);
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
+ var b = this.getBlockDirect(addr).readByteDirect(addr & this.nBlockLimit, addr);
this.nDisableFaults--;
return b;
};
@@ -968,14 +980,7 @@ BusPDP11.prototype.getByteDirect = function(addr)
*/
BusPDP11.prototype.getWord = function(addr)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
var off = addr & this.nBlockLimit;
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
@@ -995,23 +1000,16 @@ BusPDP11.prototype.getWord = function(addr)
*/
BusPDP11.prototype.getWordDirect = function(addr)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
var w;
- var off = addr & this.nBlockLimit;
- var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
this.fFault = false;
this.nDisableFaults++;
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
+ var off = addr & this.nBlockLimit;
+ var block = this.getBlockDirect(addr);
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
- w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8);
+ w = block.readByteDirect(off, addr) | (this.getBlockDirect(addr + 1).readByteDirect(0, addr + 1) << 8);
} else {
- w = this.aMemBlocks[iBlock].readWordDirect(off, addr);
+ w = block.readWordDirect(off, addr);
}
this.nDisableFaults--;
return w;
@@ -1026,14 +1024,7 @@ BusPDP11.prototype.getWordDirect = function(addr)
*/
BusPDP11.prototype.setByte = function(addr, b)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr);
};
@@ -1049,17 +1040,10 @@ BusPDP11.prototype.setByte = function(addr, b)
*/
BusPDP11.prototype.setByteDirect = function(addr, b)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
this.fFault = false;
this.nDisableFaults++;
- this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
+ this.getBlockDirect(addr).writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
this.nDisableFaults--;
};
@@ -1072,14 +1056,7 @@ BusPDP11.prototype.setByteDirect = function(addr, b)
*/
BusPDP11.prototype.setWord = function(addr, w)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
var off = addr & this.nBlockLimit;
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
@@ -1102,23 +1079,16 @@ BusPDP11.prototype.setWord = function(addr, w)
*/
BusPDP11.prototype.setWordDirect = function(addr, w)
{
- /*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
- * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
- * UNIBUS relocation map.
- */
- if (addr >= BusPDP11.UNIBUS_22BIT) {
- addr = this.cpu.mapUnibus(addr);
- }
- var off = addr & this.nBlockLimit;
- var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
this.fFault = false;
this.nDisableFaults++;
+ if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
+ var off = addr & this.nBlockLimit;
+ var block = this.getBlockDirect(addr);
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
- this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr);
- this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
+ block.writeByteDirect(off, w & 0xff, addr);
+ this.getBlockDirect(addr + 1).writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
} else {
- this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr);
+ block.writeWordDirect(off, w & 0xffff, addr);
}
this.nDisableFaults--;
};
@@ -1246,8 +1216,8 @@ BusPDP11.prototype.restoreMemory = function(a)
/**
* getMemorySize(type)
*
- * NOTE: The original pdp11.js defined MAX_MEMORY as IOBASE_UNIBUS - 16384, where IOBASE_UNIBUS
- * is 4Mb less 256Kb, and then it subtracted another 16Kb so that BSD 2.9 could boot.
+ * NOTE: The original pdp11.js defined a constant named MAX_MEMORY equal to UNIBUS_22BIT - 16384,
+ * where UNIBUS_22BIT is 4Mb less 256Kb, from which it then subtracted another 16Kb "for BSD 2.9 boot."
*
* @this {BusPDP11}
* @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported)
diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js
index b7b104008..306f061d0 100644
--- a/modules/pdp11/lib/cpustate.js
+++ b/modules/pdp11/lib/cpustate.js
@@ -271,12 +271,15 @@ CPUStatePDP11.prototype.resetMMU = function()
this.mmuLastMode = 0;
this.mmuMask = 0x3ffff;
- this.lastAddr = 0; // this is queried by the Panel when it's not using its own ADDRESS register
- this.lastOp = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
+ this.addrLast = 0; // this is queried by the Panel when it's not using its own ADDRESS register
+ this.opLast = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
this.resetIRQs();
- if (this.bus) this.setMemoryAccess();
+ if (this.bus) {
+ this.setMemoryAccess();
+ this.addrInvalid = this.bus.getMemorySize(MemoryPDP11.TYPE.RAM);
+ }
};
/**
@@ -356,11 +359,11 @@ CPUStatePDP11.prototype.setMMR0 = function(newMMR0)
if (newMMR0 & PDP11.MMR0.ABORT) {
/*
* If updates to MMR0[1-7], MMR1, and MMR2 are being shut off (ie, MMR0.ABORT bits are transitioning
- * from clear to set), then do one final sync with their real-time counterparts in lastOp.
+ * from clear to set), then do one final sync with their real-time counterparts in opLast.
*/
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
- this.regMMR1 = (this.lastOp >> 16) & 0xffff;
- this.regMMR2 = this.lastOp & 0xffff;
+ this.regMMR1 = (this.opLast >> 16) & 0xffff;
+ this.regMMR2 = this.opLast & 0xffff;
}
}
/*
@@ -393,10 +396,10 @@ CPUStatePDP11.prototype.getMMR1 = function()
{
/*
* If updates to MMR1 have not been shut off (ie, MMR0.ABORT bits are clear),
- * then we are allowed to sync MMR1 with its real-time counterpart in lastOp.
+ * then we are allowed to sync MMR1 with its real-time counterpart in opLast.
*/
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
- this.regMMR1 = (this.lastOp >> 16) & 0xffff;
+ this.regMMR1 = (this.opLast >> 16) & 0xffff;
}
var result = this.regMMR1;
if (result & 0xff00) {
@@ -415,10 +418,10 @@ CPUStatePDP11.prototype.getMMR2 = function()
{
/*
* If updates to MMR2 have not been shut off (ie, MMR0.ABORT bits are clear),
- * then we are allowed to sync MMR2 with its real-time counterpart in lastOp.
+ * then we are allowed to sync MMR2 with its real-time counterpart in opLast.
*/
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
- this.regMMR2 = this.lastOp & 0xffff;
+ this.regMMR2 = this.opLast & 0xffff;
}
return this.regMMR2;
};
@@ -662,7 +665,7 @@ CPUStatePDP11.prototype.setNF = function()
CPUStatePDP11.prototype.getOpcode = function()
{
var pc = this.regsGen[PDP11.REG.PC];
- this.lastOp = pc;
+ this.opLast = pc;
/*
* If PC is unaligned, a BUS trap will be generated, and because it will generate an
* exception, the next line (the equivalent of advancePC(2)) will not be executed, ensuring that
@@ -710,7 +713,7 @@ CPUStatePDP11.prototype.getPC = function()
*/
CPUStatePDP11.prototype.getLastAddr = function()
{
- return this.lastAddr;
+ return this.addrLast;
};
/**
@@ -721,7 +724,7 @@ CPUStatePDP11.prototype.getLastAddr = function()
*/
CPUStatePDP11.prototype.getLastPC = function()
{
- return this.lastOp & 0xffff;
+ return this.opLast & 0xffff;
};
/**
@@ -1365,14 +1368,14 @@ CPUStatePDP11.prototype.trap = function(vector, flag, reason)
* diagnostic (PC 056710), which tests what happens when a misaligned read triggers a BUS trap,
* and that trap then triggers an MMU trap during the first pushWord() below.
*
- * One would think it would be fine to zero those bits by setting lastOp to vector alone,
+ * One would think it would be fine to zero those bits by setting opLast to vector alone,
* and then letting each of the pushWord() calls below shift their own 0xF6 auto-dec value into
- * lastOp. When the first pushWord() triggers an MMU trap, we obviously won't get to the second
+ * opLast. When the first pushWord() triggers an MMU trap, we obviously won't get to the second
* pushWord(), yet the diagnostic expects TWO auto-decs to be recorded. I'm puzzled why the
* hardware apparently indicates TWO auto-decs, if SP wasn't actually decremented twice, but who
* am I to judge.
*/
- this.lastOp = vector | 0xf6f60000;
+ this.opLast = vector | 0xf6f60000;
/*
* Read from kernel D space
@@ -1476,7 +1479,7 @@ CPUStatePDP11.prototype.getTrapStatus = function()
/**
* mapUnibus(addr)
*
- * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
+ * If bits 18-21 of addr are all set (which callers check using addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
* then we have a 22-bit address pointing to the top 256Kb range, so if the UNIBUS relocation map is enabled,
* we must pass the lower 18 bits of that address through the map.
*
@@ -1532,7 +1535,7 @@ CPUStatePDP11.prototype.mapUnibus = function(addr)
};
/**
- * mapVirtualToPhysical(virtualAddress, access)
+ * mapVirtualToPhysical(addrVirtual, access)
*
* mapVirtualToPhysical() does memory management. It converts a 17-bit I/D virtual address to a
* 22-bit physical address. A real PDP 11/70 memory management unit can be enabled separately
@@ -1582,60 +1585,55 @@ CPUStatePDP11.prototype.mapUnibus = function(addr)
* physical address to the next 8Kb page.
*
* @this {CPUStatePDP11}
- * @param {number} virtualAddress
+ * @param {number} addrVirtual
* @param {number} access
* @return {number}
*/
-CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
+CPUStatePDP11.prototype.mapVirtualToPhysical = function(addrVirtual, access)
{
- var page, pdr, physicalAddress;
-
- this.assert(!(virtualAddress & ~0x1ffff) && access);
+ var page, pdr, addr;
/*
* This can happen when the DSTMODE (MAINT) bit of MMR0 is set but *not* the ENABLED bit.
*/
if (!(access & this.mmuEnable)) {
- physicalAddress = virtualAddress & 0xffff;
- if (physicalAddress >= BusPDP11.IOPAGE_16BIT) {
- physicalAddress |= this.addrIOPage;
+ addr = addrVirtual & 0xffff;
+ if (addr >= BusPDP11.IOPAGE_16BIT) {
+ addr |= this.addrIOPage;
}
- return physicalAddress;
+ return addr;
}
- page = virtualAddress >> 13;
+ page = addrVirtual >> 13;
if (!(this.regMMR3 & this.mapMMR3[this.mmuMode])) page &= 7;
pdr = this.mmuPDR[this.mmuMode][page];
- physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask;
+ addr = ((this.mmuPAR[this.mmuMode][page] << 6) + (addrVirtual & 0x1fff)) & this.mmuMask;
- if (this.nDisableTraps) return physicalAddress;
+ if (addr >= BusPDP11.UNIBUS_22BIT) {
+ addr = this.mapUnibus(addr);
+ }
+
+ if (this.nDisableTraps) return addr;
/*
- * This next bit is the weirdness that Paul mentions in the function description above:
- *
- * As an aside it turns out that it is the memory management unit that does odd address and
- * non-existent memory trapping: who knew? :-) I thought these would have been handled at access time.
- *
- * TEST #122 ("KT BEND") in the "EKBEE1" diagnostic (PC 076060) triggers an ODDADDR error using this
- * instruction:
- *
- * 076356: 005037 140001 CLR @#140001
- *
- * and it expects that instruction to generate a BUS error rather than an MMU error, so we deal with that
- * next. However, the test also claims to check for an NEXM (non-existent memory) error, using this
- * instruction:
+ * TEST #122 ("KT BEND") in the "EKBEE1" diagnostic (PC 076060) triggers a NOMEMORY error
+ * using this instruction:
*
* 076170: 005037 140100 CLR @#140100
*
- * but that error never materializes, so I've NOT included any NEXM checks yet. I assume that any such
- * checks would be limited to whatever's recorded in the Memory Size registers (177760), because actually
- * checking every physical address at this stage -- even in a real MMU -- seems prohibitively expensive.
+ * It also triggers an ODDADDR error using this instruction:
*
- * TODO: Investigate why the test's NEXM error doesn't occur.
+ * 076356: 005037 140001 CLR @#140001
+ *
+ * These tests exercise the MMU checks that Paul mentions in the function description above.
*/
- if ((physicalAddress & 0x1) && !(access & PDP11.ACCESS.BYTE)) {
+ if (addr >= this.addrInvalid && addr < this.addrIOPage) {
+ this.regErr |= PDP11.CPUERR.NOMEMORY;
+ this.trap(PDP11.TRAP.BUS, 0, addr);
+ }
+ else if ((addr & 0x1) && !(access & PDP11.ACCESS.BYTE)) {
this.regErr |= PDP11.CPUERR.ODDADDR;
- this.trap(PDP11.TRAP.BUS, 0, physicalAddress);
+ this.trap(PDP11.TRAP.BUS, 0, addr);
}
var newMMR0 = 0;
@@ -1679,12 +1677,12 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
*/
if (pdr & PDP11.PDR.ED) {
if (pdr & PDP11.PDR.PLF) {
- if ((virtualAddress & 0x1FC0) < ((pdr >> 2) & 0x1FC0)) {
+ if ((addrVirtual & 0x1FC0) < ((pdr >> 2) & 0x1FC0)) {
newMMR0 |= PDP11.MMR0.ABORT_PL;
}
}
} else {
- if ((virtualAddress & 0x1FC0) > ((pdr >> 2) & 0x1FC0)) {
+ if ((addrVirtual & 0x1FC0) > ((pdr >> 2) & 0x1FC0)) {
newMMR0 |= PDP11.MMR0.ABORT_PL;
}
}
@@ -1695,7 +1693,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
*/
this.mmuPDR[this.mmuMode][page] = pdr;
- if (physicalAddress != ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.MMR0) & this.mmuMask) || this.mmuMode) {
+ if (addr != ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.MMR0) & this.mmuMask) || this.mmuMode) {
this.mmuLastMode = this.mmuMode;
this.mmuLastPage = page;
}
@@ -1721,8 +1719,8 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
/*
* TODO: Review the code below, because the address range seems over-inclusive.
*/
- if (physicalAddress < ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.SIPDR0) & this.mmuMask) ||
- physicalAddress > ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.UDPAR7 | 0x1) & this.mmuMask)) {
+ if (addr < ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.SIPDR0) & this.mmuMask) ||
+ addr > ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.UDPAR7 | 0x1) & this.mmuMask)) {
this.regMMR0 |= PDP11.MMR0.TRAP_MMU;
if (this.regMMR0 & PDP11.MMR0.MMU_TRAPS) {
this.opFlags |= PDP11.OPFLAG.TRAP_MMU;
@@ -1730,32 +1728,32 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
}
}
}
- return physicalAddress;
+ return addr;
};
/**
- * readByteFromPhysical(physicalAddress)
+ * readByteFromPhysical(addr)
*
* @this {CPUStatePDP11}
- * @param {number} physicalAddress
+ * @param {number} addr
* @return {number}
*/
-CPUStatePDP11.prototype.readByteFromPhysical = function(physicalAddress)
+CPUStatePDP11.prototype.readByteFromPhysical = function(addr)
{
- return this.bus.getByte(physicalAddress);
+ return this.bus.getByte(addr);
};
/**
- * writeByteToPhysical(physicalAddress, data)
+ * writeByteToPhysical(addr, data)
*
* @this {CPUStatePDP11}
- * @param {number} physicalAddress
+ * @param {number} addr
* @param {number} data
*/
-CPUStatePDP11.prototype.writeByteToPhysical = function(physicalAddress, data)
+CPUStatePDP11.prototype.writeByteToPhysical = function(addr, data)
{
- if (physicalAddress & 1) this.nStepCycles--;
- this.bus.setByte(physicalAddress, data);
+ if (addr & 1) this.nStepCycles--;
+ this.bus.setByte(addr, data);
};
/**
@@ -1780,11 +1778,11 @@ CPUStatePDP11.prototype.popWord = function()
*/
CPUStatePDP11.prototype.pushWord = function(data, fRed)
{
- var virtualAddress = (this.regsGen[6] - 2) & 0xffff;
- this.regsGen[6] = virtualAddress; // BSD needs SP updated before any fault :-(
- this.lastOp = (this.lastOp & 0xffff) | ((this.lastOp & ~0xffff) << 8) | (0x00f6 << 16);
- if (!fRed) this.checkStackLimit(PDP11.ACCESS.WRITE_WORD, -2, virtualAddress);
- this.writeWord(virtualAddress, data);
+ var addrVirtual = (this.regsGen[6] - 2) & 0xffff;
+ this.regsGen[6] = addrVirtual; // BSD needs SP updated before any fault :-(
+ this.opLast = (this.opLast & 0xffff) | ((this.opLast & ~0xffff) << 8) | (0x00f6 << 16);
+ if (!fRed) this.checkStackLimit(PDP11.ACCESS.WRITE_WORD, -2, addrVirtual);
+ this.writeWord(addrVirtual, data);
};
/**
@@ -1835,7 +1833,7 @@ CPUStatePDP11.prototype.pushWord = function(data, fRed)
*/
CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
{
- var virtualAddress, step;
+ var addrVirtual, step;
var addrDSpace = (access & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace;
/*
@@ -1868,10 +1866,10 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
*/
case 2:
step = 2;
- virtualAddress = this.regsGen[reg];
- if (reg == 6) this.checkStackLimit(access, step, virtualAddress);
+ addrVirtual = this.regsGen[reg];
+ if (reg == 6) this.checkStackLimit(access, step, addrVirtual);
if (reg != 7) {
- virtualAddress |= addrDSpace;
+ addrVirtual |= addrDSpace;
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = 1;
}
this.nStepCycles -= (2 + 1);
@@ -1882,10 +1880,10 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
*/
case 3:
step = 2;
- virtualAddress = this.regsGen[reg];
- if (reg != 7) virtualAddress |= addrDSpace;
- virtualAddress = this.readWord(virtualAddress);
- virtualAddress |= addrDSpace;
+ addrVirtual = this.regsGen[reg];
+ if (reg != 7) addrVirtual |= addrDSpace;
+ addrVirtual = this.readWord(addrVirtual);
+ addrVirtual |= addrDSpace;
this.nStepCycles -= (5 + 2);
break;
@@ -1895,9 +1893,9 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
case 4:
step = -2;
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = -1;
- virtualAddress = (this.regsGen[reg] + step) & 0xffff;
- if (reg == 6) this.checkStackLimit(access, step, virtualAddress);
- if (reg != 7) virtualAddress |= addrDSpace;
+ addrVirtual = (this.regsGen[reg] + step) & 0xffff;
+ if (reg == 6) this.checkStackLimit(access, step, addrVirtual);
+ if (reg != 7) addrVirtual |= addrDSpace;
this.nStepCycles -= (3 + 1);
break;
@@ -1906,9 +1904,9 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
*/
case 5:
step = -2;
- virtualAddress = (this.regsGen[reg] - 2) & 0xffff;
- if (reg != 7) virtualAddress |= addrDSpace;
- virtualAddress = this.readWord(virtualAddress) | addrDSpace;
+ addrVirtual = (this.regsGen[reg] - 2) & 0xffff;
+ if (reg != 7) addrVirtual |= addrDSpace;
+ addrVirtual = this.readWord(addrVirtual) | addrDSpace;
this.nStepCycles -= (6 + 2);
break;
@@ -1916,27 +1914,27 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
* Mode 6: d(R)
*/
case 6:
- virtualAddress = this.readWord(this.advancePC(2));
- virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff;
- if (reg == 6) this.checkStackLimit(access, 0, virtualAddress);
+ addrVirtual = this.readWord(this.advancePC(2));
+ addrVirtual = (addrVirtual + this.regsGen[reg]) & 0xffff;
+ if (reg == 6) this.checkStackLimit(access, 0, addrVirtual);
this.nStepCycles -= (4 + 2);
- return virtualAddress | addrDSpace;
+ return addrVirtual | addrDSpace;
/*
* Mode 7: @d(R)
*/
case 7:
- virtualAddress = this.readWord(this.advancePC(2));
- virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff;
- virtualAddress = this.readWord(virtualAddress | this.addrDSpace);
+ addrVirtual = this.readWord(this.advancePC(2));
+ addrVirtual = (addrVirtual + this.regsGen[reg]) & 0xffff;
+ addrVirtual = this.readWord(addrVirtual | this.addrDSpace);
this.nStepCycles -= (7 + 3);
- return virtualAddress | addrDSpace;
+ return addrVirtual | addrDSpace;
}
this.regsGen[reg] = (this.regsGen[reg] + step) & 0xffff;
- this.lastOp = (this.lastOp & 0xffff) | ((this.lastOp & ~0xffff) << 8) | ((((step << 3) & 0xf8) | reg) << 16);
+ this.opLast = (this.opLast & 0xffff) | ((this.opLast & ~0xffff) << 8) | ((((step << 3) & 0xf8) | reg) << 16);
- return virtualAddress;
+ return addrVirtual;
};
/**
@@ -2127,59 +2125,59 @@ CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, access)
};
/**
- * readWordFromPhysical(physicalAddress)
+ * readWordFromPhysical(addr)
*
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
*
* @this {CPUStatePDP11}
- * @param {number} physicalAddress
+ * @param {number} addr
* @return {number}
*/
-CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress)
+CPUStatePDP11.prototype.readWordFromPhysical = function(addr)
{
- return this.bus.getWord(this.lastAddr = physicalAddress);
+ return this.bus.getWord(this.addrLast = addr);
};
/**
- * readWordFromVirtual(virtualAddress)
+ * readWordFromVirtual(addrVirtual)
*
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
*
* @this {CPUStatePDP11}
- * @param {number} virtualAddress (input address is 17 bit (I&D))
+ * @param {number} addrVirtual (input address is 17 bit (I&D))
* @return {number}
*/
-CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress)
+CPUStatePDP11.prototype.readWordFromVirtual = function(addrVirtual)
{
- return this.bus.getWord(this.lastAddr = this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD));
+ return this.bus.getWord(this.addrLast = this.mapVirtualToPhysical(addrVirtual, PDP11.ACCESS.READ_WORD));
};
/**
- * writeWordToPhysical(physicalAddress, data)
+ * writeWordToPhysical(addr, data)
*
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
*
* @this {CPUStatePDP11}
- * @param {number} physicalAddress
+ * @param {number} addr
* @param {number} data
*/
-CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data)
+CPUStatePDP11.prototype.writeWordToPhysical = function(addr, data)
{
- this.bus.setWord(this.lastAddr = physicalAddress, data & 0xffff);
+ this.bus.setWord(this.addrLast = addr, data & 0xffff);
};
/**
- * writeWordToVirtual(virtualAddress, data)
+ * writeWordToVirtual(addrVirtual, data)
*
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
*
* @this {CPUStatePDP11}
- * @param {number} virtualAddress (input address is 17 bit (I&D))
+ * @param {number} addrVirtual (input address is 17 bit (I&D))
* @param {number} data
*/
-CPUStatePDP11.prototype.writeWordToVirtual = function(virtualAddress, data)
+CPUStatePDP11.prototype.writeWordToVirtual = function(addrVirtual, data)
{
- this.bus.setWord(this.lastAddr = this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.WRITE_WORD), data);
+ this.bus.setWord(this.addrLast = this.mapVirtualToPhysical(addrVirtual, PDP11.ACCESS.WRITE_WORD), data);
};
/**
@@ -2223,7 +2221,7 @@ CPUStatePDP11.prototype.readWordFromPrevSpace = function(opCode, access)
*/
CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, access, data)
{
- this.lastOp = (this.lastOp & 0xffff) | (0x0016 << 16);
+ this.opLast = (this.opLast & 0xffff) | (0x0016 << 16);
var reg = this.dstReg = opCode & PDP11.OPREG.MASK;
var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT;
if (!mode) {
diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js
index bf10d5aef..0f702314f 100644
--- a/modules/pdp11/lib/rl11.js
+++ b/modules/pdp11/lib/rl11.js
@@ -956,6 +956,10 @@ RL11.prototype.processCommand = function()
}
addr = (((this.ber & PDP11.RL11.RLBE.MASK)) << 16) | this.bar; // 22 bit mode
nWords = (0x10000 - this.mpr) & 0xffff;
+ if (DEBUG && this.messageEnabled(MessagesPDP11.READ)) {
+ var pos = ((((iCylinder << 1) + iHead) * drive.nSectors) + iSector) * 128;
+ this.printMessage((fnReadWrite == this.readData? "readData" : "writeData") + "(pos=" + pos + ",addr=" + str.toOct(addr) + ",bytes=" + (nWords * 2) + ")", true, true);
+ }
fInterrupt = fnReadWrite.call(this, drive, iCylinder, iHead, iSector, nWords, addr, this.endReadWrite.bind(this));
break;
@@ -1140,9 +1144,7 @@ RL11.prototype.readRLCS = function(addr)
RL11.prototype.writeRLCS = function(data, addr)
{
this.csr = (this.csr & ~PDP11.RL11.RLCS.WMASK) | (data & PDP11.RL11.RLCS.WMASK);
-
- this.bae = (this.bae & ~0x3) | ((data & PDP11.RL11.RLCS.BAE) >> 4);
-
+ this.ber = (this.ber & 0x3C) | ((data & PDP11.RL11.RLCS.BAE) >> PDP11.RL11.RLCS.SHIFT.BAE);
if (!(this.csr & PDP11.RL11.RLCS.CRDY)) this.processCommand();
};
@@ -1233,6 +1235,12 @@ RL11.prototype.readRLBE = function(addr)
/**
* writeRLBE(data, addr)
*
+ * Curiously, we see RSTS/E v7.0 writing RLBE bits that aren't documented:
+ *
+ * R0=000000 R1=000000 R2=174410 R3=000000 R4=102076 R5=045166
+ * SP=052662 PC=067624 PS=034344 IR=000000 SL=000377 T0 N0 Z1 V0 C0
+ * 067624: 012712 000300 MOV #300,@R2
+ *
* @this {RL11}
* @param {number} data
* @param {number} addr (eg, PDP11.UNIBUS.RLBE or 174410)
@@ -1240,6 +1248,7 @@ RL11.prototype.readRLBE = function(addr)
RL11.prototype.writeRLBE = function(data, addr)
{
this.ber = data & PDP11.RL11.RLBE.MASK;
+ this.csr = (this.csr & ~PDP11.RL11.RLCS.BAE) | ((this.ber & 0x3) << PDP11.RL11.RLCS.SHIFT.BAE);
};
/*
diff --git a/versions/pdpjs/1.30.5/pdp11-dbg.js b/versions/pdpjs/1.30.5/pdp11-dbg.js
index 318286920..fca97732c 100644
--- a/versions/pdpjs/1.30.5/pdp11-dbg.js
+++ b/versions/pdpjs/1.30.5/pdp11-dbg.js
@@ -32,324 +32,325 @@
http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016
http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016
*/
-for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da":62,"?":63,"@":64,zc:65,Hf:66,Jf:67,fg:68,E:69,gg:70,hg:71,ig:72,jg:73,kg:74,lg:75,mg:76,ng:77,og:78,pg:79,qg:80,Q:81,rg:82,sg:83,tg:84,ug:85,vg:86,wg:87,xg:88,yg:89,md:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,zg:97,Ag:98,Bg:99,d:100,e:101,Cg:102,Dg:103,Eg:104,Fg:105,Ig:106,k:107,Jg:108,Kg:109,n:110,Lg:111,p:112,q:113,r:114,Mg:115,t:116,Og:117,Pg:118,Qg:119,x:120,y:121,z:122,"{":123,
-"|":124,"}":125,"~":126,bd:127};
+var ja={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Ef:0,Uc:1,Gf:2,Hf:3,If:4,Jf:5,Kf:6,Lf:7,wc:8,Mf:9,Vc:10,Nf:11,Of:12,Wc:13,Pf:14,Qf:15,Rf:16,Sf:17,Tf:18,Uf:19,Vf:20,Wf:21,Xf:22,Yf:23,Zf:24,$f:25,ag:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
+"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,vc:65,Df:66,Ff:67,bg:68,E:69,cg:70,dg:71,eg:72,fg:73,gg:74,hg:75,ig:76,jg:77,kg:78,lg:79,mg:80,Q:81,ng:82,og:83,pg:84,qg:85,rg:86,sg:87,tg:88,ug:89,gd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,vg:97,wg:98,xg:99,d:100,e:101,yg:102,zg:103,Ag:104,Bg:105,Eg:106,k:107,Fg:108,Gg:109,n:110,Hg:111,p:112,q:113,r:114,Ig:115,t:116,Kg:117,Lg:118,Mg:119,x:120,y:121,z:122,"{":123,
+"|":124,"}":125,"~":126,Xc:127};
function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)}
-function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function sa(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})}
-function ta(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
+function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ra(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})}
+function ta(a,b){return(a+" ").slice(0,b)}function ua(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}
-function Ea(a,b){var c,d={ha:null,ja:null,Ra:null,Qa: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.Ra=g.load;d.Qa=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ha=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Sa=g.load;d.Ra=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ha=Array(4*e.length),f=c=0;c>8&255,d.ha[f++]=e[c]>>16&255,d.ha[f++]=e[c]>>24&255;else d.ha=g;d.ja=g.symbols;d.ha.length?1==d.ha.length&&(w(d.ha[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.eb=this.id:(this.fb=this.id.substr(0,b),this.eb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,hb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.pa=d||0;z.push(this)}var eb=void 0,fb={};
+function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.yc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.hb=this.id:(this.ib=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,kb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.oa=d||0;z.push(this)}var eb=void 0,fb={};
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(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 B(a,b){b||(b=x);a.prototype=jb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var kb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else kb={},z=[];function lb(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function mb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,0,!1,!1,this.Kd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
-k.va=function(a,b,c,d){if(this.B&&this.B.va(a,b,c,d)||this.b&&this.b.va(a,b,c,d)||this.j&&this.j.va(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.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
-b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.va.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
-function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.oa||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
-function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Id=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.ob())};k.Jd=function(){};k.Ed=function(a){a||this.b.ea()};
-k.Cd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.ob();else{if((a=this.j)&&!qb(a,!0))pb(a,!0),a.pb(0,null),pb(a,!1);else try{var b=this.b.pb(1);0a.b.ib?8:16,c=65472<=a.Aa&&a.Aa<65472+b,b=c?1:2,c=c?15:a.v.Sa;Gb(a,"STEP")||(b=-b);Yb(a,a.Aa&~c|a.Aa+b&c)}
-function Yb(a,b){a.Aa=b&a.v.Sa;b=a.Aa;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<c;c++)$b(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.v=this.Ia-1;this.F=this.H/this.Ia|0;this.gb=[];this.qa=0;this.f=!1;this.pc=0;this.A=[];this.qd=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.Y=Array(this.F);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.gb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
-function sc(a,b,c){var d=!1,e=this.controller,f=e.gb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.gb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
-b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.gb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
-function uc(a,b,c){var d=!1,e=this.controller;a=e.gb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
-function xc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.na;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.G)return l.Zb+=l.G-f,l.G=f,!0;if(f>=l.G+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.G+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.Y[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.pc+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
-function zc(a,b,c){var d=[];for(b>>>=a.na;0>>=a.na;0>>this.na].fc(a&this.v,a)};k.ec=function(a){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;a=this.Y[(a&this.Sa)>>>this.na].sc(a&this.v,a);this.qa--;return a};
-k.ta=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].tc(b,a);this.qa--;return a};k.Nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].jc(a&this.v,b&255,a);this.qa--};
-k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].$b(a&this.v,b&65535,a)};k.nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));var c=a&this.v,d=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;this.Y[d].yc(c,b&65535,a);this.qa--};
-function Gc(a){for(var b=0,c=[],d=0;da.b.ib)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;tb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Hb=128;Lc(this.b,this.f.wc,1E3/60,!0)};k.Sd=function(){return this.f.Hb};k.Re=function(a){this.f.Hb=a&192;this.f.Hb&64||Pc(this.b,this.f.Gb)};k.Ud=function(){return Qc(this.b)};k.Te=function(a){Zc(this.b,a&-129|this.b.Da&128)};
-k.Vd=function(){return $c(this.b)};k.Wd=function(){return ad(this.b)};k.Xd=function(){return this.b.Xa};k.Ue=function(a){bd(this.b,a)};k.Ee=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.Df=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.xe=function(a){return this.b.R[1][a>>1&7]};k.wf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.ve=function(a){return this.b.R[1][(a>>1&7)+8]};
-k.uf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};k.we=function(a){return this.b.ka[1][a>>1&7]};k.vf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.ue=function(a){return this.b.ka[1][(a>>1&7)+8]};k.tf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.Rd=function(a){return this.b.R[0][a>>1&7]};k.Qe=function(a,b){b=b>>1&7;this.b.R[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Pd=function(a){return this.b.R[0][(a>>1&7)+8]};
-k.Oe=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.ka[0][a>>1&7]};k.Pe=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Od=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ne=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.De=function(a){return this.b.R[3][a>>1&7]};k.Cf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.Be=function(a){return this.b.R[3][(a>>1&7)+8]};k.Af=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};
-k.Ce=function(a){return this.b.ka[3][a>>1&7]};k.Bf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Ae=function(a){return this.b.ka[3][(a>>1&7)+8]};k.zf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.be=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.Ze=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};
-k.ee=function(){return this.b.u[7]};k.bf=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.ce=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.$e=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.de=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.af=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};
-k.Nd=function(a){return this.b.Tc[a-65504>>1]};k.Me=function(a,b){this.b.Tc[b-65504>>1]=a};k.Qc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.pc}a=(a>>6)-1}else a=0;return a};k.Wc=function(){};k.ze=function(){return 1};k.yf=function(){};k.Md=function(){return this.b.Ba};k.Le=function(){this.b.Ba=0};k.Td=function(){return this.b.Sc};k.Se=function(a,b){b&1||(a&=255);this.b.Sc=a};k.Yd=function(a,b){return b?0:this.b.Mb};k.Ve=function(a){cd(this.b,a)};
-k.ye=function(a,b){return b?0:this.b.lb&65280};k.xf=function(a){this.b.lb=a|255};k.ae=function(){return dd(this.b)};k.Ye=function(a){ed(this.b,a&-1793|dd(this.b)&1792);this.b.I|=256};k.Vc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
-var O={},Nc=(O[61568]=[null,null,M.prototype.Ee,M.prototype.Df,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.xe,M.prototype.wf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.ve,M.prototype.uf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.we,M.prototype.vf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.ue,M.prototype.tf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Rd,M.prototype.Qe,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Pd,M.prototype.Oe,"KDPDR",8,1145,64],O[62688]=
-[null,null,M.prototype.Qd,M.prototype.Pe,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Od,M.prototype.Ne,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Xd,M.prototype.Ue,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Sd,M.prototype.Re,"LKS"],O[65402]=[null,null,M.prototype.Ud,M.prototype.Te,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Vd,M.prototype.Vc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Wd,M.prototype.Vc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.De,M.prototype.Cf,
-"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.Be,M.prototype.Af,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.Ce,M.prototype.Bf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.Ae,M.prototype.zf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb,
-M.prototype.Ob,"R4SET0"],O[65477]=[null,null,M.prototype.Kb,M.prototype.Ob,"R5SET0"],O[65478]=[null,null,M.prototype.be,M.prototype.Ze,"R6KERNEL"],O[65479]=[null,null,M.prototype.ee,M.prototype.bf,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb,
-M.prototype.Pb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Lb,M.prototype.Pb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.ce,M.prototype.$e,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.de,M.prototype.af,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Nd,M.prototype.Me,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Qc,M.prototype.Wc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Qc,M.prototype.Wc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ze,M.prototype.yf,"SYSID",1,1170],O[65526]=
-[null,null,M.prototype.Md,M.prototype.Le,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Td,M.prototype.Se,"MB",1,1170],O[65530]=[null,null,M.prototype.Yd,M.prototype.Ve,"PIR"],O[65532]=[null,null,M.prototype.ye,M.prototype.xf,"SL"],O[65534]=[null,null,M.prototype.ae,M.prototype.Ye,"PSW"],O);
-ab(function(){for(var a=F(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.A,0,this.size>>2),md(this,id?nd:od);else{a=this.b=Array(this.size>>
-2);for(f=0;f>2),b=0;b>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
-1]&255)<<8},Ea:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.$a=!0},S:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,1,c.O)&&c.ea(!0)}return this.sc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,2,c.O)&&c.ea(!0)}return this.tc(a,b)},oa:function(a,
-b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.jc(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.yc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2);
-a=this.J[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){this.D[a]=b;this.$a=!0},sa:function(a,b,c){this.D[a]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ca:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.$a=!0},Ga:function(a,b,c){a&1&&this.v.Na(c,64,4);this.J[a>>1]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
-b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&sd(a,rd,!1),(a.g=c.g)&&qd(a,rd,!1))}function ud(a,b){b?--a.g||(a.ic=a.f?a.w:a.jc,a.$b=a.f?a.H:a.yc):--a.B||(a.fc=a.sc,a.za=a.tc)}function qd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.H);if(c||void 0===c)a.jc=b[1]||a.w,a.yc=b[3]||a.H}function sd(a,b,c){c&&a.B||(a.fc=b[0]||a.K,a.za=b[2]||a.L);if(c||void 0===c)a.sc=b[0]||a.K,a.tc=b[2]||a.L}function md(a,b){b||(b=vd);sd(a,b,void 0);qd(a,b,void 0)}
-var vd=[],pd=[K.prototype.U,K.prototype.Ea,K.prototype.fa,K.prototype.Pa],rd=[K.prototype.S,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var od=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ca],nd=[K.prototype.T,K.prototype.sa,K.prototype.fb,K.prototype.Ga];
-function wd(a,b){x.call(this,"CPU",a,wd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.jb=c;this.Sb=Math.round(this.tb/1E4)/100;this.Ab=this.Sb*this.jb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.O=[];this.Hc=this.Ie.bind(this);J(this)}B(wd);var xd=["power","reset"];k=wd.prototype;
-k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Ca&&(a.Ca+=a.Ib,c=!0);0<=a.Jb&&a.Jb<=Dd(a)&&(a.Ib=a.Jb=-1,Ad(a),a.ea(),c=!0);c&&a.i(Dd(a)+" cycles: checksum="+p(a.Vb))}}
-k.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;ca.Ea/a.Ab?b=1:d=!0;a.jb=b;b=a.Sb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Fd(a);return d}function Jc(a,b){var c=a.O.length;a.O.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&ba.O[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Gd(a)),a.O[b][0]=c)}
-function Hd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gd(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c}
-k.Ie=function(){if(this.C.X){this.Tb>=this.tb&&Fd(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Fc&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Hd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Gd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Gc&&(this.xa(),this.Gc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Dd(this));Ab(this,e.stack||
-e.message);return}if(this.C.X){a=setTimeout;b=this.Hc;this.fa=Ba();var c=this.Fc;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Ea=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Ed(this)));if(0>c||this.Eac&&(this.U-=c),c=0;this.Tb+=this.Ya;this.fa+=c;a(b,c)}}};
-k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Ed(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Dd(this)));setTimeout(this.Hc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Gd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Dd(this));b=!0}this.C.complete=a;return b};
-function Id(a){this.ib=+a.model||1170;this.Cc=a.addrReset||0;wd.call(this,a,6666667);this.vb=0;this.Ec=255;1120==this.ib?(this.decode=Jd.bind(this),this.sa=this.vd,this.vb=8,this.Ec=-1):(this.decode=Kd.bind(this),this.sa=this.wd);Ld(this);this.L=0;this.J=null;this.C.complete=!1}B(Id,wd);k=Id.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Ld(this);zd(this);this.C.error=!1;this.parent.reset.call(this)};
-function Ld(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Cc,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.ld=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,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.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0,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.Tc=[0,0,0,0,0,0,0,0];a.Sc=0;a.I=0;a.F=a.H=0;a.g=a.f=a.Rb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.Ba=0;a.Mb=0;a.lb=255;a.S=0;a.qb=0;a.Pa=262143;a.Ub=0;a.ua=0;a.J=null;a.v&&Md(a)}function Md(a){a.S?(a.T=65536,a.Bc=a.Xa&16?4186112:253952,a.da=a.zd,a.za=a.Fe,a.$b=a.Ef,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.Bc=57344,a.da=a.yd,a.za=a.Rc,a.$b=a.Xc,xc(a.v,16))}
-function Qc(a){var b=a.Da;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Zc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.ua>>16&65535,a.lc=a.ua&65535);a.Da=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.S!=c&&(a.S=c,Md(a))}}function $c(a){a.Da&57344||(a.kc=a.ua>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ad(a){a.Da&57344||(a.lc=a.ua&65535);return a.lc}function bd(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Md(a))}
-k.Mc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Ed(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.I&=-3;a.I|=a.J?2:1}function cd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.I|=1}a.Mb=b}function U(a,b){a.I&256||(a.aa=a.ca=b,a.W=0)}function Vd(a,b,c){a.I&256||(a.aa=a.ca=a.V=b,a.W=c||0)}
-function Wd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Xd(a,b){a.I&256||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Yd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))}
-k.wa=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=dd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);ed(this,f&-12289|this.Ga>>2&12288);Zd(this,this.Ga,d);Zd(this,this.u[7],d);T(this,e);this.I&=~(b|19);this.I|=129;this.Ga=-1;this.pd=a;this.Yc=c;if(-3<=c)throw a;}};function te(a){var b=ue(a),c=ue(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);ed(a,c);a.I&=-17}
-function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
-function ve(a,b,c){var d,e,f;if(!(c&a.S))return f=b&65535,57344<=f&&(f|=a.Bc),f;d=b>>13;a.Xa&a.ld[a.A]||(d&=7);e=a.R[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.L)return f;f&1&&!(c&1)&&(a.Ba|=64,a.wa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb=
-a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.qb<<5|a.rb<<1,Zc(a,a.Da&-61695|g&61694)),a.wa(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.I|=64)));return f}function we(a,b){return a.v.dc(b)}function ue(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Zd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.sa(4,-2,d);a.$b(d,b)}
-function xe(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);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.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d,
-0,e),a.b-=6,e|g;case 7:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.vd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.I|=32)};k.wd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.wa(4,0,-3):(this.Ba|=8,this.I|=32)))};k.ec=function(a){if(!this.S)return this.v.ec(a);this.L++;a=we(this,ve(this,a,3));this.L--;return a};
-k.Va=function(a){if(!this.S)return this.v.Va(a);this.L++;a=this.Rc(ve(this,a,2));this.L--;return a};k.Cb=function(a,b){this.S?(this.L++,a=ve(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Cb(a,b)};k.nb=function(a,b){this.S?(this.L++,this.Xc(ve(this,a,4),b),this.L--):this.v.nb(a,b)};k.yd=function(a,b,c){return xe(this,a,b,c)};k.zd=function(a,b,c){return ve(this,xe(this,a,b,c),c)};k.Rc=function(a){return this.v.ta(this.Ub=a)};k.Fe=function(a){return this.v.ta(this.Ub=ve(this,a,2))};
-k.Xc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Ef=function(a,b){this.v.Db(this.Ub=ve(this,a,4),b)};function ye(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xe(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
-function ze(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xe(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ve(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c+a.vb]&a.Ec}function Be(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c+a.vb]}function Ce(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xe(a,b,c,8)}
-function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c]&255}function Ee(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c]}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Rb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,we(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
-function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ge(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function He(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
+function Eb(a){x.call(this,"Panel",a,Eb,512);this.Ba=this.w=this.fb=this.Bb=this.A=this.F=0;this.I=this.K=this.G=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ed],STEP:[1,1,!1,!1,this.Fd],ENABLE:[1,1,!1,!1,this.Ad],CONT:[1,1,!0,!1,this.yd],DEP:[0,0,!0,!1,this.zd],EXAM:[1,1,!0,!1,this.Bd],LOAD:[1,1,!0,!1,this.Dd],TEST:[0,0,!0,!1,this.Cd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Gd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
+k.xa=function(a,b,c,d){if(this.B&&this.B.xa(a,b,c,d)||this.b&&this.b.xa(a,b,c,d)||this.j&&this.j.xa(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.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
+b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.xa.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
+function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.na||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
+function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ed=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.rb())};k.Fd=function(){};k.Ad=function(a){a||this.b.ea()};
+k.yd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.rb();else{if((a=this.j)&&!qb(a,!0))pb(a,!0),a.sb(0,null),pb(a,!1);else try{var b=this.b.sb(1);0a.b.lb?8:16,c=65472<=a.Ba&&a.Ba<65472+b,b=c?1:2,c=c?15:a.v.Xa;Gb(a,"STEP")||(b=-b);Yb(a,a.Ba&~c|a.Ba+b&c)}
+function Yb(a,b){a.Ba=b&a.v.Xa;b=a.Ba;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<c;c++)$b(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.v=this.Ia-1;this.K=this.A/this.Ia|0;this.I=this.L=(this.A-qc&this.Xa)>>>this.pa;this.jb=[];this.qa=0;this.f=!1;this.G=0;this.F=[];this.ld=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.ba=Array(this.K);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.jb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
+function sc(a,b,c){var d=!1,e=this.controller,f=e.jb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.jb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
+b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.jb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
+function uc(a,b,c){var d=!1,e=this.controller;a=e.jb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
+function xc(a,b){if(b!=a.w){var c;a.w&&(c=(1<>>a.pa,a.g=zc(a,c,qc),a.B?yc(a,c,qc,a.B):(Ac(a,c,qc,Bc,a),a.B=zc(a,c,qc)))}}k=pc.prototype;k.reset=function(){for(var a=0;a>>a.pa;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.H)return l.Zb+=l.H-f,l.H=f,!0;if(f>=l.H+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.H+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.ba[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.G+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
+function zc(a,b,c){var d=[];for(b>>>=a.pa;0>>=a.pa;0>>this.pa].fc(a&this.v,a)};function Gc(a,b){b=(b&a.Xa)>>>a.pa;var c=a.ba[b];b==a.I&&a.g.length?c=a.g[0]:b==a.L&&(c=a.ba[a.I]);return c}
+k.ec=function(a){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));a=Gc(this,a).I(a&this.v,a);this.qa--;return a};k.va=function(a){3932160<=a&&(a=Fc(this.b,a));return this.ba[(a&this.Xa)>>>this.pa].Aa(a&this.v,a)};k.Va=function(a){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));a=Gc(this,a).K(a&this.v,a);this.qa--;return a};k.Nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.ba[(a&this.Xa)>>>this.pa].ic(a&this.v,b&255,a)};
+k.Cb=function(a,b){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));Gc(this,a).G(a&this.v,b&255,a);this.qa--};k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.ba[(a&this.Xa)>>>this.pa].$b(a&this.v,b&65535,a)};k.qb=function(a,b){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));Gc(this,a).N(a&this.v,b&65535,a);this.qa--};
+function Hc(a){for(var b=0,c=[],d=0;da.b.lb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;tb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Hb=128;Nc(this.b,this.f.tc,1E3/60,!0)};k.Od=function(){return this.f.Hb};k.Ne=function(a){this.f.Hb=a&192;this.f.Hb&64||Rc(this.b,this.f.Gb)};k.Qd=function(){return $c(this.b)};k.Pe=function(a){ad(this.b,a&-129|this.b.Da&128)};
+k.Rd=function(){return bd(this.b)};k.Sd=function(){return cd(this.b)};k.Td=function(){return this.b.Ya};k.Qe=function(a){dd(this.b,a)};k.Ae=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.zf=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.te=function(a){return this.b.S[1][a>>1&7]};k.sf=function(a,b){this.b.S[1][b>>1&7]=a&65295};k.re=function(a){return this.b.S[1][(a>>1&7)+8]};
+k.qf=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};k.se=function(a){return this.b.ka[1][a>>1&7]};k.rf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.qe=function(a){return this.b.ka[1][(a>>1&7)+8]};k.pf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.Nd=function(a){return this.b.S[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.S[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Ld=function(a){return this.b.S[0][(a>>1&7)+8]};
+k.Ke=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.ka[0][a>>1&7]};k.Le=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.Kd=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Je=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.ze=function(a){return this.b.S[3][a>>1&7]};k.yf=function(a,b){this.b.S[3][b>>1&7]=a&65295};k.xe=function(a){return this.b.S[3][(a>>1&7)+8]};k.wf=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};
+k.ye=function(a){return this.b.ka[3][a>>1&7]};k.xf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.we=function(a){return this.b.ka[3][(a>>1&7)+8]};k.vf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.gb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.gb[b]=a:this.b.u[b]=a};k.Yd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.Ve=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};
+k.ae=function(){return this.b.u[7]};k.Ye=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.gb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.gb[b]=a};k.Zd=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.We=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.$d=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Xe=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};
+k.Jd=function(a){return this.b.Oc[a-65504>>1]};k.Ie=function(a,b){this.b.Oc[b-65504>>1]=a};k.Lc=function(a){return 65520==a?(Ic(this.v)>>6)-1:0};k.Rc=function(){};k.ve=function(){return 1};k.uf=function(){};k.Id=function(){return this.b.sa};k.He=function(){this.b.sa=0};k.Pd=function(){return this.b.Nc};k.Oe=function(a,b){b&1||(a&=255);this.b.Nc=a};k.Ud=function(a,b){return b?0:this.b.Mb};k.Re=function(a){ed(this.b,a)};k.ue=function(a,b){return b?0:this.b.ob&65280};k.tf=function(a){this.b.ob=a|255};
+k.Xd=function(){return fd(this.b)};k.Ue=function(a){gd(this.b,a&-1793|fd(this.b)&1792);this.b.J|=256};k.Qc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
+var O={},Pc=(O[61568]=[null,null,M.prototype.Ae,M.prototype.zf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.te,M.prototype.sf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.re,M.prototype.qf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.se,M.prototype.rf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.qe,M.prototype.pf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Nd,M.prototype.Me,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPDR",8,1145,64],O[62688]=
+[null,null,M.prototype.Md,M.prototype.Le,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Kd,M.prototype.Je,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Td,M.prototype.Qe,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Od,M.prototype.Ne,"LKS"],O[65402]=[null,null,M.prototype.Qd,M.prototype.Pe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Rd,M.prototype.Qc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Sd,M.prototype.Qc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.ze,M.prototype.yf,
+"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.xe,M.prototype.wf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ye,M.prototype.xf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.we,M.prototype.vf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb,
+M.prototype.Ob,"R4SET0"],O[65477]=[null,null,M.prototype.Kb,M.prototype.Ob,"R5SET0"],O[65478]=[null,null,M.prototype.Yd,M.prototype.Ve,"R6KERNEL"],O[65479]=[null,null,M.prototype.ae,M.prototype.Ye,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb,
+M.prototype.Pb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Lb,M.prototype.Pb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Zd,M.prototype.We,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.$d,M.prototype.Xe,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Jd,M.prototype.Ie,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Lc,M.prototype.Rc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Lc,M.prototype.Rc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ve,M.prototype.uf,"SYSID",1,1170],O[65526]=
+[null,null,M.prototype.Id,M.prototype.He,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Pd,M.prototype.Oe,"MB",1,1170],O[65530]=[null,null,M.prototype.Ud,M.prototype.Re,"PIR"],O[65532]=[null,null,M.prototype.ue,M.prototype.tf,"SL"],O[65534]=[null,null,M.prototype.Xd,M.prototype.Ue,"PSW"],O);
+ab(function(){for(var a=F(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.A,0,this.size>>2),od(this,kd?pd:qd);else{a=this.b=Array(this.size>>
+2);for(f=0;f>2),b=0;b>8,c)},fa:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},Ea:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
+1]&255)<<8},Pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.cb=!0},hb:function(a,b){if(this.j&&null!=this.H){var c=this.j;vd(c,this.H+a,1,c.N)&&c.ea(!0)}return this.I(a,b)},na:function(a,b){if(this.j&&null!=this.H){var c=this.j;vd(c,this.H+a,2,c.N)&&c.ea(!0)}return this.K(a,b)},Fa:function(a,
+b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.G(a,b,c)},Za:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.N(a,b,c)},aa:function(a){return this.D[a]},ib:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},ua:function(a,b){a&1&&this.v.Na(b,64,2);
+a=this.R[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Ca:function(a,b){this.D[a]=b;this.cb=!0},Ga:function(a,b,c){this.D[a]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Qa:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.cb=!0},$a:function(a,b,c){a&1&&this.v.Na(c,64,4);this.R[a>>1]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
+b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&ud(a,td,!1),(a.g=c.g)&&sd(a,td,!1))}function wd(a,b){b?--a.g||(a.ic=a.f?a.w:a.G,a.$b=a.f?a.L:a.N):--a.B||(a.fc=a.I,a.Aa=a.K)}function sd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.w,a.N=b[3]||a.L}function ud(a,b,c){c&&a.B||(a.fc=b[0]||a.T,a.Aa=b[2]||a.U);if(c||void 0===c)a.I=b[0]||a.T,a.K=b[2]||a.U}function od(a,b){b||(b=xd);ud(a,b,void 0);sd(a,b,void 0)}
+var xd=[],rd=[K.prototype.fa,K.prototype.Pa,K.prototype.Ea,K.prototype.ab],td=[K.prototype.hb,K.prototype.Fa,K.prototype.na,K.prototype.Za];if(Bb)var qd=[K.prototype.aa,K.prototype.Ca,K.prototype.ga,K.prototype.Qa],pd=[K.prototype.ib,K.prototype.Ga,K.prototype.ua,K.prototype.$a];
+function yd(a,b){x.call(this,"CPU",a,yd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.mb=c;this.Tb=Math.round(this.tb/1E4)/100;this.Ab=this.Tb*this.mb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.N=[];this.Cc=this.Ee.bind(this);J(this)}B(yd);var zd=["power","reset"];k=yd.prototype;
+k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Ca&&(a.Ca+=a.Ib,c=!0);0<=a.Jb&&a.Jb<=Fd(a)&&(a.Ib=a.Jb=-1,Cd(a),a.ea(),c=!0);c&&a.i(Fd(a)+" cycles: checksum="+p(a.Vb))}}
+k.xa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;ca.Ea/a.Ab?b=1:d=!0;a.mb=b;b=a.Tb*a.mb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.pb()}Ub(a,a.aa);a.aa=0;a.U=Ba();a.fa=0;Hd(a);return d}function Lc(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&ba.N[b][0])&&(c=a.tb*a.mb/1E3*c|0,a.C.X&&(c+=Id(a)),a.N[b][0]=c)}
+function Jd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Id(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c}
+k.Ee=function(){if(this.C.X){this.jc>=this.tb&&Hd(this,!0);this.Qa=0;this.ab=Ba();if(this.fa){var a=this.ab-this.fa;a>this.Ac&&(this.U+=a,this.U>this.ab&&(this.U=this.ab))}try{do{var b=Jd(this,this.C.Fb?1:this.ub);try{this.sb(b)}catch(e){if("number"!=typeof e)throw e;}b=Id(this,!0);this.Qa+=b;this.aa+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Bc&&(this.ya(),this.Bc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Fd(this));Ab(this,e.stack||
+e.message);return}if(this.C.X){a=setTimeout;b=this.Cc;this.fa=Ba();var c=this.Ac;this.Qa&&(c=Math.round(c*this.Qa/this.ub));var c=c-(this.fa-this.ab),d=this.fa-this.U;d&&(this.Ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.na=0,Gd(this)));if(0>c||this.Eac&&(this.U-=c),c=0;this.jc+=this.Qa;this.fa+=c;a(b,c)}}};
+k.rb=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Gd(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.pb(!0),this.B.start(this.U,Fd(this)));setTimeout(this.Cc,0);return!0};k.sb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Id(this);Ub(this,this.aa);this.aa=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Fd(this));b=!0}this.C.complete=a;return b};
+function Kd(a){this.lb=+a.model||1170;this.xc=a.addrReset||0;yd.call(this,a,6666667);this.vb=0;this.zc=255;1120==this.lb?(this.decode=Ld.bind(this),this.ua=this.rd,this.vb=8,this.zc=-1):(this.decode=Md.bind(this),this.ua=this.sd);Nd(this);this.L=0;this.I=null;this.C.complete=!1}B(Kd,yd);k=Kd.prototype;k.reset=function(){this.status("model "+this.lb);this.C.X&&this.ea();Nd(this);Bd(this);this.C.error=!1;this.parent.reset.call(this)};
+function Nd(a){a.V=65536;a.W=32768;a.ca=65535;a.Z=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.xc,-1,-2,-3,-4,-5,-6,-7,-8];a.gb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.$a=0;a.hd=[4,2,0,1];a.S=[[0,0,0,0,0,0,0,0,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,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.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0,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.Oc=[0,0,0,0,0,0,0,0];a.Nc=0;a.J=0;a.F=a.G=0;a.g=a.f=a.Sb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Ya=0;a.sa=0;a.Mb=0;a.ob=255;a.R=0;a.Za=0;a.Pa=262143;a.Ub=0;a.wa=0;a.I=null;a.v&&(Od(a),a.fd=Ic(a.v))}function Od(a){a.R?(a.T=65536,a.Rb=a.Ya&16?4186112:253952,a.da=a.vd,a.Aa=a.Be,a.$b=a.Af,xc(a.v,a.Ya&16?22:18)):(a.T=0,a.Rb=57344,a.da=a.ud,a.Aa=a.Mc,a.$b=a.Sc,xc(a.v,16))}
+function $c(a){var b=a.Da;b&57344||(b=b&-3199|a.Za<<5|a.$a<<1);return b}function ad(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.wa>>16&65535,a.lc=a.wa&65535);a.Da=b;a.Za=b>>5&3;a.$a=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.R!=c&&(a.R=c,Od(a))}}function bd(a){a.Da&57344||(a.kc=a.wa>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function cd(a){a.Da&57344||(a.lc=a.wa&65535);return a.lc}function dd(a,b){1170>a.lb&&(b&=-49);a.Ya!=b&&(a.Ya=b,a.Pa=b&16?4194303:262143,Od(a))}
+k.Hc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.na,this.mb]);a.set(2,Hc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.na=b[1];Gd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.J&=-3;a.J|=a.I?2:1}function ed(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.J|=1}a.Mb=b}function U(a,b){a.J&256||(a.Z=a.ca=b,a.W=0)}function Xd(a,b,c){a.J&256||(a.Z=a.ca=a.V=b,a.W=c||0)}
+function Yd(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Zd(a,b){a.J&256||(a.Z=a.ca=a.V=b,a.W=a.Z^a.V>>1)}function $d(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^d)&(d^b))}
+k.ta=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=fd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.sa|=4,this.u[6]=4,d=!0);this.wa=a|4143316992;this.A=0;var e=this.Aa(a|this.T),f=this.Aa(a+2&65535|this.T);gd(this,f&-12289|this.Ga>>2&12288);ue(this,this.Ga,d);ue(this,this.u[7],d);T(this,e);this.J&=~(b|19);this.J|=129;this.Ga=-1;this.pd=a;this.kd=c;if(-3<=c)throw a;}};function ve(a){var b=we(a),c=we(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);gd(a,c);a.J&=-17}
+function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Ya&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
+function xe(a,b,c){var d,e,f;if(!(c&a.R))return f=b&65535,57344<=f&&(f|=a.Rb),f;d=b>>13;a.Ya&a.hd[a.A]||(d&=7);e=a.S[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;3932160<=f&&(f=Fc(a,f));if(a.L)return f;f>=a.fd&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&
+8128)&&(g|=16384));a.S[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.Za=a.A,a.$a=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.Za<<5|a.$a<<1,ad(a,a.Da&-61695|g&61694)),a.ta(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ye(a,b){return a.v.dc(b)}function we(a){var b=a.Aa(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}
+function ue(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.wa=a.wa&65535|(a.wa&-65536)<<8|16121856;c||a.ua(4,-2,d);a.$b(d,b)}
+function ze(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.ta(4,0,-2),0;case 1:return 6==c&&a.ua(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.ua(d,f,e);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.Aa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.ua(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.Aa(e)|g;a.b-=8;break;case 6:return e=a.Aa(Ud(a,2)),e=e+a.u[c]&65535,6==c&&a.ua(d,
+0,e),a.b-=6,e|g;case 7:return e=a.Aa(Ud(a,2)),e=e+a.u[c]&65535,e=a.Aa(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.wa=a.wa&65535|(a.wa&-65536)<<8|(f<<3&248|c)<<16;return e}k.rd=function(a,b,c){!this.A&&0>=b&&c<=this.ob&&(this.J|=32)};k.sd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.ob&&(c<=this.ob-32?this.ta(4,0,-3):(this.sa|=8,this.J|=32)))};k.ec=function(a){if(!this.R)return this.v.ec(a);this.L++;a=ye(this,xe(this,a,3));this.L--;return a};
+k.Va=function(a){if(!this.R)return this.v.Va(a);this.L++;a=this.Mc(xe(this,a,2));this.L--;return a};k.Cb=function(a,b){this.R?(this.L++,a=xe(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Cb(a,b)};k.qb=function(a,b){this.R?(this.L++,this.Sc(xe(this,a,4),b),this.L--):this.v.qb(a,b)};k.ud=function(a,b,c){return ze(this,a,b,c)};k.vd=function(a,b,c){return xe(this,ze(this,a,b,c),c)};k.Mc=function(a){return this.v.va(this.Ub=a)};k.Be=function(a){return this.v.va(this.Ub=xe(this,a,2))};
+k.Sc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Af=function(a,b){this.v.Db(this.Ub=xe(this,a,4),b)};function Ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ze(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.Aa(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
+function Be(a,b,c,d){a.wa=a.wa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ze(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=xe(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ce(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?ye(a,a.da(b,c,3)):a.u[c+a.vb]&a.zc}function De(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?a.v.va(a.da(b,c,2)):a.u[c+a.vb]}function Ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ze(a,b,c,8)}
+function Fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ye(a,a.da(b,c,3)):a.u[c]&255}function Ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.va(a.da(b,c,2)):a.u[c]}function He(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Sb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ye(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
+function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.va(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
-k.pb=function(a){this.C.complete=!0;var b=this.j?Ie(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Je(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.I){if(a=this.I&11)if(a=!1,this.I&2){var d=160,e=(this.Mb&224)>>5,f=this.J&&this.J.kb>e?this.J:null;f&&(d=f.xc,e=f.kb);e>(this.P&224)>>5?(this.I&8&&(Sd(this,2),this.I&=-9),this.wa(d,0,-9),e=!0):e=!1;e&&(f&&Td(this,f),a=!0);this.J||this.Mb||(this.I&=-3)}else this.I&1&&this.I++;if(a){if(b&&Je(this.j,this.u[7],
-c)){this.ea();break}if(0>c)break}if(this.I&112&&Ud(this)){if(b&&Je(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.I=this.I&15|this.P&16;this.decode(Rd(this))}while(0>1|b<<16;Xd(this,a);return a&65535}function Pe(a,b){a=b&128|b>>1|b<<8;Xd(this,a<<8);return a&255}function Qe(a,b){a=b&~a;U(this,a);return a}function Re(a,b){a=b&~a;U(this,a<<8);return a}function Se(a,b){a|=b;U(this,a);return a}function Te(a,b){a|=b;U(this,a<<8);return a}function Ue(a,b){a=~b|65536;Vd(this,a);return a&65535}
-function Ve(a,b){a=~b|256;Vd(this,a<<8);return a&255}function We(a,b){a=b-a;this.I&256||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function Xe(a,b){a=b-a;var c=a<<8;b<<=8;this.I&256||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Ye(a,b){a=b+a;this.I&256||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ze(a,b){a=b+a;var c=a<<8;this.I&256||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function $e(a,b){a=-b;Vd(this,a,a&b&32768);return a&65535}
-function af(a,b){a=-b;Vd(this,a<<8,(a&b&128)<<8);return a&255}function bf(a,b){a=b<<1|this.V>>16&1;Xd(this,a);return a&65535}function cf(a,b){a=b<<1|this.V>>16&1;Xd(this,a<<8);return a&255}function df(a,b){a=(this.V&65536|b)>>1|b<<16;Xd(this,a);return a&65535}function ef(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Xd(this,a<<8);return a&255}function ff(a,b){var c=b-a;Yd(this,c,a,b);return c&65535}function gf(a,b){var c=b-a;Yd(this,c<<8,a<<8,b<<8);return c&255}
-function hf(a,b){this.I&256||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function jf(a,b){a^=b;U(this,a);return a&65535}function kf(a){V(this,a,Be(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
-function lf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.aa=this.ca=c;this.b-=(this.g?6:7)+b}
-function mf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function nf(a){W(this,a,!Nd(this))}function of(a){W(this,a,Nd(this))}
-function pf(a){V(this,a,Be(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){Fe(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){V(this,a,Be(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){Fe(this,a,Ae(this,a),Te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
-function tf(a){var b=Be(this,a);a=Ee(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){var b=Ae(this,a);a=De(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function vf(a){W(this,a,Pd(this))}function wf(a){W(this,a,!Qd(this)==!Od(this))}function xf(a){W(this,a,!Pd(this)&&!Qd(this)==!Od(this))}function yf(a){W(this,a,!Nd(this)&&!Pd(this))}
-function zf(a){W(this,a,Pd(this)||!Qd(this)!=!Od(this))}function Af(a){W(this,a,Nd(this)||Pd(this))}function Bf(a){W(this,a,!Qd(this)!=!Od(this))}function Cf(a){W(this,a,Qd(this))}function Df(a){W(this,a,!Pd(this))}function Ef(a){W(this,a,!Qd(this))}function Ff(){this.wa(12,0,-8);this.b-=5}function Gf(a){W(this,a,!0)}function Hf(a){W(this,a,!Od(this))}function If(a){W(this,a,Od(this))}function Jf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5}
-function Kf(a){var b=Be(this,a);a=Ee(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Lf(a){var b=Ae(this,a);a=De(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
-function Mf(a){var b=Ee(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Nf(){this.wa(24,0,-8);this.b-=25}
-function Of(){this.P&49152?(this.Ba|=128,this.wa(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Pf(this.j):this.ea());this.b-=7}function Qf(){this.wa(16,0,-8);this.b-=25}var Rf=[0,7,7,10,7,11,9,13];function Sf(a){this.K=this.b;T(this,Ce(this,a));this.b=this.K-Rf[this.g]}var Tf=[0,14,14,17,14,18,16,20];function Uf(a){this.K=this.b;var b=Ce(this,a);a=a>>6&7;Zd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Tf[this.g]}
-var Vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Wf(a){var b=Be(this,a);this.K=this.b;U(this,He(this,a,b));this.b=this.K-Vf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Xf(a){var b=Ae(this,a);U(this,Ge(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Yf=[7,13,13,17,14,18,17,21];
-function Zf(a){var b=Ee(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&256||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function fg(a){V(this,a,Be(this,a),ff);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function gg(a){V(this,a,0,hf);this.b-=this.g?9:3+(7==this.f?2:0)}function hg(){this.wa(28,0,-8);this.b-=5}
-function ig(){this.w&&(this.w.vc(this.u[7],!0),this.w.setData(this.u[0],!0));this.I|=8;Sd(this,-2);this.b-=3}function jg(a){V(this,a,this.u[(a>>6&7)+this.vb],jf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Pf(b)):b=!1;b||this.wa(8,0,-8)}function Jd(a){kg[a>>12].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}
-function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}
-var kg=[function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,X,function(a){Cg[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Bg=[function(a){Dg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,X,X,X],mg=[function(a){Vd(this,He(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){V(this,a,0,
-$e);this.b-=this.g?11:6},function(a){V(this,a,Nd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Nd(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ee(this,a);Vd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}],
-Dg=[function(a){Eg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,X,rg,tg,gg,gg,gg,gg],Eg=[Of,ig,cg,Ff,Qf,ag,X,X,X,X,X,X,X,X,X,X],sg=[$f,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Jf,function(){this.ca=1;this.b-=5},Jf,Jf,Jf,function(){this.aa=0;this.b-=5},Jf,Jf,Jf,Jf,Jf,Jf,Jf],ug=[$f,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},dg,function(){this.ca=0;this.b-=5},dg,dg,dg,function(){this.aa=32768;this.b-=5},dg,dg,dg,dg,dg,dg,dg],Cg=[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,
-hg,vg,xg,zg,X,X,X],wg=[function(a){Vd(this,Ge(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)}],yg=[function(a){Fe(this,a,0,af);this.b-=this.g?11:6},function(a){Fe(this,a,Nd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,Nd(this)?1:0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
-De(this,a);Vd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Ag=[function(a){Fe(this,a,0,ef);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Pe);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}];function Kd(a){Fg[a>>12].call(this,a)}
-var Fg=[function(a){Gg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,function(a){Hg[a>>8&15].call(this,a)},function(a){Ig[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Gg=[function(a){Jg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,function(a){Kg[a>>6&3].call(this,a)},X,X],Kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ye(this,a,0);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=
-this.b;ze(this,a,0,b);U(this,b);this.b=this.K-Yf[this.g]},function(a){U(this,He(this,a,Qd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Jg=[function(a){Lg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.I|=1,this.I&=-3),this.b-=5):X.call(this,a)},rg,tg,gg,gg,gg,gg],Lg=[Of,ig,function(){te(this);this.I|=this.P&16;this.b-=13},Ff,Qf,ag,cg,function(){this.wa(8,0,-8)},X,X,X,X,X,X,X,X],Hg=[Zf,Zf,Mf,Mf,lf,lf,mf,mf,jg,jg,X,X,X,X,eg,eg],Ig=
-[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,hg,vg,xg,zg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[X,function(a){a=ye(this,a,65536);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=this.b;ze(this,a,65536,b);U(this,b);this.b=this.K-Yf[this.g]},X];
-function Ng(a){x.call(this,"ROM",a,Ng,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Og(c)})}}B(Ng);k=Ng.prototype;
-k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Og(this)};k.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
-function Og(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Ng.prototype.te,Ng.prototype.sf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,ld)){for(c=0;c>>a.na;0=b.length){G(a,"invalid block at offset "+q(m),4096);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,v=n-=6;0=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
-b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=la.zc&&c<=la.md&&(b=c-(la.zc-la.Zc));b&&(a.preventDefault&&a.preventDefault(),d.gc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.ad&&(b=la.$c);d.gc(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
+k.sb=function(a){this.C.complete=!0;var b=this.j?Ke(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Le(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.J){if(a=this.J&11)if(a=!1,this.J&2){var d=160,e=(this.Mb&224)>>5,f=this.I&&this.I.nb>e?this.I:null;f&&(d=f.uc,e=f.nb);e>(this.P&224)>>5?(this.J&8&&(Ud(this,2),this.J&=-9),this.ta(d,0,-9),e=!0):e=!1;e&&(f&&Vd(this,f),a=!0);this.I||this.Mb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Le(this.j,this.u[7],
+c)){this.ea();break}if(0>c)break}if(this.J&112&&Wd(this)){if(b&&Le(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.J=this.J&15|this.P&16;this.decode(Td(this))}while(0>1|b<<16;Zd(this,a);return a&65535}function Re(a,b){a=b&128|b>>1|b<<8;Zd(this,a<<8);return a&255}function Se(a,b){a=b&~a;U(this,a);return a}function Te(a,b){a=b&~a;U(this,a<<8);return a}function Ue(a,b){a|=b;U(this,a);return a}function Ve(a,b){a|=b;U(this,a<<8);return a}function We(a,b){a=~b|65536;Xd(this,a);return a&65535}
+function Xe(a,b){a=~b|256;Xd(this,a<<8);return a&255}function Ye(a,b){a=b-a;this.J&256||(this.Z=this.ca=a,this.W=b&(b^a));return a&65535}function Ze(a,b){a=b-a;var c=a<<8;b<<=8;this.J&256||(this.Z=this.ca=c,this.W=b&(b^c));return a&255}function $e(a,b){a=b+a;this.J&256||(this.Z=this.ca=a,this.W=a&(b^a));return a&65535}function af(a,b){a=b+a;var c=a<<8;this.J&256||(this.Z=this.ca=c,this.W=c&(b<<8^c));return a&255}function bf(a,b){a=-b;Xd(this,a,a&b&32768);return a&65535}
+function cf(a,b){a=-b;Xd(this,a<<8,(a&b&128)<<8);return a&255}function df(a,b){a=b<<1|this.V>>16&1;Zd(this,a);return a&65535}function ef(a,b){a=b<<1|this.V>>16&1;Zd(this,a<<8);return a&255}function ff(a,b){a=(this.V&65536|b)>>1|b<<16;Zd(this,a);return a&65535}function gf(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Zd(this,a<<8);return a&255}function hf(a,b){var c=b-a;$d(this,c,a,b);return c&65535}function jf(a,b){var c=b-a;$d(this,c<<8,a<<8,b<<8);return c&255}
+function kf(a,b){this.J&256||(this.Z=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function lf(a,b){a^=b;U(this,a);return a&65535}function mf(a){V(this,a,De(this,a),Me);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
+function nf(a){var b=Ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.Z=this.ca=c;this.b-=(this.g?6:7)+b}
+function of(a){var b=Ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Z=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function pf(a){W(this,a,!Pd(this))}function qf(a){W(this,a,Pd(this))}
+function rf(a){V(this,a,De(this,a),Se);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){He(this,a,Ce(this,a),Te);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function tf(a){V(this,a,De(this,a),Ue);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function uf(a){He(this,a,Ce(this,a),Ve);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
+function vf(a){var b=De(this,a);a=Ge(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function wf(a){var b=Ce(this,a);a=Fe(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function xf(a){W(this,a,Rd(this))}function yf(a){W(this,a,!Sd(this)==!Qd(this))}function zf(a){W(this,a,!Rd(this)&&!Sd(this)==!Qd(this))}function Af(a){W(this,a,!Pd(this)&&!Rd(this))}
+function Bf(a){W(this,a,Rd(this)||!Sd(this)!=!Qd(this))}function Cf(a){W(this,a,Pd(this)||Rd(this))}function Df(a){W(this,a,!Sd(this)!=!Qd(this))}function Ef(a){W(this,a,Sd(this))}function Ff(a){W(this,a,!Rd(this))}function Gf(a){W(this,a,!Sd(this))}function Hf(){this.ta(12,0,-8);this.b-=5}function If(a){W(this,a,!0)}function Jf(a){W(this,a,!Qd(this))}function Kf(a){W(this,a,Qd(this))}function Lf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.Z=0);this.b-=5}
+function Mf(a){var b=De(this,a);a=Ge(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;$d(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Nf(a){var b=Ce(this,a);a=Fe(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);$d(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
+function Of(a){var b=Ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.Z=d>>16):(this.W=32768,this.ca=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.Z=0,this.W=32768,this.V=65536,this.b-=7}function Pf(){this.ta(24,0,-8);this.b-=25}
+function Qf(){this.P&49152?(this.sa|=128,this.ta(4,0,-7)):(this.w&&1120==this.lb&&this.w.setData(this.u[0],!0),this.j?Rf(this.j):this.ea());this.b-=7}function Sf(){this.ta(16,0,-8);this.b-=25}var Tf=[0,7,7,10,7,11,9,13];function Uf(a){this.K=this.b;T(this,Ee(this,a));this.b=this.K-Tf[this.g]}var Vf=[0,14,14,17,14,18,16,20];function Wf(a){this.K=this.b;var b=Ee(this,a);a=a>>6&7;ue(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Vf[this.g]}
+var Xf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Yf(a){var b=De(this,a);this.K=this.b;U(this,Je(this,a,b));this.b=this.K-Xf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Zf(a){var b=Ce(this,a);U(this,Ie(this,a,b,65535)<<8);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var $f=[7,13,13,17,14,18,17,21];
+function ag(a){var b=Ge(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&256||(this.Z=b>>16,this.ca=this.Z|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function hg(a){V(this,a,De(this,a),hf);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function ig(a){V(this,a,0,kf);this.b-=this.g?9:3+(7==this.f?2:0)}function jg(){this.ta(28,0,-8);this.b-=5}
+function kg(){this.w&&(this.w.sc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=8;Ud(this,-2);this.b-=3}function lg(a){V(this,a,this.u[(a>>6&7)+this.vb],lf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Rf(b)):b=!1;b||this.ta(8,0,-8)}function Ld(a){mg[a>>12].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}function rg(a){sg[a>>6&3].call(this,a)}
+function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a&15].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}function Bg(a){Cg[a>>6&3].call(this,a)}
+var mg=[function(a){Dg[a>>8&15].call(this,a)},Yf,Mf,vf,rf,tf,mf,X,function(a){Eg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,hg,X],Dg=[function(a){Fg[a>>4&15].call(this,a)},If,Ff,xf,yf,Df,zf,Bf,Wf,Wf,ng,pg,rg,X,X,X],og=[function(a){Xd(this,Je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,We);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,$e);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,
+bf);this.b-=this.g?11:6},function(a){V(this,a,Pd(this)?1:0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Pd(this)?1:0,hf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ge(this,a);Xd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],sg=[function(a){V(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)}],
+Fg=[function(a){Gg[a&15].call(this,a)},X,X,X,Uf,Uf,Uf,Uf,dg,X,tg,vg,ig,ig,ig,ig],Gg=[Qf,kg,eg,Hf,Sf,cg,X,X,X,X,X,X,X,X,X,X],ug=[bg,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Lf,function(){this.ca=1;this.b-=5},Lf,Lf,Lf,function(){this.Z=0;this.b-=5},Lf,Lf,Lf,Lf,Lf,Lf,Lf],wg=[bg,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},fg,function(){this.ca=0;this.b-=5},fg,fg,fg,function(){this.Z=32768;this.b-=5},fg,fg,fg,fg,fg,fg,fg],Eg=[Gf,Ef,Af,Cf,Jf,Kf,pf,qf,Pf,jg,
+xg,zg,Bg,X,X,X],yg=[function(a){Xd(this,Ie(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,0,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,1,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Ag=[function(a){He(this,a,0,cf);this.b-=this.g?11:6},function(a){He(this,a,Pd(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,Pd(this)?1:0,jf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
+Fe(this,a);Xd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Cg=[function(a){He(this,a,0,gf);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,0,Re);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function Md(a){Hg[a>>12].call(this,a)}
+var Hg=[function(a){Ig[a>>8&15].call(this,a)},Yf,Mf,vf,rf,tf,mf,function(a){Jg[a>>8&15].call(this,a)},function(a){Kg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,hg,X],Ig=[function(a){Lg[a>>4&15].call(this,a)},If,Ff,xf,yf,Df,zf,Bf,Wf,Wf,ng,pg,rg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Aa(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ae(this,a,0);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=
+this.b;Be(this,a,0,b);U(this,b);this.b=this.K-$f[this.g]},function(a){U(this,Je(this,a,Sd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Lg=[function(a){Ng[a&15].call(this,a)},X,X,X,Uf,Uf,Uf,Uf,dg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.J|=1,this.J&=-3),this.b-=5):X.call(this,a)},tg,vg,ig,ig,ig,ig],Ng=[Qf,kg,function(){ve(this);this.J|=this.P&16;this.b-=13},Hf,Sf,cg,eg,function(){this.ta(8,0,-8)},X,X,X,X,X,X,X,X],Jg=[ag,ag,Of,Of,nf,nf,of,of,lg,lg,X,X,X,X,gg,gg],Kg=
+[Gf,Ef,Af,Cf,Jf,Kf,pf,qf,Pf,jg,xg,zg,Bg,function(a){Og[a>>6&3].call(this,a)},X,X],Og=[X,function(a){a=Ae(this,a,65536);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=this.b;Be(this,a,65536,b);U(this,b);this.b=this.K-$f[this.g]},X];
+function Pg(a){x.call(this,"ROM",a,Pg,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.G=u(this.g);if(this.g){a=this.g;var b=oa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.ib,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Qg(c)})}}B(Pg);k=Pg.prototype;
+k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Qg(this)};k.Ka=function(){this.ja&&(this.j&&Rg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
+function Qg(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Pg.prototype.pe,Pg.prototype.nf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,nd)){for(c=0;c>>a.pa;0=b.length){G(a,"invalid block at offset "+q(m),4096);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,v=n-=6;0=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
+b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=la.vc&&c<=la.gd&&(b=c-(la.vc-la.Uc));b&&(a.preventDefault&&a.preventDefault(),d.gc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.Wc&&(b=la.Vc);d.gc(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.gc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
-k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;var e=this;this.ga=Mc(48,4,262144);this.ba=Jc(this.b,function(){var a;a=-1;e.H.length&&(a=e.H.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.fa&&97<=a&&122>a&&(a-=32),Lc(e.b,e.ba,1E3/Math.round(e.S/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.ga))});this.O=Mc(52,4,262144);this.sa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.O)});Jb(b,this,Wg);Lb(b,this.reset.bind(this));J(this)};
-k.Pc=function(){if(!this.J){var a=yd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.J=nb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Pc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
-k.Ja=function(a){return a?this.save():!0};k.reset=function(){Xg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.K=0;a.f=0;a.g=128;a.H=[];return!0}k.gc=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=ta("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.A){if(10==a||1024<=
-this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Lc(this.b,this.sa,1E3/Math.round(this.oa/10));this.g&=-129};var Yg={},Wg=(Yg[65392]=[null,null,Ug.prototype.ge,Ug.prototype.df,"RCSR"],Yg[65394]=[null,null,Ug.prototype.fe,Ug.prototype.cf,"RBUF"],Yg[65396]=[null,null,Ug.prototype.He,Ug.prototype.Gf,"XCSR"],Yg[65398]=[null,null,Ug.prototype.Ge,Ug.prototype.Ff,"XBUF"],Yg);
-ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
-function(){var a=d.D.listTapes;a&&uh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.S){c.parentNode.removeChild(c);break}this.D[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;uh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
-k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.ba=vh(a);var e=this;if((this.g=yd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Eh(a,b,c,d,e.ha,e.Ra,
-e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Bh(a)})}function yh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;dc.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f,
-null,!0,function(b,c,d){Lh(a,b,c,d)})}
-function Lh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
-c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A>2,e=Array(d),f=0;fa&&(a-=32),Nc(e.b,e.aa,1E3/Math.round(e.R/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Mc(c,e.ga))});this.N=Oc(52,4,262144);this.ua=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(c,e.N)});Jb(b,this,Yg);Lb(b,this.reset.bind(this));J(this)};
+k.Kc=function(){if(!this.I){var a=Ad(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ua(b[0]);if(c!=this.hb)return;b=ua(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.ib+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Kc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
+k.Ja=function(a){return a?this.save():!0};k.reset=function(){Zg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Zg(this)};function Zg(a){a.K=0;a.f=0;a.g=128;a.G=[];return!0}k.gc=function(a){if("number"==typeof a)this.G.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=ta("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.A){if(10==a||1024<=
+this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Nc(this.b,this.ua,1E3/Math.round(this.na/10));this.g&=-129};var $g={},Yg=($g[65392]=[null,null,Wg.prototype.ce,Wg.prototype.$e,"RCSR"],$g[65394]=[null,null,Wg.prototype.be,Wg.prototype.Ze,"RBUF"],$g[65396]=[null,null,Wg.prototype.De,Wg.prototype.Cf,"XCSR"],$g[65398]=[null,null,Wg.prototype.Ce,Wg.prototype.Bf,"XBUF"],$g);
+ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
+function(){var a=d.D.listTapes;a&&wh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[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;wh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
+k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.aa=xh(a);var e=this;if((this.g=Ad(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Oc(56,4,4096);this.ga=Lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.C.ma;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.ib,e,f),(e=Ea(e,f))&&Gh(a,b,c,d,e.ha,e.Sa,
+e.Ra));a.C.kb=!1;a.F&&(a.F--,a.F||J(a));Dh(a)})}function Ah(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;dc.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f,
+null,!0,function(b,c,d){Nh(a,b,c,d)})}
+function Nh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.O('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.ib,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.za=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+
-b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ta+": "+c);return b};
-k.toJSON=function(){var a;a=0;for(var b;b=Oh(this,a++);)Rh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
-function Rh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.J=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
-k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Sh(d,a)},!0;case "loadDrive":return this.D[b]=
-c,c.onclick=function(){var a=d.D.listDisks;a&&Th(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[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;Th(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
-k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);Uh(this);this.Gb=Mc(144,5,65536);Jb(b,this,Vh);Lb(b,this.reset.bind(this));Wh(this,"None","",!0);this.K&&Wh(this,"Local Disk","?");Wh(this,"Remote Disk","??");Xh(this)||J(this)};
-k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Sh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Uh(this)};k.save=function(){return(new S(this)).data()};
-k.restore=function(a){return Uh(this,a[0])};function Xh(a,b){b||(a.F=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Zh(a,e,b,c,!1,d)}else Yh(a,e)}
-function Zh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Yh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.dd)&&g++));return g}
-k.dd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Sh(this,a.zb)};
-function Wh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.H=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=32;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
-k.fd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=32;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.le=function(){return this.L};k.jf=function(){};k.me=function(){return this.A};k.kf=function(){};k.ie=function(){return this.M&61438};
-k.ff=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.ed;case 2:b||(b=this.fd),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.H&65535,c=b.call(this,d,e,f,g,c,h,this.cd.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
--2,this.M|=128,this.M&64&&Kc(this.b,this.Gb))}};k.ne=function(){return this.H};k.lf=function(a){this.H=a};k.he=function(){return this.w};k.ef=function(a){this.w=a};k.je=function(){return this.f};k.gf=function(a){this.f=a};k.ke=function(){return this.O};k.hf=function(a){this.O=a};
-var $h={},Vh=($h[65280]=[null,null,Q.prototype.le,Q.prototype.jf,"RKDS"],$h[65282]=[null,null,Q.prototype.me,Q.prototype.kf,"RKER"],$h[65284]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKCS"],$h[65286]=[null,null,Q.prototype.ne,Q.prototype.lf,"RKWC"],$h[65288]=[null,null,Q.prototype.he,Q.prototype.ef,"RKBA"],$h[65290]=[null,null,Q.prototype.je,Q.prototype.gf,"RKDA"],$h[65294]=[null,null,Q.prototype.ke,Q.prototype.hf,"RKDB"],$h);
-function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.H=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
-k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ai(d,a)},!0;case "loadDrive":return this.D[b]=
-c,c.onclick=function(){var a=d.D.listDisks;a&&bi(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[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;bi(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
-k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ci(this);this.Gb=Mc(112,5,131072);Jb(b,this,di);Lb(b,this.reset.bind(this));ei(this,"None","",!0);this.L&&ei(this,"Local Disk","?");ei(this,"Remote Disk","??");fi(this)||J(this)};
-k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ai(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){ci(this)};k.save=function(){return(new S(this)).data()};
-k.restore=function(a){return ci(this,a[0])};function fi(a,b){b||(a.H=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}hi(a,e,b,c,!1,d)}else gi(a,e)}
-function hi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,gi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.hd)&&g++));return g}
-k.hd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));ai(this,a.zb)};
-function ei(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.J=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
-k.jd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=5120;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
-k.kd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=5120;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.qe=function(){return this.M&65535};
-k.pf=function(a){this.M=this.M&-1023|a&1022;this.O=this.O&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.F=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.F=this.A;break;case 12:b=this.jd;case 10:b||(b=this.kd),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.J&
-63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.gd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Gb))}};k.oe=function(){return this.w};k.mf=function(a){this.w=a&65534};k.re=function(){return this.f};k.qf=function(a){this.f=a};k.se=function(){return this.F};k.rf=function(a){this.F=a};k.pe=function(){return this.J};k.nf=function(a){this.J=a&63};
-var ii={},di=(ii[63744]=[null,null,P.prototype.qe,P.prototype.pf,"RLCS"],ii[63746]=[null,null,P.prototype.oe,P.prototype.mf,"RLBA"],ii[63748]=[null,null,P.prototype.re,P.prototype.qf,"RLDA"],ii[63750]=[null,null,P.prototype.se,P.prototype.rf,"RLMP"],ii[63752]=[null,null,P.prototype.pe,P.prototype.nf,"RLBE"],ii);function ji(a){x.call(this,"Debugger",a,ji);this.oa=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(ji);
-var ki={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ji.prototype.Nc=function(){return-1};ji.prototype.Oc=function(){};
-function li(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.U?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(ya(b.substring(c,f))),c=f+1}}return a}
-function mi(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
+function Qh(a,b){var c=a.ra*a.ia,d=b/c|0;return dg)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+
+b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Ta+": "+c);return b};
+k.toJSON=function(){var a;a=0;for(var b;b=Qh(this,a++);)Th(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
+function Th(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
+k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Uh(d,a)},!0;case "loadDrive":return this.D[b]=
+c,c.onclick=function(){var a=d.D.listDisks;a&&Vh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[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;Vh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
+k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Wh(this);this.Gb=Oc(144,5,65536);Jb(b,this,Xh);Lb(b,this.reset.bind(this));Yh(this,"None","",!0);this.K&&Yh(this,"Local Disk","?");Yh(this,"Remote Disk","??");Zh(this)||J(this)};
+k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Uh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Wh(this)};k.save=function(){return(new S(this)).data()};
+k.restore=function(a){return Wh(this,a[0])};function Zh(a,b){b||(a.F=0);for(var c in a.I){var d=a.I[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}ai(a,e,b,c,!1,d)}else $h(a,e)}
+function ai(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,$h(a,b,!0),h.yb?a.O("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.Zc)&&g++));return g}
+k.Zc=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.F||J(this));Uh(this,a.zb)};
+function Yh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.G=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.$c=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=32;break}this.v.qb(f,r|t<<8);if(Kc(this.v)){h=1024;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
+k.ad=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Kc(this.v)){h=1024;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=32;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.he=function(){return this.L};k.ef=function(){};k.ie=function(){return this.A};k.ff=function(){};k.ee=function(){return this.M&61438};
+k.bf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.$c;case 2:b||(b=this.ad),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.G&65535,c=b.call(this,d,e,f,g,c,h,this.Yc.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
+-2,this.M|=128,this.M&64&&Mc(this.b,this.Gb))}};k.je=function(){return this.G};k.gf=function(a){this.G=a};k.de=function(){return this.w};k.af=function(a){this.w=a};k.fe=function(){return this.f};k.cf=function(a){this.f=a};k.ge=function(){return this.N};k.df=function(a){this.N=a};
+var bi={},Xh=(bi[65280]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDS"],bi[65282]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKER"],bi[65284]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKCS"],bi[65286]=[null,null,Q.prototype.je,Q.prototype.gf,"RKWC"],bi[65288]=[null,null,Q.prototype.de,Q.prototype.af,"RKBA"],bi[65290]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKDA"],bi[65294]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDB"],bi);
+function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.I=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
+k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ci(d,a)},!0;case "loadDrive":return this.D[b]=
+c,c.onclick=function(){var a=d.D.listDisks;a&&di(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[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;di(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
+k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ei(this);this.Gb=Oc(112,5,131072);Jb(b,this,fi);Lb(b,this.reset.bind(this));gi(this,"None","",!0);this.L&&gi(this,"Local Disk","?");gi(this,"Remote Disk","??");hi(this)||J(this)};
+k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ci(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){ei(this)};k.save=function(){return(new S(this)).data()};
+k.restore=function(a){return ei(this,a[0])};function hi(a,b){b||(a.I=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}ji(a,e,b,c,!1,d)}else ii(a,e)}
+function ji(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,ii(a,b,!0),h.yb?a.O("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.I++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.cd)&&g++));return g}
+k.cd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.I||J(this));ci(this,a.zb)};
+function gi(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.F=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.G=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
+k.dd=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=5120;break}this.v.qb(f,r|t<<8);if(Kc(this.v)){h=8192;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
+k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Kc(this.v)){h=8192;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=5120;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.me=function(){return this.M&65535};
+k.kf=function(a){this.M=this.M&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.G=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.G=this.A;break;case 12:b=this.dd;case 10:b||(b=this.ed),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.F&
+63)<<16|this.w,a=65536-this.G&65535,a=b.call(this,c,d,e,f,a,g,this.bd.bind(this)))}a&&(this.M|=129,this.M&64&&Mc(this.b,this.Gb))}};k.ke=function(){return this.w};k.hf=function(a){this.w=a&65534};k.ne=function(){return this.f};k.lf=function(a){this.f=a};k.oe=function(){return this.G};k.mf=function(a){this.G=a};k.le=function(){return this.F};k.jf=function(a){this.F=a&63;this.M=this.M&-49|(this.F&3)<<4};
+var ki={},fi=(ki[63744]=[null,null,P.prototype.me,P.prototype.kf,"RLCS"],ki[63746]=[null,null,P.prototype.ke,P.prototype.hf,"RLBA"],ki[63748]=[null,null,P.prototype.ne,P.prototype.lf,"RLDA"],ki[63750]=[null,null,P.prototype.oe,P.prototype.mf,"RLMP"],ki[63752]=[null,null,P.prototype.le,P.prototype.jf,"RLBE"],ki);function li(a){x.call(this,"Debugger",a,li);this.na=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(li);
+var mi={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};li.prototype.Ic=function(){return-1};li.prototype.Jc=function(){};
+function ni(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.U?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(ua(b.substring(c,f))),c=f+1}}return a}
+function oi(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
-function ni(a,b,c){var d;if(b){b=oi(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ri(a,b){if(b)return qi(a,b,a.fa[b]);var c=0;for(b in a.fa)qi(a,b,a.fa[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ti(a,b){if(b)return si(a,b,a.fa[b]);var c=0;for(b in a.fa)si(a,b,a.fa[b]),c++;return 0this.b.ib?Bi:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Ci(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
-p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}
-k.Oc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=dd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Qc(c);break;case 25:b=$c(c);break;case 26:b=ad(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b};
-k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).G));if(!this.sa||a!=this.sa)if(this.sa=a,this.pa&1073741824)this.ba.push(a);else{var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Gd(a),a.Fa=0,a.xa())}};
-function ui(a){var b;if(!Ie(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ga=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.S?Ji(a):Ki(a)}}function Ii(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
-k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ui(this);this.Fa=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Li(this);a||Bd(this)};k.save=function(){var a=new S(this);a.set(0,Ei(this.L));a.set(1,Ei(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.J);return a.data()};
-k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Fi(a[b++]),this.T=Fi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
-k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.vc(a.H[a.ga],b),++a.ga==a.H.length&&(a.ga=0)));return!1}function Pf(a){var b=a.b;if(b.C.X)throw T(b,a.b.ua&65535),a.ea(),-1;return!1}
-function ti(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Mi(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Ni(this,a,a.length-1,"set"),ui(this)));return d};
-function Mi(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g>>d.na],b==a.F));h.Ua||ui(a);break}}return f}function Oi(a,b){for(var c=1;c>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
-A&63)switch(A=C&7,C&56){case 0:y=Hi(A);break;case 8:y="@"+Hi(A);break;case 16:7>A?y="("+Hi(A)+")+":(C=v.ta(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Hi(A)+")+":(C=v.ta(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Hi(A)+")";break;case 40:y="@-("+Hi(A)+")";break;case 48:C=v.ta(t,2);y=L(v,C,0,!0)+"("+Hi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.ta(t,2),y="@"+L(v,C)+"("+Hi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
-0b)c=Hi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,dd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Qc(d));break;case 25:c="MMR1="+L(a,$c(d));break;case 26:c="MMR2="+L(a,ad(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&&
-(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Si(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ri(a,"T")+Ri(a,"N")+Ri(a,"Z")+Ri(a,"V")+Ri(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Kc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Kc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ng:b,G:c,Bd:d,ja:e,Ic:f})}function Ti(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b>>0,h=f.Bd;if(e>=g&&eb)){e.u[b]=
-g&65535;break}a.i("unknown register: "+f);return}a.B.xa();a.i("updated registers:")}}a.i(Si(a,d));c&&(a.L=Y(e.u[7]),Ki(a,L(a,a.L.G)))}}function Xi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Qi(a,b,g,f);a.i(f);a.L=b;e-=b.G-l;c++}}}
-function Pi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0n||"z"va.length&&(a.i("note: only "+va.length+" available"),ea=va.length);ka-=ea;0>ka&&(null==va[va.length-1].G?(ea=ka+ea,ka=0):ka+=va.length);var be=[];"call"==eh&&(ac=1E5,be=["CALL"]);for(void 0!==dh&&a.i(ea+" instructions earlier:");0=va.length&&(ka=0);a.tb=ea;gh++;ac--}}gh||(a.i("no "+fh+"history available"),a.tb=void 0)}else{var ub=Ci(a,ua);if(ub){var cc=0,ce=!1,de="ds"==Ua;Va&&(ce=!0,"l"==Va.charAt(0)&&(ce=!1,Va=Va.substr(1)||qj),cc=pi(a,Va)>>>0,65536ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Wa&&(Wa+="\n");Wa=de?Wa+(Xa+","):Wa+(ua+" "+Xa+(0==Sc?" "+fe:""))}Wa&&a.i(Wa);a.qb=ub}}}}break;case "e":if("else"==g[0])break;var xb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(xb=1,he=255,ie=a.dc,je=a.Nb):"e"==
-ke||"ew"==ke?(xb=2,he=65535,ie=a.ta,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Ci(a,le);if(Uc)for(var Vc=2;Vcoe;){for(var Ya=null,vj=256;65536>hc.G>>>0;){pe.G=a.ta(hc,2);if(null==hc.G||!vj--)break;if(!(pe.G&1)){for(var wj=a,Wc=pe,kh=null,ic=Wc.G,lh=ic,qe=1;6>=qe&⁣qe++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bbj){if(dj(d,this.J)){this.A=new S(this,"1.30.5","failsafe");dj(this.A)&&(ij(this,d),a=2,jj(this.A));this.A.set("timestamp",Ca());kj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=hj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?dj(d,g):("error"==
-f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.B=null)):this.i(f+": "+g),jj(d),dj(d)?(c=hj(d),e=!0):c=!1))}e&&gj(this,c?d:null)}else 2==a&&d.clear()}else gj(this);delete this.J;delete this.K}e=mb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(lj(this,this.b,b,c,a),this.xa(),this.b.Eb());this.S&&(ij(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
-function ij(a,b){if(Ga("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.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
-function Zi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l=c||30<=(b.Qb+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Qb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.I&8);if(0>=a||60<=(b.A+=a)){for(var e=0;ethis.b.lb?Di:[];Qc(this,16,function(a){a:{var b=d.v.ba,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Ei(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.pa;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}
+k.Jc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.gb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=fd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.sa;break;case 23:b=c.ob;break;case 24:b=$c(c);break;case 25:b=bd(c);break;case 26:b=cd(c);break;case 27:b=c.Ya;break;case 28:d&&(b=d.Ba);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.fb)}}return b};
+k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.wa&65535).H));if(!this.ua||a!=this.ua)if(this.ua=a,this.oa&1073741824)this.aa.push(a);else{var c;if(this.oa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Id(a),a.Fa=0,a.ya())}};
+function wi(a){var b;if(!Ke(a))a.G&&a.G.length&&a.i("instruction history buffer freed"),a.ga=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.R?Li(a):Mi(a)}}function Ki(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
+k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wi(this);this.Fa=0;this.ua=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ni(this);a||Dd(this)};k.save=function(){var a=new S(this);a.set(0,Gi(this.L));a.set(1,Gi(this.T));a.set(2,[this.g,this.U,this.oa]);a.set(3,this.I);return a.data()};
+k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Hi(a[b++]),this.T=Hi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
+k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.R){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.sc(a.G[a.ga],b),++a.ga==a.G.length&&(a.ga=0)));return!1}function Rf(a){var b=a.b;if(b.C.X)throw T(b,a.b.wa&65535),a.ea(),-1;return!1}
+function vi(a){var b,c;a.f=["bp"];if(a.N)for(b=1;b>>d.pa],!1)}a.N=["br"];if(a.F)for(b=1;b>>d.pa],!0);a.F=["bw"];a.ab=0}k.wb=function(a,b,c){var d=!0;c||Oi(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.H)),d=!1;else{var f=this.v;f.ba[e>>>f.pa].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Pi(this,a,a.length-1,"set"),wi(this)));return d};
+function Oi(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g>>d.pa],b==a.F));h.Ua||wi(a);break}}return f}function Qi(a,b){for(var c=1;c>23)&65535,y=L(v,t);else if(8192==C)t=t.H-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
+A&63)switch(A=C&7,C&56){case 0:y=Ji(A);break;case 8:y="@"+Ji(A);break;case 16:7>A?y="("+Ji(A)+")+":(C=v.va(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Ji(A)+")+":(C=v.va(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Ji(A)+")";break;case 40:y="@-("+Ji(A)+")";break;case 48:C=v.va(t,2);y=L(v,C,0,!0)+"("+Ji(A)+")";7==A&&(y=L(v,C+t.H&65535));break;case 56:C=v.va(t,2),y="@"+L(v,C)+"("+Ji(A)+")",7==A&&(y="@"+L(v,C+t.H&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
+0b)c=Ji(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.gb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,fd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.sa);break;case 23:c="SL="+L(a,d.ob);break;case 24:c="MMR0="+L(a,$c(d));break;case 25:c="MMR1="+L(a,bd(d));break;case 26:c="MMR2="+L(a,cd(d));break;case 27:c="MMR3="+L(a,d.Ya);break;case 28:a.w&&(c="AR="+L(a,a.w.Ba,3));break;case 29:a.w&&
+(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.fb,3))}c&&(c+=" ");return c}function Ui(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ti(a,"T")+Ti(a,"N")+Ti(a,"Z")+Ti(a,"V")+Ti(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Fc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Fc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Jg:b,H:c,xd:d,ja:e,Dc:f})}function Vi(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b>>0,h=f.xd;if(e>=g&&eb)){e.u[b]=
+g&65535;break}a.i("unknown register: "+f);return}a.B.ya();a.i("updated registers:")}}a.i(Ui(a,d));c&&(a.L=Y(e.u[7]),Mi(a,L(a,a.L.H)))}}function Zi(a,b){b=ua(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Si(a,b,g,f);a.i(f);a.L=b;e-=b.H-l;c++}}}
+function Ri(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.H)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(yb(a)&&0n||"z"wa.length&&(a.i("note: only "+wa.length+" available"),fa=wa.length);ka-=fa;0>ka&&(null==wa[wa.length-1].H?(fa=ka+fa,ka=0):ka+=wa.length);var ce=[];"call"==gh&&(ac=1E5,ce=["CALL"]);for(void 0!==fh&&a.i(fa+" instructions earlier:");0=wa.length&&(ka=0);a.tb=fa;ih++;ac--}}ih||(a.i("no "+hh+"history available"),a.tb=void 0)}else{var ub=Ei(a,va);if(ub){var cc=0,de=!1,ee="ds"==Ua;Va&&(de=!0,"l"==Va.charAt(0)&&(de=!1,Va=Va.substr(1)||sj),cc=ri(a,Va)>>>0,65536he?String.fromCharCode(he):"."),Uc=Uc>>8}Wa&&(Wa+="\n");Wa=ee?Wa+(Xa+","):Wa+(va+" "+Xa+(0==Tc?" "+ge:""))}Wa&&a.i(Wa);a.Za=ub}}}}break;case "e":if("else"==g[0])break;var xb,ie,je,ke,le=g[0],me=g[1];"eb"==le?(xb=1,ie=255,je=a.dc,ke=a.Nb):"e"==
+le||"ew"==le?(xb=2,ie=65535,je=a.va,ke=a.Db):me=null;if(null==me)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Vc=Ei(a,me);if(Vc)for(var Wc=2;Wcpe;){for(var Ya=null,xj=256;65536>hc.H>>>0;){qe.H=a.va(hc,2);if(null==hc.H||!xj--)break;if(!(qe.H&1)){for(var yj=a,Xc=qe,mh=null,ic=Xc.H,nh=ic,re=1;6>=re&⁣re++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bdj){if(fj(d,this.I)){this.A=new S(this,"1.30.5","failsafe");fj(this.A)&&(kj(this,d),a=2,lj(this.A));this.A.set("timestamp",Ca());mj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=jj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fj(d,g):("error"==
+f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.B=null)):this.i(f+": "+g),lj(d),fj(d)?(c=jj(d),e=!0):c=!1))}e&&ij(this,c?d:null)}else 2==a&&d.clear()}else ij(this);delete this.I;delete this.K}e=mb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(nj(this,this.b,b,c,a),this.ya(),this.b.Eb());this.R&&(kj(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
+function kj(a,b){if(Ga("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.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
+function aj(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l=c||30<=(b.Qb+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Qb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.J&8);if(0>=a||60<=(b.A+=a)){for(var e=0;ef.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"),
-a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
-"");a=a.replace(d[0],g);Cj(a,b,c)}})}else c(a,null)}
-function Dj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--pj||cb(!0));l=!1}var g,h,l=!0;pj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
-(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?Aj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--pj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--pj||cb(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Aj(b,a,d,!0,e,m):Bj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Dj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11-dbg.map
+k.xa=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?aj(d,!1,!0):hj(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.G){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");aj(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.pc=!0),d.Xb(dj),d.pc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
+c,c.onclick=function(){var a=ej(d,!0);if(a){var b=!!(d.f&&!d.G||d.N),c=aj(d,b);b?oj(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1};
+function ej(a,b){var c=a.B;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=pj(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c}
+function pj(a,b){a.B=null;b=Da(Fa()+"/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.B=b.data)}catch(d){w(d.message+" ("+c+")")}return a.B}function gj(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+qj(a,"1.30.5"));return b}
+function oj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=qj(a,"1.30.5");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"),
+a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
+"");a=a.replace(d[0],g);Ej(a,b,c)}})}else c(a,null)}
+function Fj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);l&&(--rj||cb(!0));l=!1}var g,h,l=!0;rj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
+(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?Cj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--rj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--rj||cb(!0)):f("invalid machine element: "+
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Cj(b,a,d,!0,e,m):Dj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Fj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11-dbg.map
diff --git a/versions/pdpjs/1.30.5/pdp11.js b/versions/pdpjs/1.30.5/pdp11.js
index 784a12cfc..8dc47f62e 100644
--- a/versions/pdpjs/1.30.5/pdp11.js
+++ b/versions/pdpjs/1.30.5/pdp11.js
@@ -34,9 +34,9 @@
*/
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da":62,"?":63,"@":64,Tb:65,Te:66,Ve:67,tf:68,E:69,uf:70,vf:71,wf:72,xf:73,yf:74,zf:75,Af:76,Bf:77,Cf:78,Df:79,Ef:80,Q:81,Ff:82,Gf:83,Hf:84,If:85,Jf:86,Kf:87,Lf:88,Mf:89,Ac:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Nf:97,Of:98,Pf:99,d:100,e:101,Qf:102,Rf:103,Sf:104,Tf:105,Wf:106,k:107,Xf:108,Yf:109,n:110,Zf:111,p:112,q:113,r:114,$f:115,t:116,ag:117,bg:118,cg:119,x:120,y:121,z:122,"{":123,
-"|":124,"}":125,"~":126,rc:127};
+var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},m={Re:0,kc:1,Te:2,Ue:3,Ve:4,We:5,Xe:6,Ye:7,Tb:8,Ze:9,lc:10,$e:11,af:12,mc:13,bf:14,cf:15,df:16,ef:17,ff:18,gf:19,hf:20,jf:21,kf:22,lf:23,mf:24,nf:25,pf:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
+"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Sb:65,Qe:66,Se:67,qf:68,E:69,rf:70,sf:71,tf:72,uf:73,vf:74,wf:75,xf:76,yf:77,zf:78,Af:79,Bf:80,Q:81,Cf:82,Df:83,Ef:84,Ff:85,Gf:86,Hf:87,If:88,Jf:89,wc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Kf:97,Lf:98,Mf:99,d:100,e:101,Nf:102,Of:103,Pf:104,Qf:105,Tf:106,k:107,Uf:108,Vf:109,n:110,Wf:111,p:112,q:113,r:114,Xf:115,t:116,Yf:117,Zf:118,$f:119,x:120,y:121,z:122,"{":123,
+"|":124,"}":125,"~":126,nc:127};
function q(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return""+c}function ka(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
function r(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})}
@@ -44,227 +44,227 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
-function ta(a,b){var c,d={M:null,ba:null,na:null,ma: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.na=g.load;d.ma=g.exec;if(e=g.bytes)d.M=e;else if(e=g.words)for(d.M=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.M=Array(4*e.length),f=c=0;c>8&255,d.M[f++]=e[c]>>16&255,d.M[f++]=e[c]>>24&255;else d.M=g;d.ba=g.symbols;d.M.length?1==d.M.length&&(w(d.M[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.N=e;else if(e=g.words)for(d.N=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.N=Array(4*e.length),f=c=0;c>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=g;d.ca=g.symbols;d.N.length?1==d.N.length&&(w(d.N[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Fa:!1,Jb:!1,R:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Lc=d||0;y.push(this)}var Na=void 0,Oa={};
+Ia(Ca("Opera")||Ca("iOS")?"onunload":"onbeforeunload",function(){Ka(Ea.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Xb=b.comment;this.Kc=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Ia:!1,Jb:!1,S:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Ic=d||0;y.push(this)}var Na=void 0,Oa={};
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ta=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ta={},y=[];function Ua(a,b,c){Ta[a]&&b&&(Ta[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.Wc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
-h.aa=function(a,b,c,d){if(this.l&&this.l.aa(a,b,c,d)||this.a&&this.a.aa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
-b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.aa.call(this,a,b,c,d)}};h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ha=function(a,b){b||(kb(),this.reset());return!0};h.ga=function(){return!0};
+function ab(a){x.call(this,"Panel",a,ab,512);this.ja=this.i=this.c=this.m=this.s=this.v=0;this.w=this.C=this.B=!1;this.H=bb;this.h={};this.b={START:[1,1,!0,!1,this.Rc],STEP:[1,1,!1,!1,this.Sc],ENABLE:[1,1,!1,!1,this.Nc],CONT:[1,1,!0,!1,this.Lc],DEP:[0,0,!0,!1,this.Mc],EXAM:[1,1,!0,!1,this.Oc],LOAD:[1,1,!0,!1,this.Qc],TEST:[0,0,!0,!1,this.Pc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Tc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
+h.ba=function(a,b,c,d){if(this.l&&this.l.ba(a,b,c,d)||this.a&&this.a.ba(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
+b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.ba.call(this,a,b,c,d)}};h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ia=function(a,b){b||(kb(),this.reset());return!0};h.ha=function(){return!0};
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.G&&a.G.g||8)?ja(c,d):ka(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
-function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Uc=function(a){a||this.a.o.T||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Vc=function(){};h.Qc=function(a){a||F(this.a)};
-h.Oc=function(a){if(!a&&!this.a.o.T)if(cb(this,"ENABLE"))pb(this.a);else{a=this.G;var b;if(b=a)a.o.Fa&&(a.o.Jb=!0),b=!a.o.Fa;if(b)Xa(a,!0),a.zb(0,null),Xa(a,!1);else try{var c=this.a.zb(1);0a;a++)this.b["S"+a][1]=0&1<a.a.Ta?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<c;c++)wb(a,"D"+c,b&1<>2;this.l=this.b-1;this.w=this.C/this.b|0;this.Da=[];this.h=0;this.m=!1;this.Kb=0;this.A=[];this.Bc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.w);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Da[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
-function Ab(a,b,c){var d=!1,e=this.controller,f=e.Da[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Da[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Da[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
-function Cb(a,b,c){var d=!1,e=this.controller;a=e.Da[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.Kb+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Kb(2,b,c)}
-function Hb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Nb(b&a.l,b)}function Pb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}h.Qa=function(a){3932160<=a&&(a=Ob(this.a,a));var b=a&this.l,c=(a&this.qa)>>>this.c;this.m=!1;this.h++;a=this.g[c].gc(b,a);this.h--;return a};
-function Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Sb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Xa=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].mc(c,b&65535,a);this.h--};
-function Sb(a){for(var b=0,c=[],d=0;da.a.Ta)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.hd=function(){var a=this.a;a.Z&57344||(a.Ib=a.w&65535);return a.Ib};h.jd=function(){return this.a.Ea};h.he=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.$a=a&16?4194303:262143,bc(b))};h.Rd=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
-h.Pe=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Kd=function(a){return this.a.I[1][a>>1&7]};h.Ie=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Id=function(a){return this.a.I[1][(a>>1&7)+8]};h.Ge=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Jd=function(a){return this.a.ca[1][a>>1&7]};h.He=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Hd=function(a){return this.a.ca[1][(a>>1&7)+8]};
-h.Fe=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.cd=function(a){return this.a.I[0][a>>1&7]};h.de=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.ad=function(a){return this.a.I[0][(a>>1&7)+8]};h.be=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.bd=function(a){return this.a.ca[0][a>>1&7]};h.ce=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};h.$c=function(a){return this.a.ca[0][(a>>1&7)+8]};h.ae=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};
-h.Qd=function(a){return this.a.I[3][a>>1&7]};h.Oe=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Od=function(a){return this.a.I[3][(a>>1&7)+8]};h.Me=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Pd=function(a){return this.a.ca[3][a>>1&7]};h.Ne=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Nd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Le=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]};
-h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.od=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.me=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.rd=function(){return this.a.f[7]};h.pe=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.pd=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
-h.ne=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.qd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.oe=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Zc=function(a){return this.a.jc[a-65504>>1]};h.$d=function(a,b){this.a.jc[b-65504>>1]=a};h.fc=function(a){if(65520==a){a=0;switch(Lb){case Lb:a=this.g.Kb}a=(a>>6)-1}else a=0;return a};h.lc=function(){};h.Md=function(){return 1};h.Ke=function(){};h.Yc=function(){return this.a.ja};
-h.Zd=function(){this.a.ja=0};h.ed=function(){return this.a.ic};h.fe=function(a,b){b&1||(a&=255);this.a.ic=a};h.kd=function(a,b){return b?0:this.a.yb};h.ie=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Ld=function(a,b){return b?0:this.a.jb&65280};h.Je=function(a){this.a.jb=a|255};h.nd=function(){return cc(this.a)};h.le=function(a){dc(this.a,a&-1793|cc(this.a)&1792);this.a.u|=256};h.kc=function(){};
-var L={},Zb=(L[61568]=[null,null,K.prototype.Rd,K.prototype.Pe,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Kd,K.prototype.Ie,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Id,K.prototype.Ge,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Jd,K.prototype.He,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Hd,K.prototype.Fe,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.cd,K.prototype.de,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.ad,K.prototype.be,"KDPDR",8,1145,64],L[62688]=
-[null,null,K.prototype.bd,K.prototype.ce,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.$c,K.prototype.ae,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.jd,K.prototype.he,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.dd,K.prototype.ee,"LKS"],L[65402]=[null,null,K.prototype.fd,K.prototype.ge,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.gd,K.prototype.kc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.hd,K.prototype.kc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Qd,K.prototype.Oe,
-"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Od,K.prototype.Me,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Pd,K.prototype.Ne,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Nd,K.prototype.Le,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va,
-K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.od,K.prototype.me,"R6KERNEL"],L[65479]=[null,null,K.prototype.rd,K.prototype.pe,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa,
-K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.pd,K.prototype.ne,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.qd,K.prototype.oe,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Zc,K.prototype.$d,"CTRL",8,1170],L[65520]=[null,null,K.prototype.fc,K.prototype.lc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.fc,K.prototype.lc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Md,K.prototype.Ke,"SYSID",1,1170],L[65526]=
-[null,null,K.prototype.Yc,K.prototype.Zd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.ed,K.prototype.fe,"MB",1,1170],L[65530]=[null,null,K.prototype.kd,K.prototype.ie,"PIR"],L[65532]=[null,null,K.prototype.Ld,K.prototype.Je,"SL"],L[65534]=[null,null,K.prototype.nd,K.prototype.le,"PSW"],L);
-Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),lc(this,hc?mc:nc);else{a=this.a=Array(this.size>>
-2);for(f=0;f>2),b=0;b>8,c)},P:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.za=!0},H:function(a,b){return this.K(a,b)},V:function(a,b){return this.gc(a,b)},ta:function(a,b,c){this.l?this.h(a,b,c):this.Sb(a,b,c)},wa:function(a,b,c){this.l?this.h(a,b,c):this.mc(a,b,c)},C:function(a){return this.j[a]},L:function(a){return this.j[a]},U:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},sa:function(a,b){this.j[a]=b;this.za=!0},Ca:function(a,b){this.j[a]=b;this.za=!0},va:function(a,b,c){a&1&&I(this.g,
-c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&pc(a,qc,!1),(a.m=c.m)&&tc(a,qc,!1))}function tc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.mc=b[3]||a.w}function pc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.A);if(c||void 0===c)a.K=b[0]||a.v,a.gc=b[2]||a.A}function lc(a,b){b||(b=uc);pc(a,b,void 0);tc(a,b,void 0)}
-var uc=[],oc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],qc=[H.prototype.H,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var nc=[H.prototype.C,H.prototype.sa,H.prototype.U,H.prototype.va],mc=[H.prototype.L,H.prototype.Ca,H.prototype.ka,H.prototype.xa];
-function vc(a,b){x.call(this,"CPU",a,vc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Fb=Math.round(this.rb/1E4)/100;this.Ma=this.Fb*this.xa;this.o.T=!1;this.o.Pb=!1;this.o.fb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.P=[];this.ec=this.Vd.bind(this);E(this)}z(vc);var wc=["power","reset"];h=vc.prototype;
-h.fa=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.A=a.A;for(b=0;b=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=Ac(a)&&(a.ab=a.bb=-1,zc(a),F(a),c=!0);c&&a.X(Ac(a)+" cycles: checksum="+ka(a.pb))}}
-h.aa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.La/a.Ma&&(b=1);a.xa=b;b=a.Fb*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Dc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Cc(a)}function Vb(a,b){var c=a.P.length;a.P.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&ba.P[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.T&&(c+=Ec(a)),a.P[b][0]=c)}
-function qb(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ec(a,b){var c=a.wa-=a.a;a.a=a.L=0;b&&(a.wa=0);return c}
-h.Vd=function(){if(this.o.T){this.Cb>=this.rb&&Cc(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.bc&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.P.length-1;0<=d;d--){var e=this.P[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Ec(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.cc&&(this.Ba(),this.cc=0);break}}while(this.o.T)}catch(f){F(this);
-this.l&&this.l.stop(ra(),Ac(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.ec;this.va=ra();c=this.bc;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Bc(this));if(0>c||this.Lac&&(this.la-=c),c=0;this.Cb+=this.eb;this.va+=c;a(b,c)}}};
-function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Bc(a);a.o.T=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,Ac(a));setTimeout(a.ec,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.T){Ec(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),Ac(a));b=!0}a.o.complete=void 0;return b}
-function Fc(a){this.Ta=+a.model||1170;this.Yb=a.addrReset||0;vc.call(this,a,6666667);this.tb=0;this.$b=255;1120==this.Ta?(this.decode=Gc.bind(this),this.Ka=this.Fc,this.tb=8,this.$b=-1):(this.decode=Hc.bind(this),this.Ka=this.Gc);Ic(this);this.sa=0;this.K=null;this.o.complete=!1}z(Fc,vc);h=Fc.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.T&&F(this);Ic(this);yc(this);this.o.error=!1;this.parent.reset.call(this)};
-function Ic(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Yb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Mc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,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,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.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.lb=[0,0,0,0,0,0,0,0,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.jc=[0,0,0,0,0,0,0,0];a.ic=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Eb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Gb=0;a.Ib=0;a.Ea=0;a.ja=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.hb=0;a.w=0;a.K=null;a.g&&bc(a)}function bc(a){a.ka?(a.V=65536,a.Wb=a.Ea&16?4186112:253952,a.U=a.Jc,a.Y=a.Sd,a.Bb=a.Qe,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Wb=57344,a.U=a.Ic,a.Y=a.hc,a.Bb=a.nc,Fb(a.g,16))}
-function ac(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Gb=a.w>>16&65535,a.Ib=a.w&65535);a.Z=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,bc(a))}}h.ac=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()};
-h.restore=function(a){var b=a[1];this.ya=b[1];Bc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.K?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)}
-function Nc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Oc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Pc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}
-function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=cc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);dc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);dc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
-function Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Wb),f;d=b>>13;a.Ea&a.Mc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.$a;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.I[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=
-a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.mb<<5|a.nb<<1,ac(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)}
-function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0,
-e),a.a-=6,e|g;case 7:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Fc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Gc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.ja|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.hc(Uc(this,a,2));this.sa--;return a};
-h.kb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.nc(Uc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Ic=function(a,b,c){return Vc(this,a,b,c)};h.Jc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.hc=function(a){return Pb(this.g,this.hb=a)};h.Sd=function(a){return Pb(this.g,this.hb=Uc(this,a,2))};h.nc=function(a,b){Rb(this.g,this.hb=a,b&65535)};h.Qe=function(a,b){Rb(this.g,this.hb=Uc(this,a,4),b)};
-function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Vc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Xc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Vc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Uc(a,e|c&65536,4),a.v=a.F>>14&3,Rb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
-function Yc(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.$b;return a}function Zc(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c+a.tb]}function $c(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Vc(a,b,c,8)}function ad(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function bd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Pb(a.g,a.U(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.Eb=a.U(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Qb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.U(b,e,6),Rb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Pb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
-function cd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Qb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function dd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,d,4),Rb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
-h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.K&&this.K.Ua>d?this.K:null;e&&(c=e.Xd,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Lc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&$b(this,e),a=!0);this.K||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Mc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Kc(this))}while(0>1|b<<16;Pc(this,a);return a&65535}
-function jd(a,b){a=b&128|b>>1|b<<8;Pc(this,a<<8);return a&255}function kd(a,b){a=b&~a;R(this,a);return a}function ld(a,b){a=b&~a;R(this,a<<8);return a}function md(a,b){a|=b;R(this,a);return a}function nd(a,b){a|=b;R(this,a<<8);return a}function od(a,b){a=~b|65536;Nc(this,a);return a&65535}function pd(a,b){a=~b|256;Nc(this,a<<8);return a&255}function qd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
-function rd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function sd(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function td(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function ud(a,b){a=-b;Nc(this,a,a&b&32768);return a&65535}function vd(a,b){a=-b;Nc(this,a<<8,(a&b&128)<<8);return a&255}function wd(a,b){a=b<<1|this.m>>16&1;Pc(this,a);return a&65535}
-function xd(a,b){a=b<<1|this.m>>16&1;Pc(this,a<<8);return a&255}function yd(a,b){a=(this.m&65536|b)>>1|b<<16;Pc(this,a);return a&65535}function zd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Pc(this,a<<8);return a&255}function Ad(a,b){var c=b-a;Qc(this,c,a,b);return c&65535}function Bd(a,b){var c=b-a;Qc(this,c<<8,a<<8,b<<8);return c&255}function Cd(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Dd(a,b){a^=b;R(this,a);return a&65535}
-function Ed(a){T(this,a,Zc(this,a),ed);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Fd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
-function Gd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Hd(a){V(this,a,!P(this))}function Id(a){V(this,a,P(this))}
-function Jd(a){T(this,a,Zc(this,a),kd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Kd(a){S(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Ld(a){T(this,a,Zc(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,Yc(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}
-function Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Jc(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Jc(this)==!(this.h&32768))}
-function Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Jc(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Jc(this)!=!(this.h&32768))}function Wd(a){V(this,a,Jc(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Jc(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)}
-function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ce(a){var b=Zc(this,a);a=bd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function de(a){var b=Yc(this,a);a=ad(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}
-function ee(a){var b=bd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=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.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function fe(){J(this,24,0,-8);this.a-=25}
-function ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.A&&1120==this.Ta&&this.A.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.L=this.a;Q(this,$c(this,a));this.a=this.L-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.L=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.L-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
-function ne(a){var b=Zc(this,a);this.L=this.a;R(this,dd(this,a,b));this.a=this.L-me[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function oe(a){var b=Yc(this,a);R(this,cd(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var pe=[7,13,13,17,14,18,17,21];
-function qe(a){var b=bd(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.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function we(a){T(this,a,Zc(this,a),Ad);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function xe(a){T(this,a,0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function ye(){J(this,28,0,-8);this.a-=5}
-function ze(){this.A&&(this.A.ia=this.f[7],this.A.setData(this.f[0],!0));this.u|=8;Lc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.tb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Gc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}
-function Oe(a){Pe[a>>6&3].call(this,a)}function Qe(a){Re[a>>6&3].call(this,a)}
-var Be=[function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,Y,function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Se=[function(a){Ue[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Nc(this,dd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,
-ud);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],
-Ue=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,Y,Ie,Ke,xe,xe,xe,xe],Ve=[ge,ze,ue,Zd,he,se,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Je=[re,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Le=[re,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Te=[Yd,Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,Y,Y,Y],Ne=[function(a){Nc(this,
-cd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){S(this,a,0,vd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Nc(this,a<<8);this.a-=this.c?4:3+(7==
-this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Hc(a){We[a>>12].call(this,a)}
-var We=[function(a){Xe[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,function(a){Ye[a>>8&15].call(this,a)},function(a){Ze[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Xe=[function(a){$e[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,function(a){af[a>>6&3].call(this,a)},Y,Y],af=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Wc(this,a,0);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L=
-this.a;Xc(this,a,0,b);R(this,b);this.a=this.L-pe[this.c]},function(a){R(this,dd(this,a,Jc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.u|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd,
-Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[Y,function(a){a=Wc(this,a,65536);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L=this.a;Xc(this,a,65536,b);R(this,b);this.a=this.L-pe[this.c]},Y];
-function df(a){x.call(this,"ROM",a,df,128);this.ba=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.M,c.ba=a.ba):c.l=null);ef(c)})}}z(df);h=df.prototype;
-h.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;ef(this)};h.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.i,this.b,this.ba),delete this.ba);return!0};h.ga=function(){return!0};
-function ef(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+ka(a.c.length,8,!0)+") does not match specified size ("+ka(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[df.prototype.Gd,df.prototype.Ee,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,kc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=m.Tb&&c<=m.Ac&&(b=c-(m.Tb-m.oc));b&&(a.preventDefault&&a.preventDefault(),d.xb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.qc&&(b=m.pc);d.xb(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&
+function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rc=function(a){a||this.a.o.U||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Sc=function(){};h.Nc=function(a){a||F(this.a)};
+h.Lc=function(a){if(!a&&!this.a.o.U)if(cb(this,"ENABLE"))pb(this.a);else{a=this.G;var b;if(b=a)a.o.Ia&&(a.o.Jb=!0),b=!a.o.Ia;if(b)Xa(a,!0),a.zb(0,null),Xa(a,!1);else try{var c=this.a.zb(1);0a;a++)this.b["S"+a][1]=0&1<a.a.Ta?8:16,c=65472<=a.ja&&a.ja<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ja&~c|a.ja+b&c)}function vb(a,b){a.ja=b&a.g.qa;b=a.ja;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<c;c++)wb(a,"D"+c,b&1<>2;this.l=this.b-1;this.I=this.B/this.b|0;this.H=this.K=(this.B-G&this.qa)>>>this.c;this.Ga=[];this.h=0;this.s=!1;this.C=0;this.w=[];this.xc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.I);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Ga[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
+function Ab(a,b,c){var d=!1,e=this.controller,f=e.Ga[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ga[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Ga[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
+function Cb(a,b,c){var d=!1,e=this.controller;a=e.Ga[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.v){var c;a.v&&(c=(1<>>a.c,a.m=Hb(a,c,G),a.i?Gb(a,c,G,a.i):(Ib(a,c,G,Jb,a),a.i=Hb(a,c,G)))}}h=yb.prototype;h.reset=function(){for(var a=0;a>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.C+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Kb(2,b,c)}
+function Hb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Nb(b&a.l,b)}function Pb(a,b){b=(b&a.qa)>>>a.c;var c=a.g[b];b==a.H&&a.m.length?c=a.m[0]:b==a.K&&(c=a.g[a.H]);return c}function Qb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}
+h.Qa=function(a){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));a=Pb(this,a).C(a&this.l,a);this.h--;return a};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));Pb(this,a).s(a&this.l,b&255,a);this.h--};function Sb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Xa=function(a,b){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));Pb(this,a).I(a&this.l,b&65535,a);this.h--};
+function Tb(a){for(var b=0,c=[],d=0;da.a.Ta)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v>16&65535);a=a.Ib;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.aa&57344||(a.Kb=a.w&65535);return a.Kb};h.fd=function(){return this.a.Ha};h.ee=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ha!=a&&(b.Ha=a,b.$a=a&16?4194303:262143,dc(b))};h.Od=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
+h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Hd=function(a){return this.a.J[1][a>>1&7]};h.Fe=function(a,b){this.a.J[1][b>>1&7]=a&65295};h.Fd=function(a){return this.a.J[1][(a>>1&7)+8]};h.De=function(a,b){this.a.J[1][(b>>1&7)+8]=a&65295};h.Gd=function(a){return this.a.da[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.da[1][b]=a;this.a.J[1][b]&=65295};h.Ed=function(a){return this.a.da[1][(a>>1&7)+8]};
+h.Ce=function(a,b){b=(b>>1&7)+8;this.a.da[1][b]=a;this.a.J[1][b]&=65295};h.$c=function(a){return this.a.J[0][a>>1&7]};h.ae=function(a,b){this.a.J[0][b>>1&7]=a&65295};h.Yc=function(a){return this.a.J[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.J[0][(b>>1&7)+8]=a&65295};h.Zc=function(a){return this.a.da[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.da[0][b]=a;this.a.J[0][b]&=65295};h.Xc=function(a){return this.a.da[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.da[0][b]=a;this.a.J[0][b]&=65295};
+h.Nd=function(a){return this.a.J[3][a>>1&7]};h.Le=function(a,b){this.a.J[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.J[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.J[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.da[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Kd=function(a){return this.a.da[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ma[a]:this.a.f[a]};
+h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ma[b]=a:this.a.f[b]=a};h.ld=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.od=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ma[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ma[b]=a};h.md=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
+h.ke=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.nd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.le=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Wc=function(a){return this.a.gc[a-65504>>1]};h.Xd=function(a,b){this.a.gc[b-65504>>1]=a};h.dc=function(a){return 65520==a?(Ub(this.g)>>6)-1:0};h.ic=function(){};h.Jd=function(){return 1};h.He=function(){};h.Vc=function(){return this.a.Z};h.Wd=function(){this.a.Z=0};h.bd=function(){return this.a.fc};
+h.ce=function(a,b){b&1||(a&=255);this.a.fc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return ec(this.a)};h.ie=function(a){fc(this.a,a&-1793|ec(this.a)&1792);this.a.u|=256};h.hc=function(){};
+var L={},ac=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]=
+[null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.hc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.hc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le,
+"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va,
+K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa,
+K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.dc,K.prototype.ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.dc,K.prototype.ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]=
+[null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L);
+Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),nc(this,jc?oc:pc);else{a=this.a=Array(this.size>>
+2);for(f=0;f>2),b=0;b>8,c)},ka:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Ca:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.za=!0},M:function(a,b){return this.R(a,b)},sa:function(a,b){return this.C(a,b)},va:function(a,b,c){this.l?this.h(a,b,c):this.s(a,b,c)},Da:function(a,b,c){this.l?this.h(a,b,c):this.I(a,b,c)},K:function(a){return this.j[a]},V:function(a){return this.j[a]},la:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ta:function(a,b){a&1&&I(this.g,b,64);return this.v[a>>1]},ua:function(a,b){this.j[a]=b;this.za=!0},wa:function(a,b){this.j[a]=b;this.za=!0},ya:function(a,b,c){a&1&&I(this.g,
+c,64);this.c.setUint16(a,b,!0);this.za=!0},Ea:function(a,b,c){a&1&&I(this.g,c,64);this.v[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&rc(a,uc,!1),(a.m=c.m)&&vc(a,uc,!1))}function vc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.H);if(c||void 0===c)a.s=b[1]||a.h,a.I=b[3]||a.H}function rc(a,b,c){c&&a.i||(a.Nb=b[0]||a.B,a.Y=b[2]||a.w);if(c||void 0===c)a.R=b[0]||a.B,a.C=b[2]||a.w}function nc(a,b){b||(b=wc);rc(a,b,void 0);vc(a,b,void 0)}
+var wc=[],qc=[H.prototype.ka,H.prototype.xa,H.prototype.Ca,H.prototype.Fa],uc=[H.prototype.M,H.prototype.va,H.prototype.sa,H.prototype.Da];if($a)var pc=[H.prototype.K,H.prototype.ua,H.prototype.la,H.prototype.ya],oc=[H.prototype.V,H.prototype.wa,H.prototype.ta,H.prototype.Ea];
+function xc(a,b){x.call(this,"CPU",a,xc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Cb=Math.round(this.rb/1E4)/100;this.Fa=this.Cb*this.xa;this.o.U=!1;this.o.Pb=!1;this.o.gb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.M=[];this.cc=this.Sd.bind(this);E(this)}z(xc);var yc=["power","reset"];h=xc.prototype;
+h.ga=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.B=a.B;for(b=0;b=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=Cc(a)&&(a.ab=a.bb=-1,Bc(a),F(a),c=!0);c&&a.X(Cc(a)+" cycles: checksum="+ka(a.pb))}}
+h.ba=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.S)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.Ea/a.Fa&&(b=1);a.xa=b;b=a.Cb*a.xa;if(a.Fa!=b){a.Fa=b;b=a.Fa.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Fc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Ec(a)}function Xb(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Zb(a,b,c,d){0<=b&&ba.M[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.U&&(c+=Gc(a)),a.M[b][0]=c)}
+function qb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gc(a,b){var c=a.wa-=a.a;a.a=a.K=0;b&&(a.wa=0);return c}
+h.Sd=function(){if(this.o.U){this.Gb>=this.rb&&Ec(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.$b&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Gc(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.ac&&(this.Ba(),this.ac=0);break}}while(this.o.U)}catch(f){F(this);
+this.l&&this.l.stop(ra(),Cc(this));Za(this,f.stack||f.message);return}if(this.o.U){a=setTimeout;b=this.cc;this.va=ra();c=this.$b;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.Ea=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Dc(this));if(0>c||this.Eac&&(this.la-=c),c=0;this.Gb+=this.eb;this.va+=c;a(b,c)}}};
+function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.U)a.X(a.toString()+" busy");else{Dc(a);a.o.U=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,Cc(a));setTimeout(a.cc,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.U){Gc(a);rb(a,a.ta);a.ta=0;a.o.U=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),Cc(a));b=!0}a.o.complete=void 0;return b}
+function Hc(a){this.Ta=+a.model||1170;this.Wb=a.addrReset||0;xc.call(this,a,6666667);this.tb=0;this.Yb=255;1120==this.Ta?(this.decode=Ic.bind(this),this.Da=this.Bc,this.tb=8,this.Yb=-1):(this.decode=Jc.bind(this),this.Da=this.Cc);Kc(this);this.sa=0;this.I=null;this.o.complete=!1}z(Hc,xc);h=Hc.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.U&&F(this);Kc(this);Ac(this);this.o.error=!1;this.parent.reset.call(this)};
+function Kc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Wb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ma=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.J=[[0,0,0,0,0,0,0,0,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,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.da=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.lb=[0,0,0,0,0,0,0,0,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.u=0;a.C=a.H=0;a.c=a.b=a.Fb=0;a.Oa=-1;ob(a)}function ob(a){a.aa=0;a.Ib=0;a.Kb=0;a.Ha=0;a.Z=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.fb=0;a.w=0;a.I=null;a.g&&(dc(a),a.Hc=Ub(a.g))}function dc(a){a.ka?(a.V=65536,a.Eb=a.Ha&16?4186112:253952,a.R=a.Fc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ha&16?22:18)):(a.V=0,a.Eb=57344,a.R=a.Ec,a.Y=a.ec,a.Bb=a.jc,Fb(a.g,16))}
+function cc(a,b){b&=-3073;if(a.aa!=b){b&57344&&!(a.aa&57344)&&(a.Ib=a.w>>16&65535,a.Kb=a.w&65535);a.aa=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,dc(a))}}h.Zb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Tb(this.g));return a.data()};
+h.restore=function(a){var b=a[1];this.ya=b[1];Dc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.I?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)}
+function Pc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Rc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Sc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}
+function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=ec(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.Z|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);fc(a,g&-12289|a.Oa>>2&12288);Tc(a,a.Oa,e);Tc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Uc(a){var b=Vc(a),c=Vc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);fc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ha&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
+function Wc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Eb),f;d=b>>13;a.Ha&a.Jc[a.v]||(d&=7);e=a.J[a.v][d];f=(a.da[a.v][d]<<6)+(b&8191)&a.$a;3932160<=f&&(f=Ob(a,f));if(a.sa)return f;f>=a.Hc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&
+(g|=16384));a.J[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.aa&57344||(g|=a.aa&4096|a.mb<<5|a.nb<<1,cc(a,a.aa&-61695|g&61694)),J(a,168,64,-1)),a.aa&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.aa|=4096,a.aa&512&&(a.u|=64)));return f}function Vc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Tc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Da(4,-2,d);a.Bb(d,b)}
+function Xc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Da(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Da(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Da(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,6==c&&a.Da(d,0,
+e),a.a-=6,e|g;case 7:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Bc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Cc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.Z|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.ec(Wc(this,a,2));this.sa--;return a};
+h.kb=function(a,b){this.ka?(this.sa++,a=Wc(this,a,5),a&1&&this.a--,Rb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.jc(Wc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Ec=function(a,b,c){return Xc(this,a,b,c)};h.Fc=function(a,b,c){return Wc(this,Xc(this,a,b,c),c)};h.ec=function(a){return Qb(this.g,this.fb=a)};h.Pd=function(a){return Qb(this.g,this.fb=Wc(this,a,2))};h.jc=function(a,b){Sb(this.g,this.fb=a,b&65535)};h.Ne=function(a,b){Sb(this.g,this.fb=Wc(this,a,4),b)};
+function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Zc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Wc(a,e|c&65536,4),a.v=a.F>>14&3,Sb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
+function $c(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.Yb;return a}function ad(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Qb(a.g,a.R(b,c,2)):a.f[c+a.tb]}function bd(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xc(a,b,c,8)}function cd(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function dd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Qb(a.g,a.R(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.Fb=a.R(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Rb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.R(b,e,6),Sb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Qb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
+function ed(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Rb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function fd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,d,4),Sb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
+h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.I&&this.I.Ua>d?this.I:null;e&&(c=e.Ud,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Nc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&bc(this,e),a=!0);this.I||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Oc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Mc(this))}while(0>1|b<<16;Rc(this,a);return a&65535}
+function ld(a,b){a=b&128|b>>1|b<<8;Rc(this,a<<8);return a&255}function md(a,b){a=b&~a;R(this,a);return a}function nd(a,b){a=b&~a;R(this,a<<8);return a}function od(a,b){a|=b;R(this,a);return a}function pd(a,b){a|=b;R(this,a<<8);return a}function qd(a,b){a=~b|65536;Pc(this,a);return a&65535}function rd(a,b){a=~b|256;Pc(this,a<<8);return a&255}function sd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
+function td(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function ud(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function vd(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function wd(a,b){a=-b;Pc(this,a,a&b&32768);return a&65535}function xd(a,b){a=-b;Pc(this,a<<8,(a&b&128)<<8);return a&255}function yd(a,b){a=b<<1|this.m>>16&1;Rc(this,a);return a&65535}
+function zd(a,b){a=b<<1|this.m>>16&1;Rc(this,a<<8);return a&255}function Ad(a,b){a=(this.m&65536|b)>>1|b<<16;Rc(this,a);return a&65535}function Bd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Rc(this,a<<8);return a&255}function Cd(a,b){var c=b-a;Sc(this,c,a,b);return c&65535}function Dd(a,b){var c=b-a;Sc(this,c<<8,a<<8,b<<8);return c&255}function Ed(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Fd(a,b){a^=b;R(this,a);return a&65535}
+function Gd(a){T(this,a,ad(this,a),gd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Hd(a){var b=dd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
+function Id(a){var b=dd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Jd(a){V(this,a,!P(this))}function Kd(a){V(this,a,P(this))}
+function Ld(a){T(this,a,ad(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,$c(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Nd(a){T(this,a,ad(this,a),od);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Od(a){S(this,a,$c(this,a),pd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}
+function Pd(a){var b=ad(this,a);a=dd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Qd(a){var b=$c(this,a);a=cd(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Rd(a){V(this,a,this.i&65535?0:4)}function Sd(a){V(this,a,!Lc(this)==!(this.h&32768))}function Td(a){V(this,a,!!(this.i&65535)&&!Lc(this)==!(this.h&32768))}
+function Ud(a){V(this,a,!P(this)&&!!(this.i&65535))}function Vd(a){V(this,a,(this.i&65535?0:4)||!Lc(this)!=!(this.h&32768))}function Wd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Xd(a){V(this,a,!Lc(this)!=!(this.h&32768))}function Yd(a){V(this,a,Lc(this))}function Zd(a){V(this,a,!!(this.i&65535))}function $d(a){V(this,a,!Lc(this))}function ae(){J(this,12,0,-8);this.a-=5}function be(a){V(this,a,!0)}function ce(a){V(this,a,!(this.h&32768))}function de(a){V(this,a,this.h&32768?2:0)}
+function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ee(a){var b=ad(this,a);a=dd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Sc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function fe(a){var b=$c(this,a);a=cd(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Sc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}
+function ge(a){var b=dd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=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.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function he(){J(this,24,0,-8);this.a-=25}
+function ie(){this.F&49152?(this.Z|=128,J(this,4,0,-7)):(this.B&&1120==this.Ta&&this.B.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function je(){J(this,16,0,-8);this.a-=25}var ke=[0,7,7,10,7,11,9,13];function le(a){this.K=this.a;Q(this,bd(this,a));this.a=this.K-ke[this.c]}var me=[0,14,14,17,14,18,16,20];function ne(a){this.K=this.a;var b=bd(this,a);a=a>>6&7;Tc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.K-me[this.c]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
+function pe(a){var b=ad(this,a);this.K=this.a;R(this,fd(this,a,b));this.a=this.K-oe[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function qe(a){var b=$c(this,a);R(this,ed(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var re=[7,13,13,17,14,18,17,21];
+function se(a){var b=dd(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.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ye(a){T(this,a,ad(this,a),Cd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function ze(a){T(this,a,0,Ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Ae(){J(this,28,0,-8);this.a-=5}
+function Be(){this.B&&(this.B.ja=this.f[7],this.B.setData(this.f[0],!0));this.u|=8;Nc(this,-2);this.a-=3}function Ce(a){T(this,a,this.f[(a>>6&7)+this.tb],Fd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Ic(a){De[a>>12].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 Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a&15].call(this,a)}function Oe(a){Pe[a>>6&3].call(this,a)}
+function Qe(a){Re[a>>6&3].call(this,a)}function Se(a){Te[a>>6&3].call(this,a)}
+var De=[function(a){Ue[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,Gd,Y,function(a){Ve[a>>8&15].call(this,a)},qe,fe,Qd,Md,Od,ye,Y],Ue=[function(a){We[a>>4&15].call(this,a)},be,Zd,Rd,Sd,Xd,Td,Vd,ne,ne,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Pc(this,fd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,
+wd);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=dd(this,a);Pc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Je=[function(a){T(this,a,0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)}],
+We=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,le,le,le,le,ve,Y,Ke,Me,ze,ze,ze,ze],Xe=[ie,Be,we,ae,je,ue,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Le=[te,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ne=[te,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ve=[$d,Yd,Ud,Wd,ce,de,Jd,Kd,he,Ae,Oe,Qe,Se,Y,Y,Y],Pe=[function(a){Pc(this,
+ed(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){S(this,a,0,xd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cd(this,a);Pc(this,a<<8);this.a-=this.c?4:3+(7==
+this.b?2:0)}],Te=[function(a){S(this,a,0,Bd);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,ld);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Jc(a){Ye[a>>12].call(this,a)}
+var Ye=[function(a){Ze[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,Gd,function(a){$e[a>>8&15].call(this,a)},function(a){af[a>>8&15].call(this,a)},qe,fe,Qd,Md,Od,ye,Y],Ze=[function(a){bf[a>>4&15].call(this,a)},be,Zd,Rd,Sd,Xd,Td,Vd,ne,ne,Ee,Ge,Ie,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yc(this,a,0);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=
+this.a;Zc(this,a,0,b);R(this,b);this.a=this.K-re[this.c]},function(a){R(this,fd(this,a,Lc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],bf=[function(a){df[a&15].call(this,a)},Y,Y,Y,le,le,le,le,ve,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ke,Me,ze,ze,ze,ze],df=[ie,Be,function(){Uc(this);this.u|=this.F&16;this.a-=13},ae,je,ue,we,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],$e=[se,se,ge,ge,Hd,Hd,Id,Id,Ce,Ce,Y,Y,Y,Y,xe,xe],af=[$d,
+Yd,Ud,Wd,ce,de,Jd,Kd,he,Ae,Oe,Qe,Se,function(a){ef[a>>6&3].call(this,a)},Y,Y],ef=[Y,function(a){a=Yc(this,a,65536);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=this.a;Zc(this,a,65536,b);R(this,b);this.a=this.K-re[this.c]},Y];
+function ff(a){x.call(this,"ROM",a,ff,128);this.ca=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.N,c.ca=a.ca):c.l=null);gf(c)})}}z(ff);h=ff.prototype;
+h.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;gf(this)};h.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.i,this.b,this.ca),delete this.ca);return!0};h.ha=function(){return!0};
+function gf(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+ka(a.c.length,8,!0)+") does not match specified size ("+ka(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[ff.prototype.Dd,ff.prototype.Be,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,mc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=m.Sb&&c<=m.wc&&(b=c-(m.Sb-m.kc));b&&(a.preventDefault&&a.preventDefault(),d.xb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.mc&&(b=m.lc);d.xb(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&
a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.xb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
-h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=Yb(48,4,262144);this.P=Vb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.U&&97<=a&&122>a&&(a-=32),Xb(e.a,e.P,1E3/Math.round(e.H/10)));0<=a&&(e.A=a,e.b&128?e.A|=49152:e.b|=128,e.b&64&&Wb(c,e.V))});this.C=Yb(52,4,262144);this.la=Vb(this.a,function(){e.c|=128;e.c&64&&Wb(c,e.C)});fb(b,this,lf);hb(b,this.reset.bind(this));E(this)};
-h.dc=function(){if(!this.v){var a=xc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(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.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.dc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
-h.ga=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.A=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.L||8,c=a-this.m%a,this.L&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a||
-1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Xb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var nf={},lf=(nf[65392]=[null,null,Z.prototype.td,Z.prototype.re,"RCSR"],nf[65394]=[null,null,Z.prototype.sd,Z.prototype.qe,"RBUF"],nf[65396]=[null,null,Z.prototype.Ud,Z.prototype.Se,"XCSR"],nf[65398]=[null,null,Z.prototype.Td,Z.prototype.Re,"XBUF"],nf);
-Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
-function(){var a=d.j.listTapes;a&&qf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[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;qf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
-h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.P=rf(a);var e=this;if((this.c=xc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.K=Yb(56,4,4096);this.V=Vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.Ac.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!t(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.R;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Af(a,b,c,d,e.M,e.na,e.ma));
-a.o.Fa=!1;a.m&&(a.m--,a.m||E(a));xf(a)})}function uf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.O);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f,
-null,!0,function(b,c,d){Hf(a,b,c,d)})}
-function Hf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
-c+")");if(k.length)if(1==k.length)w(k[0]);else{a.O=k.length;a.S=k[0].length;a.N=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,Aa=v.length;Aa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ea?f=a.pa+a.ea&&(a.ea+=f-(a.pa+a.ea)+1):(a.pa=f,a.ea=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+
-b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.D("Unable to restore disk '"+this.oa+": "+c);return b};
-h.toJSON=function(){var a;a=0;for(var b;b=Kf(this,a++);)Nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
-function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.A=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
-h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]=
-c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[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;Pf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
-h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.Ra=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)};
-h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()};
-h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)}
-function Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.D("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
-h.tc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)};
-function Sf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.B|=49152);return!0};
-h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};
-h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=1024;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};h.yd=function(){return this.w};h.we=function(){};h.zd=function(){return this.i};h.xe=function(){};h.vd=function(){return this.B&61438};
-h.te=function(a){this.B=this.B&-3968|a&3967;if(this.B&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.B&=-129;switch(this.B&14){case 0:this.w=d.status;this.i=0;this.B=128;this.b=0;break;case 4:b=this.uc;case 2:b||(b=this.vc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.O?(this.i|=32832,this.B|=49152):g>=d.N?(this.i|=32800,this.B|=49152):(k=(this.B&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.sc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.B&=
--2,this.B|=128,this.B&64&&Wb(this.a,this.Ra))}};h.Ad=function(){return this.s};h.ye=function(a){this.s=a};h.ud=function(){return this.h};h.se=function(a){this.h=a};h.wd=function(){return this.b};h.ue=function(a){this.b=a};h.xd=function(){return this.C};h.ve=function(a){this.C=a};
-var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.yd,N.prototype.we,"RKDS"],Wf[65282]=[null,null,N.prototype.zd,N.prototype.xe,"RKER"],Wf[65284]=[null,null,N.prototype.vd,N.prototype.te,"RKCS"],Wf[65286]=[null,null,N.prototype.Ad,N.prototype.ye,"RKWC"],Wf[65288]=[null,null,N.prototype.ud,N.prototype.se,"RKBA"],Wf[65290]=[null,null,N.prototype.wd,N.prototype.ue,"RKDA"],Wf[65294]=[null,null,N.prototype.xd,N.prototype.ve,"RKDB"],Wf);
-function M(a){x.call(this,"RL11",a,M,131072);this.A=a.autoMount||{};this.s=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
-h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]=
-c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[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;Yf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
-h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.Ra=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.w&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)};
-h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()};
-h.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.s=0);for(var c in a.A){var d=a.A[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)}
-function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.D("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.s++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.xc)&&g++));return g}
-h.xc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)};
-function ag(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.v=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.B=this.B|a|32768);return!0};
-h.yc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};
-h.zc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=8192;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Dd=function(){return this.B&65535};
-h.Be=function(a){this.B=this.B&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.B&128)){var b;a=!0;var c=this.c[(this.B&768)>>8],d,e,f,g;this.B&=-2;switch(this.B&14){case 4:this.b&8&&(this.B&=63);this.m=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.yc;case 10:b||(b=this.zc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.O||f>=c.N?this.B|=37888:(g=(this.v&
-63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.wc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.Ra))}};h.Bd=function(){return this.h};h.ze=function(a){this.h=a&65534};h.Ed=function(){return this.b};h.Ce=function(a){this.b=a};h.Fd=function(){return this.m};h.De=function(a){this.m=a};h.Cd=function(){return this.v};h.Ae=function(a){this.v=a&63};
-var eg={},$f=(eg[63744]=[null,null,M.prototype.Dd,M.prototype.Be,"RLCS"],eg[63746]=[null,null,M.prototype.Bd,M.prototype.ze,"RLBA"],eg[63748]=[null,null,M.prototype.Ed,M.prototype.Ce,"RLDA"],eg[63750]=[null,null,M.prototype.Fd,M.prototype.De,"RLMP"],eg[63752]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLBE"],eg);
-function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.w=xc(this,"autoPower",a);this.l=0;this.P=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.K=!1;this.U=xc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.P},this.a,this.G);var d,e=A(this.id);if((this.A=Wa("Panel",this.id))&&this.A.gb)for(b=0;b\nLicense: GPL version 3 or later ");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.s)){this.h=new O(this,"1.30.5","failsafe");jg(this.h)&&(og(this,d),a=2,pg(this.h));this.h.set("timestamp",sa());qg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"==
-f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.X(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.fb());this.H&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
-function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.U;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
-function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&F(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;la&&(a-=32),Zb(e.a,e.M,1E3/Math.round(e.H/10)));0<=a&&(e.B=a,e.b&128?e.B|=49152:e.b|=128,e.b&64&&Yb(c,e.V))});this.C=$b(52,4,262144);this.la=Xb(this.a,function(){e.c|=128;e.c&64&&Yb(c,e.C)});fb(b,this,nf);hb(b,this.reset.bind(this));E(this)};
+h.bc=function(){if(!this.v){var a=zc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(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.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ia=function(a,b){if(!b)if(this.bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
+h.ha=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.B=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.m%a,this.K&&(b=" ".slice(0,c)));this.I&&!this.m&&c&&(b=String.fromCharCode(this.I)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a||
+1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Zb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var pf={},nf=(pf[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],pf[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],pf[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],pf[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],pf);
+Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
+function(){var a=d.j.listTapes;a&&sf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[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;sf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
+h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.M=tf(a);var e=this;if((this.c=zc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.I=$b(56,4,4096);this.V=Xb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.Bc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!t(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.S;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Cf(a,b,c,d,e.N,e.na,e.ma));
+a.o.Ia=!1;a.m&&(a.m--,a.m||E(a));zf(a)})}function wf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.P);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f,
+null,!0,function(b,c,d){Jf(a,b,c,d)})}
+function Jf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.S;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
+c+")");if(k.length)if(1==k.length)w(k[0]);else{a.P=k.length;a.T=k[0].length;a.O=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,Aa=v.length;Aa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.fa?f=a.pa+a.fa&&(a.fa+=f-(a.pa+a.fa)+1):(a.pa=f,a.fa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+
+b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.D("Unable to restore disk '"+this.oa+": "+c);return b};
+h.toJSON=function(){var a;a=0;for(var b;b=Mf(this,a++);)Pf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
+function Pf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.B=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
+h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Qf(d,a)},!0;case "loadDrive":return this.j[b]=
+c,c.onclick=function(){var a=d.j.listDisks;a&&Rf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[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;Rf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
+h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=zc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Sf(this);this.Ra=$b(144,5,65536);fb(b,this,Tf);hb(b,this.reset.bind(this));Uf(this,"None","",!0);this.B&&Uf(this,"Local Disk","?");Uf(this,"Remote Disk","??");Vf(this)||E(this)};
+h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Qf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Sf(this)};h.save=function(){return(new O(this)).data()};
+h.restore=function(a){return Sf(this,a[0])};function Vf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Xf(a,e,b,c,!1,d)}else Wf(a,e)}
+function Xf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,Wf(a,b,!0),k.Ka?a.D("RK11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.m++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.pc)&&g++));return g}
+h.pc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.m||E(this));Qf(this,a.La)};
+function Uf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.A|=49152);return!0};
+h.qc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Wb(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};
+h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Wb(this.g)){k=1024;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};h.vd=function(){return this.w};h.te=function(){};h.wd=function(){return this.i};h.ue=function(){};h.sd=function(){return this.A&61438};
+h.qe=function(a){this.A=this.A&-3968|a&3967;if(this.A&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.A&=-129;switch(this.A&14){case 0:this.w=d.status;this.i=0;this.A=128;this.b=0;break;case 4:b=this.qc;case 2:b||(b=this.rc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.P?(this.i|=32832,this.A|=49152):g>=d.O?(this.i|=32800,this.A|=49152):(k=(this.A&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.oc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.A&=
+-2,this.A|=128,this.A&64&&Yb(this.a,this.Ra))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a};
+var Yf={},Tf=(Yf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Yf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Yf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Yf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Yf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Yf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Yf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Yf);
+function M(a){x.call(this,"RL11",a,M,131072);this.B=a.autoMount||{};this.v=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
+h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Zf(d,a)},!0;case "loadDrive":return this.j[b]=
+c,c.onclick=function(){var a=d.j.listDisks;a&&$f(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[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;$f(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
+h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=zc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.B[e]=a[e]);ag(this);this.Ra=$b(112,5,131072);fb(b,this,bg);hb(b,this.reset.bind(this));cg(this,"None","",!0);this.w&&cg(this,"Local Disk","?");cg(this,"Remote Disk","??");dg(this)||E(this)};
+h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Zf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){ag(this)};h.save=function(){return(new O(this)).data()};
+h.restore=function(a){return ag(this,a[0])};function dg(a,b){b||(a.v=0);for(var c in a.B){var d=a.B[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}fg(a,e,b,c,!1,d)}else eg(a,e)}
+function fg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,eg(a,b,!0),k.Ka?a.D("RL11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.v++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
+h.tc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.v||E(this));Zf(this,a.La)};
+function cg(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.m=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.s=65536-e&65535;a&&(this.A=this.A|a|32768);return!0};
+h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Wb(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};
+h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Wb(this.g)){k=8192;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Ad=function(){return this.A&65535};
+h.ye=function(a){this.A=this.A&-1023|a&1022;this.m=this.m&60|(a&48)>>4;if(!(this.A&128)){var b;a=!0;var c=this.c[(this.A&768)>>8],d,e,f,g;this.A&=-2;switch(this.A&14){case 4:this.b&8&&(this.A&=63);this.s=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.uc;case 10:b||(b=this.vc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.P||f>=c.O?this.A|=37888:(g=(this.m&
+63)<<16|this.h,a=65536-this.s&65535,a=b.call(this,c,d,e,f,a,g,this.sc.bind(this)))}a&&(this.A|=129,this.A&64&&Yb(this.a,this.Ra))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.s};h.Ae=function(a){this.s=a};h.zd=function(){return this.m};h.xe=function(a){this.m=a&63;this.A=this.A&-49|(this.m&3)<<4};
+var gg={},bg=(gg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],gg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],gg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],gg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],gg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],gg);
+function hg(a,b,c){x.call(this,"Computer",a,hg,33554432);this.o.S=!1;ig(this,b);this.w=zc(this,"autoPower",a);this.l=0;this.M=a.busWidth||a.buswidth;this.b=jg;this.s=null;this.i=this.I=!1;this.R=zc(this,"url")||"";(Math.random()+.1).toString(36);this.c=kg(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.M},this.a,this.G);var d,e=A(this.id);if((this.B=Wa("Panel",this.id))&&this.B.hb)for(b=0;b\nLicense: GPL version 3 or later ");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bjg){if(lg(d,this.s)){this.h=new O(this,"1.30.5","failsafe");lg(this.h)&&(qg(this,d),a=2,rg(this.h));this.h.set("timestamp",sa());sg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=pg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?lg(d,g):("error"==
+f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.X(f+": "+g),rg(d),lg(d)?(c=pg(d),e=!0):c=!1))}e&&og(this,c?d:null)}else 2==a&&d.clear()}else og(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.V=!0;this.o.S=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(vg(this,this.a,b,c,a),this.Ba(),this.a.gb());this.H&&(qg(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
+function qg(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.5"};d.url=a.R;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
+function wg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ha&&(c&&F(a.a),d=a.a.ha(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.S=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l=c||30<=(b.Db+=c))&&(d.textContent=b.o.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.A&&(b=this.A,a=a||0,b.v)){c=b.a.o.T;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e=c||30<=(b.Db+=c))&&(d.textContent=b.o.U?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.B&&(b=this.B,a=a||0,b.v)){c=b.a.o.U;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;ef.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"),
-a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");t(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
-"");a=a.replace(d[0],g);Bg(a,b,c)}})}else c(a,null)}
-function Cg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--yg||La(!0));l=!1}var g,k,l=!0;yg++;Ta[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
-(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?zg(c,null,null,!1,e,function(d,l){l?(Ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--yg||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--yg||La(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?zg(b,a,d,!0,e,n):Ag(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return l}window.embedPDP11=function(a,b,c,d){La(!1);return Cg(a,b,c,d)};window.enableEvents=La;window.sendEvent=Ma;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11.map
+h.ba=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.l||(d.o.S?wg(d,!1,!0):ng(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.S&&!d.l)if(d.b&&!d.m){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");wg(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Lb=!0),d.ib(jg),d.Lb=!1)}else d.reset(),d.a&&d.a.gb()},!0;case "save":if(ma(ua(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
+c,c.onclick=function(){var a=kg(d,!0);if(a){var b=!!(d.b&&!d.m||d.C),c=wg(d,b);b?xg(d,a,c):d.D("Resume disabled, machine state not saved")}},!0}return!1};
+function kg(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=yg(a,c))||a.D("The user ID is invalid.")):b&&a.D("Browser local storage is not available"));return c}
+function yg(a,b){a.c=null;b=t(ua()+"/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){w(d.message+" ("+c+")")}return a.c}function mg(a){var b=null;a.c&&(b=ua()+"/api/v1/user?req=load&user="+a.c+"&state="+zg(a,"1.30.5"));return b}
+function xg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=zg(a,"1.30.5");d.data=c;b=t(ua()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"),
+a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");t(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
+"");a=a.replace(d[0],g);Dg(a,b,c)}})}else c(a,null)}
+function Eg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Ag||La(!0));l=!1}var g,k,l=!0;Ag++;Ta[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
+(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?Bg(c,null,null,!1,e,function(d,l){l?(Ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Ag||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ag||La(!0)):f("invalid machine element: "+
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Bg(b,a,d,!0,e,n):Cg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return l}window.embedPDP11=function(a,b,c,d){La(!1);return Eg(a,b,c,d)};window.enableEvents=La;window.sendEvent=Ma;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11.map