From 0cf11c0b012384a3f4fbd7113df7255bb7c777f4 Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 4 Nov 2016 17:09:50 -0700 Subject: [PATCH] Fixed the memory clear "toggle-in", by returning the correct amount of installed RAM, and passing properly masked addresses to all the I/O handlers --- .../machine/1170/panel/debugger/README.md | 18 +- modules/pdp11/lib/bus.js | 95 +++- modules/pdp11/lib/cpustate.js | 32 +- modules/pdp11/lib/debugger.js | 103 ++-- modules/pdp11/lib/defines.js | 2 +- modules/pdp11/lib/device.js | 14 +- versions/pdpjs/1.30.3/pdp11-dbg.js | 492 +++++++++--------- versions/pdpjs/1.30.3/pdp11.js | 360 ++++++------- 8 files changed, 605 insertions(+), 511 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index e4a2e7faf..91dfa2d21 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -186,7 +186,7 @@ If you also want to see all the hardware register activity, use the Debugger's " 17772262 021311 CMP (R3),(R1) ; Top of Memory? 17772264 003402 BLE 2$ 17772266 005000 CLR R0 ; Start at Virtual Address 0 - 17772270 000776 BR 1$ + 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --@jeffpar] 17772272 005312 2$: DEC (R2) ; Disable Relocation 17772274 000000 HLT @@ -208,7 +208,7 @@ The above "toggle-in" can be entered with the PDPjs Debugger as follows: e 17777706 177676; e 17777776 000000; e 17772240 012714 000020 005212 010520 020027 017776 003774 062711; - e 17772260 000200 021311 003402 005000 000776 005312 000000; + e 17772260 000200 021311 003402 005000 000766 005312 000000; r pc 172240 which should produce the following results when Bus messages are turned on ("m bus on"): @@ -268,7 +268,7 @@ which should produce the following results when Bus messages are turned on ("m b SIPAR6.writeWord(00017772254,003774) changing 00017772256 to 062711 SIPAR7.writeWord(00017772256,062711) - >> e 17772260 000200 021311 003402 005000 000776 005312 000000 + >> e 17772260 000200 021311 003402 005000 000766 005312 000000 changing 00017772260 to 000200 SDPAR0.writeWord(00017772260,000200) changing 00017772262 to 021311 @@ -277,8 +277,8 @@ which should produce the following results when Bus messages are turned on ("m b SDPAR2.writeWord(00017772264,003402) changing 00017772266 to 005000 SDPAR3.writeWord(00017772266,005000) - changing 00017772270 to 000776 - SDPAR4.writeWord(00017772270,000776) + changing 00017772270 to 000766 + SDPAR4.writeWord(00017772270,000766) changing 00017772272 to 005312 SDPAR5.writeWord(00017772272,005312) changing 00017772274 to 000000 @@ -309,3 +309,11 @@ As the **Maintenance Service Guide** goes on to say: Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will slow execution to a crawl. + +If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address, +not one of the physical (22-bit) addresses shown above. For example, to break on this instruction: + + 17772256 062711 ADD #200,(R1) ; Step Page + +use the command "bp 172256", because while the code *is* physically located at 17772256, it is being executed at virtual +address 172256, and execution breakpoints operate on virtual addresses. diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index a69972c09..a72eb5dca 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -94,7 +94,7 @@ function BusPDP11(parmsBus, cpu, dbg) * as a result, our IOController functions assume that all incoming offsets are within a single 8Kb block. */ this.addrTotal = 1 << this.nBusWidth; - this.nBusLimit = this.nBusMask = (this.addrTotal - 1); + this.nBusMask = (this.addrTotal - 1); this.nBlockSize = BusPDP11.IOPAGE_LENGTH; this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2) this.nBlockLen = this.nBlockSize >> 2; @@ -135,6 +135,7 @@ function BusPDP11(parmsBus, cpu, dbg) this.fIOBreakAll = false; this.nDisableFaults = 0; this.fFault = false; + this.cbRAM = 0; /* * Array of RESET notification handlers registered by Device components. @@ -242,21 +243,28 @@ BusPDP11.IOController = { var b = -1; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { - b = afn[BusPDP11.IOHANDLER.READ_BYTE](addr); + b = afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked); } else if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - if (!(addr & 0x1)) { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr) & 0xff; + if (!(addrMasked & 0x1)) { + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked) & 0xff; } else { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked & ~0x1) >> 8; } } - } else if (addr & 0x1) { + } else if (addrMasked & 0x1) { afn = bus.aIOHandlers[off & ~0x1]; if (afn) { if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked & ~0x1) >> 8; } } } @@ -288,12 +296,19 @@ BusPDP11.IOController = { var fWrite = false; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { /* * If a writeByte() handler exists, call it; we're done. */ if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { - afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addr); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addrMasked); fWrite = true; } /* @@ -306,15 +321,15 @@ BusPDP11.IOController = { */ else if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; - if (!(addr & 0x1)) { - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addr); + if (!(addrMasked & 0x1)) { + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addrMasked); fWrite = true; } else { - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr & ~0x1); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addrMasked & ~0x1); fWrite = true; } } - } else if (addr & 0x1) { + } else if (addrMasked & 0x1) { /* * If no handler existed, and this address was odd, then perhaps a handler exists for the even address; * if so, call the readWord() handler first to get the original data, then call writeWord() with the new @@ -327,9 +342,9 @@ BusPDP11.IOController = { afn = bus.aIOHandlers[off & ~0x1]; if (afn) { if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { - addr &= ~0x1; + addrMasked &= ~0x1; w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addrMasked); fWrite = true; } } @@ -359,11 +374,18 @@ BusPDP11.IOController = { var w = -1; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - w = afn[BusPDP11.IOHANDLER.READ_WORD](addr); + w = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked); } else if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { - w = afn[BusPDP11.IOHANDLER.READ_BYTE](addr) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addr + 1) << 8); + w = afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked + 1) << 8); } } if (w >= 0) { @@ -393,13 +415,20 @@ BusPDP11.IOController = { var fWrite = false; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { - afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addr); + afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addrMasked); fWrite = true; } else if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { - afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addr); - afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addr + 1); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addrMasked); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addrMasked + 1); fWrite = true; } } @@ -458,7 +487,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) if (nRange) { this.nIOPageRange = nRange; addr = (1 << nRange); - this.nBusLimit = this.nBusMask = (addr - 1); + this.nBusMask = (addr - 1); addr -= BusPDP11.IOPAGE_LENGTH; this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); if (this.aIOPageBlocks) { @@ -633,6 +662,9 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) } if (sizeLeft <= 0) { + if (type == MemoryPDP11.TYPE.RAM && !this.cbRAM) { + this.cbRAM += size; + } this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); return true; } @@ -1203,6 +1235,27 @@ BusPDP11.prototype.restoreMemory = function(a) return true; }; +/** + * getMemorySize(type) + * + * NOTE: The original pdp11.js defined MAX_MEMORY as IOBASE_UNIBUS - 16384, where IOBASE_UNIBUS + * is 4Mb less 256Kb, and then subtracted another 16Kb so that BSD 2.9 could boot. + * + * @this {BusPDP11} + * @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported) + * @return {number} (size of initial allocation, in bytes) + */ +BusPDP11.prototype.getMemorySize = function(type) +{ + var cb = 0; + switch(type) { + case MemoryPDP11.TYPE.RAM: + cb = this.cbRAM; + break; + } + return cb; +}; + /** * addIOHandlers(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName) * @@ -1331,7 +1384,7 @@ BusPDP11.prototype.fault = function(addr, err, access) * @this {BusPDP11} * @return {boolean} */ -BusPDP11.prototype.checkFault= function() +BusPDP11.prototype.checkFault = function() { var f = this.fFault; this.fFault = false; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index c735f81ef..80cc6358b 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -278,6 +278,9 @@ CPUStatePDP11.prototype.setMemoryAccess = function() /** * getMMR0() * + * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 + * nonr leng read trap unus unus ena mnt cmp -mode- i/d --page-- enable + * * @this {CPUStatePDP11} * @return {number} */ @@ -1257,6 +1260,11 @@ CPUStatePDP11.prototype.getTrapStatus = function() * address are added to 22 bits of the selected mapping register to produce the 22-bit physical address. The lowest * order bit of all mapping registers is always a zero, since relocation is always on word boundaries. * + * Sadly, because these mappings occur at a word-granular level, we can't implement the mappings by simply shuffling + * the underlying block around in the Bus component; it would be much more efficient if we could. That's EXACTLY how + * we move the IOPAGE in response to addressing changes. If it turns out that block-granular addresses are commonly + * stored in the unibusMap registers, we could add code to detect that and perform block remapping in those cases. + * * @this {CPUStatePDP11} * @param {number} addr * @return {number} @@ -1295,15 +1303,33 @@ CPUStatePDP11.prototype.mapUnibus = function(addr) * it again if all worked. If however something happens to cause a trap then no restore is * done as setPSW() will have been invoked as part of the trap, which will resynchronize mmuMode. * - * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 & above) + * A PDP-11/70 is different from other PDP-11s in that the highest 18 bit space (017000000 & above) * maps directly to UNIBUS space - including low memory. This doesn't appear to be particularly * useful as it restricts maximum system memory - although it does appear to allow software * testing of the unibus map. This feature also appears to confuse some OSes which test consecutive * memory locations to find maximum memory -- and on a full memory system find themselves accessing * low memory again at high addresses. * - * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 - * nonr leng read trap unus unus ena mnt cmp -mode- i/d --page-- enable + * Construction of a Physical Address + * ---------------------------------- + * + * Virtual Addr (VA) 12 11 10 9 8 7 6 5 4 3 2 1 0 + * Page Addr Field (PAF) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + * + ----------------------------------------------------------------- + * Physical Addr (PA) 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + * + * The Page Address Field (PAF) comes from a Page Address Register (PAR) that is selected by Virtual Address (VA) + * bits 15-13. You can see from the above alignments that the VA contributes to the low 13 bits, providing an 8Kb + * range. + * + * VA bits 0-5 pass directly through to the PA; those are also called the DIB (Displacement in Block) bits. + * VA bits 6-12 are added to the low 7 bits of the PAF and are also called the BN (Block Number) bits. + * + * You can also think of the entire PAF as a block number, where each block is 64 bytes. This is consistent with + * the LSIZE register at 177760, which is supposed to contain the number of 64-byte blocks of memory installed. + * + * Note that if a PAR is initialized to zero, successively adding 0200 (0x80) to the PAR will advance the base + * physical address to the next 8Kb page. * * @this {CPUStatePDP11} * @param {number} virtualAddress diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index c6447a1af..f5be91339 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -770,7 +770,7 @@ if (DEBUGGER) { * done later, by getAddr(), which returns PDP11.ADDR_INVALID for invalid segments, out-of-range offsets, * etc. The Debugger's low-level get/set memory functions verify all getAddr() results, but even if an * invalid address is passed through to the Bus memory interfaces, the address will simply be masked with - * BusPDP11.nBusLimit; in the case of PDP11.ADDR_INVALID, that will generally refer to the top of the physical + * bus.nBusMask; in the case of PDP11.ADDR_INVALID, that will generally refer to the top of the physical * address space. * * @this {DebuggerPDP11} @@ -2013,64 +2013,59 @@ if (DEBUGGER) { if (fTemporary && !dbgAddrBreak.fTemporary) continue; /* - * We used to calculate the linear address of the breakpoint at the time the - * breakpoint was added, so that a breakpoint set in one mode (eg, in real-mode) - * would still work as intended if the mode changed later (eg, to protected-mode). - * - * However, that created difficulties setting protected-mode breakpoints in segments - * that might not be defined yet, or that could move in physical memory. - * - * If you want to create a real-mode breakpoint that will break regardless of mode, - * use the physical address of the real-mode memory location instead. + * Since we're checking an execution address, which is always virtual, and virtual + * addresses are always restricted to 16 bits, let's mask the breakpoint address to match + * (the user should know better, but we'll be nice). */ - var addrBreak = this.getAddr(dbgAddrBreak); + var addrBreak = this.getAddr(dbgAddrBreak) & 0xffff; for (var n = 0; n < nb; n++) { - if (addr + n == addrBreak) { - var a; - fBreak = true; - if (dbgAddrBreak.fTemporary) { - this.findBreakpoint(aBreak, dbgAddrBreak, true, true); - fTemporary = true; - } - if (a = dbgAddrBreak.aCmds) { - /* - * When one or more commands are attached to a breakpoint, we don't halt by default. - * Instead, we set fBreak to true only if, at the completion of all the commands, the - * CPU is halted; in other words, you should include "h" as one of the breakpoint commands - * if you want the breakpoint to stop execution. - * - * Another useful command is "if", which will return false if the expression is false, - * at which point we'll jump ahead to the next "else" command, and if there isn't an "else", - * we abort. - */ - fBreak = false; - for (var j = 0; j < a.length; j++) { - if (!this.doCommand(a[j], true)) { - if (a[j].indexOf("if")) { - fBreak = true; // the failed command wasn't "if", so abort - break; - } - var k = j + 1; - for (; k < a.length; k++) { - if (!a[k].indexOf("else")) break; - j++; - } - if (k == a.length) { // couldn't find an "else" after the "if", so abort - fBreak = true; - break; - } - /* - * If we're still here, we'll execute the "else" command (which is just a no-op), - * followed by any remaining commands. - */ + + if ((addr + n) != addrBreak) continue; + + var a; + fBreak = true; + if (dbgAddrBreak.fTemporary) { + this.findBreakpoint(aBreak, dbgAddrBreak, true, true); + fTemporary = true; + } + if (a = dbgAddrBreak.aCmds) { + /* + * When one or more commands are attached to a breakpoint, we don't halt by default. + * Instead, we set fBreak to true only if, at the completion of all the commands, the + * CPU is halted; in other words, you should include "h" as one of the breakpoint commands + * if you want the breakpoint to stop execution. + * + * Another useful command is "if", which will return false if the expression is false, + * at which point we'll jump ahead to the next "else" command, and if there isn't an "else", + * we abort. + */ + fBreak = false; + for (var j = 0; j < a.length; j++) { + if (!this.doCommand(a[j], true)) { + if (a[j].indexOf("if")) { + fBreak = true; // the failed command wasn't "if", so abort + break; } + var k = j + 1; + for (; k < a.length; k++) { + if (!a[k].indexOf("else")) break; + j++; + } + if (k == a.length) { // couldn't find an "else" after the "if", so abort + fBreak = true; + break; + } + /* + * If we're still here, we'll execute the "else" command (which is just a no-op), + * followed by any remaining commands. + */ } - if (!this.cpu.isRunning()) fBreak = true; - } - if (fBreak) { - if (!fTemporary) this.printBreakpoint(aBreak, i, "hit"); - break; } + if (!this.cpu.isRunning()) fBreak = true; + } + if (fBreak) { + if (!fTemporary) this.printBreakpoint(aBreak, i, "hit"); + break; } } } diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 5822957da..acd6440cf 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -518,7 +518,7 @@ var PDP11 = { UNDEF1: 0o177754, UNDEF2: 0o177756, - LSIZE: 0o177760, // Lower Size Register (last 32-word block) (11/70 only) + LSIZE: 0o177760, // Lower Size Register (last 64-byte block #) (11/70 only) HSIZE: 0o177762, // Upper Size Register (always zero) (11/70 only) SYSID: 0o177764, // System ID Register (11/70 only) CPUERR: 0o177766, // CPU error (11/70 only) diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index a54bed8e1..a5a8f5fcf 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -38,6 +38,7 @@ if (NODE) { var Component = require("../../shared/lib/component"); var State = require("../../shared/lib/state"); var BusPDP11 = require("./bus"); + var MemoryPDP11 = require("./memory"); var MessagesPDP11 = require("./messages"); var PC11 = require("./pc11"); var RL11 = require("./rl11"); @@ -854,13 +855,24 @@ DevicePDP11.prototype.writeCTRL = function(data, addr) /** * readSIZE(addr) * + * We're adhering to DEC's documentation, which says: + * + * This read-only register specifies the memory size of the system. It is defined to indicate the + * last addressable block of 32 words in memory (bit 0 is equivalent to bit 6 of the Physical Address). + * + * Looking at the Memory Clear "toggle-in" code in /devices/pdp11/machine/1170/panel/debugger/README.md, the + * memory loop gives up when the block number stored in KIPAR0 is >= LSIZE, suggesting that LSIZE is actually + * the total number of 64-byte blocks, rather than the block number of the last block. But that code is + * not conclusive, since it writes 8192 bytes at a time rather than 64, so it doesn't really matter if LSIZE + * is off by one. + * * @this {DevicePDP11} * @param {number} addr (eg, PDP11.UNIBUS.LSIZE--HSIZE or 177760--177762) * @return {number} */ DevicePDP11.prototype.readSIZE = function(addr) { - return addr == PDP11.UNIBUS.LSIZE? ((BusPDP11.MAX_MEMORY >> 6) - 1) : 0; + return addr == PDP11.UNIBUS.LSIZE? ((this.bus.getMemorySize(MemoryPDP11.TYPE.RAM) >> 6) - 1) : 0; }; /** diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 4c459ac95..18f9d0a96 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -46,273 +46,273 @@ function Ga(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Qa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.rc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +function yb(a){u.call(this,"Panel",a,yb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=zb;this.C={};this.g={START:[1,!0,!1,this.cd],STEP:[1,!1,!1,this.dd],ENABLE:[1,!1,!1,this.Zc],CONT:[1,!0,!1,this.Xc],DEP:[0,!0,!1,this.Yc],EXAM:[1,!0,!1,this.$c],LOAD:[1,!0,!1,this.bd],TEST:[0,!0,!1,this.ad]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ga()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +k.fd=function(a){return(a?this.Va:this.v)&65535};k.$d=function(a){this.v=a};var hc={},Db=(hc[65400]=[null,null,yb.prototype.fd,yb.prototype.$d,"CNSW"],hc);function Hb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](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.Za[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function mc(a,b){var c=-1,d=this.controller;a=d.Za[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.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function nc(a,b,c){var d=!1,e=this.controller;a=e.Za[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.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} function qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].gc(a&this.w,a);this.la--;return a}; -k.oa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].hc(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Zb(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; -k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].lc(c,b&65535,a);this.la--}; -function yc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.qb};k.je=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; -k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.pe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.fa};k.$d=function(){this.b.fa=0};k.od=function(){return this.b.Ac}; -k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return Oc(this.b)};k.ne=function(a){Pc(this.b,a&-1809|Oc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.ld, -K.prototype.ee,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Pd, -K.prototype.Ge,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Xc(this,Tc?Yc:Zc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(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},wa: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.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.hc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); +function tc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){d!=wc||a.Ob||(a.Ob+=c);c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)}; +k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a};k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)}; +k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--};k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.ke=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Td=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Ke=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Md=function(a){return this.b.V[1][a>>1&7]};k.De=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Kd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Be=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ld=function(a){return this.b.xa[1][a>>1&7]};k.Ce=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Jd=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.Ae=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.ge=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.ee=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.fe=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.de=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Sd=function(a){return this.b.V[3][a>>1&7]};k.Je=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Qd=function(a){return this.b.V[3][(a>>1&7)+8]};k.He=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Rd=function(a){return this.b.xa[3][a>>1&7]};k.Ie=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Pd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ge=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.pe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.se=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.qe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.re=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.be=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Od=function(){return 1};k.Fe=function(){};k.gd=function(){return this.b.fa}; +k.ae=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.ie=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.le=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Nd=function(a){return a?this.b.fb&65280:0};k.Ee=function(a){this.b.fb=a|255};k.xd=function(){return Pc(this.b)};k.oe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Td,K.prototype.Ke,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Md,K.prototype.De,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Kd,K.prototype.Be,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.ge,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.ee,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, +K.prototype.fe,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.de,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.ke,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.he,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.je,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Sd,K.prototype.Je,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Qd, +K.prototype.He,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Pd,K.prototype.Ge,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.pe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.se,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.qe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.re,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.be,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Od,K.prototype.Fe,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.ae,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.pd,K.prototype.ie,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.le,"PIR"],M[65532]=[null,null,K.prototype.Nd,K.prototype.Ee,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.oe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Yc(this,Uc?Zc:$c);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(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},wa: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.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&cd(a,bd,!1),(a.B=c.B)&&ad(a,bd,!1))}function ed(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function ad(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function cd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Xc(a,b){b||(b=fd);cd(a,b,void 0);ad(a,b,void 0)} -var fd=[],$c=[I.prototype.S,I.prototype.wa,I.prototype.ca,I.prototype.Na],bd=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var Zc=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.lb],Yc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; -function gd(a,b){u.call(this,"CPU",a,gd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(gd);var hd=["power","reset"];k=gd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=nd(a)&&(a.yb=a.zb=-1,kd(a),a.ga(),c=!0);c&&a.j(nd(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;pd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+qd(a))} -function rd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function qd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Wd=function(){if(this.A.Z){this.wb>=this.mb&&pd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=rd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=qd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),nd(this));vb(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.vc;this.$=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,od(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;od(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,nd(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){qd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),nd(this));b=!0}this.A.complete=a;return b}; -function sd(a){this.pb=+a.model||1170;this.Ob=a.addrReset||0;gd.call(this,a,6666667);this.decode=1120==this.pb?td.bind(this):ud.bind(this);vd(this);this.L=0;this.M=null;this.A.complete=!1}z(sd,gd);k=sd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();vd(this);jd(this);this.A.error=!1;this.parent.reset.call(this)}; -function vd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.M=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ba=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function wd(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ga()||ld(a.i))}k.sc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];od(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Cd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Dd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Ed(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Fd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Oc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Pc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Xd(this,this.wa);Xd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; -function Yd(a){var b=Zd(a),c=Zd(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Pc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function $d(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=ae(this,$d(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc($d(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,be(this,$d(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc($d(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ce(this,a,b,c)};k.Qc=function(a,b,c){return $d(this,ce(this,a,b,c),c)};k.zc=function(a){return this.w.oa(a)};k.Td=function(a){return this.w.oa($d(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; -k.Ke=function(a,b){this.w.hb($d(this,a,4),b)};function de(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ce(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function ee(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ce(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=$d(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} -function fe(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function he(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ce(a,b,c,8)}function ie(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),be(a,e,d.call(a,c,ae(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ke(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?be(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function le(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&me(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&ne(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Yd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Bd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Ad(this))}while(0>1|b<<16;Ed(this,a);return a&65535}function te(a,b){a=b&2048|b>>1|b<<8;Ed(this,a<<8);return a&255}function ue(a,b){a=b&~a;R(this,a);return a}function ve(a,b){a=b&~a;R(this,a<<8);return a}function we(a,b){a|=b;R(this,a);return a}function xe(a,b){a|=b;R(this,a<<8);return a} -function ye(a,b){a=~b|65536;Cd(this,a);return a&65535}function ze(a,b){a=~b|256;Cd(this,a<<8);return a&255}function Ae(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Be(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Ce(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function De(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Ee(a,b){a=-b;Cd(this,a,a&b&32768);return a&65535}function Fe(a,b){a=-b;Cd(this,a<<8,(a&b&128)<<8);return a&255}function Ge(a,b){a=b<<1|this.T>>16&1;Ed(this,a);return a&65535}function He(a,b){a=b<<1|this.T>>16&1;Ed(this,a<<8);return a&255}function Ie(a,b){a=(this.T&65536|b)>>1|b<<16;Ed(this,a);return a&65535}function Je(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Ed(this,a<<8);return a&255}function Ke(a,b){var c=b-a;Fd(this,c,a,b);return c&65535} -function Le(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function Me(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ne(a,b){a^=b;R(this,a);return a&65535}function Oe(a){T(this,a,ge(this,a),oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Pe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Qe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Re(a){U(this,a,!xd(this))}function Se(a){U(this,a,xd(this))} -function Te(a){T(this,a,ge(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,fe(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){T(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){S(this,a,fe(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Xe(a){R(this,ge(this,a)&je(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ye(a){R(this,(fe(this,a)&ie(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){U(this,a,zd(this))}function $e(a){U(this,a,!this.Ta()==!yd(this))}function af(a){U(this,a,!zd(this)&&!this.Ta()==!yd(this))}function bf(a){U(this,a,!xd(this)&&!zd(this))}function cf(a){U(this,a,zd(this)||!this.Ta()!=!yd(this))} -function df(a){U(this,a,xd(this)||zd(this))}function ef(a){U(this,a,!this.Ta()!=!yd(this))}function ff(a){U(this,a,this.Ta())}function gf(a){U(this,a,!zd(this))}function hf(a){U(this,a,!this.Ta())}function jf(){this.pa(12,1);this.b-=5}function kf(a){U(this,a,!0)}function lf(a){U(this,a,!yd(this))}function mf(a){U(this,a,yd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function nf(a){var b=ge(this,a);a=je(this,a);Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function of(a){var b=fe(this,a)<<8;a=ie(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function pf(a){var b=je(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function qf(){this.pa(24,2);this.b-=25} -function rf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?sf(this.i):this.ga();this.b-=7}function tf(){this.pa(16,4);this.b-=25}var uf=[0,7,7,10,7,11,9,13];function vf(a){this.J=this.b;O(this,he(this,a));this.b=this.J-uf[this.g]}var wf=[0,14,14,17,14,18,16,20];function xf(a){this.J=this.b;var b=he(this,a);a=a>>6&7;Xd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-wf[this.g]}var yf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function zf(a){var b=ge(this,a);this.J=this.b;R(this,le(this,a,b));this.b=this.J-yf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Af(a){var b=fe(this,a);R(this,ke(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Bf=[7,13,13,17,14,18,17,21]; -function Cf(a){var b=je(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function If(a){T(this,a,ge(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Jf(a){T(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}function Kf(){this.pa(28,5);this.b-=5}function Lf(){this.I|=4;Bd(this,-2);this.b-=3}function Mf(a){T(this,a,ge(this,a),Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=sf(b);b||this.pa(8,6)}function td(a){Nf[a>>12].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)}function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a>>6&3].call(this,a)} -function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} -var Nf=[function(a){dg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,W,function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],dg=[function(a){fg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,W,W,W],Pf=[function(a){Cd(this,le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0, -Ee);this.b-=this.g?11:6},function(a){T(this,a,xd(this)?1:0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,xd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Cd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Tf=[function(a){T(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)}], -fg=[function(a){gg[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,W,Uf,Wf,Jf,Jf,Jf,Jf],gg=[rf,Lf,Ff,jf,tf,Ef,W,W,W,W,W,W,W,W,W,W],Vf=[Df,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Xf=[Df,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],eg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,W,W,W],Zf=[function(a){Cd(this, -ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],ag=[function(a){S(this,a,0,Fe);this.b-=this.g?11:6},function(a){S(this,a,xd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,xd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ie(this,a);Cd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],cg=[function(a){S(this,a,0,Je);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} -var hg=[function(a){ig[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],ig=[function(a){lg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,function(a){mg[a>>6&3].call(this,a)},W,W],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=de(this,a,0);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J= -this.b;ee(this,a,0,b);R(this,b);this.b=this.J-Bf[this.g]},function(a){R(this,le(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Uf,Wf,Jf,Jf,Jf,Jf],ng=[rf,Lf,Ff,jf,tf,Ef,function(){Yd(this);this.b-=13},W,W,W,W,W,W,W,W,W],jg=[Cf,Cf,pf,pf,Pe,Pe,Qe,Qe,Mf,Mf,W,W,W,W,Hf,Hf],kg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,function(a){og[a>> -6&3].call(this,a)},W,W],og=[W,function(a){a=de(this,a,65536);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J=this.b;ee(this,a,65536,b);R(this,b);this.b=this.J-Bf[this.g]},W]; -function pg(a){u.call(this,"ROM",a,pg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);qg(c)})}}z(pg);pg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;qg(this)}; -pg.prototype.Ha=function(){this.ha&&(this.i&&rg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};pg.prototype.Ga=function(){return!0}; -function qg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Wc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():wd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ja))});this.ma=Mc(52,4);this.$=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Qg);H(this)}; -k.wc=function(){if(!this.J){var a=id(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ga=function(a){return a?this.save():!0};k.reset=function(){Rg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Rg(this)};function Rg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.$,1E3/Math.round(this.R/10))}};var Sg={},Qg=(Sg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Sg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Sg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Sg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Sg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Vg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Vg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Wg(a);var e=this;if((this.g=id(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.ca=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&eh(a,b,c,d,e.da,e.La, -e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));bh(a)})}function Zg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(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.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=od(a)&&(a.yb=a.zb=-1,ld(a),a.ga(),c=!0);c&&a.j(od(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+rd(a))} +function sd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} +k.Xd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Ub&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=sd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; +function td(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;hd.call(this,a,6666667);this.decode=1120==this.pb?ud.bind(this):vd.bind(this);wd(this);this.L=0;this.M=null;this.A.complete=!1}z(td,hd);k=td.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();wd(this);kd(this);this.A.error=!1;this.parent.reset.call(this)}; +function wd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Ud,a.Nb=a.Le,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,qc(a.w,16))}function xd(a,b,c){a.Pb=b;O(a,b);!c&&a.i&&(a.ga()||md(a.i))}k.tc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];pd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Dd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ed(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function Zd(a){var b=$d(a),c=$d(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Qc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function ae(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Ud=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; +k.Le=function(a,b){this.w.hb(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function fe(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function he(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ie(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return de(a,b,c,8)}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function ke(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Zd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function ue(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ve(a,b){a=b&~a;R(this,a);return a}function we(a,b){a=b&~a;R(this,a<<8);return a}function xe(a,b){a|=b;R(this,a);return a}function ye(a,b){a|=b;R(this,a<<8);return a} +function ze(a,b){a=~b|65536;Dd(this,a);return a&65535}function Ae(a,b){a=~b|256;Dd(this,a<<8);return a&255}function Be(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ce(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function De(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ee(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Fe(a,b){a=-b;Dd(this,a,a&b&32768);return a&65535}function Ge(a,b){a=-b;Dd(this,a<<8,(a&b&128)<<8);return a&255}function He(a,b){a=b<<1|this.T>>16&1;Fd(this,a);return a&65535}function Ie(a,b){a=b<<1|this.T>>16&1;Fd(this,a<<8);return a&255}function Je(a,b){a=(this.T&65536|b)>>1|b<<16;Fd(this,a);return a&65535}function Ke(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Fd(this,a<<8);return a&255}function Le(a,b){var c=b-a;Gd(this,c,a,b);return c&65535} +function Me(a,b){var c=b-a;Gd(this,c<<8,a<<8,b<<8);return c&255}function Ne(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Oe(a,b){a^=b;R(this,a);return a&65535}function Pe(a){T(this,a,he(this,a),pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Qe(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Re(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Se(a){U(this,a,!yd(this))}function Te(a){U(this,a,yd(this))} +function Ue(a){T(this,a,he(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){S(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){T(this,a,he(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){S(this,a,ge(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ye(a){R(this,he(this,a)&ke(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){R(this,(ge(this,a)&je(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function $e(a){U(this,a,Ad(this))}function af(a){U(this,a,!this.Ta()==!zd(this))}function bf(a){U(this,a,!Ad(this)&&!this.Ta()==!zd(this))}function cf(a){U(this,a,!yd(this)&&!Ad(this))}function df(a){U(this,a,Ad(this)||!this.Ta()!=!zd(this))} +function ef(a){U(this,a,yd(this)||Ad(this))}function ff(a){U(this,a,!this.Ta()!=!zd(this))}function gf(a){U(this,a,this.Ta())}function hf(a){U(this,a,!Ad(this))}function jf(a){U(this,a,!this.Ta())}function kf(){this.pa(12,1);this.b-=5}function lf(a){U(this,a,!0)}function mf(a){U(this,a,!zd(this))}function nf(a){U(this,a,zd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function of(a){var b=he(this,a);a=ke(this,a);Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function pf(a){var b=ge(this,a)<<8;a=je(this,a)<<8;Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function qf(a){var b=ke(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function rf(){this.pa(24,2);this.b-=25} +function sf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?tf(this.i):this.ga();this.b-=7}function uf(){this.pa(16,4);this.b-=25}var vf=[0,7,7,10,7,11,9,13];function wf(a){this.J=this.b;O(this,ie(this,a));this.b=this.J-vf[this.g]}var xf=[0,14,14,17,14,18,16,20];function yf(a){this.J=this.b;var b=ie(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-xf[this.g]}var zf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Af(a){var b=he(this,a);this.J=this.b;R(this,me(this,a,b));this.b=this.J-zf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Bf(a){var b=ge(this,a);R(this,le(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Cf=[7,13,13,17,14,18,17,21]; +function Df(a){var b=ke(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Jf(a){T(this,a,he(this,a),Le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Kf(a){T(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function Lf(){this.pa(28,5);this.b-=5}function Mf(){this.I|=4;Cd(this,-2);this.b-=3}function Nf(a){T(this,a,he(this,a),Oe);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=tf(b);b||this.pa(8,6)}function ud(a){Of[a>>12].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)} +function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} +var Of=[function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,W,function(a){fg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],eg=[function(a){gg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,W,W,W],Qf=[function(a){Dd(this,me(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],Sf=[function(a){T(this,a,0, +Fe);this.b-=this.g?11:6},function(a){T(this,a,yd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,yd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ke(this,a);Dd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Uf=[function(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}], +gg=[function(a){hg[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,W,Vf,Xf,Kf,Kf,Kf,Kf],hg=[sf,Mf,Gf,kf,uf,Ff,W,W,W,W,W,W,W,W,W,W],Wf=[Ef,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Yf=[Ef,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],fg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,W,W,W],$f=[function(a){Dd(this, +le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)}],bg=[function(a){S(this,a,0,Ge);this.b-=this.g?11:6},function(a){S(this,a,yd(this)?1:0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,yd(this)?1:0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Dd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],dg=[function(a){S(this,a,0,Ke);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ue);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)}];function vd(a){ig[a>>12].call(this,a)} +var ig=[function(a){jg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],jg=[function(a){mg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,function(a){ng[a>>6&3].call(this,a)},W,W],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ee(this,a,0);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J= +this.b;fe(this,a,0,b);R(this,b);this.b=this.J-Cf[this.g]},function(a){R(this,me(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Vf,Xf,Kf,Kf,Kf,Kf],og=[sf,Mf,Gf,kf,uf,Ff,function(){Zd(this);this.b-=13},W,W,W,W,W,W,W,W,W],kg=[Df,Df,qf,qf,Qe,Qe,Re,Re,Nf,Nf,W,W,W,W,If,If],lg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,function(a){pg[a>> +6&3].call(this,a)},W,W],pg=[W,function(a){a=ee(this,a,65536);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J=this.b;fe(this,a,65536,b);R(this,b);this.b=this.J-Cf[this.g]},W]; +function qg(a){u.call(this,"ROM",a,qg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);rg(c)})}}z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)}; +qg.prototype.Ha=function(){this.ha&&(this.i&&sg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};qg.prototype.Ga=function(){return!0}; +function rg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Xc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ja))});this.ma=Nc(52,4);this.$=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.ma)});Cb(b,this,Rg);H(this)}; +k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Sg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Sg(this)};function Sg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ue,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.te,"RBUF"],Tg[65396]=[null,null,Y.prototype.Wd,Y.prototype.Ne,"XCSR"],Tg[65398]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Wg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Wg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Xg(a);var e=this;if((this.g=jd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.ca=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&fh(a,b,c,d,e.da,e.La, +e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));ch(a)})}function $g(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){mh(a,b,c,d)})} +function mh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<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 ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=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.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=nh(this,a++);)ph(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 ph(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&qh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&rh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=nh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&rh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=oh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";qh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){sh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return sh(this,a[0])};function vh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}xh(a,e,b,c,!1,d)}else wh(a,e)} -function xh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,wh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,kh(new gh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} -k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.sb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));qh(this,a.fc)}; -function uh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ac(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Ac(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.ea&65535}; -k.we=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; -var yh={},th=(yh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],yh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],yh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],yh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],yh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],yh);function zh(a){u.call(this,"Debugger",a,zh);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(zh); -var Ah={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};zh.prototype.tc=function(){return-1};zh.prototype.uc=function(){}; -function Bh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function Ch(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; +!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;sh(d,sa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=jd(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}th(this);this.P=Nc(112,5);Cb(b,this,uh,2097152);vh(this,"None","",!0);this.L&&vh(this,"Local Disk","?");vh(this,"Remote Disk","??");wh(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.sc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";rh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){th(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return th(this,a[0])};function wh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}yh(a,e,b,c,!1,d)}else xh(a,e)} +function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; +function vh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ce=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.xe=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.ce),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.ve=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ye=function(a){this.g=a};k.Id=function(){return this.D};k.ze=function(a){this.D=a};k.Fd=function(){return this.K};k.we=function(a){this.K=a&63}; +var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.xe,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ye,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.ze,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.we,"RLBE"],zh);function Ah(a){u.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); +var Bh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ah.prototype.uc=function(){return-1};Ah.prototype.vc=function(){}; +function Ch(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Dh(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 Dh(a,b,c){var d;if(b){b=Eh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Hh(a,b){if(b)return Gh(a,b,a.Y[b]);var c=0;for(b in a.Y)Gh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ih(a,b){if(b)return Hh(a,b,a.Y[b]);var c=0;for(b in a.Y)Hh(a,b,a.Y[b]),c++;return 0this.b.pb?Qh:[];Rh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Sh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Oc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,qd(a),a.ua=0,a.qa()))};function Kh(a){var b;if(!me(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?Zh(a):$h(a)}}function Yh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Kh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;ai(this);a||ld(this)};k.save=function(){var a=new P(this);a.set(0,Uh(this.L));a.set(1,Uh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Vh(a[b++]),this.P=Vh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function sf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} -function Jh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||bi(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ci(this,a,a.length-1,"set"),Kh(this)));return d}; -function bi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Kh(a);break}}return f}function di(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Xh(y);break;case 8:x="@"+Xh(y);break;case 16:7>y?x="("+Xh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Xh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Xh(y)+")";break;case 40:x="@-("+Xh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Xh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Xh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Xh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Oc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ii(a){var b,c="";for(b=0;6>b;b++)c+=hi(a,b);c=c+"\n"+(hi(a,6)+hi(a,7));c+=hi(a,20)+hi(a,21);return c+=gi(a,"T")+gi(a,"N")+gi(a,"Z")+gi(a,"V")+gi(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ha:e,mc:f})}function ji(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ii(a));c&&(a.L=Z(d.u[7]),$h(a,J(a,a.L.F)))}}function ni(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=fi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function ei(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Id=[];"call"==zg&&(Kb=1E5,Id=["CALL"]);for(void 0!==yg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Bg++;Kb--}}Bg||(a.j("no "+Ag+"history available"),a.vb=void 0)}else{var Mb=Sh(a,ma);if(Mb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Hi),Bc=Fh(a,La)>>>0,65536>4||1,Ob="";Ji--&&0Ec?String.fromCharCode(Ec):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Jd+(0==Pb?" "+Eg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Xb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.oa,Md=a.hb):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Sh(a,Od);if(Fc)for(var Gc= -2;GcRd;){for(var Ma=null,Mi=256;65536>Tb.F>>>0;){Sd.F=a.oa(Tb,2);if(null==Tb.F||!Mi--)break;if(!(Sd.F&1)){for(var Ni=a,Hc=Sd,Gg=null,Ub=Hc.F,Hg=Ub,Td=1;6>=Td&&Ub;Td++){if(2< -Td){Hc.F=Ub;var Ic=fi(Ni,Hc);if(0<=Ic.indexOf("JSR")){var Ig=Ic.indexOf(" ");if(Ub+(Ic.indexOf(" ",Ig+1)-Ig-1)/2==Hg){Gg=Ic;break}}}Ub-=2}Hc.F=Hg;if(Ma=Gg)break}}if(!Ma||null==Ma)break;var Jg=null;if("ks"==Li){var Kg=Ma.match(/[0-9A-F]+$/);Kg&&(Jg=mi(a,Kg[0]))}Ma=xa(Ma,50)+" ;"+(Jg||"stack="+J(a,Tb.F));a.j(Ma);Rd++}Rd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){mi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Ud=0;Ud\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsi){if(ui(d,this.J)){this.C=new P(this,"1.30.3","failsafe");ui(this.C)&&(zi(this,d),a=2,Ai(this.C));this.C.set("timestamp",Ca());Bi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ui(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Ai(d),ui(d)?(c=yi(d),e=!0):c=!1))}e&&xi(this,c?d:null)}else 2==a&&d.clear()}else xi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ci(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(zi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function zi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function pi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lthis.b.pb?Rh:[];Sh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Th(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Pc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,rd(a),a.ua=0,a.qa()))};function Lh(a){var b;if(!ne(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Lh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;bi(this);a||md(this)};k.save=function(){var a=new P(this);a.set(0,Vh(this.L));a.set(1,Vh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Wh(a[b++]),this.P=Wh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} +function Kh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ci(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(di(this,a,a.length-1,"set"),Lh(this)));return d}; +function ci(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Lh(a);break}}return f}function ei(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Yh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Pc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ji(a){var b,c="";for(b=0;6>b;b++)c+=ii(a,b);c=c+"\n"+(ii(a,6)+ii(a,7));c+=ii(a,20)+ii(a,21);return c+=hi(a,"T")+hi(a,"N")+hi(a,"Z")+hi(a,"V")+hi(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.pc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Te:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ji(a));c&&(a.L=Z(d.u[7]),ai(a,J(a,a.L.F)))}}function oi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=gi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ii),Cc=Gh(a,La)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(kb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(kb=2,Ld=65535,Md=a.oa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Gc=Th(a,Pd);if(Gc)for(var Hc= +2;HcSd;){for(var Ma=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< +Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Ma=Hg)break}}if(!Ma||null==Ma)break;var Kg=null;if("ks"==Mi){var Lg=Ma.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Ma=xa(Ma,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Ma);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Vd=0;Vd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bti){if(vi(d,this.J)){this.C=new P(this,"1.30.3","failsafe");vi(this.C)&&(Ai(this,d),a=2,Bi(this.C));this.C.set("timestamp",Ca());Ci(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?vi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Bi(d),vi(d)?(c=zi(d),e=!0):c=!1))}e&&yi(this,c?d:null)}else 2==a&&d.clear()}else yi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Di(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(Ai(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function Ai(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function qi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;l(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Ti(a,b,c)}})}else c(a,null)} -function Ui(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Gi||Za(!0));l=!1}var g,h,l=!0;Gi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Ri(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Gi||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Gi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ri(b,a,d,!0,e,m):Si(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ui(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +k.qa=function(a){if(this.b){var b=this.b,c=b.G.speed;c&&(c.textContent=b.A.Z&&b.Y?b.Y.toFixed(2)+"Mhz":"Stopped")}if(this.f&&(b=this.f,b.D)){if(!(0(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Ui(a,b,c)}})}else c(a,null)} +function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Si(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hi||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Hi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index e5c23d23b..f0b25cb23 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -45,198 +45,198 @@ d.K[f++]=e[c]>>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function u(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va} function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ca={init:[],show:[],exit:[]},Da=!1,Ea=!1,Fa=!0; function Ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ha(a){Ca.init.push(a)}function Ia(a){if(Fa)try{for(var b=0;bb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.kc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.i=this.f=this.w=this.s=0;this.A=this.C=this.v=!1;this.F=$a;this.m={};this.c={START:[1,!0,!1,this.rc],STEP:[1,!1,!1,this.sc],ENABLE:[1,!1,!1,this.nc],CONT:[1,!0,!1,this.lc],DEP:[0,!0,!1,this.mc],EXAM:[1,!0,!1,this.oc],LOAD:[1,!0,!1,this.qc],TEST:[0,!0,!1,this.pc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.pb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](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.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;a=d.ya[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;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[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||J(e,c,16)}function Bb(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.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} -h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ia)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Mb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; -h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; -h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return Vb(this.a)};h.Cd=function(a){Wb(this.a,a&-1809|Vb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; -var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.zc, -L.prototype.td,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.cd, -L.prototype.Vd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, -"R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, -L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= -[null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),dc(this,$b?ec:fc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,jc,!1),(a.m=c.m)&&kc(a,jc,!1))}function kc(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function dc(a,b){b||(b=lc);ic(a,b,void 0);kc(a,b,void 0)} -var lc=[],gc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],jc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var fc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],ec=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function mc(a,b){x.call(this,"CPU",a,mc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.ub=Math.round(this.fb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.gb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Pb=this.kd.bind(this);F(this)}z(mc);var nc=["power","reset"];h=mc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=rc(a)&&(a.Qa=a.Ra=-1,qc(a),G(a),c=!0);c&&a.T(rc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&uc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;tc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+vc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -function vc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.kd=function(){if(this.l.U){this.vb>=this.fb&&tc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Nb&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=vc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.va(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),rc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Pb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,sc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; -function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{sc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,rc(a));setTimeout(a.Pb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){vc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),rc(a));b=!0}a.l.complete=void 0;return b} -function wc(a){this.Wa=+a.model||1170;this.Jb=a.addrReset||0;mc.call(this,a,6666667);this.decode=1120==this.Wa?xc.bind(this):yc.bind(this);zc(this);this.ra=0;this.N=null;this.l.complete=!1}z(wc,mc);h=wc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);zc(this);pc(this);this.l.error=!1;this.parent.reset.call(this)}; -function zc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.qb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.ab=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function Ac(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];sc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Dc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Fc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Vb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Wb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Hc(a,a.Ia);Hc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Ic(a){var b=Jc(a),c=Jc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Wb(a,c);a.u&=-17} -function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Kc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Jc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Hc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Kc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Lc(this,Kc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Kc(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Mc(this,a,b,c)};h.hc=function(a,b,c){return Kc(this,Mc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Kc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Kc(this,a,4),b)}; -function Nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Mc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Oc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Mc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Kc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Pc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Mc(a,b,c,8)}function Sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.qb=a.J(b,e,7),Lc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Lc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Cc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Bc(this))}while(0>1|b<<16;Fc(this,a);return a&65535}function ad(a,b){a=b&2048|b>>1|b<<8;Fc(this,a<<8);return a&255}function bd(a,b){a=b&~a;S(this,a);return a}function cd(a,b){a=b&~a;S(this,a<<8);return a}function dd(a,b){a|=b;S(this,a);return a}function ed(a,b){a|=b;S(this,a<<8);return a}function fd(a,b){a=~b|65536;Dc(this,a);return a&65535}function gd(a,b){a=~b|256;Dc(this,a<<8);return a&255} -function hd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function id(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function jd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function kd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function ld(a,b){a=-b;Dc(this,a,a&b&32768);return a&65535}function md(a,b){a=-b;Dc(this,a<<8,(a&b&128)<<8);return a&255} -function nd(a,b){a=b<<1|this.m>>16&1;Fc(this,a);return a&65535}function od(a,b){a=b<<1|this.m>>16&1;Fc(this,a<<8);return a&255}function pd(a,b){a=(this.m&65536|b)>>1|b<<16;Fc(this,a);return a&65535}function qd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Fc(this,a<<8);return a&255}function rd(a,b){var c=b-a;Gc(this,c,a,b);return c&65535}function sd(a,b){var c=b-a;Gc(this,c<<8,a<<8,b<<8);return c&255}function td(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function ud(a,b){a^=b;S(this,a);return a&65535}function vd(a){U(this,a,Qc(this,a),Wc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function wd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function xd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function yd(a){V(this,a,!R(this))}function zd(a){V(this,a,R(this))} -function Ad(a){U(this,a,Qc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){U(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){T(this,a,Pc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Ed(a){S(this,Qc(this,a)&Tc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){S(this,(Pc(this,a)&Sc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){V(this,a,this.i&65535?0:4)}function Hd(a){V(this,a,!this.za()==!(this.f&32768))}function Id(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Kd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,R(this)||(this.i&65535?0:4))}function Md(a){V(this,a,!this.za()!=!(this.f&32768))}function Nd(a){V(this,a,this.za())}function Od(a){V(this,a,!!(this.i&65535))}function Pd(a){V(this,a,!this.za())}function Qd(){K(this,12,1);this.a-=5}function Rd(a){V(this,a,!0)}function Sd(a){V(this,a,!(this.f&32768))}function Td(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ud(a){var b=Qc(this,a);a=Tc(this,a);Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Vd(a){var b=Pc(this,a)<<8;a=Sc(this,a)<<8;Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Wd(a){var b=Tc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Xd(){K(this,24,2);this.a-=25} -function Yd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Zd(){K(this,16,4);this.a-=25}var $d=[0,7,7,10,7,11,9,13];function ae(a){this.F=this.a;P(this,Rc(this,a));this.a=this.F-$d[this.c]}var be=[0,14,14,17,14,18,16,20];function ce(a){this.F=this.a;var b=Rc(this,a);a=a>>6&7;Hc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-be[this.c]}var de=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ee(a){var b=Qc(this,a);this.F=this.a;S(this,Vc(this,a,b));this.a=this.F-de[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function fe(a){var b=Pc(this,a);S(this,Uc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ge=[7,13,13,17,14,18,17,21]; -function he(a){var b=Tc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ne(a){U(this,a,Qc(this,a),rd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function oe(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)}function pe(){K(this,28,5);this.a-=5}function qe(){this.u|=4;Cc(this,-2);this.a-=3}function re(a){U(this,a,Qc(this,a),ud);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function xc(a){se[a>>12].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a&15].call(this,a)} -function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)} -var se=[function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,Y,function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Je=[function(a){Le[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,Y,Y,Y],ue=[function(a){Dc(this,Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0, -ld);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Dc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ye=[function(a){U(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Le=[function(a){Me[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,Y,ze,Be,oe,oe,oe,oe],Me=[Yd,qe,ke,Qd,Zd,je,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[ie,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ce=[ie,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ke=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,Y,Y,Y],Ee=[function(a){Dc(this, -Uc(this,a,0));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)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],Ge=[function(a){T(this,a,0,md);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Dc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Ie=[function(a){T(this,a,0,qd);this.a-=this.c?9+(this.qb&1):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,0,ad);this.a-=this.c?9+(this.qb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}];function yc(a){Ne[a>>12].call(this,a)} -var Ne=[function(a){Oe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,function(a){Pe[a>>8&15].call(this,a)},function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Oe=[function(a){Re[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,function(a){Se[a>>6&3].call(this,a)},Y,Y],Se=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Nc(this,a,0);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F= -this.a;Oc(this,a,0,b);S(this,b);this.a=this.F-ge[this.c]},function(a){S(this,Vc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){Te[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ze,Be,oe,oe,oe,oe],Te=[Yd,qe,ke,Qd,Zd,je,function(){Ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Pe=[he,he,Wd,Wd,wd,wd,xd,xd,re,re,Y,Y,Y,Y,me,me],Qe=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,function(a){Ue[a>>6& -3].call(this,a)},Y,Y],Ue=[Y,function(a){a=Nc(this,a,65536);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F=this.a;Oc(this,a,65536,b);S(this,b);this.a=this.F-ge[this.c]},Y]; -function Ve(a){x.call(this,"ROM",a,Ve);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);We(c)})}}z(Ve);Ve.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;We(this)}; -Ve.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ve.prototype.ja=function(){return!0}; -function We(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,cc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Ac(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.da=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.da)});cb(b,this,bf);F(this)}; -h.Lb=function(){if(!this.v){var a=oc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Lb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){cf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return cf(this)};function cf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Rb(this.a,this.P,1E3/Math.round(this.I/10))}};var df={},bf=(df[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],df[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],df[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],df[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],df);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&gf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=hf(a);var e=this;if((this.c=oc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&rf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));of(a)})}function lf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.tb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){yf(a,b,c,d)})} -function yf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.ob+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){d!=Hb||a.gb||(a.gb+=c);c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} +h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; +function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; +h.zd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Vb(b))};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; +h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.h.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.ad=function(a){return a?this.a.Da&65280:0};h.Td=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Dd=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var N={},M=(N[61568]=[null,null,L.prototype.gd,L.prototype.Zd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.$c,L.prototype.Sd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Yc,L.prototype.Qd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Bc,L.prototype.vd,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.zc,L.prototype.td,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.Ac, +L.prototype.ud,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.yc,L.prototype.sd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Hc,L.prototype.zd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Cc,L.prototype.wd,"LKS"],N[65402]=[null,null,L.prototype.Ec,L.prototype.yd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.fd,L.prototype.Yd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.dd, +L.prototype.Wd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.cd,L.prototype.Vd,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, +"R5SET0"],N[65478]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6KERNEL"],N[65479]=[null,null,L.prototype.Pc,L.prototype.Hd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, +L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Oc,L.prototype.Gd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.wc,L.prototype.qd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.bd,L.prototype.Ud,"SYSID",1,1170],N[65526]=[null,null,L.prototype.vc,L.prototype.pd,"CPUERR",1,1170],N[65528]= +[null,null,L.prototype.Dc,L.prototype.xd,"MB",1,1170],N[65530]=[null,null,L.prototype.Ic,L.prototype.Ad,"PIR"],N[65532]=[null,null,L.prototype.ad,L.prototype.Td,"SL"],N[65534]=[null,null,L.prototype.Lc,L.prototype.Dd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&jc(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function jc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);jc(a,b,void 0);lc(a,b,void 0)} +var mc=[],hc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],kc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var gc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],fc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; +function nc(a,b){x.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.wa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.ld.bind(this);F(this)}z(nc);var oc=["power","reset"];h=nc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),G(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +function wc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} +h.ld=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} +function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}z(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; +function Ac(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.hd,a.pb=a.$d,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.h,16))}function Bc(a,b,c){a.Kb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ic(a,a.Ia);Ic(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Xb(a,c);a.u&=-17} +function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ic(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.h.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.h.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.h,a)};h.hd=function(a){return Lb(this.h,Lc(this,a,2))};h.ac=function(a,b){Mb(this.h,a,b&65535)};h.$d=function(a,b){Mb(this.h,Lc(this,a,4),b)}; +function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;S(this,a);return a}function dd(a,b){a=b&~a;S(this,a<<8);return a}function ed(a,b){a|=b;S(this,a);return a}function fd(a,b){a|=b;S(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} +function id(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function jd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function kd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ld(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function md(a,b){a=-b;Ec(this,a,a&b&32768);return a&65535}function nd(a,b){a=-b;Ec(this,a<<8,(a&b&128)<<8);return a&255} +function od(a,b){a=b<<1|this.m>>16&1;Gc(this,a);return a&65535}function pd(a,b){a=b<<1|this.m>>16&1;Gc(this,a<<8);return a&255}function qd(a,b){a=(this.m&65536|b)>>1|b<<16;Gc(this,a);return a&65535}function rd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Gc(this,a<<8);return a&255}function sd(a,b){var c=b-a;Hc(this,c,a,b);return c&65535}function td(a,b){var c=b-a;Hc(this,c<<8,a<<8,b<<8);return c&255}function ud(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function vd(a,b){a^=b;S(this,a);return a&65535}function wd(a){U(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function yd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function zd(a){V(this,a,!R(this))}function Ad(a){V(this,a,R(this))} +function Bd(a){U(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){U(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){T(this,a,Qc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Fd(a){S(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){S(this,(Qc(this,a)&Tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){V(this,a,this.i&65535?0:4)}function Id(a){V(this,a,!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Ld(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){V(this,a,R(this)||(this.i&65535?0:4))}function Nd(a){V(this,a,!this.za()!=!(this.f&32768))}function Od(a){V(this,a,this.za())}function Pd(a){V(this,a,!!(this.i&65535))}function Qd(a){V(this,a,!this.za())}function Rd(){K(this,12,1);this.a-=5}function Sd(a){V(this,a,!0)}function Td(a){V(this,a,!(this.f&32768))}function Ud(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Vd(a){var b=Rc(this,a);a=Uc(this,a);Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Wd(a){var b=Qc(this,a)<<8;a=Tc(this,a)<<8;Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Xd(a){var b=Uc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Yd(){K(this,24,2);this.a-=25} +function Zd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function $d(){K(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;P(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function fe(a){var b=Rc(this,a);this.F=this.a;S(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);S(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; +function ie(a){var b=Uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){U(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function pe(a){U(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){K(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){U(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} +function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)} +var te=[function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0, +md);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Me=[function(a){Ne[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Ne=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],De=[je,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, +Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,nd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Je=[function(a){T(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Oe[a>>12].call(this,a)} +var Oe=[function(a){Pe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Qe[a>>8&15].call(this,a)},function(a){Re[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Pe=[function(a){Se[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Te[a>>6&3].call(this,a)},Y,Y],Te=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F= +this.a;Pc(this,a,0,b);S(this,b);this.a=this.F-he[this.c]},function(a){S(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Se=[function(a){Ue[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ue=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Qe=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Re=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){Ve[a>>6& +3].call(this,a)},Y,Y],Ve=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);S(this,b);this.a=this.F-he[this.c]},Y]; +function We(a){x.call(this,"ROM",a,We);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Xe(c)})}}z(We);We.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Xe(this)}; +We.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};We.prototype.ja=function(){return!0}; +function Xe(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,dc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,cf);F(this)}; +h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){df(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return df(this)};function df(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ef={},cf=(ef[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],ef[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],ef[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],ef[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],ef);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&hf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;hf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=jf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&sf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));pf(a)})}function mf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){zf(a,b,c,d)})} +function zf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function Bf(a,b){var c=a.Z*a.S,d=b/c|0;return dg)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.G("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Af(this,a++);)Cf(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 Cf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Df(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Ef(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Af(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ef(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Ff(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Bf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Df(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Ff(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Ff(this,a[0])};function If(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Kf(a,e,b,c,!1,d)}else Jf(a,e)} -function Kf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Jf(a,b,!0),k.sb?a.G("RL11 busy"):(k.sb=!0,e&&(k.rb=!0,a.s++),k.ib=!!f,xf(new tf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.sb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.rb||e),this.j&&uc(this.j)):a.ib=!1;a.rb&&(a.rb=!1,--this.s||F(this));Df(this,a.wb)}; -function Hf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; -h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.F))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var Lf={},Gf=(Lf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Lf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Lf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Lf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Lf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Lf); -function Mf(a,b,c){x.call(this,"Computer",a,Mf);this.l.O=!1;Nf(this,b);this.A=oc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Of;this.v=null;this.m=this.I=!1;this.P=oc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Pf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bOf){if(Qf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Qf(this.i)&&(Vf(this,d),a=2,Wf(this.i));this.i.set("timestamp",sa());Xf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Uf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Qf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Wf(d),Qf(d)?(c=Uf(d),e=!0):c=!1))}e&&Tf(this,c?d:null)}else 2==a&&d.clear()}else Tf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Yf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Vf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Vf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function ag(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Ef(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Gf(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Gf(this,a[0])};function Jf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Lf(a,e,b,c,!1,d)}else Kf(a,e)} +function Lf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Kf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,yf(new uf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Ef(this,a.xb)}; +function If(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.Md=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; +var Mf={},Hf=(Mf[63744]=[null,null,O.prototype.Uc,O.prototype.Md,"RLCS"],Mf[63746]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBA"],Mf[65284]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLDA"],Mf[65286]=[null,null,O.prototype.Wc,O.prototype.Od,"RLMP"],Mf[65288]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLBE"],Mf); +function Nf(a,b,c){x.call(this,"Computer",a,Nf);this.l.O=!1;Of(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Pf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Qf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bPf){if(Rf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Rf(this.i)&&(Wf(this,d),a=2,Xf(this.i));this.i.set("timestamp",sa());Yf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Vf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Rf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Xf(d),Rf(d)?(c=Vf(d),e=!0):c=!1))}e&&Uf(this,c?d:null)}else 2==a&&d.clear()}else Uf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Zf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Wf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Wf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);hg(a,b,c)}})}else c(a,null)} -function ig(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&&(--eg||Ja(!0));l=!1}var g,k,l=!0;eg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?fg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--eg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--eg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?fg(b,a,d,!0,e,n):gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return ig(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map +h.va=function(a){if(this.a){var b=this.a,c=b.o.speed;c&&(c.textContent=b.l.U&&b.da?b.da.toFixed(2)+"Mhz":"Stopped")}if(this.f&&(b=this.f,b.s)){if(!(0(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);ig(a,b,c)}})}else c(a,null)} +function jg(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&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?gg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--fg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gg(b,a,d,!0,e,n):hg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return jg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map