The PDP-11 Bus component now maintains separate memory maps: one fixed for all Bus (direct) accesses, and another that can vary based on current MMU settings
This commit is contained in:
parent
375146f6bb
commit
a5a40ebab4
4 changed files with 562 additions and 585 deletions
|
|
@ -75,14 +75,6 @@ function BusPDP11(parmsBus, cpu, dbg)
|
||||||
*/
|
*/
|
||||||
this.nBusWidth = parmsBus['busWidth'] || 16;
|
this.nBusWidth = parmsBus['busWidth'] || 16;
|
||||||
|
|
||||||
/*
|
|
||||||
* This controls the location of the IOPAGE (ie, at the top of 16-bit, 18-bit, or 22-bit address range).
|
|
||||||
* It is managed by setIOPageRange(). reset() establishes the default (16).
|
|
||||||
*/
|
|
||||||
this.nIOPageRange = 0; // zero means no IOPAGE access (yet)
|
|
||||||
this.aIOPrevBlocks = []; // this saves any previous blocks we had to replace with IOPAGE blocks
|
|
||||||
this.aIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute all BusPDP11 memory block parameters now, based on the width of the bus.
|
* Compute all BusPDP11 memory block parameters now, based on the width of the bus.
|
||||||
*
|
*
|
||||||
|
|
@ -103,9 +95,6 @@ function BusPDP11(parmsBus, cpu, dbg)
|
||||||
this.nBlockMask = this.nBlockTotal - 1;
|
this.nBlockMask = this.nBlockTotal - 1;
|
||||||
this.assert(this.nBlockMask <= BusPDP11.BlockInfo.num.mask);
|
this.assert(this.nBlockMask <= BusPDP11.BlockInfo.num.mask);
|
||||||
|
|
||||||
this.iBlockIOPageDefault = ((this.addrTotal - BusPDP11.IOPAGE_LENGTH) & this.nBusMask) >>> this.nBlockShift;
|
|
||||||
this.iBlockIOPageActive = this.iBlockIOPageDefault;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* aIOHandlers is an array (ie, a hash) of I/O notification handlers, indexed by address, where each
|
* aIOHandlers is an array (ie, a hash) of I/O notification handlers, indexed by address, where each
|
||||||
* entry contains an array:
|
* entry contains an array:
|
||||||
|
|
@ -460,16 +449,34 @@ BusPDP11.IOController = {
|
||||||
*
|
*
|
||||||
* Allocate enough (empty) Memory blocks to span the entire physical address space.
|
* Allocate enough (empty) Memory blocks to span the entire physical address space.
|
||||||
*
|
*
|
||||||
|
* Note that we now maintain two parallel arrays of these Memory blocks: aBusBlocks is for use by
|
||||||
|
* devices (or any component using the "direct" interfaces), while aMemBlocks is for use by the CPU.
|
||||||
|
*
|
||||||
|
* Whereas the Bus memory map is fixed at init time, the CPU's memory map will vary depending on MMU
|
||||||
|
* settings. The CPU will call setIOPageRange() as needed to update the range of addressible memory,
|
||||||
|
* which in turn will determine where the IOPAGE can be accessed.
|
||||||
|
*
|
||||||
* @this {BusPDP11}
|
* @this {BusPDP11}
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.initMemory = function()
|
BusPDP11.prototype.initMemory = function()
|
||||||
{
|
{
|
||||||
var block = new MemoryPDP11(this);
|
var block = new MemoryPDP11(this);
|
||||||
block.copyBreakpoints(this.dbg);
|
block.copyBreakpoints(this.dbg);
|
||||||
|
|
||||||
|
this.aBusBlocks = new Array(this.nBlockTotal);
|
||||||
this.aMemBlocks = new Array(this.nBlockTotal);
|
this.aMemBlocks = new Array(this.nBlockTotal);
|
||||||
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
||||||
this.aMemBlocks[iBlock] = block;
|
this.aBusBlocks[iBlock] = this.aMemBlocks[iBlock] = block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var addrIOPage = this.addrTotal - BusPDP11.IOPAGE_LENGTH;
|
||||||
|
this.addMemory(addrIOPage, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
|
||||||
|
|
||||||
|
this.iBlockIOPageBus = (addrIOPage & this.nBusMask) >>> this.nBlockShift;
|
||||||
|
this.iBlockIOPageMem = this.iBlockIOPageBus;
|
||||||
|
|
||||||
|
this.nIOPageRange = 0;
|
||||||
|
this.nMemMask = this.nBusMask;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -478,35 +485,24 @@ BusPDP11.prototype.initMemory = function()
|
||||||
* We can define the IOPAGE address range with a single number, because the size of the IOPAGE is fixed at 8Kb.
|
* We can define the IOPAGE address range with a single number, because the size of the IOPAGE is fixed at 8Kb.
|
||||||
* The bottom of the range is (2 ^ nRange) - IOPAGE_LENGTH, and the top is (2 ^ nRange) - 1.
|
* The bottom of the range is (2 ^ nRange) - IOPAGE_LENGTH, and the top is (2 ^ nRange) - 1.
|
||||||
*
|
*
|
||||||
* Note that we defer our initial call to this function as long as possible (ie, at the end of reset()) so that
|
|
||||||
* other components have first shot at adding their own memory blocks (if any), because addMemory() only allows
|
|
||||||
* installing memory on top of empty memory blocks.
|
|
||||||
*
|
|
||||||
* @this {BusPDP11}
|
* @this {BusPDP11}
|
||||||
* @param {number} nRange (16, 18 or 22; 0 removes the IOPAGE altogether)
|
* @param {number} nRange (16, 18 or 22; 0 removes the IOPAGE altogether)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.setIOPageRange = function(nRange)
|
BusPDP11.prototype.setIOPageRange = function(nRange)
|
||||||
{
|
{
|
||||||
if (nRange != this.nIOPageRange) {
|
if (nRange != this.nIOPageRange) {
|
||||||
var addr;
|
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
||||||
if (this.nIOPageRange) {
|
this.aMemBlocks[iBlock] = this.aBusBlocks[iBlock];
|
||||||
addr = (1 << this.nIOPageRange) - BusPDP11.IOPAGE_LENGTH;
|
|
||||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPrevBlocks);
|
|
||||||
this.nIOPageRange = 0;
|
|
||||||
}
|
}
|
||||||
|
this.nIOPageRange = 0;
|
||||||
|
this.nMemMask = this.nBusMask;
|
||||||
if (nRange) {
|
if (nRange) {
|
||||||
this.nIOPageRange = nRange;
|
this.nIOPageRange = nRange;
|
||||||
addr = (1 << nRange);
|
var addr = (1 << nRange);
|
||||||
this.nBusMask = (addr - 1);
|
this.nMemMask = (addr - 1);
|
||||||
addr -= BusPDP11.IOPAGE_LENGTH;
|
addr -= BusPDP11.IOPAGE_LENGTH;
|
||||||
this.iBlockIOPageActive = (addr & this.nBusMask) >>> this.nBlockShift;
|
this.iBlockIOPageMem = (addr & this.nMemMask) >>> this.nBlockShift;
|
||||||
this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
this.aMemBlocks[this.iBlockIOPageMem] = this.aBusBlocks[this.iBlockIOPageBus];
|
||||||
if (this.aIOPageBlocks) {
|
|
||||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPageBlocks);
|
|
||||||
} else {
|
|
||||||
this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
|
|
||||||
this.aIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -626,9 +622,9 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller)
|
||||||
var sizeLeft = size;
|
var sizeLeft = size;
|
||||||
var iBlock = addrNext >>> this.nBlockShift;
|
var iBlock = addrNext >>> this.nBlockShift;
|
||||||
|
|
||||||
while (sizeLeft > 0 && iBlock < this.aMemBlocks.length) {
|
while (sizeLeft > 0 && iBlock < this.aBusBlocks.length) {
|
||||||
|
|
||||||
var block = this.aMemBlocks[iBlock];
|
var block = this.aBusBlocks[iBlock];
|
||||||
var addrBlock = iBlock * this.nBlockSize;
|
var addrBlock = iBlock * this.nBlockSize;
|
||||||
var sizeBlock = this.nBlockSize - (addrNext - addrBlock);
|
var sizeBlock = this.nBlockSize - (addrNext - addrBlock);
|
||||||
if (sizeBlock > sizeLeft) sizeBlock = sizeLeft;
|
if (sizeBlock > sizeLeft) sizeBlock = sizeLeft;
|
||||||
|
|
@ -666,7 +662,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller)
|
||||||
|
|
||||||
var blockNew = new MemoryPDP11(this, addrNext, sizeBlock, this.nBlockSize, type, controller);
|
var blockNew = new MemoryPDP11(this, addrNext, sizeBlock, this.nBlockSize, type, controller);
|
||||||
blockNew.copyBreakpoints(this.dbg, block);
|
blockNew.copyBreakpoints(this.dbg, block);
|
||||||
this.aMemBlocks[iBlock++] = blockNew;
|
this.aBusBlocks[iBlock++] = blockNew;
|
||||||
|
|
||||||
addrNext = addrBlock + this.nBlockSize;
|
addrNext = addrBlock + this.nBlockSize;
|
||||||
sizeLeft -= sizeBlock;
|
sizeLeft -= sizeBlock;
|
||||||
|
|
@ -695,10 +691,10 @@ BusPDP11.prototype.cleanMemory = function(addr, size)
|
||||||
{
|
{
|
||||||
var fClean = true;
|
var fClean = true;
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||||
if (this.aMemBlocks[iBlock].fDirty) {
|
if (this.aBusBlocks[iBlock].fDirty) {
|
||||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
this.aBusBlocks[iBlock].fDirty = fClean = false;
|
||||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
this.aBusBlocks[iBlock].fDirtyEver = true;
|
||||||
}
|
}
|
||||||
size -= this.nBlockSize;
|
size -= this.nBlockSize;
|
||||||
iBlock++;
|
iBlock++;
|
||||||
|
|
@ -718,15 +714,8 @@ BusPDP11.prototype.zeroMemory = function(addr, size, pattern)
|
||||||
{
|
{
|
||||||
var off = addr & this.nBlockLimit;
|
var off = addr & this.nBlockLimit;
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||||
var block = this.aMemBlocks[iBlock];
|
this.aBusBlocks[iBlock].zero(off, size, pattern);
|
||||||
if (block.controller) {
|
|
||||||
if (this.aIOPageBlocks && this.aIOPageBlocks.length == this.aIOPrevBlocks.length) {
|
|
||||||
var i = this.aIOPageBlocks.indexOf(block);
|
|
||||||
if (i >= 0) block = this.aIOPrevBlocks[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (block) block.zero(off, size, pattern);
|
|
||||||
size -= this.nBlockSize;
|
size -= this.nBlockSize;
|
||||||
iBlock++;
|
iBlock++;
|
||||||
off = 0;
|
off = 0;
|
||||||
|
|
@ -792,7 +781,7 @@ BusPDP11.prototype.scanMemory = function(info, addr, size)
|
||||||
info.cbTotal = 0;
|
info.cbTotal = 0;
|
||||||
info.cBlocks = 0;
|
info.cBlocks = 0;
|
||||||
while (iBlock <= iBlockMax) {
|
while (iBlock <= iBlockMax) {
|
||||||
var block = this.aMemBlocks[iBlock];
|
var block = this.aBusBlocks[iBlock];
|
||||||
info.cbTotal += block.size;
|
info.cbTotal += block.size;
|
||||||
if (block.size) {
|
if (block.size) {
|
||||||
info.aBlocks.push(usr.initBitFields(BusPDP11.BlockInfo, iBlock, 0, 0, block.type));
|
info.aBlocks.push(usr.initBitFields(BusPDP11.BlockInfo, iBlock, 0, 0, block.type));
|
||||||
|
|
@ -820,10 +809,10 @@ BusPDP11.prototype.removeMemory = function(addr, size)
|
||||||
if (!(addr & this.nBlockLimit) && size && !(size & this.nBlockLimit)) {
|
if (!(addr & this.nBlockLimit) && size && !(size & this.nBlockLimit)) {
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
var blockOld = this.aMemBlocks[iBlock];
|
var blockOld = this.aBusBlocks[iBlock];
|
||||||
var blockNew = new MemoryPDP11(this, addr);
|
var blockNew = new MemoryPDP11(this, addr);
|
||||||
blockNew.copyBreakpoints(this.dbg, blockOld);
|
blockNew.copyBreakpoints(this.dbg, blockOld);
|
||||||
this.aMemBlocks[iBlock++] = blockNew;
|
this.aBusBlocks[iBlock++] = blockNew;
|
||||||
addr = iBlock * this.nBlockSize;
|
addr = iBlock * this.nBlockSize;
|
||||||
size -= this.nBlockSize;
|
size -= this.nBlockSize;
|
||||||
}
|
}
|
||||||
|
|
@ -844,8 +833,8 @@ BusPDP11.prototype.getMemoryBlocks = function(addr, size)
|
||||||
{
|
{
|
||||||
var aBlocks = [];
|
var aBlocks = [];
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||||
aBlocks.push(this.aMemBlocks[iBlock++]);
|
aBlocks.push(this.aBusBlocks[iBlock++]);
|
||||||
size -= this.nBlockSize;
|
size -= this.nBlockSize;
|
||||||
}
|
}
|
||||||
return aBlocks;
|
return aBlocks;
|
||||||
|
|
@ -870,7 +859,7 @@ BusPDP11.prototype.setMemoryAccess = function(addr, size, afn, fQuiet)
|
||||||
if (!(addr & this.nBlockLimit) && size && !(size & this.nBlockLimit)) {
|
if (!(addr & this.nBlockLimit) && size && !(size & this.nBlockLimit)) {
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
var block = this.aMemBlocks[iBlock];
|
var block = this.aBusBlocks[iBlock];
|
||||||
if (!block.controller) {
|
if (!block.controller) {
|
||||||
return this.reportError(BusPDP11.ERROR.NO_CONTROLLER, addr, size, fQuiet);
|
return this.reportError(BusPDP11.ERROR.NO_CONTROLLER, addr, size, fQuiet);
|
||||||
}
|
}
|
||||||
|
|
@ -902,7 +891,7 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
|
||||||
{
|
{
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||||
var block = aBlocks[i++];
|
var block = aBlocks[i++];
|
||||||
this.assert(block);
|
this.assert(block);
|
||||||
if (!block) break;
|
if (!block) break;
|
||||||
|
|
@ -911,7 +900,7 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
|
||||||
blockNew.clone(block, type, this.dbg);
|
blockNew.clone(block, type, this.dbg);
|
||||||
block = blockNew;
|
block = blockNew;
|
||||||
}
|
}
|
||||||
this.aMemBlocks[iBlock++] = block;
|
this.aBusBlocks[iBlock++] = block;
|
||||||
size -= this.nBlockSize;
|
size -= this.nBlockSize;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -926,30 +915,19 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
|
||||||
BusPDP11.prototype.getByte = function(addr)
|
BusPDP11.prototype.getByte = function(addr)
|
||||||
{
|
{
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr);
|
return this.aMemBlocks[(addr & this.nMemMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getBlockDirect(addr)
|
* getBlockDirect(addr)
|
||||||
*
|
*
|
||||||
* This checks for block requests matching the active IOPAGE block and redirects to the original block;
|
|
||||||
* conversely, if the request is for the default IOPAGE block, then the request is redirected to the active
|
|
||||||
* IOPAGE block.
|
|
||||||
*
|
|
||||||
* @this {BusPDP11}
|
* @this {BusPDP11}
|
||||||
* @param {number} addr is a physical address
|
* @param {number} addr is a physical address
|
||||||
* @return {MemoryPDP11}
|
* @return {MemoryPDP11}
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.getBlockDirect = function(addr)
|
BusPDP11.prototype.getBlockDirect = function(addr)
|
||||||
{
|
{
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
return this.aBusBlocks[(addr & this.nBusMask) >>> this.nBlockShift];
|
||||||
var block = this.aMemBlocks[iBlock];
|
|
||||||
if (iBlock == this.iBlockIOPageActive && this.aIOPrevBlocks.length) {
|
|
||||||
block = this.aIOPrevBlocks[0];
|
|
||||||
} else if (iBlock == this.iBlockIOPageDefault) {
|
|
||||||
block = this.aMemBlocks[this.iBlockIOPageActive];
|
|
||||||
}
|
|
||||||
return block;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -982,7 +960,7 @@ BusPDP11.prototype.getWord = function(addr)
|
||||||
{
|
{
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
var off = addr & this.nBlockLimit;
|
var off = addr & this.nBlockLimit;
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
var iBlock = (addr & this.nMemMask) >>> this.nBlockShift;
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8);
|
return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8);
|
||||||
}
|
}
|
||||||
|
|
@ -1025,7 +1003,7 @@ BusPDP11.prototype.getWordDirect = function(addr)
|
||||||
BusPDP11.prototype.setByte = function(addr, b)
|
BusPDP11.prototype.setByte = function(addr, b)
|
||||||
{
|
{
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr);
|
this.aMemBlocks[(addr & this.nMemMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1058,7 +1036,7 @@ BusPDP11.prototype.setWord = function(addr, w)
|
||||||
{
|
{
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
var off = addr & this.nBlockLimit;
|
var off = addr & this.nBlockLimit;
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
var iBlock = (addr & this.nMemMask) >>> this.nBlockShift;
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr);
|
this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr);
|
||||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1);
|
this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1);
|
||||||
|
|
@ -1104,7 +1082,7 @@ BusPDP11.prototype.addMemBreak = function(addr, fWrite)
|
||||||
{
|
{
|
||||||
if (DEBUGGER) {
|
if (DEBUGGER) {
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
this.aMemBlocks[iBlock].addBreakpoint(addr & this.nBlockLimit, fWrite);
|
this.aBusBlocks[iBlock].addBreakpoint(addr & this.nBlockLimit, fWrite);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1119,7 +1097,7 @@ BusPDP11.prototype.removeMemBreak = function(addr, fWrite)
|
||||||
{
|
{
|
||||||
if (DEBUGGER) {
|
if (DEBUGGER) {
|
||||||
var iBlock = addr >>> this.nBlockShift;
|
var iBlock = addr >>> this.nBlockShift;
|
||||||
this.aMemBlocks[iBlock].removeBreakpoint(addr & this.nBlockLimit, fWrite);
|
this.aBusBlocks[iBlock].removeBreakpoint(addr & this.nBlockLimit, fWrite);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1158,7 +1136,7 @@ BusPDP11.prototype.saveMemory = function(fAll)
|
||||||
var a = [];
|
var a = [];
|
||||||
|
|
||||||
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
||||||
var block = this.aMemBlocks[iBlock];
|
var block = this.aBusBlocks[iBlock];
|
||||||
/*
|
/*
|
||||||
* We have to check both fDirty and fDirtyEver, because we may have called cleanMemory() on some of
|
* We have to check both fDirty and fDirtyEver, because we may have called cleanMemory() on some of
|
||||||
* the memory blocks (eg, video memory), and while cleanMemory() will clear a dirty block's fDirty flag,
|
* the memory blocks (eg, video memory), and while cleanMemory() will clear a dirty block's fDirty flag,
|
||||||
|
|
@ -1199,7 +1177,7 @@ BusPDP11.prototype.restoreMemory = function(a)
|
||||||
if (adw && adw.length < this.nBlockLen) {
|
if (adw && adw.length < this.nBlockLen) {
|
||||||
adw = State.decompress(adw, this.nBlockLen);
|
adw = State.decompress(adw, this.nBlockLen);
|
||||||
}
|
}
|
||||||
var block = this.aMemBlocks[iBlock];
|
var block = this.aBusBlocks[iBlock];
|
||||||
if (!block || !block.restore(adw)) {
|
if (!block || !block.restore(adw)) {
|
||||||
/*
|
/*
|
||||||
* Either the block to restore hasn't been allocated, indicating a change in the machine
|
* Either the block to restore hasn't been allocated, indicating a change in the machine
|
||||||
|
|
|
||||||
|
|
@ -960,7 +960,7 @@ if (DEBUGGER) {
|
||||||
*/
|
*/
|
||||||
DebuggerPDP11.prototype.dumpBus = function(asArgs)
|
DebuggerPDP11.prototype.dumpBus = function(asArgs)
|
||||||
{
|
{
|
||||||
this.dumpBlocks(this.bus.aMemBlocks, asArgs[0]);
|
this.dumpBlocks(this.bus.aBusBlocks, asArgs[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -32,325 +32,324 @@
|
||||||
http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016
|
http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016
|
||||||
http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016
|
http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016
|
||||||
*/
|
*/
|
||||||
for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var ea=ca[da];ea in ba||(ba[ea]={});ba=ba[ea]}var ga=ca[ca.length-1],ha=ba[ga],ia=ha?ha:function(a){return Math.log(a)/Math.LN2};
|
for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var fa=ca[da];fa in ba||(ba[fa]={});ba=ba[fa]}var ga=ca[ca.length-1],ha=ba[ga],ia=ha?ha:function(a){return Math.log(a)/Math.LN2};
|
||||||
ia!=ha&&null!=ia&&aa(ba,ga,{configurable:!0,writable:!0,value:ia});
|
ia!=ha&&null!=ia&&aa(ba,ga,{configurable:!0,writable:!0,value:ia});
|
||||||
var ja={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Ef:0,Uc:1,Gf:2,Hf:3,If:4,Jf:5,Kf:6,Lf:7,wc:8,Mf:9,Vc:10,Nf:11,Of:12,Wc:13,Pf:14,Qf:15,Rf:16,Sf:17,Tf:18,Uf:19,Vf:20,Wf:21,Xf:22,Yf:23,Zf:24,$f:25,ag:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Ef:0,Uc:1,Gf:2,Hf:3,If:4,Jf:5,Kf:6,Lf:7,wc:8,Mf:9,Vc:10,Nf:11,Of:12,Wc:13,Pf:14,Qf:15,Rf:16,Sf:17,Tf:18,Uf:19,Vf:20,Wf:21,Xf:22,Yf:23,Zf:24,$f:25,ag:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
||||||
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,vc:65,Df:66,Ff:67,bg:68,E:69,cg:70,dg:71,eg:72,fg:73,gg:74,hg:75,ig:76,jg:77,kg:78,lg:79,mg:80,Q:81,ng:82,og:83,pg:84,qg:85,rg:86,sg:87,tg:88,ug:89,gd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,vg:97,wg:98,xg:99,d:100,e:101,yg:102,zg:103,Ag:104,Bg:105,Eg:106,k:107,Fg:108,Gg:109,n:110,Hg:111,p:112,q:113,r:114,Ig:115,t:116,Kg:117,Lg:118,Mg:119,x:120,y:121,z:122,"{":123,
|
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,vc:65,Df:66,Ff:67,bg:68,E:69,cg:70,dg:71,eg:72,fg:73,gg:74,hg:75,ig:76,jg:77,kg:78,lg:79,mg:80,Q:81,ng:82,og:83,pg:84,qg:85,rg:86,sg:87,tg:88,ug:89,gd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,vg:97,wg:98,xg:99,d:100,e:101,yg:102,zg:103,Ag:104,Bg:105,Eg:106,k:107,Fg:108,Gg:109,n:110,Hg:111,p:112,q:113,r:114,Ig:115,t:116,Kg:117,Lg:118,Mg:119,x:120,y:121,z:122,"{":123,
|
||||||
"|":124,"}":125,"~":126,Xc:127};
|
"|":124,"}":125,"~":126,Xc:127};
|
||||||
function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
|
function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
|
||||||
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function na(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)}
|
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function na(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)}
|
||||||
function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function oa(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function pa(a,b){return-1!==a.indexOf(b,a.length-b.length)}var qa={"&":"&","<":"<",">":">",'"':""","'":"'"};function ra(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})}
|
function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function oa(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function pa(a,b){return-1!==a.indexOf(b,a.length-b.length)}var qa={"&":"&","<":"<",">":">",'"':""","'":"'"};function sa(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})}
|
||||||
function ta(a,b){return(a+" ").slice(0,b)}function ua(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
function ta(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
||||||
function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}var Ba=Date.now||function(){return+new Date};function Ca(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}var Ba=Date.now||function(){return+new Date};function Ca(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||||
function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
||||||
typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
||||||
function Ea(a,b){var c,d={ha:null,ja:null,Sa:null,Ra:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Sa=g.load;d.Ra=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c<e.length;c++)d.ha[f++]=e[c]&255,d.ha[f++]=e[c]>>8&255;else if(e=g.data)for(d.ha=Array(4*e.length),f=c=0;c<e.length;c++)d.ha[f++]=
|
function Ea(a,b){var c,d={ha:null,ja:null,Sa:null,Ra:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Sa=g.load;d.Ra=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c<e.length;c++)d.ha[f++]=e[c]&255,d.ha[f++]=e[c]>>8&255;else if(e=g.data)for(d.ha=Array(4*e.length),f=c=0;c<e.length;c++)d.ha[f++]=
|
||||||
e[c]&255,d.ha[f++]=e[c]>>8&255,d.ha[f++]=e[c]>>16&255,d.ha[f++]=e[c]>>24&255;else d.ha=g;d.ja=g.symbols;d.ha.length?1==d.ha.length&&(w(d.ha[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){w("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.ha=e)}return d}
|
e[c]&255,d.ha[f++]=e[c]>>8&255,d.ha[f++]=e[c]>>16&255,d.ha[f++]=e[c]>>24&255;else d.ha=g;d.ja=g.symbols;d.ha.length?1==d.ha.length&&(w(d.ha[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){w("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.ha=e)}return d}
|
||||||
function Fa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function w(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window.confirm(a));return b}var Ha=null;function Ia(){if(null==Ha){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}Ha=a}return Ha}
|
function Fa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function w(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window.confirm(a));return b}var Ha=null;function Ia(){if(null==Ha){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}Ha=a}return Ha}
|
||||||
function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ma(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 Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function La(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ma(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 Na(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
function Na(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||||
function Pa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Qa={init:[],show:[],exit:[]},Ra=!1,Ta=!1,Za=!0;function $a(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ab(a){Qa.init.push(a)}
|
function Pa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Qa={init:[],show:[],exit:[]},Sa=!1,Ya=!1,Za=!0;function $a(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ab(a){Qa.init.push(a)}
|
||||||
function bb(a){if(Za)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function cb(a){!Za&&a?(Za=!0,Ra&&db("init"),Ta&&db("show")):Za=a}function db(a){Qa[a]&&bb(Qa[a])}$a("onload",function(){Ra=!0;bb(Qa.init)});$a("onpageshow",function(){Ta=!0;bb(Qa.show)});$a(Ma("Opera")||Ma("iOS")?"onunload":"onbeforeunload",function(){bb(Qa.exit)});
|
function bb(a){if(Za)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function cb(a){!Za&&a?(Za=!0,Sa&&db("init"),Ya&&db("show")):Za=a}function db(a){Qa[a]&&bb(Qa[a])}$a("onload",function(){Sa=!0;bb(Qa.init)});$a("onpageshow",function(){Ya=!0;bb(Qa.show)});$a(Ma("Opera")||Ma("iOS")?"onunload":"onbeforeunload",function(){bb(Qa.exit)});
|
||||||
function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.yc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.hb=this.id:(this.ib=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,kb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.oa=d||0;z.push(this)}var eb=void 0,fb={};
|
function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.yc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.gb=this.id:(this.hb=this.id.substr(0,b),this.gb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,jb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.oa=d||0;z.push(this)}var eb=void 0,fb={};
|
||||||
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
||||||
function B(a,b){b||(b=x);a.prototype=jb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var kb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else kb={},z=[];function lb(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function mb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<z.length;b++){var d=z[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
function B(a,b){b||(b=x);a.prototype=jb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var kb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else kb={},z=[];function lb(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function mb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<z.length;b++){var d=z[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||||
function nb(a){if(void 0!==a){var b;for(b=0;b<z.length;b++)if(z[b].id===a)return z[b]}return null}function ob(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<z.length;d++)if(c)c==z[d]&&(c=null);else if(!(a!=z[d].type||b&&z[d].id.indexOf(b)))return z[d]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
function nb(a){if(void 0!==a){var b;for(b=0;b<z.length;b++)if(z[b].id===a)return z[b]}return null}function ob(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<z.length;d++)if(c)c==z[d]&&(c=null);else if(!(a!=z[d].type||b&&z[d].id.indexOf(b)))return z[d]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
||||||
function E(a,b){b=F(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),l=0;l<h.length;l++)switch(g=h[l],g){case "pdp11-binding":(g=D(f))&&g.binding&&a.xa(g.type,g.binding,f,g.value),l=h.length}}}}
|
function E(a,b){b=F(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),l=0;l<h.length;l++)switch(g=h[l],g){case "pdp11-binding":(g=D(f))&&g.binding&&a.xa(g.type,g.binding,f,g.value),l=h.length}}}}
|
||||||
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},xa:function(a,b,c){switch(b){case "clear":return this.D[b]||(this.D[b]=c,c.onclick=function(a){return function(){a.D.print&&(a.D.print.value="")}}(this)),!0;case "print":return this.D[b]||(this.bb=this.D[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},xa:function(a,b,c){switch(b){case "clear":return this.D[b]||(this.D[b]=c,c.onclick=function(a){return function(){a.D.print&&(a.D.print.value="")}}(this)),!0;case "print":return this.D[b]||(this.ab=this.D[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
this.O=function(a){this.i(a,this.hb)}),!0;default:return!1}},log:function(){},i:function(){},status:function(a){this.i(this.hb+": "+a)},O:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},Ka:function(){return this.C.ma=!0},Ja:function(a,b){b&&(this.C.ma=!1);return!0}};function G(a,b,c,d){a.j&&(!0===c||I(a,c|0))&&a.j.message(b,d)}function I(a,b){if(a.j){a===a.j?b|=0:b=b||a.oa;var c=a.j.oa&b;return!!b&&c===b||!!(c&a.j.qd)}return!1}
|
this.O=function(a){this.i(a,this.gb)}),!0;default:return!1}},log:function(){},i:function(){},status:function(a){this.i(this.gb+": "+a)},O:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},Ka:function(){return this.C.ma=!0},Ja:function(a,b){b&&(this.C.ma=!1);return!0}};function G(a,b,c,d){a.j&&(!0===c||I(a,c|0))&&a.j.message(b,d)}function I(a,b){if(a.j){a===a.j?b|=0:b=b||a.oa;var c=a.j.oa&b;return!!b&&c===b||!!(c&a.j.qd)}return!1}
|
||||||
function pb(a,b){if(a.C.nc)return a.C.kb=!1,a.C.nc=!1;if(a.C.error)return a.i(a.toString()+" error"),!1;a.C.kb=b;return a.C.kb}function qb(a,b){a.C.kb&&(b?a.C.nc=!0:void 0===b&&a.i(a.toString()+" busy"));return a.C.kb}function J(a,b){a.C.error||(a.C.ready=!1!==b,a.C.ready&&(b=a.cc,a.cc=null,b&&b()))}function yb(a,b){b&&(a.C.ready?b():a.cc=b);return a.C.ready}function zb(a){return a.C.error?(a.i(a.toString()+" error"),!0):!1}function Ab(a,b){a.C.error=!0;a.O(b)}
|
function pb(a,b){if(a.C.nc)return a.C.jb=!1,a.C.nc=!1;if(a.C.error)return a.i(a.toString()+" error"),!1;a.C.jb=b;return a.C.jb}function qb(a,b){a.C.jb&&(b?a.C.nc=!0:void 0===b&&a.i(a.toString()+" busy"));return a.C.jb}function J(a,b){a.C.error||(a.C.ready=!1!==b,a.C.ready&&(b=a.cc,a.cc=null,b&&b()))}function yb(a,b){b&&(a.C.ready?b():a.cc=b);return a.C.ready}function zb(a){return a.C.error?(a.i(a.toString()+" error"),!0):!1}function Ab(a,b){a.C.error=!0;a.O(b)}
|
||||||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||||
var Bb="undefined"!==typeof ArrayBuffer,Cb="UNKNOWN ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Db={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,dl11:262144,serial:262144,kw11:524288,timer:524288,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
var Bb="undefined"!==typeof ArrayBuffer,Cb="UNKNOWN ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Db={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,dl11:262144,serial:262144,kw11:524288,timer:524288,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
||||||
function Eb(a){x.call(this,"Panel",a,Eb,512);this.Ba=this.w=this.fb=this.Bb=this.A=this.F=0;this.I=this.K=this.G=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ed],STEP:[1,1,!1,!1,this.Fd],ENABLE:[1,1,!1,!1,this.Ad],CONT:[1,1,!0,!1,this.yd],DEP:[0,0,!0,!1,this.zd],EXAM:[1,1,!0,!1,this.Bd],LOAD:[1,1,!0,!1,this.Dd],TEST:[0,0,!0,!1,this.Cd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Gd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
function Eb(a){x.call(this,"Panel",a,Eb,512);this.Ba=this.w=this.eb=this.Ab=this.B=this.F=0;this.I=this.K=this.G=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ed],STEP:[1,1,!1,!1,this.Fd],ENABLE:[1,1,!1,!1,this.Ad],CONT:[1,1,!0,!1,this.yd],DEP:[0,0,!0,!1,this.zd],EXAM:[1,1,!0,!1,this.Bd],LOAD:[1,1,!0,!1,this.Dd],TEST:[0,0,!0,!1,this.Cd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Gd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
||||||
k.xa=function(a,b,c,d){if(this.B&&this.B.xa(a,b,c,d)||this.b&&this.b.xa(a,b,c,d)||this.j&&this.j.xa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
k.xa=function(a,b,c,d){if(this.A&&this.A.xa(a,b,c,d)||this.b&&this.b.xa(a,b,c,d)||this.j&&this.j.xa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
||||||
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.xa.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.xa.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
||||||
function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.na||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
|
function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.da()),c=8==(a.j&&a.j.na||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
|
||||||
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ed=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.rb())};k.Fd=function(){};k.Ad=function(a){a||this.b.ea()};
|
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ed=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.qb())};k.Fd=function(){};k.Ad=function(a){a||this.b.da()};
|
||||||
k.yd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.rb();else{if((a=this.j)&&!qb(a,!0))pb(a,!0),a.sb(0,null),pb(a,!1);else try{var b=this.b.sb(1);0<b&&(Tb(this.b,b),Ub(this.b,b,!0),Vb(this.b,b))}catch(c){"number"!=typeof c&&Ab(this.b,c.stack||c.message)}this.stop();this.B&&this.B.ya()}};k.zd=function(a){a&&!this.b.C.X&&(this.I&&Wb(this),a=Xb(this,this.fb),this.L==Fb?this.v.qb(this.Ba,a):this.b.qb(this.Ba,a))};
|
k.yd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.qb();else{if((a=this.j)&&!qb(a,!0))pb(a,!0),a.rb(0,null),pb(a,!1);else try{var b=this.b.rb(1);0<b&&(Tb(this.b,b),Ub(this.b,b,!0),Vb(this.b,b))}catch(c){"number"!=typeof c&&Ab(this.b,c.stack||c.message)}this.stop();this.A&&this.A.ya()}};k.zd=function(a){a&&!this.b.C.X&&(this.I&&Wb(this),a=Xb(this,this.eb),this.L==Fb?this.v.pb(this.Ba,a):this.b.pb(this.Ba,a))};
|
||||||
k.Bd=function(a){a||this.b.C.X||(this.K&&Wb(this),a=this.L==Fb?this.v.Va(this.Ba):this.b.Va(this.Ba),Xb(this,a))};k.Dd=function(a){a||this.b.C.X||Yb(this,this.fb)};k.Cd=function(a){a?(this.G=!0,Mb(this,!0)):(this.G=!1,Mb(this),Zb(this,0))};k.Gd=function(a,b){this.fb=a?this.fb|1<<b:this.fb&~(1<<b)};function Wb(a){var b=1145>a.b.lb?8:16,c=65472<=a.Ba&&a.Ba<65472+b,b=c?1:2,c=c?15:a.v.Xa;Gb(a,"STEP")||(b=-b);Yb(a,a.Ba&~c|a.Ba+b&c)}
|
k.Bd=function(a){a||this.b.C.X||(this.K&&Wb(this),a=this.L==Fb?this.v.Va(this.Ba):this.b.Va(this.Ba),Xb(this,a))};k.Dd=function(a){a||this.b.C.X||Yb(this,this.eb)};k.Cd=function(a){a?(this.G=!0,Mb(this,!0)):(this.G=!1,Mb(this),Zb(this,0))};k.Gd=function(a,b){this.eb=a?this.eb|1<<b:this.eb&~(1<<b)};function Wb(a){var b=1145>a.b.kb?8:16,c=65472<=a.Ba&&a.Ba<65472+b,b=c?1:2,c=c?15:a.v.Hb;Gb(a,"STEP")||(b=-b);Yb(a,a.Ba&~c|a.Ba+b&c)}
|
||||||
function Yb(a,b){a.Ba=b&a.v.Xa;b=a.Ba;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<<c)}function Xb(a,b){a.w=b&65535;b=a.w;for(var c=0;16>c;c++)$b(a,"D"+c,b&1<<c);return a.w}function $b(a,b,c){a.g[b]=c;a.G||Pb(a,b,c)}function nc(a){return void 0!==a.D.S0}function Zb(a,b){if(nc(a)){a.fb=b;for(var c=0;22>c;c++)a.f["S"+c][1]=b&1<<c?1:0;Nb(a)}}k.stop=function(){Yb(this,this.b.u[7])};k.sc=function(a){this.Ba=a};k.setData=function(a,b){b?this.Bb=a:this.w=a};k.Hd=function(a,b){return(b?this.Bb:this.fb)&65535};
|
function Yb(a,b){a.Ba=b&a.v.Hb;b=a.Ba;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<<c)}function Xb(a,b){a.w=b&65535;b=a.w;for(var c=0;16>c;c++)$b(a,"D"+c,b&1<<c);return a.w}function $b(a,b,c){a.g[b]=c;a.G||Pb(a,b,c)}function nc(a){return void 0!==a.D.S0}function Zb(a,b){if(nc(a)){a.eb=b;for(var c=0;22>c;c++)a.f["S"+c][1]=b&1<<c?1:0;Nb(a)}}k.stop=function(){Yb(this,this.b.u[7])};k.sc=function(a){this.Ba=a};k.setData=function(a,b){b?this.Ab=a:this.w=a};k.Hd=function(a,b){return(b?this.Ab:this.eb)&65535};
|
||||||
k.Ge=function(a){this.Bb=a};var oc={},Kb=(oc[65400]=[null,null,Eb.prototype.Hd,Eb.prototype.Ge,"CNSW"],oc);function Ob(){for(var a=!1,b=F(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=D(d),f=nb(e.id);f||(a=!0,f=new Eb(e));E(f,d);a&&J(f)}}ab(Ob);
|
k.Ge=function(a){this.Ab=a};var oc={},Kb=(oc[65400]=[null,null,Eb.prototype.Hd,Eb.prototype.Ge,"CNSW"],oc);function Ob(){for(var a=!1,b=F(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=D(d),f=nb(e.id);f||(a=!0,f=new Eb(e));E(f,d);a&&J(f)}}ab(Ob);
|
||||||
function pc(a,b,c){x.call(this,"Bus",a,pc,16);this.b=b;this.j=c;this.R=a.busWidth||16;this.w=0;this.g=[];this.B=null;this.A=1<<this.R;this.Xa=this.A-1;this.Ia=qc;this.pa=Math.log2(this.Ia);this.N=this.Ia>>2;this.v=this.Ia-1;this.K=this.A/this.Ia|0;this.I=this.L=(this.A-qc&this.Xa)>>>this.pa;this.jb=[];this.qa=0;this.f=!1;this.G=0;this.F=[];this.ld=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.ba=Array(this.K);for(b=0;b<this.K;b++)this.ba[b]=a;J(this)}B(pc);var qc=8192,wc=qc-1;
|
function pc(a,b,c){x.call(this,"Bus",a,pc,16);this.b=b;this.j=c;this.R=a.busWidth||16;this.B=1<<this.R;this.Hb=this.B-1;this.Ia=qc;this.pa=Math.log2(this.Ia);this.N=this.Ia>>2;this.v=this.Ia-1;this.w=this.B/this.Ia|0;this.ib=[];this.qa=0;this.A=!1;this.G=0;this.F=[];this.ld=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.ga=Array(this.w);this.f=Array(this.w);for(b=0;b<this.w;b++)this.ga[b]=this.f[b]=a;a=this.B-qc;wc(this,a,qc,xc,this);this.L=this.K=(a&this.Hb)>>>this.pa;this.I=0;this.g=this.Hb;J(this)}
|
||||||
function rc(a,b){var c=-1,d=this.controller,e=d.jb[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.jb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
B(pc);var qc=8192,yc=qc-1;function rc(a,b){var c=-1,d=this.controller,e=d.ib[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.ib[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
||||||
function sc(a,b,c){var d=!1,e=this.controller,f=e.jb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.jb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
function sc(a,b,c){var d=!1,e=this.controller,f=e.ib[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ib[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
||||||
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.jb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.ib[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
||||||
function uc(a,b,c){var d=!1,e=this.controller;a=e.jb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
function uc(a,b,c){var d=!1,e=this.controller;a=e.ib[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
||||||
function xc(a,b){if(b!=a.w){var c;a.w&&(c=(1<<a.w)-qc,yc(a,c,qc,a.g),a.w=0);b&&(a.w=b,c=1<<b,a.Xa=c-1,c-=qc,a.I=(c&a.Xa)>>>a.pa,a.g=zc(a,c,qc),a.B?yc(a,c,qc,a.B):(Ac(a,c,qc,Bc,a),a.B=zc(a,c,qc)))}}k=pc.prototype;k.reset=function(){for(var a=0;a<this.F.length;a++)this.F[a]();xc(this,16)};k.Ka=function(a,b){b||this.reset();return!0};
|
function zc(a,b){if(b!=a.I){for(var c=0;c<a.w;c++)a.f[c]=a.ga[c];a.I=0;a.g=a.Hb;b&&(a.I=b,b=1<<b,a.g=b-1,b-=qc,a.L=(b&a.g)>>>a.pa,a.f[a.L]=a.ga[a.K])}}k=pc.prototype;k.reset=function(){for(var a=0;a<this.F.length;a++)this.F[a]();zc(this,16)};k.Ka=function(a,b){b||this.reset();return!0};
|
||||||
function Ac(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.pa;0<g&&h<a.ba.length;){var l=a.ba[h],m=h*a.Ia,n=a.Ia-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.H)return l.Zb+=l.H-f,l.H=f,!0;if(f>=l.H+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.H+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.ba[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.G+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
|
function wc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.pa;0<g&&h<a.ga.length;){var l=a.ga[h],m=h*a.Ia,n=a.Ia-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.H)return l.Zb+=l.H-f,l.H=f,!0;if(f>=l.H+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.H+n;f=m+a.Ia;g-=n;h++;continue}}return Ac(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.ga[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Bc&&(a.G+=c),a.status((c>>10)+"Kb "+Cc[d]+" at "+na(b)),!0):Ac(2,b,c)}
|
||||||
function zc(a,b,c){var d=[];for(b>>>=a.pa;0<c&&b<a.ba.length;)d.push(a.ba[b++]),c-=a.Ia;return d}function yc(a,b,c,d){var e=0;for(b>>>=a.pa;0<c&&b<a.ba.length;){var f=d[e++];if(!f)break;a.ba[b++]=f;c-=a.Ia}}k.dc=function(a){3932160<=a&&(a=Fc(this.b,a));return this.ba[(a&this.Xa)>>>this.pa].fc(a&this.v,a)};function Gc(a,b){b=(b&a.Xa)>>>a.pa;var c=a.ba[b];b==a.I&&a.g.length?c=a.g[0]:b==a.L&&(c=a.ba[a.I]);return c}
|
k.dc=function(a){3932160<=a&&(a=Dc(this.b,a));return this.f[(a&this.g)>>>this.pa].fc(a&this.v,a)};function Ec(a,b){return a.ga[(b&a.Hb)>>>a.pa]}k.ec=function(a){this.A=!1;this.qa++;3932160<=a&&(a=Dc(this.b,a));a=Ec(this,a).I(a&this.v,a);this.qa--;return a};k.va=function(a){3932160<=a&&(a=Dc(this.b,a));return this.f[(a&this.g)>>>this.pa].Aa(a&this.v,a)};k.Va=function(a){this.A=!1;this.qa++;3932160<=a&&(a=Dc(this.b,a));a=Ec(this,a).K(a&this.v,a);this.qa--;return a};
|
||||||
k.ec=function(a){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));a=Gc(this,a).I(a&this.v,a);this.qa--;return a};k.va=function(a){3932160<=a&&(a=Fc(this.b,a));return this.ba[(a&this.Xa)>>>this.pa].Aa(a&this.v,a)};k.Va=function(a){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));a=Gc(this,a).K(a&this.v,a);this.qa--;return a};k.Nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.ba[(a&this.Xa)>>>this.pa].ic(a&this.v,b&255,a)};
|
k.Nb=function(a,b){3932160<=a&&(a=Dc(this.b,a));this.f[(a&this.g)>>>this.pa].ic(a&this.v,b&255,a)};k.Bb=function(a,b){this.A=!1;this.qa++;3932160<=a&&(a=Dc(this.b,a));Ec(this,a).G(a&this.v,b&255,a);this.qa--};k.Cb=function(a,b){3932160<=a&&(a=Dc(this.b,a));this.f[(a&this.g)>>>this.pa].$b(a&this.v,b&65535,a)};k.pb=function(a,b){this.A=!1;this.qa++;3932160<=a&&(a=Dc(this.b,a));Ec(this,a).N(a&this.v,b&65535,a);this.qa--};
|
||||||
k.Cb=function(a,b){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));Gc(this,a).G(a&this.v,b&255,a);this.qa--};k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.ba[(a&this.Xa)>>>this.pa].$b(a&this.v,b&65535,a)};k.qb=function(a,b){this.f=!1;this.qa++;3932160<=a&&(a=Fc(this.b,a));Gc(this,a).N(a&this.v,b&65535,a);this.qa--};
|
function Fc(a){for(var b=0,c=[],d=0;d<a.w;d++){var e=a.ga[d];if(e.bb||e.td){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[h++]=n-g;l[h++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function Gc(a){var b=0;switch(Bc){case Bc:b=a.G}return b}function Hc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&yc;if(void 0!==a.ib[m])return w("I/O address already registered: "+p(b,8,!0)),!1;a.ib[m]=[d,e,f,g,l||"unknown",h||16,!1]}return!0}
|
||||||
function Hc(a){for(var b=0,c=[],d=0;d<a.K;d++){var e=a.ba[d];if(e.cb||e.td){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[h++]=n-g;l[h++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function Ic(a){var b=0;switch(Dc){case Dc:b=a.G}return b}function Jc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&wc;if(void 0!==a.jb[m])return w("I/O address already registered: "+p(b,8,!0)),!1;a.jb[m]=[d,e,f,g,l||"unknown",h||16,!1]}return!0}
|
function Jb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.kb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;t<r;t++,e+=2)if(n&&1<r&&(n=f[4]+t),!Hc(a,e,e,g,h,l,m,f[7]||b.oa,n||b.gb))return!1}}return!0}function Lb(a,b){a.F.push(b)}
|
||||||
function Jb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.lb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;t<r;t++,e+=2)if(n&&1<r&&(n=f[4]+t),!Jc(a,e,e,g,h,l,m,f[7]||b.oa,n||b.hb))return!1}}return!0}function Lb(a,b){a.F.push(b)}
|
k.Na=function(a,b,c){this.A=!0;this.qa||(this.j&&I(this.j,4)&&G(this.j,"memory fault ("+c+") on "+L(this.j,a),!0,!0),b&&(this.b.sa|=b),this.b.ta(4,0,a))};function Ic(a){var b=a.A;a.A=!1;return b}function Ac(a,b,c){w("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function M(a){x.call(this,"Device",a,M,256);this.f={M:0,tc:-1}}B(M);k=M.prototype;
|
||||||
k.Na=function(a,b,c){this.f=!0;this.qa||(this.j&&I(this.j,4)&&G(this.j,"memory fault ("+c+") on "+L(this.j,a),!0,!0),b&&(this.b.sa|=b),this.b.ta(4,0,a))};function Kc(a){var b=a.f;a.f=!1;return b}function Cc(a,b,c){w("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function M(a){x.call(this,"Device",a,M,256);this.f={M:0,tc:-1}}B(M);k=M.prototype;
|
k.Ha=function(a,b,c,d){this.v=b;this.A=a;this.b=c;this.j=d;var e=this;this.f.tc=Jc(c,function(){e.f.Gb|=128;e.f.Gb&64&&Kc(e.b,e.f.Fb);e.A&&e.A.ya(1);Lc(e.b,e.f.tc,1E3/60)});this.f.Fb=Mc(64,6,524288);Jb(b,this,Nc);Lb(b,this.reset.bind(this));d&&Oc(d,64,function(a){var b=e.b;N(e,"KIPDR",b.S[0],0,a[0]);N(e,"KDPDR",b.S[0],8,a[0]);N(e,"KIPAR",b.ka[0],0,a[0]);N(e,"KDPAR",b.ka[0],8,a[0],!0);N(e,"SIPDR",b.S[1],0,a[0]);N(e,"SDPDR",b.S[1],8,a[0]);N(e,"SIPAR",b.ka[1],0,a[0]);N(e,"SDPAR",b.ka[1],8,a[0],!0);N(e,
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.j=d;var e=this;this.f.tc=Lc(c,function(){e.f.Hb|=128;e.f.Hb&64&&Mc(e.b,e.f.Gb);e.B&&e.B.ya(1);Nc(e.b,e.f.tc,1E3/60)});this.f.Gb=Oc(64,6,524288);Jb(b,this,Pc);Lb(b,this.reset.bind(this));d&&Qc(d,64,function(a){var b=e.b;N(e,"KIPDR",b.S[0],0,a[0]);N(e,"KDPDR",b.S[0],8,a[0]);N(e,"KIPAR",b.ka[0],0,a[0]);N(e,"KDPAR",b.ka[0],8,a[0],!0);N(e,"SIPDR",b.S[1],0,a[0]);N(e,"SDPDR",b.S[1],8,a[0]);N(e,"SIPAR",b.ka[1],0,a[0]);N(e,"SDPAR",b.ka[1],8,a[0],!0);N(e,
|
"UIPDR",b.S[3],0,a[0]);N(e,"UDPDR",b.S[3],8,a[0]);N(e,"UIPAR",b.ka[3],0,a[0]);N(e,"UDPAR",b.ka[3],8,a[0],!0)});J(this)};function N(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Gb=128;Lc(this.b,this.f.tc,1E3/60,!0)};k.Od=function(){return this.f.Gb};k.Ne=function(a){this.f.Gb=a&192;this.f.Gb&64||Pc(this.b,this.f.Fb)};k.Qd=function(){return Qc(this.b)};k.Pe=function(a){Rc(this.b,a&-129|this.b.Da&128)};
|
||||||
"UIPDR",b.S[3],0,a[0]);N(e,"UDPDR",b.S[3],8,a[0]);N(e,"UIPAR",b.ka[3],0,a[0]);N(e,"UDPAR",b.ka[3],8,a[0],!0)});J(this)};function N(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Hb=128;Nc(this.b,this.f.tc,1E3/60,!0)};k.Od=function(){return this.f.Hb};k.Ne=function(a){this.f.Hb=a&192;this.f.Hb&64||Rc(this.b,this.f.Gb)};k.Qd=function(){return $c(this.b)};k.Pe=function(a){ad(this.b,a&-129|this.b.Da&128)};
|
k.Rd=function(){return $c(this.b)};k.Sd=function(){return ad(this.b)};k.Td=function(){return this.b.Xa};k.Qe=function(a){bd(this.b,a)};k.Ae=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.zf=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.te=function(a){return this.b.S[1][a>>1&7]};k.sf=function(a,b){this.b.S[1][b>>1&7]=a&65295};k.re=function(a){return this.b.S[1][(a>>1&7)+8]};
|
||||||
k.Rd=function(){return bd(this.b)};k.Sd=function(){return cd(this.b)};k.Td=function(){return this.b.Ya};k.Qe=function(a){dd(this.b,a)};k.Ae=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.zf=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.te=function(a){return this.b.S[1][a>>1&7]};k.sf=function(a,b){this.b.S[1][b>>1&7]=a&65295};k.re=function(a){return this.b.S[1][(a>>1&7)+8]};
|
|
||||||
k.qf=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};k.se=function(a){return this.b.ka[1][a>>1&7]};k.rf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.qe=function(a){return this.b.ka[1][(a>>1&7)+8]};k.pf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.Nd=function(a){return this.b.S[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.S[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Ld=function(a){return this.b.S[0][(a>>1&7)+8]};
|
k.qf=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};k.se=function(a){return this.b.ka[1][a>>1&7]};k.rf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.qe=function(a){return this.b.ka[1][(a>>1&7)+8]};k.pf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.Nd=function(a){return this.b.S[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.S[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Ld=function(a){return this.b.S[0][(a>>1&7)+8]};
|
||||||
k.Ke=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.ka[0][a>>1&7]};k.Le=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.Kd=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Je=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.ze=function(a){return this.b.S[3][a>>1&7]};k.yf=function(a,b){this.b.S[3][b>>1&7]=a&65295};k.xe=function(a){return this.b.S[3][(a>>1&7)+8]};k.wf=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};
|
k.Ke=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.ka[0][a>>1&7]};k.Le=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.Kd=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Je=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.ze=function(a){return this.b.S[3][a>>1&7]};k.yf=function(a,b){this.b.S[3][b>>1&7]=a&65295};k.xe=function(a){return this.b.S[3][(a>>1&7)+8]};k.wf=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};
|
||||||
k.ye=function(a){return this.b.ka[3][a>>1&7]};k.xf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.we=function(a){return this.b.ka[3][(a>>1&7)+8]};k.vf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.gb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.gb[b]=a:this.b.u[b]=a};k.Yd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.Ve=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};
|
k.ye=function(a){return this.b.ka[3][a>>1&7]};k.xf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.we=function(a){return this.b.ka[3][(a>>1&7)+8]};k.vf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.fb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.fb[b]=a:this.b.u[b]=a};k.Yd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.Ve=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};
|
||||||
k.ae=function(){return this.b.u[7]};k.Ye=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.gb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.gb[b]=a};k.Zd=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.We=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.$d=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Xe=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};
|
k.ae=function(){return this.b.u[7]};k.Ye=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.fb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.fb[b]=a};k.Zd=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.We=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.$d=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Xe=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};
|
||||||
k.Jd=function(a){return this.b.Oc[a-65504>>1]};k.Ie=function(a,b){this.b.Oc[b-65504>>1]=a};k.Lc=function(a){return 65520==a?(Ic(this.v)>>6)-1:0};k.Rc=function(){};k.ve=function(){return 1};k.uf=function(){};k.Id=function(){return this.b.sa};k.He=function(){this.b.sa=0};k.Pd=function(){return this.b.Nc};k.Oe=function(a,b){b&1||(a&=255);this.b.Nc=a};k.Ud=function(a,b){return b?0:this.b.Mb};k.Re=function(a){ed(this.b,a)};k.ue=function(a,b){return b?0:this.b.ob&65280};k.tf=function(a){this.b.ob=a|255};
|
k.Jd=function(a){return this.b.Oc[a-65504>>1]};k.Ie=function(a,b){this.b.Oc[b-65504>>1]=a};k.Lc=function(a){return 65520==a?(Gc(this.v)>>6)-1:0};k.Rc=function(){};k.ve=function(){return 1};k.uf=function(){};k.Id=function(){return this.b.sa};k.He=function(){this.b.sa=0};k.Pd=function(){return this.b.Nc};k.Oe=function(a,b){b&1||(a&=255);this.b.Nc=a};k.Ud=function(a,b){return b?0:this.b.Mb};k.Re=function(a){cd(this.b,a)};k.ue=function(a,b){return b?0:this.b.nb&65280};k.tf=function(a){this.b.nb=a|255};
|
||||||
k.Xd=function(){return fd(this.b)};k.Ue=function(a){gd(this.b,a&-1793|fd(this.b)&1792);this.b.J|=256};k.Qc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
k.Xd=function(){return dd(this.b)};k.Ue=function(a){ed(this.b,a&-1793|dd(this.b)&1792);this.b.J|=256};k.Qc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
||||||
var O={},Pc=(O[61568]=[null,null,M.prototype.Ae,M.prototype.zf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.te,M.prototype.sf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.re,M.prototype.qf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.se,M.prototype.rf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.qe,M.prototype.pf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Nd,M.prototype.Me,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPDR",8,1145,64],O[62688]=
|
var O={},Nc=(O[61568]=[null,null,M.prototype.Ae,M.prototype.zf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.te,M.prototype.sf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.re,M.prototype.qf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.se,M.prototype.rf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.qe,M.prototype.pf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Nd,M.prototype.Me,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPDR",8,1145,64],O[62688]=
|
||||||
[null,null,M.prototype.Md,M.prototype.Le,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Kd,M.prototype.Je,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Td,M.prototype.Qe,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Od,M.prototype.Ne,"LKS"],O[65402]=[null,null,M.prototype.Qd,M.prototype.Pe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Rd,M.prototype.Qc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Sd,M.prototype.Qc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.ze,M.prototype.yf,
|
[null,null,M.prototype.Md,M.prototype.Le,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Kd,M.prototype.Je,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Td,M.prototype.Qe,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Od,M.prototype.Ne,"LKS"],O[65402]=[null,null,M.prototype.Qd,M.prototype.Pe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Rd,M.prototype.Qc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Sd,M.prototype.Qc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.ze,M.prototype.yf,
|
||||||
"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.xe,M.prototype.wf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ye,M.prototype.xf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.we,M.prototype.vf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb,
|
"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.xe,M.prototype.wf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ye,M.prototype.xf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.we,M.prototype.vf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb,
|
||||||
M.prototype.Ob,"R4SET0"],O[65477]=[null,null,M.prototype.Kb,M.prototype.Ob,"R5SET0"],O[65478]=[null,null,M.prototype.Yd,M.prototype.Ve,"R6KERNEL"],O[65479]=[null,null,M.prototype.ae,M.prototype.Ye,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb,
|
M.prototype.Ob,"R4SET0"],O[65477]=[null,null,M.prototype.Kb,M.prototype.Ob,"R5SET0"],O[65478]=[null,null,M.prototype.Yd,M.prototype.Ve,"R6KERNEL"],O[65479]=[null,null,M.prototype.ae,M.prototype.Ye,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb,
|
||||||
M.prototype.Pb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Lb,M.prototype.Pb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Zd,M.prototype.We,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.$d,M.prototype.Xe,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Jd,M.prototype.Ie,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Lc,M.prototype.Rc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Lc,M.prototype.Rc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ve,M.prototype.uf,"SYSID",1,1170],O[65526]=
|
M.prototype.Pb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Lb,M.prototype.Pb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Zd,M.prototype.We,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.$d,M.prototype.Xe,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Jd,M.prototype.Ie,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Lc,M.prototype.Rc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Lc,M.prototype.Rc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ve,M.prototype.uf,"SYSID",1,1170],O[65526]=
|
||||||
[null,null,M.prototype.Id,M.prototype.He,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Pd,M.prototype.Oe,"MB",1,1170],O[65530]=[null,null,M.prototype.Ud,M.prototype.Re,"PIR"],O[65532]=[null,null,M.prototype.ue,M.prototype.tf,"SL"],O[65534]=[null,null,M.prototype.Xd,M.prototype.Ue,"PSW"],O);
|
[null,null,M.prototype.Id,M.prototype.He,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Pd,M.prototype.Oe,"MB",1,1170],O[65530]=[null,null,M.prototype.Ud,M.prototype.Re,"PIR"],O[65532]=[null,null,M.prototype.ue,M.prototype.tf,"SL"],O[65534]=[null,null,M.prototype.Xd,M.prototype.Ue,"PSW"],O);
|
||||||
ab(function(){for(var a=F(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=D(d);switch(c.type){case "default":c=new M(c);E(c,d);break;case "pc11":c=new hd(c);E(c,d);break;case "rl11":c=new P(c);E(c,d);break;case "rk11":c=new Q(c),E(c,d)}}});var id;if(Bb){var jd=new ArrayBuffer(2);(new DataView(jd)).setUint16(0,256,!0);id=256===(new Uint16Array(jd))[0]}else id=!1;var kd=id;
|
ab(function(){for(var a=F(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=D(d);switch(c.type){case "default":c=new M(c);E(c,d);break;case "pc11":c=new fd(c);E(c,d);break;case "rl11":c=new P(c);E(c,d);break;case "rk11":c=new Q(c),E(c,d)}}});var gd;if(Bb){var hd=new ArrayBuffer(2);(new DataView(hd)).setUint16(0,256,!0);gd=256===(new Uint16Array(hd))[0]}else gd=!1;var id=gd;
|
||||||
function K(a,b,c,d,e,f){this.v=a;this.id=ld+=2;this.b=null;this.H=b;this.Zb=c;this.size=d||0;this.type=e||md;this.f=e==nd;this.controller=null;vc(this);this.cb=this.td=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],od(this,f.ld);else if(Bb)this.A=new ArrayBuffer(this.size),this.F=new DataView(this.A,0,this.size),this.D=new Uint8Array(this.A,0,this.size),this.R=new Uint16Array(this.A,0,this.size>>1),this.b=new Int32Array(this.A,0,this.size>>2),od(this,kd?pd:qd);else{a=this.b=Array(this.size>>
|
function K(a,b,c,d,e,f){this.v=a;this.id=jd+=2;this.b=null;this.H=b;this.Zb=c;this.size=d||0;this.type=e||kd;this.f=e==ld;this.controller=null;vc(this);this.bb=this.td=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],md(this,f.ld);else if(Bb)this.B=new ArrayBuffer(this.size),this.F=new DataView(this.B,0,this.size),this.D=new Uint8Array(this.B,0,this.size),this.R=new Uint16Array(this.B,0,this.size>>1),this.b=new Int32Array(this.B,0,this.size>>2),md(this,id?nd:od);else{a=this.b=Array(this.size>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;od(this,rd)}else od(this)}var md=0,Dc=1,nd=2,Bc=4,Ec=["NONE","RAM","ROM","VID","H/W"],ld=0;
|
2);for(f=0;f<a.length;f++)a[f]=0;md(this,pd)}else md(this)}var kd=0,Bc=1,ld=2,xc=4,Cc=["NONE","RAM","ROM","VID","H/W"],jd=0;
|
||||||
K.prototype={constructor:K,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Bb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Bb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.cb=!0}return!1},wb:function(a,b){b?this.g++||sd(this,td,!1):this.B++||ud(this,td,!1)},T:function(a,b){this.j&&I(this.j,32)&&G(this.j,
|
K.prototype={constructor:K,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Bb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Bb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.bb=!0}return!1},vb:function(a,b){b?this.g++||qd(this,rd,!1):this.A++||sd(this,rd,!1)},T:function(a,b){this.j&&I(this.j,32)&&G(this.j,
|
||||||
"attempt to read invalid address "+L(this.j,b),!0);this.v.Na(b,32,2);return 255},w:function(a,b,c){this.j&&I(this.j,32)&&G(this.j,"attempt to write "+L(this.j,b)+" to invalid addresses "+L(this.j,c),!0);this.v.Na(c,32,4)},U:function(a,b){return this.fc(a++,b++)|this.fc(a,b)<<8},L:function(a,b,c){this.ic(a++,b&255,c++);this.ic(a,b>>8,c)},fa:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},Ea:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
|
"attempt to read invalid address "+L(this.j,b),!0);this.v.Na(b,32,2);return 255},w:function(a,b,c){this.j&&I(this.j,32)&&G(this.j,"attempt to write "+L(this.j,b)+" to invalid addresses "+L(this.j,c),!0);this.v.Na(c,32,4)},U:function(a,b){return this.fc(a++,b++)|this.fc(a,b)<<8},L:function(a,b,c){this.ic(a++,b&255,c++);this.ic(a,b>>8,c)},ea:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},Ea:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
|
||||||
1]&255)<<8},Pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.cb=!0},ab:function(a,b,c){a&1&&this.v.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.cb=!0},hb:function(a,b){if(this.j&&null!=this.H){var c=this.j;vd(c,this.H+a,1,c.N)&&c.ea(!0)}return this.I(a,b)},na:function(a,b){if(this.j&&null!=this.H){var c=this.j;vd(c,this.H+a,2,c.N)&&c.ea(!0)}return this.K(a,b)},Fa:function(a,
|
1]&255)<<8},Pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.bb=!0},$a:function(a,b,c){a&1&&this.v.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.bb=!0},gb:function(a,b){if(this.j&&null!=this.H){var c=this.j;td(c,this.H+a,1,c.N)&&c.da(!0)}return this.I(a,b)},na:function(a,b){if(this.j&&null!=this.H){var c=this.j;td(c,this.H+a,2,c.N)&&c.da(!0)}return this.K(a,b)},Fa:function(a,
|
||||||
b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.G(a,b,c)},Za:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.N(a,b,c)},aa:function(a){return this.D[a]},ib:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},ua:function(a,b){a&1&&this.v.Na(b,64,2);
|
b,c){if(this.j&&null!=this.H){var d=this.j;td(d,this.H+a,1,d.F)&&d.da(!0)}this.f?this.w(a,b,c):this.G(a,b,c)},Ya:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;td(d,this.H+a,2,d.F)&&d.da(!0)}this.f?this.w(a,b,c):this.N(a,b,c)},aa:function(a){return this.D[a]},hb:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},fa:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},ua:function(a,b){a&1&&this.v.Na(b,64,2);
|
||||||
a=this.R[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Ca:function(a,b){this.D[a]=b;this.cb=!0},Ga:function(a,b,c){this.D[a]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Qa:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.cb=!0},$a:function(a,b,c){a&1&&this.v.Na(c,64,4);this.R[a>>1]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
a=this.R[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Ca:function(a,b){this.D[a]=b;this.bb=!0},Ga:function(a,b,c){this.D[a]=b;this.bb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Qa:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.bb=!0},Za:function(a,b,c){a&1&&this.v.Na(c,64,4);this.R[a>>1]=b;this.bb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
||||||
b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&ud(a,td,!1),(a.g=c.g)&&sd(a,td,!1))}function wd(a,b){b?--a.g||(a.ic=a.f?a.w:a.G,a.$b=a.f?a.L:a.N):--a.B||(a.fc=a.I,a.Aa=a.K)}function sd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.w,a.N=b[3]||a.L}function ud(a,b,c){c&&a.B||(a.fc=b[0]||a.T,a.Aa=b[2]||a.U);if(c||void 0===c)a.I=b[0]||a.T,a.K=b[2]||a.U}function od(a,b){b||(b=xd);ud(a,b,void 0);sd(a,b,void 0)}
|
b)+")",!0)}};function vc(a,b,c){a.j=b;a.A=a.g=0;c&&((a.A=c.A)&&sd(a,rd,!1),(a.g=c.g)&&qd(a,rd,!1))}function ud(a,b){b?--a.g||(a.ic=a.f?a.w:a.G,a.$b=a.f?a.L:a.N):--a.A||(a.fc=a.I,a.Aa=a.K)}function qd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.w,a.N=b[3]||a.L}function sd(a,b,c){c&&a.A||(a.fc=b[0]||a.T,a.Aa=b[2]||a.U);if(c||void 0===c)a.I=b[0]||a.T,a.K=b[2]||a.U}function md(a,b){b||(b=vd);sd(a,b,void 0);qd(a,b,void 0)}
|
||||||
var xd=[],rd=[K.prototype.fa,K.prototype.Pa,K.prototype.Ea,K.prototype.ab],td=[K.prototype.hb,K.prototype.Fa,K.prototype.na,K.prototype.Za];if(Bb)var qd=[K.prototype.aa,K.prototype.Ca,K.prototype.ga,K.prototype.Qa],pd=[K.prototype.ib,K.prototype.Ga,K.prototype.ua,K.prototype.$a];
|
var vd=[],pd=[K.prototype.ea,K.prototype.Pa,K.prototype.Ea,K.prototype.$a],rd=[K.prototype.gb,K.prototype.Fa,K.prototype.na,K.prototype.Ya];if(Bb)var od=[K.prototype.aa,K.prototype.Ca,K.prototype.fa,K.prototype.Qa],nd=[K.prototype.hb,K.prototype.Ga,K.prototype.ua,K.prototype.Za];
|
||||||
function yd(a,b){x.call(this,"CPU",a,yd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.mb=c;this.Tb=Math.round(this.tb/1E4)/100;this.Ab=this.Tb*this.mb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.N=[];this.Cc=this.Ee.bind(this);J(this)}B(yd);var zd=["power","reset"];k=yd.prototype;
|
function wd(a,b){x.call(this,"CPU",a,wd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.sb=b;this.lb=c;this.Tb=Math.round(this.sb/1E4)/100;this.zb=this.Tb*this.lb;this.C.X=!1;this.C.hc=!1;this.C.Db=a.autoStart;this.C.Eb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.N=[];this.Cc=this.Ee.bind(this);J(this)}B(wd);var xd=["power","reset"];k=wd.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b<zd.length;b++)(c=this.D[zd[b]])&&this.B.xa(null,zd[b],c);a=Ad(a,"autoStart");null!=a&&(this.C.Eb="true"==a?!0:"false"==a?!1:!!a);J(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
|
k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b<xd.length;b++)(c=this.D[xd[b]])&&this.A.xa(null,xd[b],c);a=yd(a,"autoStart");null!=a&&(this.C.Db="true"==a?!0:"false"==a?!1:!!a);J(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
|
||||||
k.Ka=function(a,b){if(!b){if(a&&this.restore){Bd(this);if(!this.restore(a))return!1;Cd(this)}else this.reset();this.j?(a=this.j,b=this.C.Eb,a.$a=!0,a.i("Type ? for help with PDPjs Debugger commands"),Dd(a),b||a.pb(),a.Qa&&(b=a.Qa,a.Qa=null,Ed(a,b))):this.i("No debugger detected")}return!0};k.Ja=function(a){return a?this.save():!0};k.Eb=function(){return this.C.Eb||!this.j&&void 0===this.D.run?(this.rb(),!0):!1};k.Hc=function(){return 0};
|
k.Ka=function(a,b){if(!b){if(a&&this.restore){zd(this);if(!this.restore(a))return!1;Ad(this)}else this.reset();this.j?(a=this.j,b=this.C.Db,a.Za=!0,a.i("Type ? for help with PDPjs Debugger commands"),Bd(a),b||a.ob(),a.Qa&&(b=a.Qa,a.Qa=null,Cd(a,b))):this.i("No debugger detected")}return!0};k.Ja=function(a){return a?this.save():!0};k.Db=function(){return this.C.Db||!this.j&&void 0===this.D.run?(this.qb(),!0):!1};k.Hc=function(){return 0};
|
||||||
function Cd(a){void 0===a.Wb&&(a.Wb=0);void 0===a.Ib&&(a.Ib=-1);void 0===a.Jb&&(a.Jb=-1);a.C.Fb=0<=a.Wb&&0<a.Ib;a.C.Fb&&(a.Vb=0,a.Ca=a.Wb-a.na)}function Vb(a,b){if(a.C.Fb){var c=!1;a.Vb=a.Vb+a.Hc()|0;a.Ca-=b;0>=a.Ca&&(a.Ca+=a.Ib,c=!0);0<=a.Jb&&a.Jb<=Fd(a)&&(a.Ib=a.Jb=-1,Cd(a),a.ea(),c=!0);c&&a.i(Fd(a)+" cycles: checksum="+p(a.Vb))}}
|
function Ad(a){void 0===a.Wb&&(a.Wb=0);void 0===a.Ib&&(a.Ib=-1);void 0===a.Jb&&(a.Jb=-1);a.C.Eb=0<=a.Wb&&0<a.Ib;a.C.Eb&&(a.Vb=0,a.Ca=a.Wb-a.na)}function Vb(a,b){if(a.C.Eb){var c=!1;a.Vb=a.Vb+a.Hc()|0;a.Ca-=b;0>=a.Ca&&(a.Ca+=a.Ib,c=!0);0<=a.Jb&&a.Jb<=Dd(a)&&(a.Ib=a.Jb=-1,Ad(a),a.da(),c=!0);c&&a.i(Dd(a)+" cycles: checksum="+p(a.Vb))}}
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.C.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.C.ma);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.C.ready?"powered yet":"ready yet"+(b.cc?" (waiting for notification)":""))+".");a=!1}a&&(d.C.X?d.ea():d.rb())},
|
k.xa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.C.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.C.ma);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.C.ready?"powered yet":"ready yet"+(b.cc?" (waiting for notification)":""))+".");a=!1}a&&(d.C.X?d.da():d.qb())},
|
||||||
!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Gd(d,d.mb<<1,!0)},c.textContent=this.Ab.toFixed(2)+"Mhz",!0}return!1};k.ya=function(a){this.B&&this.B.ya(a)};function Ub(a,b,c){a.na+=b;c&&(a.ga=a.b=a.K=0)}function Hd(a,b){var c=1;b&&1<a.mb&&a.Ea&&(c=a.Ea/a.Tb);a.Ac=Math.round(1E3/30);a.ub=Math.floor(a.tb/30*c);b||(a.Fa=a.ub);a.jc=0}function Fd(a){return a.na+a.aa+a.ga-a.b}function Bd(a){a.Ea=0;a.Bc=0;a.na=a.aa=a.ga=a.b=a.K=0;Cd(a);Gd(a,1)}
|
!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Ed(d,d.lb<<1,!0)},c.textContent=this.zb.toFixed(2)+"Mhz",!0}return!1};k.ya=function(a){this.A&&this.A.ya(a)};function Ub(a,b,c){a.na+=b;c&&(a.fa=a.b=a.K=0)}function Fd(a,b){var c=1;b&&1<a.lb&&a.Ea&&(c=a.Ea/a.Tb);a.Ac=Math.round(1E3/30);a.tb=Math.floor(a.sb/30*c);b||(a.Fa=a.tb);a.jc=0}function Dd(a){return a.na+a.aa+a.fa-a.b}function zd(a){a.Ea=0;a.Bc=0;a.na=a.aa=a.fa=a.b=a.K=0;Ad(a);Ed(a,1)}
|
||||||
function Gd(a,b,c){var d=!1;if(void 0!==b){.8>a.Ea/a.Ab?b=1:d=!0;a.mb=b;b=a.Tb*a.mb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.pb()}Ub(a,a.aa);a.aa=0;a.U=Ba();a.fa=0;Hd(a);return d}function Lc(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&b<a.N.length&&(d||0>a.N[b][0])&&(c=a.tb*a.mb/1E3*c|0,a.C.X&&(c+=Id(a)),a.N[b][0]=c)}
|
function Ed(a,b,c){var d=!1;if(void 0!==b){.8>a.Ea/a.zb?b=1:d=!0;a.lb=b;b=a.Tb*a.lb;if(a.zb!=b){a.zb=b;b=a.zb.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.A&&a.A.ob()}Ub(a,a.aa);a.aa=0;a.U=Ba();a.ea=0;Fd(a);return d}function Jc(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&b<a.N.length&&(d||0>a.N[b][0])&&(c=a.sb*a.lb/1E3*c|0,a.C.X&&(c+=Gd(a)),a.N[b][0]=c)}
|
||||||
function Jd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Id(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c}
|
function Hd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gd(a,b){var c=a.fa-=a.b;a.b=a.K=0;b&&(a.fa=0);return c}
|
||||||
k.Ee=function(){if(this.C.X){this.jc>=this.tb&&Hd(this,!0);this.Qa=0;this.ab=Ba();if(this.fa){var a=this.ab-this.fa;a>this.Ac&&(this.U+=a,this.U>this.ab&&(this.U=this.ab))}try{do{var b=Jd(this,this.C.Fb?1:this.ub);try{this.sb(b)}catch(e){if("number"!=typeof e)throw e;}b=Id(this,!0);this.Qa+=b;this.aa+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Bc&&(this.ya(),this.Bc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Fd(this));Ab(this,e.stack||
|
k.Ee=function(){if(this.C.X){this.jc>=this.sb&&Fd(this,!0);this.Qa=0;this.$a=Ba();if(this.ea){var a=this.$a-this.ea;a>this.Ac&&(this.U+=a,this.U>this.$a&&(this.U=this.$a))}try{do{var b=Hd(this,this.C.Eb?1:this.tb);try{this.rb(b)}catch(e){if("number"!=typeof e)throw e;}b=Gd(this,!0);this.Qa+=b;this.aa+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.tb;15<=++this.Bc&&(this.ya(),this.Bc=0);break}}while(this.C.X)}catch(e){this.da();this.A&&this.A.stop(Ba(),Dd(this));Ab(this,e.stack||
|
||||||
e.message);return}if(this.C.X){a=setTimeout;b=this.Cc;this.fa=Ba();var c=this.Ac;this.Qa&&(c=Math.round(c*this.Qa/this.ub));var c=c-(this.fa-this.ab),d=this.fa-this.U;d&&(this.Ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.na=0,Gd(this)));if(0>c||this.Ea<this.Ab)-1E3>c&&(this.U-=c),c=0;this.jc+=this.Qa;this.fa+=c;a(b,c)}}};
|
e.message);return}if(this.C.X){a=setTimeout;b=this.Cc;this.ea=Ba();var c=this.Ac;this.Qa&&(c=Math.round(c*this.Qa/this.tb));var c=c-(this.ea-this.$a),d=this.ea-this.U;d&&(this.Ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.na=0,Ed(this)));if(0>c||this.Ea<this.zb)-1E3>c&&(this.U-=c),c=0;this.jc+=this.Qa;this.ea+=c;a(b,c)}}};
|
||||||
k.rb=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Gd(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.pb(!0),this.B.start(this.U,Fd(this)));setTimeout(this.Cc,0);return!0};k.sb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Id(this);Ub(this,this.aa);this.aa=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Fd(this));b=!0}this.C.complete=a;return b};
|
k.qb=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Ed(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.ob(!0),this.A.start(this.U,Dd(this)));setTimeout(this.Cc,0);return!0};k.rb=function(){return 0};k.da=function(a){var b=!1;if(this.C.X){Gd(this);Ub(this,this.aa);this.aa=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.A&&this.A.stop(Ba(),Dd(this));b=!0}this.C.complete=a;return b};
|
||||||
function Kd(a){this.lb=+a.model||1170;this.xc=a.addrReset||0;yd.call(this,a,6666667);this.vb=0;this.zc=255;1120==this.lb?(this.decode=Ld.bind(this),this.ua=this.rd,this.vb=8,this.zc=-1):(this.decode=Md.bind(this),this.ua=this.sd);Nd(this);this.L=0;this.I=null;this.C.complete=!1}B(Kd,yd);k=Kd.prototype;k.reset=function(){this.status("model "+this.lb);this.C.X&&this.ea();Nd(this);Bd(this);this.C.error=!1;this.parent.reset.call(this)};
|
function Id(a){this.kb=+a.model||1170;this.xc=a.addrReset||0;wd.call(this,a,6666667);this.ub=0;this.zc=255;1120==this.kb?(this.decode=Jd.bind(this),this.ua=this.rd,this.ub=8,this.zc=-1):(this.decode=Kd.bind(this),this.ua=this.sd);Ld(this);this.L=0;this.I=null;this.C.complete=!1}B(Id,wd);k=Id.prototype;k.reset=function(){this.status("model "+this.kb);this.C.X&&this.da();Ld(this);zd(this);this.C.error=!1;this.parent.reset.call(this)};
|
||||||
function Nd(a){a.V=65536;a.W=32768;a.ca=65535;a.Z=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.xc,-1,-2,-3,-4,-5,-6,-7,-8];a.gb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.$a=0;a.hd=[4,2,0,1];a.S=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
function Ld(a){a.V=65536;a.W=32768;a.ba=65535;a.Z=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.xc,-1,-2,-3,-4,-5,-6,-7,-8];a.fb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.B=0;a.Za=0;a.hd=[4,2,0,1];a.S=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0]];a.Yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Oc=[0,0,0,0,0,0,0,0];a.Nc=0;a.J=0;a.F=a.G=0;a.g=a.f=a.Sb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Ya=0;a.sa=0;a.Mb=0;a.ob=255;a.R=0;a.Za=0;a.Pa=262143;a.Ub=0;a.wa=0;a.I=null;a.v&&(Od(a),a.fd=Ic(a.v))}function Od(a){a.R?(a.T=65536,a.Rb=a.Ya&16?4186112:253952,a.da=a.vd,a.Aa=a.Be,a.$b=a.Af,xc(a.v,a.Ya&16?22:18)):(a.T=0,a.Rb=57344,a.da=a.ud,a.Aa=a.Mc,a.$b=a.Sc,xc(a.v,16))}
|
0,0,0,0,0,0,0,0,0,0]];a.Yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Oc=[0,0,0,0,0,0,0,0];a.Nc=0;a.J=0;a.F=a.G=0;a.g=a.f=a.Sb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.sa=0;a.Mb=0;a.nb=255;a.R=0;a.Ya=0;a.Pa=262143;a.Ub=0;a.wa=0;a.I=null;a.v&&(Md(a),a.fd=Gc(a.v))}function Md(a){a.R?(a.T=65536,a.Rb=a.Xa&16?4186112:253952,a.ca=a.vd,a.Aa=a.Be,a.$b=a.Af,zc(a.v,a.Xa&16?22:18)):(a.T=0,a.Rb=57344,a.ca=a.ud,a.Aa=a.Mc,a.$b=a.Sc,zc(a.v,16))}
|
||||||
function $c(a){var b=a.Da;b&57344||(b=b&-3199|a.Za<<5|a.$a<<1);return b}function ad(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.wa>>16&65535,a.lc=a.wa&65535);a.Da=b;a.Za=b>>5&3;a.$a=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.R!=c&&(a.R=c,Od(a))}}function bd(a){a.Da&57344||(a.kc=a.wa>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function cd(a){a.Da&57344||(a.lc=a.wa&65535);return a.lc}function dd(a,b){1170>a.lb&&(b&=-49);a.Ya!=b&&(a.Ya=b,a.Pa=b&16?4194303:262143,Od(a))}
|
function Qc(a){var b=a.Da;b&57344||(b=b&-3199|a.Ya<<5|a.Za<<1);return b}function Rc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.wa>>16&65535,a.lc=a.wa&65535);a.Da=b;a.Ya=b>>5&3;a.Za=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.R!=c&&(a.R=c,Md(a))}}function $c(a){a.Da&57344||(a.kc=a.wa>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ad(a){a.Da&57344||(a.lc=a.wa&65535);return a.lc}function bd(a,b){1170>a.kb&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Md(a))}
|
||||||
k.Hc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.na,this.mb]);a.set(2,Hc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.na=b[1];Gd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.N){for(var f=0,g=Array(b.N),h=0;h<e.length-1;)for(var l=e[h++],m=e[h++];l--;)g[f++]=m;e=g}f=b.ba[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
k.Hc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.na,this.lb]);a.set(2,Fc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.na=b[1];Ed(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.N){for(var f=0,g=Array(b.N),h=0;h<e.length-1;)for(var l=e[h++],m=e[h++];l--;)g[f++]=m;e=g}f=b.ga[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
||||||
function Pd(a){return a.V&65536?1:0}function Qd(a){return a.W&32768?2:0}function Rd(a){return a.ca&65535?0:4}function Sd(a){return a.Z&32768?8:0}function Td(a){var b=a.u[7];a.wa=b;var c=a.Aa(b);a.u[7]=b+2&65535;return c}function Ud(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function T(a,b){a.u[7]=b&65535}function Oc(a,b,c){return{uc:a,nb:b,message:c||0,next:null}}function Vd(a,b){var c=a.I;if(c==b)a.I=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.I&&(a.J|=1)}
|
function Nd(a){return a.V&65536?1:0}function Od(a){return a.W&32768?2:0}function Pd(a){return a.ba&65535?0:4}function Qd(a){return a.Z&32768?8:0}function Rd(a){var b=a.u[7];a.wa=b;var c=a.Aa(b);a.u[7]=b+2&65535;return c}function Sd(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function T(a,b){a.u[7]=b&65535}function Mc(a,b,c){return{uc:a,mb:b,message:c||0,next:null}}function Td(a,b){var c=a.I;if(c==b)a.I=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.I&&(a.J|=1)}
|
||||||
function Mc(a,b){if(b!=a.I){var c=a.I;if(!c||c.nb<=b.nb)b.next=c,a.I=b;else{do{var d=c.next;if(!d||d.nb<=b.nb){b.next=d;c.next=b;break}c=d}while(c)}}a.J|=1;b.message&&I(a,b.message|8)&&G(a,"setIRQ(vector="+na(b.uc)+",priority="+b.nb+")",!0,!0)}function Rc(a,b){Vd(a,b);b.message&&I(a,b.message|8)&&G(a,"clearIRQ(vector="+na(b.uc)+",priority="+b.nb+")",!0,!0)}function Wd(a){return a.J&64?(a.ta(168,64,-5),!0):a.J&32?(a.ta(4,32,-4),!0):a.J&16?(a.ta(12,16,-6),!0):!1}
|
function Kc(a,b){if(b!=a.I){var c=a.I;if(!c||c.mb<=b.mb)b.next=c,a.I=b;else{do{var d=c.next;if(!d||d.mb<=b.mb){b.next=d;c.next=b;break}c=d}while(c)}}a.J|=1;b.message&&I(a,b.message|8)&&G(a,"setIRQ(vector="+na(b.uc)+",priority="+b.mb+")",!0,!0)}function Pc(a,b){Td(a,b);b.message&&I(a,b.message|8)&&G(a,"clearIRQ(vector="+na(b.uc)+",priority="+b.mb+")",!0,!0)}function Ud(a){return a.J&64?(a.ta(168,64,-5),!0):a.J&32?(a.ta(4,32,-4),!0):a.J&16?(a.ta(12,16,-6),!0):!1}
|
||||||
function fd(a){return a.P=a.P&63728|Sd(a)|Rd(a)|Qd(a)|Pd(a)}function gd(a,b){a.Z=b<<12;a.ca=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.gb.length;0<=--c;){var d=a.u[c];a.u[c]=a.gb[c];a.gb[c]=d}a.A=b>>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.J&=-3;a.J|=a.I?2:1}function ed(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.J|=1}a.Mb=b}function U(a,b){a.J&256||(a.Z=a.ca=b,a.W=0)}function Xd(a,b,c){a.J&256||(a.Z=a.ca=a.V=b,a.W=c||0)}
|
function dd(a){return a.P=a.P&63728|Qd(a)|Pd(a)|Od(a)|Nd(a)}function ed(a,b){a.Z=b<<12;a.ba=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.fb.length;0<=--c;){var d=a.u[c];a.u[c]=a.fb[c];a.fb[c]=d}a.B=b>>14&3;c=a.P>>14&3;a.B!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.B]);a.P=b;a.J&=-3;a.J|=a.I?2:1}function cd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.J|=1}a.Mb=b}function U(a,b){a.J&256||(a.Z=a.ba=b,a.W=0)}function Vd(a,b,c){a.J&256||(a.Z=a.ba=a.V=b,a.W=c||0)}
|
||||||
function Yd(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Zd(a,b){a.J&256||(a.Z=a.ca=a.V=b,a.W=a.Z^a.V>>1)}function $d(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^d)&(d^b))}
|
function Wd(a,b,c,d){a.J&256||(a.Z=a.ba=a.V=b,a.W=(c^b)&(d^b))}function Xd(a,b){a.J&256||(a.Z=a.ba=a.V=b,a.W=a.Z^a.V>>1)}function Yd(a,b,c,d){a.J&256||(a.Z=a.ba=a.V=b,a.W=(c^d)&(d^b))}
|
||||||
k.ta=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=fd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.sa|=4,this.u[6]=4,d=!0);this.wa=a|4143316992;this.A=0;var e=this.Aa(a|this.T),f=this.Aa(a+2&65535|this.T);gd(this,f&-12289|this.Ga>>2&12288);ue(this,this.Ga,d);ue(this,this.u[7],d);T(this,e);this.J&=~(b|19);this.J|=129;this.Ga=-1;this.pd=a;this.kd=c;if(-3<=c)throw a;}};function ve(a){var b=we(a),c=we(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);gd(a,c);a.J&=-17}
|
k.ta=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=dd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.sa|=4,this.u[6]=4,d=!0);this.wa=a|4143316992;this.B=0;var e=this.Aa(a|this.T),f=this.Aa(a+2&65535|this.T);ed(this,f&-12289|this.Ga>>2&12288);se(this,this.Ga,d);se(this,this.u[7],d);T(this,e);this.J&=~(b|19);this.J|=129;this.Ga=-1;this.pd=a;this.kd=c;if(-3<=c)throw a;}};function te(a){var b=ue(a),c=ue(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);ed(a,c);a.J&=-17}
|
||||||
function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Ya&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
|
function Dc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||||
function xe(a,b,c){var d,e,f;if(!(c&a.R))return f=b&65535,57344<=f&&(f|=a.Rb),f;d=b>>13;a.Ya&a.hd[a.A]||(d&=7);e=a.S[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;3932160<=f&&(f=Fc(a,f));if(a.L)return f;f>=a.fd&&f<a.Rb?(a.sa|=32,a.ta(4,0,f)):f&1&&!(c&1)&&(a.sa|=64,a.ta(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&
|
function ve(a,b,c){var d,e,f;if(!(c&a.R))return f=b&65535,57344<=f&&(f|=a.Rb),f;d=b>>13;a.Xa&a.hd[a.B]||(d&=7);e=a.S[a.B][d];f=(a.ka[a.B][d]<<6)+(b&8191)&a.Pa;3932160<=f&&(f=Dc(a,f));if(a.L)return f;f>=a.fd&&f<a.Rb?(a.sa|=32,a.ta(4,0,f)):f&1&&!(c&1)&&(a.sa|=64,a.ta(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&
|
||||||
8128)&&(g|=16384));a.S[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.Za=a.A,a.$a=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.Za<<5|a.$a<<1,ad(a,a.Da&-61695|g&61694)),a.ta(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ye(a,b){return a.v.dc(b)}function we(a){var b=a.Aa(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}
|
8128)&&(g|=16384));a.S[a.B][d]=e;if(f!=(4194170&a.Pa)||a.B)a.Ya=a.B,a.Za=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.Ya<<5|a.Za<<1,Rc(a,a.Da&-61695|g&61694)),a.ta(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function we(a,b){return a.v.dc(b)}function ue(a){var b=a.Aa(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}
|
||||||
function ue(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.wa=a.wa&65535|(a.wa&-65536)<<8|16121856;c||a.ua(4,-2,d);a.$b(d,b)}
|
function se(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.wa=a.wa&65535|(a.wa&-65536)<<8|16121856;c||a.ua(4,-2,d);a.$b(d,b)}
|
||||||
function ze(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.ta(4,0,-2),0;case 1:return 6==c&&a.ua(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.ua(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.Aa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.ua(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.Aa(e)|g;a.b-=8;break;case 6:return e=a.Aa(Ud(a,2)),e=e+a.u[c]&65535,6==c&&a.ua(d,
|
function xe(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.ta(4,0,-2),0;case 1:return 6==c&&a.ua(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.ua(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.Aa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.ua(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.Aa(e)|g;a.b-=8;break;case 6:return e=a.Aa(Sd(a,2)),e=e+a.u[c]&65535,6==c&&a.ua(d,
|
||||||
0,e),a.b-=6,e|g;case 7:return e=a.Aa(Ud(a,2)),e=e+a.u[c]&65535,e=a.Aa(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.wa=a.wa&65535|(a.wa&-65536)<<8|(f<<3&248|c)<<16;return e}k.rd=function(a,b,c){!this.A&&0>=b&&c<=this.ob&&(this.J|=32)};k.sd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.ob&&(c<=this.ob-32?this.ta(4,0,-3):(this.sa|=8,this.J|=32)))};k.ec=function(a){if(!this.R)return this.v.ec(a);this.L++;a=ye(this,xe(this,a,3));this.L--;return a};
|
0,e),a.b-=6,e|g;case 7:return e=a.Aa(Sd(a,2)),e=e+a.u[c]&65535,e=a.Aa(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.wa=a.wa&65535|(a.wa&-65536)<<8|(f<<3&248|c)<<16;return e}k.rd=function(a,b,c){!this.B&&0>=b&&c<=this.nb&&(this.J|=32)};k.sd=function(a,b,c){this.B||(65534<=c&&(c|=-65536),a&4&&c<=this.nb&&(c<=this.nb-32?this.ta(4,0,-3):(this.sa|=8,this.J|=32)))};k.ec=function(a){if(!this.R)return this.v.ec(a);this.L++;a=we(this,ve(this,a,3));this.L--;return a};
|
||||||
k.Va=function(a){if(!this.R)return this.v.Va(a);this.L++;a=this.Mc(xe(this,a,2));this.L--;return a};k.Cb=function(a,b){this.R?(this.L++,a=xe(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Cb(a,b)};k.qb=function(a,b){this.R?(this.L++,this.Sc(xe(this,a,4),b),this.L--):this.v.qb(a,b)};k.ud=function(a,b,c){return ze(this,a,b,c)};k.vd=function(a,b,c){return xe(this,ze(this,a,b,c),c)};k.Mc=function(a){return this.v.va(this.Ub=a)};k.Be=function(a){return this.v.va(this.Ub=xe(this,a,2))};
|
k.Va=function(a){if(!this.R)return this.v.Va(a);this.L++;a=this.Mc(ve(this,a,2));this.L--;return a};k.Bb=function(a,b){this.R?(this.L++,a=ve(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Bb(a,b)};k.pb=function(a,b){this.R?(this.L++,this.Sc(ve(this,a,4),b),this.L--):this.v.pb(a,b)};k.ud=function(a,b,c){return xe(this,a,b,c)};k.vd=function(a,b,c){return ve(this,xe(this,a,b,c),c)};k.Mc=function(a){return this.v.va(this.Ub=a)};k.Be=function(a){return this.v.va(this.Ub=ve(this,a,2))};
|
||||||
k.Sc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Af=function(a,b){this.v.Db(this.Ub=xe(this,a,4),b)};function Ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ze(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.Aa(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
k.Sc=function(a,b){this.v.Cb(this.Ub=a,b&65535)};k.Af=function(a,b){this.v.Cb(this.Ub=ve(this,a,4),b)};function ye(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xe(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.B=a.P>>12&3,c=a.Aa(d|c&a.T),a.B=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
||||||
function Be(a,b,c,d){a.wa=a.wa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ze(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=xe(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ce(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?ye(a,a.da(b,c,3)):a.u[c+a.vb]&a.zc}function De(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?a.v.va(a.da(b,c,2)):a.u[c+a.vb]}function Ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ze(a,b,c,8)}
|
function ze(a,b,c,d){a.wa=a.wa&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xe(a,b,e,4),c&65536||(e&=65535),a.B=a.P>>12&3,e=ve(a,e|c&65536,4),a.B=a.P>>14&3,a.v.Cb(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ae(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?we(a,a.ca(b,c,3)):a.u[c+a.ub]&a.zc}function Be(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?a.v.va(a.ca(b,c,2)):a.u[c+a.ub]}function Ce(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xe(a,b,c,8)}
|
||||||
function Fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ye(a,a.da(b,c,3)):a.u[c]&255}function Ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.va(a.da(b,c,2)):a.u[c]}function He(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Sb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ye(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?we(a,a.ca(b,c,3)):a.u[c]&255}function Ee(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.va(a.ca(b,c,2)):a.u[c]}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Sb=a.ca(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,we(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
||||||
function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.va(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.v.Cb(e,d.call(a,0>c?a.u[-c-1]:c,a.v.va(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ge(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ca(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function He(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ca(b,d,4),a.v.Cb(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
||||||
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
||||||
k.sb=function(a){this.C.complete=!0;var b=this.j?Ke(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Le(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.J){if(a=this.J&11)if(a=!1,this.J&2){var d=160,e=(this.Mb&224)>>5,f=this.I&&this.I.nb>e?this.I:null;f&&(d=f.uc,e=f.nb);e>(this.P&224)>>5?(this.J&8&&(Ud(this,2),this.J&=-9),this.ta(d,0,-9),e=!0):e=!1;e&&(f&&Vd(this,f),a=!0);this.I||this.Mb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Le(this.j,this.u[7],
|
k.rb=function(a){this.C.complete=!0;var b=this.j?Ie(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.fa=this.b=a;do{if(b){if(Je(this.j,this.u[7],c)){this.da();break}c||c++;b++}if(this.J){if(a=this.J&11)if(a=!1,this.J&2){var d=160,e=(this.Mb&224)>>5,f=this.I&&this.I.mb>e?this.I:null;f&&(d=f.uc,e=f.mb);e>(this.P&224)>>5?(this.J&8&&(Sd(this,2),this.J&=-9),this.ta(d,0,-9),e=!0):e=!1;e&&(f&&Td(this,f),a=!0);this.I||this.Mb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Je(this.j,this.u[7],
|
||||||
c)){this.ea();break}if(0>c)break}if(this.J&112&&Wd(this)){if(b&&Le(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.J=this.J&15|this.P&16;this.decode(Td(this))}while(0<this.b);return this.C.complete?this.ga-this.b:void 0===this.C.complete?0:-1};ab(function(){for(var a=F(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Kd(d);E(d,c)}});function Me(a,b){var c=b+a;Yd(this,c,a,b);return c&65535}function Ne(a,b){var c=b+a;Yd(this,c<<8,a<<8,b<<8);return c&255}
|
c)){this.da();break}if(0>c)break}if(this.J&112&&Ud(this)){if(b&&Je(this.j,this.u[7],c)){this.da();break}if(0>c)break}}this.J=this.J&15|this.P&16;this.decode(Rd(this))}while(0<this.b);return this.C.complete?this.fa-this.b:void 0===this.C.complete?0:-1};ab(function(){for(var a=F(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Id(d);E(d,c)}});function Ke(a,b){var c=b+a;Wd(this,c,a,b);return c&65535}function Le(a,b){var c=b+a;Wd(this,c<<8,a<<8,b<<8);return c&255}
|
||||||
function Oe(a,b){a=b<<1;Zd(this,a);return a&65535}function Pe(a,b){a=b<<1;Zd(this,a<<8);return a&255}function Qe(a,b){a=b&32768|b>>1|b<<16;Zd(this,a);return a&65535}function Re(a,b){a=b&128|b>>1|b<<8;Zd(this,a<<8);return a&255}function Se(a,b){a=b&~a;U(this,a);return a}function Te(a,b){a=b&~a;U(this,a<<8);return a}function Ue(a,b){a|=b;U(this,a);return a}function Ve(a,b){a|=b;U(this,a<<8);return a}function We(a,b){a=~b|65536;Xd(this,a);return a&65535}
|
function Me(a,b){a=b<<1;Xd(this,a);return a&65535}function Ne(a,b){a=b<<1;Xd(this,a<<8);return a&255}function Oe(a,b){a=b&32768|b>>1|b<<16;Xd(this,a);return a&65535}function Pe(a,b){a=b&128|b>>1|b<<8;Xd(this,a<<8);return a&255}function Qe(a,b){a=b&~a;U(this,a);return a}function Re(a,b){a=b&~a;U(this,a<<8);return a}function Se(a,b){a|=b;U(this,a);return a}function Te(a,b){a|=b;U(this,a<<8);return a}function Ue(a,b){a=~b|65536;Vd(this,a);return a&65535}
|
||||||
function Xe(a,b){a=~b|256;Xd(this,a<<8);return a&255}function Ye(a,b){a=b-a;this.J&256||(this.Z=this.ca=a,this.W=b&(b^a));return a&65535}function Ze(a,b){a=b-a;var c=a<<8;b<<=8;this.J&256||(this.Z=this.ca=c,this.W=b&(b^c));return a&255}function $e(a,b){a=b+a;this.J&256||(this.Z=this.ca=a,this.W=a&(b^a));return a&65535}function af(a,b){a=b+a;var c=a<<8;this.J&256||(this.Z=this.ca=c,this.W=c&(b<<8^c));return a&255}function bf(a,b){a=-b;Xd(this,a,a&b&32768);return a&65535}
|
function Ve(a,b){a=~b|256;Vd(this,a<<8);return a&255}function We(a,b){a=b-a;this.J&256||(this.Z=this.ba=a,this.W=b&(b^a));return a&65535}function Xe(a,b){a=b-a;var c=a<<8;b<<=8;this.J&256||(this.Z=this.ba=c,this.W=b&(b^c));return a&255}function Ye(a,b){a=b+a;this.J&256||(this.Z=this.ba=a,this.W=a&(b^a));return a&65535}function Ze(a,b){a=b+a;var c=a<<8;this.J&256||(this.Z=this.ba=c,this.W=c&(b<<8^c));return a&255}function $e(a,b){a=-b;Vd(this,a,a&b&32768);return a&65535}
|
||||||
function cf(a,b){a=-b;Xd(this,a<<8,(a&b&128)<<8);return a&255}function df(a,b){a=b<<1|this.V>>16&1;Zd(this,a);return a&65535}function ef(a,b){a=b<<1|this.V>>16&1;Zd(this,a<<8);return a&255}function ff(a,b){a=(this.V&65536|b)>>1|b<<16;Zd(this,a);return a&65535}function gf(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Zd(this,a<<8);return a&255}function hf(a,b){var c=b-a;$d(this,c,a,b);return c&65535}function jf(a,b){var c=b-a;$d(this,c<<8,a<<8,b<<8);return c&255}
|
function af(a,b){a=-b;Vd(this,a<<8,(a&b&128)<<8);return a&255}function bf(a,b){a=b<<1|this.V>>16&1;Xd(this,a);return a&65535}function cf(a,b){a=b<<1|this.V>>16&1;Xd(this,a<<8);return a&255}function df(a,b){a=(this.V&65536|b)>>1|b<<16;Xd(this,a);return a&65535}function ef(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Xd(this,a<<8);return a&255}function ff(a,b){var c=b-a;Yd(this,c,a,b);return c&65535}function gf(a,b){var c=b-a;Yd(this,c<<8,a<<8,b<<8);return c&255}
|
||||||
function kf(a,b){this.J&256||(this.Z=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function lf(a,b){a^=b;U(this,a);return a&65535}function mf(a){V(this,a,De(this,a),Me);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function hf(a,b){this.J&256||(this.Z=this.ba=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function jf(a,b){a^=b;U(this,a);return a&65535}function kf(a){V(this,a,Be(this,a),Ke);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
||||||
function nf(a){var b=Ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.V=c<<17-b,c>>=b;else if(b)if(16<b)this.W=c,c=0;else{this.V=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.Z=this.ca=c;this.b-=(this.g?6:7)+b}
|
function lf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.V=c<<17-b,c>>=b;else if(b)if(16<b)this.W=c,c=0;else{this.V=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.Z=this.ba=c;this.b-=(this.g?6:7)+b}
|
||||||
function of(a){var b=Ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.V=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.W=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.Z=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function pf(a){W(this,a,!Pd(this))}function qf(a){W(this,a,Pd(this))}
|
function mf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.V=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.W=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.Z=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function nf(a){W(this,a,!Nd(this))}function of(a){W(this,a,Nd(this))}
|
||||||
function rf(a){V(this,a,De(this,a),Se);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){He(this,a,Ce(this,a),Te);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function tf(a){V(this,a,De(this,a),Ue);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function uf(a){He(this,a,Ce(this,a),Ve);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function pf(a){V(this,a,Be(this,a),Qe);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){Fe(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){V(this,a,Be(this,a),Se);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){Fe(this,a,Ae(this,a),Te);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
||||||
function vf(a){var b=De(this,a);a=Ge(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function wf(a){var b=Ce(this,a);a=Fe(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function xf(a){W(this,a,Rd(this))}function yf(a){W(this,a,!Sd(this)==!Qd(this))}function zf(a){W(this,a,!Rd(this)&&!Sd(this)==!Qd(this))}function Af(a){W(this,a,!Pd(this)&&!Rd(this))}
|
function tf(a){var b=Be(this,a);a=Ee(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){var b=Ae(this,a);a=De(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function vf(a){W(this,a,Pd(this))}function wf(a){W(this,a,!Qd(this)==!Od(this))}function xf(a){W(this,a,!Pd(this)&&!Qd(this)==!Od(this))}function yf(a){W(this,a,!Nd(this)&&!Pd(this))}
|
||||||
function Bf(a){W(this,a,Rd(this)||!Sd(this)!=!Qd(this))}function Cf(a){W(this,a,Pd(this)||Rd(this))}function Df(a){W(this,a,!Sd(this)!=!Qd(this))}function Ef(a){W(this,a,Sd(this))}function Ff(a){W(this,a,!Rd(this))}function Gf(a){W(this,a,!Sd(this))}function Hf(){this.ta(12,0,-8);this.b-=5}function If(a){W(this,a,!0)}function Jf(a){W(this,a,!Qd(this))}function Kf(a){W(this,a,Qd(this))}function Lf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.Z=0);this.b-=5}
|
function zf(a){W(this,a,Pd(this)||!Qd(this)!=!Od(this))}function Af(a){W(this,a,Nd(this)||Pd(this))}function Bf(a){W(this,a,!Qd(this)!=!Od(this))}function Cf(a){W(this,a,Qd(this))}function Df(a){W(this,a,!Pd(this))}function Ef(a){W(this,a,!Qd(this))}function Ff(){this.ta(12,0,-8);this.b-=5}function Gf(a){W(this,a,!0)}function Hf(a){W(this,a,!Od(this))}function If(a){W(this,a,Od(this))}function Jf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ba=1);a&8&&(this.Z=0);this.b-=5}
|
||||||
function Mf(a){var b=De(this,a);a=Ge(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;$d(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Nf(a){var b=Ce(this,a);a=Fe(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);$d(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
|
function Kf(a){var b=Be(this,a);a=Ee(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Yd(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Lf(a){var b=Ae(this,a);a=De(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Yd(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
|
||||||
function Of(a){var b=Ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.Z=d>>16):(this.W=32768,this.ca=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.Z=0,this.W=32768,this.V=65536,this.b-=7}function Pf(){this.ta(24,0,-8);this.b-=25}
|
function Mf(a){var b=Ee(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.Z=d>>16):(this.W=32768,this.ba=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.Z=0,this.W=32768,this.V=65536,this.b-=7}function Nf(){this.ta(24,0,-8);this.b-=25}
|
||||||
function Qf(){this.P&49152?(this.sa|=128,this.ta(4,0,-7)):(this.w&&1120==this.lb&&this.w.setData(this.u[0],!0),this.j?Rf(this.j):this.ea());this.b-=7}function Sf(){this.ta(16,0,-8);this.b-=25}var Tf=[0,7,7,10,7,11,9,13];function Uf(a){this.K=this.b;T(this,Ee(this,a));this.b=this.K-Tf[this.g]}var Vf=[0,14,14,17,14,18,16,20];function Wf(a){this.K=this.b;var b=Ee(this,a);a=a>>6&7;ue(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Vf[this.g]}
|
function Of(){this.P&49152?(this.sa|=128,this.ta(4,0,-7)):(this.w&&1120==this.kb&&this.w.setData(this.u[0],!0),this.j?Pf(this.j):this.da());this.b-=7}function Qf(){this.ta(16,0,-8);this.b-=25}var Rf=[0,7,7,10,7,11,9,13];function Sf(a){this.K=this.b;T(this,Ce(this,a));this.b=this.K-Rf[this.g]}var Tf=[0,14,14,17,14,18,16,20];function Uf(a){this.K=this.b;var b=Ce(this,a);a=a>>6&7;se(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Tf[this.g]}
|
||||||
var Xf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Yf(a){var b=De(this,a);this.K=this.b;U(this,Je(this,a,b));this.b=this.K-Xf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Zf(a){var b=Ce(this,a);U(this,Ie(this,a,b,65535)<<8);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var $f=[7,13,13,17,14,18,17,21];
|
var Vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Wf(a){var b=Be(this,a);this.K=this.b;U(this,He(this,a,b));this.b=this.K-Vf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Xf(a){var b=Ae(this,a);U(this,Ge(this,a,b,65535)<<8);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Yf=[7,13,13,17,14,18,17,21];
|
||||||
function ag(a){var b=Ge(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&256||(this.Z=b>>16,this.ca=this.Z|b,this.W=0,this.V=-32768>b||32767<b?65536:0);this.b-=23}function bg(){this.b-=5}function cg(){this.P&49152||(this.v.reset(),Sb(this),this.w&&this.w.setData(this.u[0],!0));this.b-=667}function dg(a){if(a&8)X.call(this,a);else{var b=we(this);a&=7;7==a?T(this,b):(T(this,this.u[a]),this.u[a]=b);this.b-=9}}
|
function Zf(a){var b=Ee(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&256||(this.Z=b>>16,this.ba=this.Z|b,this.W=0,this.V=-32768>b||32767<b?65536:0);this.b-=23}function $f(){this.b-=5}function ag(){this.P&49152||(this.v.reset(),Sb(this),this.w&&this.w.setData(this.u[0],!0));this.b-=667}function bg(a){if(a&8)X.call(this,a);else{var b=ue(this);a&=7;7==a?T(this,b):(T(this,this.u[a]),this.u[a]=b);this.b-=9}}
|
||||||
function eg(){ve(this);this.b-=13}function fg(a){a&1&&(this.V=65536);a&2&&(this.W=32768);a&4&&(this.ca=0);a&8&&(this.Z=32768);this.b-=5}function gg(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function hg(a){V(this,a,De(this,a),hf);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function ig(a){V(this,a,0,kf);this.b-=this.g?9:3+(7==this.f?2:0)}function jg(){this.ta(28,0,-8);this.b-=5}
|
function cg(){te(this);this.b-=13}function dg(a){a&1&&(this.V=65536);a&2&&(this.W=32768);a&4&&(this.ba=0);a&8&&(this.Z=32768);this.b-=5}function eg(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function fg(a){V(this,a,Be(this,a),ff);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function gg(a){V(this,a,0,hf);this.b-=this.g?9:3+(7==this.f?2:0)}function hg(){this.ta(28,0,-8);this.b-=5}
|
||||||
function kg(){this.w&&(this.w.sc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=8;Ud(this,-2);this.b-=3}function lg(a){V(this,a,this.u[(a>>6&7)+this.vb],lf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Rf(b)):b=!1;b||this.ta(8,0,-8)}function Ld(a){mg[a>>12].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}function rg(a){sg[a>>6&3].call(this,a)}
|
function ig(){this.w&&(this.w.sc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=8;Sd(this,-2);this.b-=3}function jg(a){V(this,a,this.u[(a>>6&7)+this.ub],jf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Pf(b)):b=!1;b||this.ta(8,0,-8)}function Jd(a){kg[a>>12].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}
|
||||||
function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a&15].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}function Bg(a){Cg[a>>6&3].call(this,a)}
|
function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}
|
||||||
var mg=[function(a){Dg[a>>8&15].call(this,a)},Yf,Mf,vf,rf,tf,mf,X,function(a){Eg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,hg,X],Dg=[function(a){Fg[a>>4&15].call(this,a)},If,Ff,xf,yf,Df,zf,Bf,Wf,Wf,ng,pg,rg,X,X,X],og=[function(a){Xd(this,Je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,We);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,$e);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,
|
var kg=[function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,X,function(a){Cg[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Bg=[function(a){Dg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,X,X,X],mg=[function(a){Vd(this,He(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){V(this,a,0,
|
||||||
bf);this.b-=this.g?11:6},function(a){V(this,a,Pd(this)?1:0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Pd(this)?1:0,hf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ge(this,a);Xd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],sg=[function(a){V(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)}],
|
$e);this.b-=this.g?11:6},function(a){V(this,a,Nd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Nd(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ee(this,a);Vd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}],
|
||||||
Fg=[function(a){Gg[a&15].call(this,a)},X,X,X,Uf,Uf,Uf,Uf,dg,X,tg,vg,ig,ig,ig,ig],Gg=[Qf,kg,eg,Hf,Sf,cg,X,X,X,X,X,X,X,X,X,X],ug=[bg,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Lf,function(){this.ca=1;this.b-=5},Lf,Lf,Lf,function(){this.Z=0;this.b-=5},Lf,Lf,Lf,Lf,Lf,Lf,Lf],wg=[bg,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},fg,function(){this.ca=0;this.b-=5},fg,fg,fg,function(){this.Z=32768;this.b-=5},fg,fg,fg,fg,fg,fg,fg],Eg=[Gf,Ef,Af,Cf,Jf,Kf,pf,qf,Pf,jg,
|
Dg=[function(a){Eg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,X,rg,tg,gg,gg,gg,gg],Eg=[Of,ig,cg,Ff,Qf,ag,X,X,X,X,X,X,X,X,X,X],sg=[$f,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Jf,function(){this.ba=1;this.b-=5},Jf,Jf,Jf,function(){this.Z=0;this.b-=5},Jf,Jf,Jf,Jf,Jf,Jf,Jf],ug=[$f,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},dg,function(){this.ba=0;this.b-=5},dg,dg,dg,function(){this.Z=32768;this.b-=5},dg,dg,dg,dg,dg,dg,dg],Cg=[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,hg,
|
||||||
xg,zg,Bg,X,X,X],yg=[function(a){Xd(this,Ie(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,0,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,1,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Ag=[function(a){He(this,a,0,cf);this.b-=this.g?11:6},function(a){He(this,a,Pd(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,Pd(this)?1:0,jf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
|
vg,xg,zg,X,X,X],wg=[function(a){Vd(this,Ge(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)}],yg=[function(a){Fe(this,a,0,af);this.b-=this.g?11:6},function(a){Fe(this,a,Nd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,Nd(this)?1:0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
|
||||||
Fe(this,a);Xd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Cg=[function(a){He(this,a,0,gf);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,0,Re);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function Md(a){Hg[a>>12].call(this,a)}
|
De(this,a);Vd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Ag=[function(a){Fe(this,a,0,ef);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Pe);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}];function Kd(a){Fg[a>>12].call(this,a)}
|
||||||
var Hg=[function(a){Ig[a>>8&15].call(this,a)},Yf,Mf,vf,rf,tf,mf,function(a){Jg[a>>8&15].call(this,a)},function(a){Kg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,hg,X],Ig=[function(a){Lg[a>>4&15].call(this,a)},If,Ff,xf,yf,Df,zf,Bf,Wf,Wf,ng,pg,rg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Aa(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ae(this,a,0);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=
|
var Fg=[function(a){Gg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,function(a){Hg[a>>8&15].call(this,a)},function(a){Ig[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Gg=[function(a){Jg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,function(a){Kg[a>>6&3].call(this,a)},X,X],Kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Aa(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ye(this,a,0);se(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=
|
||||||
this.b;Be(this,a,0,b);U(this,b);this.b=this.K-$f[this.g]},function(a){U(this,Je(this,a,Sd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Lg=[function(a){Ng[a&15].call(this,a)},X,X,X,Uf,Uf,Uf,Uf,dg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.J|=1,this.J&=-3),this.b-=5):X.call(this,a)},tg,vg,ig,ig,ig,ig],Ng=[Qf,kg,function(){ve(this);this.J|=this.P&16;this.b-=13},Hf,Sf,cg,eg,function(){this.ta(8,0,-8)},X,X,X,X,X,X,X,X],Jg=[ag,ag,Of,Of,nf,nf,of,of,lg,lg,X,X,X,X,gg,gg],Kg=
|
this.b;ze(this,a,0,b);U(this,b);this.b=this.K-Yf[this.g]},function(a){U(this,He(this,a,Qd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Jg=[function(a){Lg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.J|=1,this.J&=-3),this.b-=5):X.call(this,a)},rg,tg,gg,gg,gg,gg],Lg=[Of,ig,function(){te(this);this.J|=this.P&16;this.b-=13},Ff,Qf,ag,cg,function(){this.ta(8,0,-8)},X,X,X,X,X,X,X,X],Hg=[Zf,Zf,Mf,Mf,lf,lf,mf,mf,jg,jg,X,X,X,X,eg,eg],Ig=
|
||||||
[Gf,Ef,Af,Cf,Jf,Kf,pf,qf,Pf,jg,xg,zg,Bg,function(a){Og[a>>6&3].call(this,a)},X,X],Og=[X,function(a){a=Ae(this,a,65536);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=this.b;Be(this,a,65536,b);U(this,b);this.b=this.K-$f[this.g]},X];
|
[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,hg,vg,xg,zg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[X,function(a){a=ye(this,a,65536);se(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=this.b;ze(this,a,65536,b);U(this,b);this.b=this.K-Yf[this.g]},X];
|
||||||
function Pg(a){x.call(this,"ROM",a,Pg,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.G=u(this.g);if(this.g){a=this.g;var b=oa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.ib,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Qg(c)})}}B(Pg);k=Pg.prototype;
|
function Ng(a){x.call(this,"ROM",a,Ng,128);this.ja=this.A=null;this.B=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.G=u(this.g);if(this.g){a=this.g;var b=oa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.hb,a,b),(a=Ea(a,b))?(c.A=a.ha,c.ja=a.ja):c.g=null);Og(c)})}}B(Ng);k=Ng.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Qg(this)};k.Ka=function(){this.ja&&(this.j&&Rg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Og(this)};k.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.B,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
||||||
function Qg(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Pg.prototype.pe,Pg.prototype.nf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,nd)){for(c=0;c<a.B.length;c++)a.v.Cb(b+c,a.B[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.w?b.push(a.w):
|
function Og(a){if(!yb(a)){if(a.g){if(!a.A||!a.v)return;a.f||(a.f=a.A.length);if(a.A.length!=a.f)Ab(a,"ROM size ("+p(a.A.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.B;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Ng.prototype.pe,Ng.prototype.nf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(wc(a.v,b,a.f,ld)){for(c=0;c<a.A.length;c++)a.v.Bb(b+c,a.A[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.w?b.push(a.w):
|
||||||
null!=a.w&&a.w.length&&(b=a.w);for(c=0;c<b.length;c++){var d=a,e=b[c],f=zc(d.v,d.A,d.f);yc(d.v,e,d.f,f)}a.F||delete a.B}}}J(a)}}k.pe=function(a){return this.B[a-this.A]};k.nf=function(){};ab(function(){for(var a=F(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Pg(d);E(d,c)}});
|
null!=a.w&&a.w.length&&(b=a.w);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.v,g=d.f,h=[],l=d.B>>>f.pa;0<g&&l<f.ga.length;)h.push(f.ga[l++]),g-=f.Ia;f=d.v;d=d.f;g=0;for(e>>>=f.pa;0<d&&e<f.ga.length;){l=h[g++];if(!l)break;f.ga[e++]=l;d-=f.Ia}}a.F||delete a.A}}}J(a)}}k.pe=function(a){return this.A[a-this.B]};k.nf=function(){};ab(function(){for(var a=F(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Ng(d);E(d,c)}});
|
||||||
function Sg(a){x.call(this,"RAM",a,Sg);this.ja=this.B=null;this.g=a.addr;this.A=a.size;this.Sa=a.load;this.Ra=a.exec;this.w=!1;this.f=a.file;this.F=u(this.f);if(this.f){a=this.f;var b=oa(this.F);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(lb(c.ib,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja,null==c.Sa&&(c.Sa=a.Sa),null==c.Ra&&(c.Ra=a.Ra)):c.f=null);Tg(c)})}}
|
function Qg(a){x.call(this,"RAM",a,Qg);this.ja=this.A=null;this.g=a.addr;this.B=a.size;this.Sa=a.load;this.Ra=a.exec;this.w=!1;this.f=a.file;this.F=u(this.f);if(this.f){a=this.f;var b=oa(this.F);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(lb(c.hb,a,b),(a=Ea(a,b))?(c.A=a.ha,c.ja=a.ja,null==c.Sa&&(c.Sa=a.Sa),null==c.Ra&&(c.Ra=a.Ra)):c.f=null);Rg(c)})}}
|
||||||
B(Sg);Sg.prototype.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Tg(this)};Sg.prototype.Ka=function(){this.ja&&(this.j&&Rg(this.j,this.id,this.g,this.A,this.ja),delete this.ja);return!0};Sg.prototype.Ja=function(){return!0};function Tg(a){if(a.v&&(!a.w&&a.A&&Ac(a.v,a.g,a.A,Dc)&&(a.w=!0),!yb(a))){if(!a.w)w("No RAM allocated");else if(a.f){if(!a.B||!a.v)return;Ug(a,a.B,a.Sa,a.Ra,a.g)}J(a)}}
|
B(Qg);Qg.prototype.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Rg(this)};Qg.prototype.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.g,this.B,this.ja),delete this.ja);return!0};Qg.prototype.Ja=function(){return!0};function Rg(a){if(a.v&&(!a.w&&a.B&&wc(a.v,a.g,a.B,Bc)&&(a.w=!0),!yb(a))){if(!a.w)w("No RAM allocated");else if(a.f){if(!a.A||!a.v)return;Sg(a,a.A,a.Sa,a.Ra,a.g)}J(a)}}
|
||||||
Sg.prototype.reset=function(){if(this.w){for(var a=this.v,b=this.g,c=this.A,d=b&a.v,b=b>>>a.pa;0<c&&b<a.ba.length;){var e=a.ba[b];if(e.controller&&a.B&&a.B.length==a.g.length){var f=a.B.indexOf(e);0<=f&&(e=a.g[f])}if(e){var f=c,g=0,h,d=d||0,g=g&255;void 0===f&&(f=e.size);if(Bb&&e.D)for(h=d;f--&&h<e.D.length;h++)e.D[h]=g;else for(h=d;f--&&h<e.size;h++)e.G(d,g,e.H+d)}c-=a.Ia;b++;d=0}this.B&&Ug(this,this.B,this.Sa,this.Ra,this.g,!0)}};
|
Qg.prototype.reset=function(){if(this.w){for(var a=this.v,b=this.g,c=this.B,d=b&a.v,b=b>>>a.pa;0<c&&b<a.ga.length;){var e=a.ga[b],f=c,g=0,h,d=d||0,g=g&255;void 0===f&&(f=e.size);if(Bb&&e.D)for(h=d;f--&&h<e.D.length;h++)e.D[h]=g;else for(h=d;f--&&h<e.size;h++)e.G(d,g,e.H+d);c-=a.Ia;b++;d=0}this.A&&Sg(this,this.A,this.Sa,this.Ra,this.g,!0)}};
|
||||||
function Ug(a,b,c,d,e,f){var g=!1;if(null==c)for(var h=0;h<b.length-1;){var l=b[h]&255|(b[h+1]&255)<<8;if(l)if(l&255){var m=h;if(1!=l){G(a,"invalid signature ("+q(l)+") at offset "+q(m),4096);break}if(h+6>=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0<n&&h<b.length;)l+=b[h++]&255,n--;if(n||h>=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
|
function Sg(a,b,c,d,e,f){var g=!1;if(null==c)for(var h=0;h<b.length-1;){var l=b[h]&255|(b[h+1]&255)<<8;if(l)if(l&255){var m=h;if(1!=l){G(a,"invalid signature ("+q(l)+") at offset "+q(m),4096);break}if(h+6>=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0<n&&h<b.length;)l+=b[h++]&255,n--;if(n||h>=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
|
||||||
b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.b.Cb(c+g,b[g]);g=!0}g&&null!=d&&(a=a.b,a.xc=d,a.v.reset(),Sb(a),T(a,d),gd(a,0),!f&&a.j&&(a.ea()||Dd(a.j)));return g}
|
b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Bb(r++,b[t++]&255);else r&1?a.b.da():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.b.Bb(c+g,b[g]);g=!0}g&&null!=d&&(a=a.b,a.xc=d,a.v.reset(),Sb(a),T(a,d),ed(a,0),!f&&a.j&&(a.da()||Bd(a.j)));return g}
|
||||||
ab(function(){for(var a=F(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Sg(d);E(d,c)}});function Vg(a){x.call(this,"Keyboard",a,Vg,1024);J(this)}B(Vg);Vg.prototype.xa=function(){return!1};Vg.prototype.Ha=function(a,b,c,d){this.B=a;this.b=c;this.j=d};ab(function(){for(var a=F(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Vg(d);E(d,c)}});
|
ab(function(){for(var a=F(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Qg(d);E(d,c)}});function Tg(a){x.call(this,"Keyboard",a,Tg,1024);J(this)}B(Tg);Tg.prototype.xa=function(){return!1};Tg.prototype.Ha=function(a,b,c,d){this.A=a;this.b=c;this.j=d};ab(function(){for(var a=F(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Tg(d);E(d,c)}});
|
||||||
function Wg(a){this.R=a.baudReceive||9600;this.na=a.baudTransmit||9600;this.fa=a.upperCase;this.w=this.A=null;this.U=a.tabSize;this.T=a.charBOL;this.F=0;x.call(this,"SerialPort",a,Wg,262144);var b=a.binding;if("console"==b)this.A="";else{var c;a=Xg;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.D[b])&&this.xa(null,a,b))}this.I=this.L=null;this.exports={connect:this.Kc,receiveData:this.gc}}B(Wg);var Xg="buffer";k=Wg.prototype;
|
function Ug(a){this.R=a.baudReceive||9600;this.na=a.baudTransmit||9600;this.ea=a.upperCase;this.w=this.B=null;this.U=a.tabSize;this.T=a.charBOL;this.F=0;x.call(this,"SerialPort",a,Ug,262144);var b=a.binding;if("console"==b)this.B="";else{var c;a=Vg;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.D[b])&&this.xa(null,a,b))}this.I=this.L=null;this.exports={connect:this.Kc,receiveData:this.gc}}B(Ug);var Vg="buffer";k=Ug.prototype;
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case Xg:return this.D[b]=this.w=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.wc:la.Xc:46==c?b=la.wc:a.ctrlKey&&c>=la.vc&&c<=la.gd&&(b=c-(la.vc-la.Uc));b&&(a.preventDefault&&a.preventDefault(),d.gc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.Wc&&(b=la.Vc);d.gc(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
k.xa=function(a,b,c){var d=this;switch(b){case Vg:return this.D[b]=this.w=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.wc:la.Xc:46==c?b=la.wc:a.ctrlKey&&c>=la.vc&&c<=la.gd&&(b=c-(la.vc-la.Uc));b&&(a.preventDefault&&a.preventDefault(),d.gc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.Wc&&(b=la.Vc);d.gc(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
||||||
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.gc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.gc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;var e=this;this.ga=Oc(48,4,262144);this.aa=Lc(this.b,function(){var a;a=-1;e.G.length&&(a=e.G.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.fa&&97<=a&&122>a&&(a-=32),Nc(e.b,e.aa,1E3/Math.round(e.R/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Mc(c,e.ga))});this.N=Oc(52,4,262144);this.ua=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(c,e.N)});Jb(b,this,Yg);Lb(b,this.reset.bind(this));J(this)};
|
k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.b=c;this.j=d;var e=this;this.fa=Mc(48,4,262144);this.aa=Jc(this.b,function(){var a;a=-1;e.G.length&&(a=e.G.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.ea&&97<=a&&122>a&&(a-=32),Lc(e.b,e.aa,1E3/Math.round(e.R/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.fa))});this.N=Mc(52,4,262144);this.ua=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.N)});Jb(b,this,Wg);Lb(b,this.reset.bind(this));J(this)};
|
||||||
k.Kc=function(){if(!this.I){var a=Ad(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ua(b[0]);if(c!=this.hb)return;b=ua(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.ib+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Kc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
k.Kc=function(){if(!this.I){var a=yd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.gb)return;b=ya(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.hb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Kc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
k.Ja=function(a){return a?this.save():!0};k.reset=function(){Zg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Zg(this)};function Zg(a){a.K=0;a.f=0;a.g=128;a.G=[];return!0}k.gc=function(a){if("number"==typeof a)this.G.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.G.push(b)}else this.G=this.G.concat(a);Nc(this.b,this.aa,1E3/Math.round(this.R/10));return!0};
|
k.Ja=function(a){return a?this.save():!0};k.reset=function(){Xg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.K=0;a.f=0;a.g=128;a.G=[];return!0}k.gc=function(a){if("number"==typeof a)this.G.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.G.push(b)}else this.G=this.G.concat(a);Lc(this.b,this.aa,1E3/Math.round(this.R/10));return!0};
|
||||||
k.ce=function(){return this.f&65534};k.$e=function(a){this.f=this.f&-112|a&111};k.be=function(){this.f&=-129;return this.K};k.Ze=function(){};k.De=function(){return this.g};k.Cf=function(a){this.g&128&&(a&64?Mc(this.b,this.N):Rc(this.b,this.N));this.g=this.g&-70|a&69};k.Ce=function(){return 0};
|
k.ce=function(){return this.f&65534};k.$e=function(a){this.f=this.f&-112|a&111};k.be=function(){this.f&=-129;return this.K};k.Ze=function(){};k.De=function(){return this.g};k.Cf=function(a){this.g&128&&(a&64?Kc(this.b,this.N):Pc(this.b,this.N));this.g=this.g&-70|a&69};k.Ce=function(){return 0};
|
||||||
k.Bf=function(a){a&=255;G(this,"transmitByte("+p(a,2,!0)+")");this.L&&this.L.call(this.I,a);a&=127;if(this.w)if(13==a)this.F=0;else if(8==a)this.w.value=this.w.value.slice(0,-1),0<this.F&&this.F--;else{if(a){var b;b=(b=za[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=ta("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.A){if(10==a||1024<=
|
k.Bf=function(a){a&=255;G(this,"transmitByte("+p(a,2,!0)+")");this.L&&this.L.call(this.I,a);a&=127;if(this.w)if(13==a)this.F=0;else if(8==a)this.w.value=this.w.value.slice(0,-1),0<this.F&&this.F--;else{if(a){var b;b=(b=za[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=ta("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.B){if(10==a||1024<=
|
||||||
this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Nc(this.b,this.ua,1E3/Math.round(this.na/10));this.g&=-129};var $g={},Yg=($g[65392]=[null,null,Wg.prototype.ce,Wg.prototype.$e,"RCSR"],$g[65394]=[null,null,Wg.prototype.be,Wg.prototype.Ze,"RBUF"],$g[65396]=[null,null,Wg.prototype.De,Wg.prototype.Cf,"XCSR"],$g[65398]=[null,null,Wg.prototype.Ce,Wg.prototype.Bf,"XBUF"],$g);
|
this.B.length)this.i(this.B),this.B="";10!=a&&(this.B+=String.fromCharCode(a))}Lc(this.b,this.ua,1E3/Math.round(this.na/10));this.g&=-129};var Yg={},Wg=(Yg[65392]=[null,null,Ug.prototype.ce,Ug.prototype.$e,"RCSR"],Yg[65394]=[null,null,Ug.prototype.be,Ug.prototype.Ze,"RBUF"],Yg[65396]=[null,null,Ug.prototype.De,Ug.prototype.Cf,"XCSR"],Yg[65398]=[null,null,Ug.prototype.Ce,Ug.prototype.Bf,"XBUF"],Yg);
|
||||||
ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Wg(d);E(d,c)}});function hd(a){x.call(this,"PC11",a,hd);this.g=a.autoMount||null;this.F=0;this.fa=a.baudReceive||3600;this.K=this.L=this.f=0;this.I=[];this.G=ah;this.w=vh;this.N=this.A="";this.ha=this.Sa=this.Ra=null;this.U=-1;this.R=!Ma("Mobi")&&window&&"FileReader"in window}B(hd);var ah="",vh=0;k=hd.prototype;
|
ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Ug(d);E(d,c)}});function fd(a){x.call(this,"PC11",a,fd);this.g=a.autoMount||null;this.F=0;this.ea=a.baudReceive||3600;this.K=this.L=this.f=0;this.I=[];this.G=Zg;this.w=th;this.N=this.B="";this.ha=this.Sa=this.Ra=null;this.U=-1;this.R=!Ma("Mobi")&&window&&"FileReader"in window}B(fd);var Zg="",th=0;k=fd.prototype;
|
||||||
k.xa=function(a,b,c){var d=this,e=vh;switch(b){case "listTapes":return this.D[b]=c,c.onchange=function(){var a=d.D.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
|
k.xa=function(a,b,c){var d=this,e=th;switch(b){case "listTapes":return this.D[b]=c,c.onchange=function(){var a=d.D.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
|
||||||
function(){var a=d.D.listTapes;a&&wh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
function(){var a=d.D.listTapes;a&&uh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;uh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.aa=xh(a);var e=this;if((this.g=Ad(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Oc(56,4,4096);this.ga=Lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.I.length&&(e.L=e.I[e.K++]&255,yh(e,e.K/e.I.length*100),e.f|=128,e.f&=-2049,e.f&64&&Mc(e.b,e.T))});Jb(b,this,zh);Lb(b,this.reset.bind(this));Ah(this,"None",ah,
|
k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.b=c;this.j=d;this.aa=vh(a);var e=this;if((this.g=yd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.fa=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.I.length&&(e.L=e.I[e.K++]&255,wh(e,e.K/e.I.length*100),e.f|=128,e.f&=-2049,e.f&64&&Kc(e.b,e.T))});Jb(b,this,xh);Lb(b,this.reset.bind(this));yh(this,"None",Zg,
|
||||||
!0);this.R&&Ah(this,"Local Tape","?");Ah(this,"Remote Tape","??");Bh(this)||J(this)};k.Ka=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.L=0};
|
!0);this.R&&yh(this,"Local Tape","?");yh(this,"Remote Tape","??");zh(this)||J(this)};k.Ka=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.L=0};
|
||||||
function Bh(a){a.F=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.D.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=u(b,!0)}b&&c?Ch(a,c,b,1,!0):Dh(a)}return!!a.F}
|
function zh(a){a.F=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.D.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=u(b,!0)}b&&c?Ah(a,c,b,1,!0):Bh(a)}return!!a.F}
|
||||||
function wh(a,b,c,d,e){if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"');a.G="??"}else a.G=c;Ch(a,b,c,d,!1,e)}else Eh(a,!1)}
|
function uh(a,b,c,d,e){if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"');a.G="??"}else a.G=c;Ah(a,b,c,d,!1,e)}else Ch(a,!1)}
|
||||||
function Ch(a,b,c,d,e,f){var g=-1;if(a.A.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Eh(a,!0),a.C.kb?a.O("PC11 busy"):(e&&(a.F++,I(a)&&G(a,"auto-loading tape: "+b)),Fh(a,b,c,d,f)?g++:a.C.kb=!0);g&&Gh(a,a.N,a.A,a.w,a.ha,a.Sa,a.Ra)}
|
function Ah(a,b,c,d,e,f){var g=-1;if(a.B.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Ch(a,!0),a.C.jb?a.O("PC11 busy"):(e&&(a.F++,I(a)&&G(a,"auto-loading tape: "+b)),Dh(a,b,c,d,f)?g++:a.C.jb=!0);g&&Eh(a,a.N,a.B,a.w,a.ha,a.Sa,a.Ra)}
|
||||||
function Fh(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Gh(a,b,c,d,e),a.G="?");Dh(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.C.ma;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.ib,e,f),(e=Ea(e,f))&&Gh(a,b,c,d,e.ha,e.Sa,
|
function Dh(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Eh(a,b,c,d,e),a.G="?");Bh(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.C.ma;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.hb,e,f),(e=Ea(e,f))&&Eh(a,b,c,d,e.ha,e.Sa,
|
||||||
e.Ra));a.C.kb=!1;a.F&&(a.F--,a.F||J(a));Dh(a)})}function Ah(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
e.Ra));a.C.jb=!1;a.F&&(a.F--,a.F||J(a));Bh(a)})}function yh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Dh(a){var b=a.D.listTapes;if(b&&b.options){a=a.G||a.A;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function yh(a,b){b|=0;if(b!==a.U){var c=a.D.readProgress;c&&(c=(c=F(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.U=b}}
|
function Bh(a){var b=a.D.listTapes;if(b&&b.options){a=a.G||a.B;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function wh(a,b){b|=0;if(b!==a.U){var c=a.D.readProgress;c&&(c=(c=F(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.U=b}}
|
||||||
function Gh(a,b,c,d,e,f,g){a.N=b;a.A=c;a.w=d;a.ha=e;a.Sa=f;a.Ra=g;2==d?a.aa&&Ug(a.aa,e,f,g)?a.status("tape loaded: "+b):(a.N="",a.A="",a.G=ah,a.w=vh,a.O("No load address available for tape: "+b)):(a.K=0,a.I=e,a.status("tape attached: "+b),yh(a,0))}function Eh(a,b){if(a.A||!1===b)a.N="",a.A="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.G=ah,a.w=vh,Dh(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.Wd=function(){return this.f&65534};
|
function Eh(a,b,c,d,e,f,g){a.N=b;a.B=c;a.w=d;a.ha=e;a.Sa=f;a.Ra=g;2==d?a.aa&&Sg(a.aa,e,f,g)?a.status("tape loaded: "+b):(a.N="",a.B="",a.G=Zg,a.w=th,a.O("No load address available for tape: "+b)):(a.K=0,a.I=e,a.status("tape attached: "+b),wh(a,0))}function Ch(a,b){if(a.B||!1===b)a.N="",a.B="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.G=Zg,a.w=th,Bh(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.Wd=function(){return this.f&65534};
|
||||||
k.Te=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Mc(this.b,this.T)):(this.f&=-129,this.f|=2048,this.L=0,Nc(this.b,this.ga,1E3/Math.round(this.fa/10))));this.f=this.f&-66|a&65};k.Vd=function(){this.f&=-129;this.f|=2048;return this.L};k.Se=function(){};var Hh={},zh=(Hh[65384]=[null,null,hd.prototype.Wd,hd.prototype.Te,"PRS"],Hh[65386]=[null,null,hd.prototype.Vd,hd.prototype.Se,"PRB"],Hh);
|
k.Te=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Kc(this.b,this.T)):(this.f&=-129,this.f|=2048,this.L=0,Lc(this.b,this.fa,1E3/Math.round(this.ea/10))));this.f=this.f&-66|a&65};k.Vd=function(){this.f&=-129;this.f|=2048;return this.L};k.Se=function(){};var Fh={},xh=(Fh[65384]=[null,null,fd.prototype.Wd,fd.prototype.Te,"PRS"],Fh[65386]=[null,null,fd.prototype.Vd,fd.prototype.Se,"PRB"],Fh);
|
||||||
function Ih(a,b,c){x.call(this,"Disk",{id:a.ib+".disk"+p(++Jh,4)},Ih,8192);this.controller=a;this.B=a.B;this.j=a.j;this.w=b;this.Ta=b.name;this.bc=b.bc;Kh(this,c,b.la,b.ra,b.ia,b.za);J(this)}var Jh=0;B(Ih);k=Ih.prototype;k.Ha=function(a,b,c,d){this.j=d};
|
function Gh(a,b,c){x.call(this,"Disk",{id:a.hb+".disk"+p(++Hh,4)},Gh,8192);this.controller=a;this.A=a.A;this.j=a.j;this.w=b;this.Ta=b.name;this.bc=b.bc;Ih(this,c,b.la,b.ra,b.ia,b.za);J(this)}var Hh=0;B(Gh);k=Gh.prototype;k.Ha=function(a,b,c,d){this.j=d};
|
||||||
function Kh(a,b,c,d,e,f){a.mode=b;a.la=c;a.ra=d;a.ia=e;a.za=f;a.b=[];if("preload"!=a.mode){b=Array(a.la);for(c=0;c<b.length;c++){d=Array(a.ra);for(e=0;e<d.length;e++){f=Array(a.ia);for(var g=1;g<=f.length;g++)f[g-1]=Lh(null,c,e,g,a.za,0);d[e]=f}b[c]=d}a.b=b}a.f=null}
|
function Ih(a,b,c,d,e,f){a.mode=b;a.la=c;a.ra=d;a.ia=e;a.za=f;a.b=[];if("preload"!=a.mode){b=Array(a.la);for(c=0;c<b.length;c++){d=Array(a.ra);for(e=0;e<d.length;e++){f=Array(a.ia);for(var g=1;g<=f.length;g++)f[g-1]=Jh(null,c,e,g,a.za,0);d[e]=f}b[c]=d}a.b=b}a.f=null}
|
||||||
function Mh(a,b,c,d,e){var f=c;if(a.v)return!0;a.Ta=b;a.La=c;a.rc=u(c);a.v=e;a.A=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ja[d];if(e){a.la=e[0];a.ra=e[1];a.ia=e[2];a.za=e[3]||512;c=a.za>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ra),v=0;v<t.length;v++)for(var A=t[v]=Array(a.ia),y=0;y<A.length;y++){for(var C=Lh(null,d,v,y+1,a.za,0),sa=C.data,Sa=0;Sa<c;Sa++,f+=4)var R=sa[Sa]=b.getInt32(f,
|
function Kh(a,b,c,d,e){var f=c;if(a.v)return!0;a.Ta=b;a.La=c;a.rc=u(c);a.v=e;a.B=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.la=e[0];a.ra=e[1];a.ia=e[2];a.za=e[3]||512;c=a.za>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ra),v=0;v<t.length;v++)for(var A=t[v]=Array(a.ia),y=0;y<A.length;y++){for(var C=Jh(null,d,v,y+1,a.za,0),ra=C.data,Ra=0;Ra<c;Ra++,f+=4)var R=ra[Ra]=b.getInt32(f,
|
||||||
!0),e=e+R&-1;C.Ma=c;A[y]=C}a.f=e;c=a}else a.O("Unrecognized disk format ("+d+" bytes)");a.v&&(a.v.call(a.controller,a.w,c,a.Ta,a.La),a.v=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f,
|
!0),e=e+R&-1;C.Ma=c;A[y]=C}a.f=e;c=a}else a.O("Unrecognized disk format ("+d+" bytes)");a.v&&(a.v.call(a.controller,a.w,c,a.Ta,a.La),a.v=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f,
|
||||||
null,!0,function(b,c,d){Nh(a,b,c,d)})}
|
null,!0,function(b,c,d){Lh(a,b,c,d)})}
|
||||||
function Nh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.O('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.ib,b,c);try{if(0<u(a.rc,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Ta]:h=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
function Lh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.C.ma;if(d)a.controller.O('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.hb,b,c);try{if(0<u(a.rc,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Ta]:h=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
||||||
c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.za=l&&l.length||512;for(d=c=0;d<a.la;d++)for(f=0;f<a.ra;f++)for(g=0;g<a.ia;g++)if(l=h[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A<v;A++)t[A]=n;Oh(l,t)}else r=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=r;delete l.bytes}Lh(l,d,f);for(v=
|
c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.za=l&&l.length||512;for(d=c=0;d<a.la;d++)for(f=0;f<a.ra;f++)for(g=0;g<a.ia;g++)if(l=h[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A<v;A++)t[A]=n;Mh(l,t)}else r=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=r;delete l.bytes}Jh(l,d,f);for(v=
|
||||||
0;v<r.length;v++)c=c+r[v]&-1}a.b=h;a.f=c;e=a}else w("Empty disk image: "+a.Ta)}catch(y){w("Disk image error ("+b+"): "+y.message)}}a.v&&(a.v.call(a.A,a.w,e,a.Ta,a.La),a.v=null)}function Lh(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Cg=b;a.Dg=c;a.Wa=a.Ma=0;a.cb=!1;return a}function Ph(a){return a.b.length?[a.b.length,a.b[0].length,a.b[0][0].length,a.b[0][0][0].length]:[0,0,0,0]}
|
0;v<r.length;v++)c=c+r[v]&-1}a.b=h;a.f=c;e=a}else w("Empty disk image: "+a.Ta)}catch(y){w("Disk image error ("+b+"): "+y.message)}}a.v&&(a.v.call(a.B,a.w,e,a.Ta,a.La),a.v=null)}function Jh(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Cg=b;a.Dg=c;a.Wa=a.Ma=0;a.bb=!1;return a}function Nh(a){return a.b.length?[a.b.length,a.b[0].length,a.b[0][0].length,a.b[0][0][0].length]:[0,0,0,0]}
|
||||||
k.seek=function(a,b,c,d,e){d=null;var f=this.w,g=this.b[a];if(g){var h=g[b];if(!h&&f.nd&&b<f.ra)for(h=g[b]=Array(f.Ec),g=0;g<h.length;g++)h[g]=Lh(null,a,b,g+1,f.qc,0);if(h){for(g=0;g<h.length;g++)if(h[g]&&h[g].sector==c){d=h[g];break}!d&&f.nd&&9==f.mc&&(d=h[g]=Lh(null,a,b,f.mc,f.qc,0))}}e&&e(d,!1);return d};function Oh(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
k.seek=function(a,b,c,d,e){d=null;var f=this.w,g=this.b[a];if(g){var h=g[b];if(!h&&f.nd&&b<f.ra)for(h=g[b]=Array(f.Ec),g=0;g<h.length;g++)h[g]=Jh(null,a,b,g+1,f.qc,0);if(h){for(g=0;g<h.length;g++)if(h[g]&&h[g].sector==c){d=h[g];break}!d&&f.nd&&9==f.mc&&(d=h[g]=Jh(null,a,b,f.mc,f.qc,0))}}e&&e(d,!1);return d};function Mh(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||||
k.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f<a.Wa?(a.Ma+=a.Wa-f,a.Wa=f):f>=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
k.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f<a.Wa?(a.Ma+=a.Wa-f,a.Wa=f):f>=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||||
function Qh(a,b){var c=a.ra*a.ia,d=b/c|0;return d<a.la?(b%=c,a.seek(d,b/a.ia|0,b%a.ia+1)):null}function Rh(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Sh(a){for(var b="",c=0,d;d=Qh(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Rh(a,d,e));return btoa(b)}
|
function Oh(a,b){var c=a.ra*a.ia,d=b/c|0;return d<a.la?(b%=c,a.seek(d,b/a.ia|0,b%a.ia+1)):null}function Ph(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Qh(a){for(var b="",c=0,d;d=Oh(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Ph(a,d,e));return btoa(b)}
|
||||||
k.save=function(){var a=0,b=[];b[a++]=[this.La,this.f,this.la,this.ra,this.ia,this.za];if(!this.g)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Ma){for(var h=[],l=0,m=g.Wa,n=g.Wa+g.Ma;m<n;)h[l++]=g.data[m++];b[a++]=[d,e,f,g.Wa,h]}}return b};
|
k.save=function(){var a=0,b=[];b[a++]=[this.La,this.f,this.la,this.ra,this.ia,this.za];if(!this.g)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Ma){for(var h=[],l=0,m=g.Wa,n=g.Wa+g.Ma;m<n;)h[l++]=g.data[m++];b[a++]=[d,e,f,g.Wa,h]}}return b};
|
||||||
k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?Kh(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],l=g[f++],m=g[f++];if(h>=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<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?Ih(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],l=g[f++],m=g[f++];if(h>=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;l<e;)h.data[l++]=h.pattern;l=0;h.Wa=e;for(h.Ma=f.length;e<g;)h.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Ta+": "+c);return b};
|
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;l<e;)h.data[l++]=h.pattern;l=0;h.Wa=e;for(h.Ma=f.length;e<g;)h.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Ta+": "+c);return b};
|
||||||
k.toJSON=function(){var a;a=0;for(var b;b=Qh(this,a++);)Th(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
k.toJSON=function(){var a;a=0;for(var b;b=Oh(this,a++);)Rh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Th(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
function Rh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Uh(d,a)},!0;case "loadDrive":return this.D[b]=
|
k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Sh(d,a)},!0;case "loadDrive":return this.D[b]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&Vh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&Th(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Qh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Vh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Th(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Wh(this);this.Gb=Oc(144,5,65536);Jb(b,this,Xh);Lb(b,this.reset.bind(this));Yh(this,"None","",!0);this.K&&Yh(this,"Local Disk","?");Yh(this,"Remote Disk","??");Zh(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.A,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Uh(this);this.Fb=Mc(144,5,65536);Jb(b,this,Vh);Lb(b,this.reset.bind(this));Wh(this,"None","",!0);this.K&&Wh(this,"Local Disk","?");Wh(this,"Remote Disk","??");Xh(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;a<this.g.length;a++)$h(this,a,!0);Zh(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Uh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Wh(this)};k.save=function(){return(new S(this)).data()};
|
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.pc){for(a=0;a<this.g.length;a++)Yh(this,a,!0);Xh(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Sh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Uh(this)};k.save=function(){return(new S(this)).data()};
|
||||||
k.restore=function(a){return Wh(this,a[0])};function Zh(a,b){b||(a.F=0);for(var c in a.I){var d=a.I[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!ai(a,g,f,e,!0)&&b&&J(a,!1);continue}a.O("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.F}
|
k.restore=function(a){return Uh(this,a[0])};function Xh(a,b){b||(a.F=0);for(var c in a.I){var d=a.I[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!Zh(a,g,f,e,!0)&&b&&J(a,!1);continue}a.O("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.F}
|
||||||
function Vh(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}ai(a,e,b,c,!1,d)}else $h(a,e)}
|
function Th(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Zh(a,e,b,c,!1,d)}else Yh(a,e)}
|
||||||
function ai(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,$h(a,b,!0),h.yb?a.O("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.Zc)&&g++));return g}
|
function Zh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Yh(a,b,!0),h.xb?a.O("RK11 busy"):(h.xb=!0,e&&(h.wb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.cb=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.Zc)&&g++));return g}
|
||||||
k.Zc=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.F||J(this));Uh(this,a.zb)};
|
k.Zc=function(a,b,c,d,e){var f;a.xb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RK"+a.yb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RK"+a.yb),a.wb||e),this.A&&this.A.ob()):a.cb=!1;a.wb&&(a.wb=!1,--this.F||J(this));Sh(this,a.yb)};
|
||||||
function Yh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function Wh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Uh(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.eb?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function $h(a,b,c){var d=a.g[b];if(d.Y||!1===c)d.Ta="",d.La="",d.Y=null,d.eb=!1,c||(a.O("Drive RK"+b+" unloaded",c),Uh(a,b))}
|
function Sh(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.cb?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Yh(a,b,c){var d=a.g[b];if(d.Y||!1===c)d.Ta="",d.La="",d.Y=null,d.cb=!1,c||(a.O("Drive RK"+b+" unloaded",c),Sh(a,b))}
|
||||||
function Wh(a,b){var c=0;b||(b=[]);a.L=b[c++]||2496;a.A=b[c++]||0;a.M=b[c++]||128;a.G=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.N=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.eb=!1;d.name=c.hb;d.la=203;d.ra=2;d.ia=12;d.za=512;d.bc=!0;d.od=0;d.md=0;d.mc=1;d.Ec=d.ia;d.qc=d.za;d.wd=0;d.Fe=null;d.Y||(d.La="");d.status=2496}return!0}
|
function Uh(a,b){var c=0;b||(b=[]);a.L=b[c++]||2496;a.B=b[c++]||0;a.M=b[c++]||128;a.G=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.N=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.yb=b;d.xb=d.cb=!1;d.name=c.gb;d.la=203;d.ra=2;d.ia=12;d.za=512;d.bc=!0;d.od=0;d.md=0;d.mc=1;d.Ec=d.ia;d.qc=d.za;d.wd=0;d.Fe=null;d.Y||(d.La="");d.status=2496}return!0}
|
||||||
k.Yc=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.G=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.$c=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=32;break}this.v.qb(f,r|t<<8);if(Kc(this.v)){h=1024;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
|
k.Yc=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.G=65536-e&65535;a&&(this.B=this.B|a|32768,this.M|=49152);return!0};k.$c=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=32;break}this.v.pb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
|
||||||
k.ad=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Kc(this.v)){h=1024;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=32;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.he=function(){return this.L};k.ef=function(){};k.ie=function(){return this.A};k.ff=function(){};k.ee=function(){return this.M&61438};
|
k.ad=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=32;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.he=function(){return this.L};k.ef=function(){};k.ie=function(){return this.B};k.ff=function(){};k.ee=function(){return this.M&61438};
|
||||||
k.bf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.$c;case 2:b||(b=this.ad),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.G&65535,c=b.call(this,d,e,f,g,c,h,this.Yc.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
k.bf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.B=0;this.M=128;this.f=0;break;case 4:b=this.$c;case 2:b||(b=this.ad),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.B|=32832,this.M|=49152):g>=d.ia?(this.B|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.G&65535,c=b.call(this,d,e,f,g,c,h,this.Yc.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
||||||
-2,this.M|=128,this.M&64&&Mc(this.b,this.Gb))}};k.je=function(){return this.G};k.gf=function(a){this.G=a};k.de=function(){return this.w};k.af=function(a){this.w=a};k.fe=function(){return this.f};k.cf=function(a){this.f=a};k.ge=function(){return this.N};k.df=function(a){this.N=a};
|
-2,this.M|=128,this.M&64&&Kc(this.b,this.Fb))}};k.je=function(){return this.G};k.gf=function(a){this.G=a};k.de=function(){return this.w};k.af=function(a){this.w=a};k.fe=function(){return this.f};k.cf=function(a){this.f=a};k.ge=function(){return this.N};k.df=function(a){this.N=a};
|
||||||
var bi={},Xh=(bi[65280]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDS"],bi[65282]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKER"],bi[65284]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKCS"],bi[65286]=[null,null,Q.prototype.je,Q.prototype.gf,"RKWC"],bi[65288]=[null,null,Q.prototype.de,Q.prototype.af,"RKBA"],bi[65290]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKDA"],bi[65294]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDB"],bi);
|
var $h={},Vh=($h[65280]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDS"],$h[65282]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKER"],$h[65284]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKCS"],$h[65286]=[null,null,Q.prototype.je,Q.prototype.gf,"RKWC"],$h[65288]=[null,null,Q.prototype.de,Q.prototype.af,"RKBA"],$h[65290]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKDA"],$h[65294]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDB"],$h);
|
||||||
function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.I=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
|
function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.I=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ci(d,a)},!0;case "loadDrive":return this.D[b]=
|
k.xa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ai(d,a)},!0;case "loadDrive":return this.D[b]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&di(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&bi(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Qh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;di(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;bi(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ei(this);this.Gb=Oc(112,5,131072);Jb(b,this,fi);Lb(b,this.reset.bind(this));gi(this,"None","",!0);this.L&&gi(this,"Local Disk","?");gi(this,"Remote Disk","??");hi(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.A=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.A,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ci(this);this.Fb=Mc(112,5,131072);Jb(b,this,di);Lb(b,this.reset.bind(this));ei(this,"None","",!0);this.L&&ei(this,"Local Disk","?");ei(this,"Remote Disk","??");fi(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;a<this.g.length;a++)ii(this,a,!0);hi(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ci(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){ei(this)};k.save=function(){return(new S(this)).data()};
|
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.pc){for(a=0;a<this.g.length;a++)gi(this,a,!0);fi(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ai(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){ci(this)};k.save=function(){return(new S(this)).data()};
|
||||||
k.restore=function(a){return ei(this,a[0])};function hi(a,b){b||(a.I=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!ji(a,g,f,e,!0)&&b&&J(a,!1);continue}a.O("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.I}
|
k.restore=function(a){return ci(this,a[0])};function fi(a,b){b||(a.I=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!hi(a,g,f,e,!0)&&b&&J(a,!1);continue}a.O("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.I}
|
||||||
function di(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}ji(a,e,b,c,!1,d)}else ii(a,e)}
|
function bi(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}hi(a,e,b,c,!1,d)}else gi(a,e)}
|
||||||
function ji(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,ii(a,b,!0),h.yb?a.O("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.I++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.cd)&&g++));return g}
|
function hi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,gi(a,b,!0),h.xb?a.O("RL11 busy"):(h.xb=!0,e&&(h.wb=!0,a.I++,I(a)&&G(a,"auto-loading disk: "+c)),h.cb=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.cd)&&g++));return g}
|
||||||
k.cd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.I||J(this));ci(this,a.zb)};
|
k.cd=function(a,b,c,d,e){var f;a.xb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.yb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.yb),a.wb||e),this.A&&this.A.ob()):a.cb=!1;a.wb&&(a.wb=!1,--this.I||J(this));ai(this,a.yb)};
|
||||||
function gi(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function ei(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function ci(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.eb?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function ii(a,b,c){var d=a.g[b];if(d.Y||!1===c)d.Ta="",d.La="",d.Y=null,d.eb=!1,c||(a.O("Drive RL"+b+" unloaded",c),ci(a,b))}
|
function ai(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.cb?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function gi(a,b,c){var d=a.g[b];if(d.Y||!1===c)d.Ta="",d.La="",d.Y=null,d.cb=!1,c||(a.O("Drive RL"+b+" unloaded",c),ai(a,b))}
|
||||||
function ei(a,b){var c=0;b||(b=[]);a.M=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.A=b[c++]||0;a.G=b[c++]||0;a.F=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.eb=!1;d.name=c.hb;d.la=512;d.ra=2;d.ia=40;d.za=256;d.bc=!0;d.od=0;d.md=0;d.mc=1;d.Ec=d.ia;d.qc=d.za;d.wd=0;d.Fe=null;d.Y||(d.La="");d.status=29|(512==d.la?128:0)}return!0}
|
function ci(a,b){var c=0;b||(b=[]);a.M=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.B=b[c++]||0;a.G=b[c++]||0;a.F=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.yb=b;d.xb=d.cb=!1;d.name=c.gb;d.la=512;d.ra=2;d.ia=40;d.za=256;d.bc=!0;d.od=0;d.md=0;d.mc=1;d.Ec=d.ia;d.qc=d.za;d.wd=0;d.Fe=null;d.Y||(d.La="");d.status=29|(512==d.la?128:0)}return!0}
|
||||||
k.bd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.F=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.G=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
|
k.bd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.F=f>>16&63;this.B=this.f=b<<7|(c?64:0)|d&63;this.G=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
|
||||||
k.dd=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=5120;break}this.v.qb(f,r|t<<8);if(Kc(this.v)){h=8192;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
|
k.dd=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Y.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Y.read(m,n++))||0>(t=a.Y.read(m,n++))){h=5120;break}this.v.pb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
|
||||||
k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Kc(this.v)){h=8192;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=5120;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.me=function(){return this.M&65535};
|
k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Y,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Y.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Y.write(m,n++,r&255)||!a.Y.write(m,n++,r>>8)){h=5120;break}if(n>=l.za&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.me=function(){return this.M&65535};
|
||||||
k.kf=function(a){this.M=this.M&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.G=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.G=this.A;break;case 12:b=this.dd;case 10:b||(b=this.ed),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.F&
|
k.kf=function(a){this.M=this.M&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.G=c.status|this.B&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.B=this.f&4?this.B+b:this.B-b,this.f=this.B=this.B&65408|c);break;case 8:this.G=this.B;break;case 12:b=this.dd;case 10:b||(b=this.ed),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.F&
|
||||||
63)<<16|this.w,a=65536-this.G&65535,a=b.call(this,c,d,e,f,a,g,this.bd.bind(this)))}a&&(this.M|=129,this.M&64&&Mc(this.b,this.Gb))}};k.ke=function(){return this.w};k.hf=function(a){this.w=a&65534};k.ne=function(){return this.f};k.lf=function(a){this.f=a};k.oe=function(){return this.G};k.mf=function(a){this.G=a};k.le=function(){return this.F};k.jf=function(a){this.F=a&63;this.M=this.M&-49|(this.F&3)<<4};
|
63)<<16|this.w,a=65536-this.G&65535,a=b.call(this,c,d,e,f,a,g,this.bd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Fb))}};k.ke=function(){return this.w};k.hf=function(a){this.w=a&65534};k.ne=function(){return this.f};k.lf=function(a){this.f=a};k.oe=function(){return this.G};k.mf=function(a){this.G=a};k.le=function(){return this.F};k.jf=function(a){this.F=a&63;this.M=this.M&-49|(this.F&3)<<4};
|
||||||
var ki={},fi=(ki[63744]=[null,null,P.prototype.me,P.prototype.kf,"RLCS"],ki[63746]=[null,null,P.prototype.ke,P.prototype.hf,"RLBA"],ki[63748]=[null,null,P.prototype.ne,P.prototype.lf,"RLDA"],ki[63750]=[null,null,P.prototype.oe,P.prototype.mf,"RLMP"],ki[63752]=[null,null,P.prototype.le,P.prototype.jf,"RLBE"],ki);function li(a){x.call(this,"Debugger",a,li);this.na=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(li);
|
var ii={},di=(ii[63744]=[null,null,P.prototype.me,P.prototype.kf,"RLCS"],ii[63746]=[null,null,P.prototype.ke,P.prototype.hf,"RLBA"],ii[63748]=[null,null,P.prototype.ne,P.prototype.lf,"RLDA"],ii[63750]=[null,null,P.prototype.oe,P.prototype.mf,"RLMP"],ii[63752]=[null,null,P.prototype.le,P.prototype.jf,"RLBE"],ii);function ji(a){x.call(this,"Debugger",a,ji);this.na=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.B=-1;this.g=[];this.ea={}}B(ji);
|
||||||
var mi={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};li.prototype.Ic=function(){return-1};li.prototype.Jc=function(){};
|
var ki={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ji.prototype.Ic=function(){return-1};ji.prototype.Jc=function(){};
|
||||||
function ni(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ua(b.substring(c,f))),c=f+1}}return a}
|
function li(a,b,c,d){if(c)if(b){0>a.B&&a.g.length&&(a.B=0);if(0>a.B||b!=a.g[a.B])a.g.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.g[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a}
|
||||||
function oi(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
function mi(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
||||||
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
|
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
|
||||||
function pi(a,b,c){var d;if(b){b=qi(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<m.length;){var n=m[e++],r=n.length,n=ua(n);if(!n){f=!0;break}n=ri(a,n,null,!1===c);if(void 0===n){f=!0;c=!1;break}h.push(n);if(e==m.length)break;var n=m[e++],t=n.length;l.length&&mi[n]<mi[l[l.length-1]]&&oi(h,l,1);l.push(n);b=b.substr(r+t)}oi(h,l)&&1==h.length||(f=!0);f?c&&a.i("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&si(a,null,
|
function ni(a,b,c){var d;if(b){b=oi(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<m.length;){var n=m[e++],r=n.length,n=ya(n);if(!n){f=!0;break}n=pi(a,n,null,!1===c);if(void 0===n){f=!0;c=!1;break}h.push(n);if(e==m.length)break;var n=m[e++],t=n.length;l.length&&ki[n]<ki[l[l.length-1]]&&mi(h,l,1);l.push(n);b=b.substr(r+t)}mi(h,l)&&1==h.length||(f=!0);f?c&&a.i("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&qi(a,null,
|
||||||
d))}return d}function qi(a,b){for(var c,d=a.Ga?"(":"{",e=a.Ga?")":"}",f=new RegExp(a.Ga?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=pi(a,c[1]);b=b.replace(d+c[1]+e,null!=g?L(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(a=b;b=a.match(/\$([a-z]+)/i);){c=null;switch(b[1].toLowerCase()){case "ops":c=0}if(null==c)break;a=a.replace(b[0],c.toString())}return a}
|
d))}return d}function oi(a,b){for(var c,d=a.Ga?"(":"{",e=a.Ga?")":"}",f=new RegExp(a.Ga?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=ni(a,c[1]);b=b.replace(d+c[1]+e,null!=g?L(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(a=b;b=a.match(/\$([a-z]+)/i);){c=null;switch(b[1].toLowerCase()){case "ops":c=0}if(null==c)break;a=a.replace(b[0],c.toString())}return a}
|
||||||
function ri(a,b,c,d){var e;null!=b?(e=a.Ic(b),0<=e?e=a.Jc(e):(e=a.fa[b],null==e&&(e=ma(b,a.na))),null!=e||d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return e}
|
function pi(a,b,c,d){var e;null!=b?(e=a.Ic(b),0<=e?e=a.Jc(e):(e=a.ea[b],null==e&&(e=ma(b,a.na))),null!=e||d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return e}
|
||||||
function si(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var l=d&255,m=8,n="";m?32<m&&(m=32):m=32;if(null==l||isNaN(l))for(;0<m--;)n="?"+n;else for(;0<m--;)n=(l&1?"1":"0")+n,l>>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ti(a,b){if(b)return si(a,b,a.fa[b]);var c=0;for(b in a.fa)si(a,b,a.fa[b]),c++;return 0<c}
|
function qi(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var l=d&255,m=8,n="";m?32<m&&(m=32):m=32;if(null==l||isNaN(l))for(;0<m--;)n="?"+n;else for(;0<m--;)n=(l&1?"1":"0")+n,l>>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ri(a,b){if(b)return qi(a,b,a.ea[b]);var c=0;for(b in a.ea)qi(a,b,a.ea[b]),c++;return 0<c}
|
||||||
function L(a,b,c,d){switch(a.na){case 8:a=na(b,3*c-(2<c?1:0));break;case 10:a=b.toString();break;default:a=p(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d}
|
function L(a,b,c,d){switch(a.na){case 8:a=na(b,3*c-(2<c?1:0));break;case 10:a=b.toString();break;default:a=p(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d}
|
||||||
function ui(a){li.call(this,a);this.$a=!1;this.Ga=!0;this.L=Y(0);this.Za=Y(0);this.T=Y(0);this.I=[];this.f=this.N=this.F=[];vi(this);this.Ca=0;wi(this);this.Pa={};xi(this,a.messages);this.Qa=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Ed(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Ed(b,a)})}B(ui,li);
|
function si(a){ji.call(this,a);this.Za=!1;this.Ga=!0;this.L=Y(0);this.Ya=Y(0);this.T=Y(0);this.I=[];this.f=this.N=this.F=[];ti(this);this.Ca=0;ui(this);this.Pa={};vi(this,a.messages);this.Qa=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Cd(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Cd(b,a)})}B(si,ji);
|
||||||
var yi={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},zi=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
|
var wi={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},xi=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
|
||||||
Ai={SP:6,PC:7,PS:20,IR:21,ER:22,SL:23,MMR0:24,MMR1:25,MMR2:26,MMR3:27,AR:28,DR:29,SR:30},Bi={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],
|
yi={SP:6,PC:7,PS:20,IR:21,ER:22,SL:23,MMR0:24,MMR1:25,MMR2:26,MMR3:27,AR:28,DR:29,SR:30},zi={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],
|
||||||
768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],
|
768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],
|
||||||
35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],
|
35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],
|
||||||
183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Ci=[0],Di=[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=ui.prototype;
|
183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Ai=[0],Bi=[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=si.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.w=a.w;(a=Ad(a,"messages"))&&xi(this,a);this.ub=Bi;this.Qb=1145>this.b.lb?Di:[];Qc(this,16,function(a){a:{var b=d.v.ba,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Ei(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.pa;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
|
k.Ha=function(a,b,c,d){this.v=b;this.A=a;this.b=c;this.w=a.w;(a=yd(a,"messages"))&&vi(this,a);this.tb=zi;this.Qb=1145>this.b.kb?Bi:[];Oc(this,16,function(a){a:{var b=d.v.ga,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Ci(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.pa;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Cc[c],n&&d.i(p(n.id,8)+" %"+
|
||||||
p(e<<d.v.pa,8)+" %%"+p(n.H,8)+" "+q(n.Zb)+" "+q(n.size)+" "+m),c!=md&&(c=-1),m=0);a+=d.v.Ia;e++}}});J(this)};
|
p(e<<d.v.pa,8)+" %%"+p(n.H,8)+" "+q(n.Zb)+" "+q(n.size)+" "+m),c!=kd&&(c=-1),m=0);a+=d.v.Ia;e++}}});J(this)};
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Ea=this.D[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Ed(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.g.length-1&&(b=d.g[++d.A])):40==a.keyCode&&(0<d.A?b=d.g[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.D[b]=c,Pa(c,function(){if(d.Ea){var a=d.Ea.value;
|
k.xa=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Ea=this.D[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Cd(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.B<d.g.length-1&&(b=d.g[++d.B])):40==a.keyCode&&(0<d.B?b=d.g[--d.B]:(b="",d.B=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.D[b]=c,Pa(c,function(){if(d.Ea){var a=d.Ea.value;
|
||||||
d.Ea.value="";Ed(d,a,!0);return!0}return!1}),!0;case "step":return this.D[b]=c,Pa(c,function(a){var b=!1;qb(d,!0)||(pb(d,!0),b=d.sb(a?1:0,null),pb(d,!1));return b}),!0}return!1};k.pb=function(a){if(this.Ea){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Ea.focus();!a&&window&&window.scrollTo(b,c)}};k.da=function(a){a=a&&a.H;null==a&&(a=-1);return a};k.dc=function(a,b){var c=255,d=this.da(a,!1,1);-1!==d&&(c=a.ac?this.v.ec(d):this.b.ec(d),b&&Fi(a,b));return c};
|
d.Ea.value="";Cd(d,a,!0);return!0}return!1}),!0;case "step":return this.D[b]=c,Pa(c,function(a){var b=!1;qb(d,!0)||(pb(d,!0),b=d.rb(a?1:0,null),pb(d,!1));return b}),!0}return!1};k.ob=function(a){if(this.Ea){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Ea.focus();!a&&window&&window.scrollTo(b,c)}};k.ca=function(a){a=a&&a.H;null==a&&(a=-1);return a};k.dc=function(a,b){var c=255,d=this.ca(a,!1,1);-1!==d&&(c=a.ac?this.v.ec(d):this.b.ec(d),b&&Di(a,b));return c};
|
||||||
k.va=function(a,b){var c=65535,d=this.da(a,!1,2);-1!==d&&(c=a.ac?this.v.Va(d):this.b.Va(d),b&&Fi(a,b));return c};k.Nb=function(a,b,c){var d=this.da(a,!0,1);-1!==d&&(a.ac?this.v.Cb(d,b):this.b.Cb(d,b),c&&Fi(a,c),this.B.ya(-1))};k.Db=function(a,b,c){var d=this.da(a,!0,2);-1!==d&&(a.ac?this.v.qb(d,b):this.b.qb(d,b),c&&Fi(a,c),this.B.ya(-1))};function Y(a,b){return{H:a,ac:b,Ua:!1}}k.sc=function(a,b){a.H=b;a.Ua=!1;return a};function Gi(a){return[a.H,a.Ua]}function Hi(a){return{H:a[0],Ua:a[1]}}
|
k.va=function(a,b){var c=65535,d=this.ca(a,!1,2);-1!==d&&(c=a.ac?this.v.Va(d):this.b.Va(d),b&&Di(a,b));return c};k.Nb=function(a,b,c){var d=this.ca(a,!0,1);-1!==d&&(a.ac?this.v.Bb(d,b):this.b.Bb(d,b),c&&Di(a,c),this.A.ya(-1))};k.Cb=function(a,b,c){var d=this.ca(a,!0,2);-1!==d&&(a.ac?this.v.pb(d,b):this.b.pb(d,b),c&&Di(a,c),this.A.ya(-1))};function Y(a,b){return{H:a,ac:b,Ua:!1}}k.sc=function(a,b){a.H=b;a.Ua=!1;return a};function Ei(a){return[a.H,a.Ua]}function Fi(a){return{H:a[0],Ua:a[1]}}
|
||||||
function Ei(a,b,c){var d,e=(c?a.L:a.Za).H;c=!1;if(void 0!==b){b=qi(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.I.length;e++){var g=a.I[e].ja[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Y(d));break}}if(d=f)return d;e=pi(a,b,void 0)}null!=e&&(d=Y(e,c));return d}function Ii(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.jd=ni(a,b.Pc=c[2]))}function Fi(a,b){null!=a.H&&(a.H+=b||1)}
|
function Ci(a,b,c){var d,e=(c?a.L:a.Ya).H;c=!1;if(void 0!==b){b=oi(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.I.length;e++){var g=a.I[e].ja[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Y(d));break}}if(d=f)return d;e=ni(a,b,void 0)}null!=e&&(d=Y(e,c));return d}function Gi(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.jd=li(a,b.Pc=c[2]))}function Di(a,b){null!=a.H&&(a.H+=b||1)}
|
||||||
function xi(a,b){a.j=a;a.oa=a.qd=536870912;a.ua=null;a.aa=[];b=ni(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Db){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.oa|=Db[c],a.i(c+" messages enabled"))}}function Qc(a,b,c){for(var d in Db)if(b==Db[d]){a.Pa[d]=c;break}}
|
function vi(a,b){a.j=a;a.oa=a.qd=536870912;a.ua=null;a.aa=[];b=li(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Db){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.oa|=Db[c],a.i(c+" messages enabled"))}}function Oc(a,b,c){for(var d in Db)if(b==Db[d]){a.Pa[d]=c;break}}
|
||||||
k.Ic=function(a){a=a.toUpperCase();var b=Ai[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function Ji(a){return 6>a?"R"+a:6==a?"SP":"PC"}
|
k.Ic=function(a){a=a.toUpperCase();var b=yi[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function Hi(a){return 6>a?"R"+a:6==a?"SP":"PC"}
|
||||||
k.Jc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.gb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=fd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.sa;break;case 23:b=c.ob;break;case 24:b=$c(c);break;case 25:b=bd(c);break;case 26:b=cd(c);break;case 27:b=c.Ya;break;case 28:d&&(b=d.Ba);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.fb)}}return b};
|
k.Jc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.fb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=dd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.sa;break;case 23:b=c.nb;break;case 24:b=Qc(c);break;case 25:b=$c(c);break;case 26:b=ad(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Ba);break;case 29:d&&(b=d.Ab);break;case 30:d&&nc(d)&&(b=d.eb)}}return b};
|
||||||
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.wa&65535).H));if(!this.ua||a!=this.ua)if(this.ua=a,this.oa&1073741824)this.aa.push(a);else{var c;if(this.oa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Id(a),a.Fa=0,a.ya())}};
|
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.wa&65535).H));if(!this.ua||a!=this.ua)if(this.ua=a,this.oa&1073741824)this.aa.push(a);else{var c;if(this.oa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.da(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Gd(a),a.Fa=0,a.ya())}};
|
||||||
function wi(a){var b;if(!Ke(a))a.G&&a.G.length&&a.i("instruction history buffer freed"),a.ga=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b<a.G.length;b++)a.G[b]=Y();a.ga=0;a.i("instruction history buffer allocated")}}k.rb=function(a,b){if(!Ki(this,b))return!1;this.b.rb(a);return!0};
|
function ui(a){var b;if(!Ie(a))a.G&&a.G.length&&a.i("instruction history buffer freed"),a.fa=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b<a.G.length;b++)a.G[b]=Y();a.fa=0;a.i("instruction history buffer allocated")}}k.qb=function(a,b){if(!Ii(this,b))return!1;this.b.qb(a);return!0};
|
||||||
k.sb=function(a,b,c){if(!Ki(this))return!1;null===b&&(b=!this.vb||"tr"==this.vb);this.K=0;a||Ke(this)&&Le(this,this.b.u[7],0);try{a=Jd(this.b,a);var d=this.b.sb(a);0<d&&(Tb(this.b,d),this.K+=d,Ub(this.b,d,!0),Vb(this.b,d),this.Fa++)}catch(e){"number"!=typeof e&&(this.K=0,Ab(this.b,e.stack||e.message))}!1!==c&&(this.w&&this.w.stop&&this.w.stop(),this.B.ya(-1));Dd(this,b||!1);return 0<this.K};k.ea=function(a){this.b&&this.b.ea(a)};
|
k.rb=function(a,b,c){if(!Ii(this))return!1;null===b&&(b=!this.ub||"tr"==this.ub);this.K=0;a||Ie(this)&&Je(this,this.b.u[7],0);try{a=Hd(this.b,a);var d=this.b.rb(a);0<d&&(Tb(this.b,d),this.K+=d,Ub(this.b,d,!0),Vb(this.b,d),this.Fa++)}catch(e){"number"!=typeof e&&(this.K=0,Ab(this.b,e.stack||e.message))}!1!==c&&(this.w&&this.w.stop&&this.w.stop(),this.A.ya(-1));Bd(this,b||!1);return 0<this.K};k.da=function(a){this.b&&this.b.da(a)};
|
||||||
function Dd(a,b){if(a.$a){void 0===b&&(b=!0);var c;c=a.b;if(c=c.J&128?c.pd|c.kd<<8:0){var d=c>>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.R?Li(a):Mi(a)}}function Ki(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
function Bd(a,b){if(a.Za){void 0===b&&(b=!0);var c;c=a.b;if(c=c.J&128?c.pd|c.kd<<8:0){var d=c>>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.R?Ji(a):Ki(a)}}function Ii(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
||||||
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wi(this);this.Fa=0;this.ua=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ni(this);a||Dd(this)};k.save=function(){var a=new S(this);a.set(0,Gi(this.L));a.set(1,Gi(this.T));a.set(2,[this.g,this.U,this.oa]);a.set(3,this.I);return a.data()};
|
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ui(this);this.Fa=0;this.ua=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Li(this);a||Bd(this)};k.save=function(){var a=new S(this);a.set(0,Ei(this.L));a.set(1,Ei(this.T));a.set(2,[this.g,this.U,this.oa]);a.set(3,this.I);return a.data()};
|
||||||
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Hi(a[b++]),this.T=Hi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
|
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Fi(a[b++]),this.T=Fi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
|
||||||
k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.R){b="stopped";if(this.K){a-=this.Rb;var c=0<a?Math.round(1E3*this.K/a):0;b+=" (";Ke(this)&&(b+=this.Fa+" instructions, ",this.Fa=0);b+=this.K+" cycles, "+a+" ms, "+c+" hz)"}else I(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.i(b)}Dd(this,!0);this.pb();Ni(this,this.b.u[7]);this.ua=null}};function Ke(a){return 1<a.f.length||!!a.Ca}
|
k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.R){b="stopped";if(this.K){a-=this.Rb;var c=0<a?Math.round(1E3*this.K/a):0;b+=" (";Ie(this)&&(b+=this.Fa+" instructions, ",this.Fa=0);b+=this.K+" cycles, "+a+" ms, "+c+" hz)"}else I(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.i(b)}Bd(this,!0);this.ob();Li(this,this.b.u[7]);this.ua=null}};function Ie(a){return 1<a.f.length||!!a.Ca}
|
||||||
function Le(a,b,c){var d=-1;c||(d=a.b.Va(b),0==d&&(b=Ud(a.b,2)));if(0<c&&(a.Ca&&!--a.Ca||vd(a,b,1,a.f)))return!0;0<=c&&a.G.length&&(a.Fa++,0>d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.sc(a.G[a.ga],b),++a.ga==a.G.length&&(a.ga=0)));return!1}function Rf(a){var b=a.b;if(b.C.X)throw T(b,a.b.wa&65535),a.ea(),-1;return!1}
|
function Je(a,b,c){var d=-1;c||(d=a.b.Va(b),0==d&&(b=Sd(a.b,2)));if(0<c&&(a.Ca&&!--a.Ca||td(a,b,1,a.f)))return!0;0<=c&&a.G.length&&(a.Fa++,0>d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.sc(a.G[a.fa],b),++a.fa==a.G.length&&(a.fa=0)));return!1}function Pf(a){var b=a.b;if(b.C.X)throw T(b,a.b.wa&65535),a.da(),-1;return!1}
|
||||||
function vi(a){var b,c;a.f=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];var d=a.v;c=a.da(c);wd(d.ba[c>>>d.pa],!1)}a.N=["br"];if(a.F)for(b=1;b<a.F.length;b++)c=a.F[b],d=a.v,c=a.da(c),wd(d.ba[c>>>d.pa],!0);a.F=["bw"];a.ab=0}k.wb=function(a,b,c){var d=!0;c||Oi(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.H)),d=!1;else{var f=this.v;f.ba[e>>>f.pa].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Pi(this,a,a.length-1,"set"),wi(this)));return d};
|
function ti(a){var b,c;a.f=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];var d=a.v;c=a.ca(c);ud(d.ga[c>>>d.pa],!1)}a.N=["br"];if(a.F)for(b=1;b<a.F.length;b++)c=a.F[b],d=a.v,c=a.ca(c),ud(d.ga[c>>>d.pa],!0);a.F=["bw"];a.$a=0}k.vb=function(a,b,c){var d=!0;c||Mi(this,a,b,!1,!0);if(a!=this.f){var e=this.ca(b);if(-1===e)this.i("invalid address: "+L(this,b.H)),d=!1;else{var f=this.v;f.ga[e>>>f.pa].vb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Ni(this,a,a.length-1,"set"),ui(this)));return d};
|
||||||
function Oi(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.da(h)&&(!d||h.Ua)){f=!0;h.Ua||e||Pi(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.v,wd(d.ba[c>>>d.pa],b==a.F));h.Ua||wi(a);break}}return f}function Qi(a,b){for(var c=1;c<b.length;c++)Pi(a,b,c);return b.length-1}function Pi(a,b,c,d){c=b[c];a.i(b[0]+" "+L(a,c.H)+(d?" "+d:c.Pc?' "'+c.Pc+'"':""))}
|
function Mi(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.ca(h)&&(!d||h.Ua)){f=!0;h.Ua||e||Ni(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.v,ud(d.ga[c>>>d.pa],b==a.F));h.Ua||ui(a);break}}return f}function Oi(a,b){for(var c=1;c<b.length;c++)Ni(a,b,c);return b.length-1}function Ni(a,b,c,d){c=b[c];a.i(b[0]+" "+L(a,c.H)+(d?" "+d:c.Pc?' "'+c.Pc+'"':""))}
|
||||||
function Ni(a,b){if(void 0!==b)vd(a,b,1,a.f,!0),a.R=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ua){if(!Oi(a,a.f,c,!0))break;b=0}}}
|
function Li(a,b){if(void 0!==b)td(a,b,1,a.f,!0),a.R=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ua){if(!Mi(a,a.f,c,!0))break;b=0}}}
|
||||||
function vd(a,b,c,d,e){var f=!1;if(!a.ab++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ua)for(var l=a.da(h)&65535,m=0;m<c;m++)if(b+m==l){var n,f=!0;h.Ua&&(Oi(a,d,h,!0),e=!0);if(n=h.jd){for(var f=!1,r=0;r<n.length;r++)if(!Ri(a,n[r],!0)){if(n[r].indexOf("if")){f=!0;break}for(var t=r+1;t<n.length&&n[t].indexOf("else");t++)r++;if(t==n.length){f=!0;break}}a.b.C.X||(f=!0)}if(f){e||Pi(a,d,g,"hit");break}}}a.ab--;return f}
|
function td(a,b,c,d,e){var f=!1;if(!a.$a++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ua)for(var l=a.ca(h)&65535,m=0;m<c;m++)if(b+m==l){var n,f=!0;h.Ua&&(Mi(a,d,h,!0),e=!0);if(n=h.jd){for(var f=!1,r=0;r<n.length;r++)if(!Pi(a,n[r],!0)){if(n[r].indexOf("if")){f=!0;break}for(var t=r+1;t<n.length&&n[t].indexOf("else");t++)r++;if(t==n.length){f=!0;break}}a.b.C.X||(f=!0)}if(f){e||Ni(a,d,g,"hit");break}}}a.$a--;return f}
|
||||||
function Si(a,b,c,d){var e=Y(b.H),f=a.va(b,2),g,h;for(h in a.ub)if(g=a.ub[h][f&h])break;g||(g=Ci);var l=g[0];0<=a.Qb.indexOf(l)&&(g=Ci,l=g[0]);var m=h="",n=zi[l],r=g.length-1;l||r||(h=L(a,f));for(l=1;l<=r;l++){var t=g[l];if(void 0!==t){var v;v=a;var A=t,t=b,y="",C=A&61440;if(4096==C)t=t.H+((f&255)<<24>>23)&65535,y=L(v,t);else if(8192==C)t=t.H-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
|
function Qi(a,b,c,d){var e=Y(b.H),f=a.va(b,2),g,h;for(h in a.tb)if(g=a.tb[h][f&h])break;g||(g=Ai);var l=g[0];0<=a.Qb.indexOf(l)&&(g=Ai,l=g[0]);var m=h="",n=xi[l],r=g.length-1;l||r||(h=L(a,f));for(l=1;l<=r;l++){var t=g[l];if(void 0!==t){var v;v=a;var A=t,t=b,y="",C=A&61440;if(4096==C)t=t.H+((f&255)<<24>>23)&65535,y=L(v,t);else if(8192==C)t=t.H-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
|
||||||
A&63)switch(A=C&7,C&56){case 0:y=Ji(A);break;case 8:y="@"+Ji(A);break;case 16:7>A?y="("+Ji(A)+")+":(C=v.va(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Ji(A)+")+":(C=v.va(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Ji(A)+")";break;case 40:y="@-("+Ji(A)+")";break;case 48:C=v.va(t,2);y=L(v,C,0,!0)+"("+Ji(A)+")";7==A&&(y=L(v,C+t.H&65535));break;case 56:C=v.va(t,2),y="@"+L(v,C)+"("+Ji(A)+")",7==A&&(y="@"+L(v,C+t.H&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
|
A&63)switch(A=C&7,C&56){case 0:y=Hi(A);break;case 8:y="@"+Hi(A);break;case 16:7>A?y="("+Hi(A)+")+":(C=v.va(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Hi(A)+")+":(C=v.va(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Hi(A)+")";break;case 40:y="@-("+Hi(A)+")";break;case 48:C=v.va(t,2);y=L(v,C,0,!0)+"("+Hi(A)+")";7==A&&(y=L(v,C+t.H&65535));break;case 56:C=v.va(t,2),y="@"+L(v,C)+"("+Hi(A)+")",7==A&&(y="@"+L(v,C+t.H&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
|
||||||
0<h.length&&(h+=",");h+=v||"???"}}f="";g=L(a,e.H)+":";if(-1!==e.H&&-1!==b.H){do if(f+=" "+L(a,a.va(e,2)),null==e.H)break;while(e.H!=b.H)}g+=ta(f,24);g+=ta(n,5);h&&(g+=" "+h);if(c||m)g=ta(g,60)+";"+(c||""),g=a.b.C.Fb?g+("cycles="+Fd(a.b).toString()+" cs="+p(a.b.Vb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Ti(a,b){switch(b){case "N":a=Sd(a.b);break;case "Z":a=Rd(a.b);break;case "V":a=Qd(a.b);break;case "C":a=Pd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
0<h.length&&(h+=",");h+=v||"???"}}f="";g=L(a,e.H)+":";if(-1!==e.H&&-1!==b.H){do if(f+=" "+L(a,a.va(e,2)),null==e.H)break;while(e.H!=b.H)}g+=ta(f,24);g+=ta(n,5);h&&(g+=" "+h);if(c||m)g=ta(g,60)+";"+(c||""),g=a.b.C.Eb?g+("cycles="+Dd(a.b).toString()+" cs="+p(a.b.Vb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Ri(a,b){switch(b){case "N":a=Qd(a.b);break;case "Z":a=Pd(a.b);break;case "V":a=Od(a.b);break;case "C":a=Nd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
||||||
function Z(a,b){var c="",d=a.b;if(8>b)c=Ji(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.gb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,fd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.sa);break;case 23:c="SL="+L(a,d.ob);break;case 24:c="MMR0="+L(a,$c(d));break;case 25:c="MMR1="+L(a,bd(d));break;case 26:c="MMR2="+L(a,cd(d));break;case 27:c="MMR3="+L(a,d.Ya);break;case 28:a.w&&(c="AR="+L(a,a.w.Ba,3));break;case 29:a.w&&
|
function Z(a,b){var c="",d=a.b;if(8>b)c=Hi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.fb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,dd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.sa);break;case 23:c="SL="+L(a,d.nb);break;case 24:c="MMR0="+L(a,Qc(d));break;case 25:c="MMR1="+L(a,$c(d));break;case 26:c="MMR2="+L(a,ad(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Ba,3));break;case 29:a.w&&
|
||||||
(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.fb,3))}c&&(c+=" ");return c}function Ui(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ti(a,"T")+Ti(a,"N")+Ti(a,"Z")+Ti(a,"V")+Ti(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Fc=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
(c="DR="+L(a,a.w.Ab));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.eb,3))}c&&(c+=" ");return c}function Si(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ri(a,"T")+Ri(a,"N")+Ri(a,"Z")+Ri(a,"V")+Ri(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Fc=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||||
function Rg(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=Aa(n,l,a.Fc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Jg:b,H:c,xd:d,ja:e,Dc:f})}function Vi(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.H>>>0,h=f.xd;if(e>=g&&e<g+h){e=Aa(f.Dc,[e-g],a.Fc);0<=e?Wi(a,b,e,d):c&&(e=~e,Wi(a,b,e-1,d),Wi(a,b,e,d));break}}return d}
|
function Pg(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=Aa(n,l,a.Fc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Jg:b,H:c,xd:d,ja:e,Dc:f})}function Ti(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.H>>>0,h=f.xd;if(e>=g&&e<g+h){e=Aa(f.Dc,[e-g],a.Fc);0<=e?Ui(a,b,e,d):c&&(e=~e,Ui(a,b,e-1,d),Ui(a,b,e,d));break}}return d}
|
||||||
function Wi(a,b,c,d){var e={},f=a.I[b].Dc,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.I[b].ja[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}function Xi(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return ti(a)||a.i("no variables"),!0;if(!c[2])return ti(a,c[1]);if(!c[3])return delete a.fa[c[1]],!0;b=pi(a,c[3]);return void 0!==b?(a.fa[c[1]]=b,!0):!1}a.i("invalid assignment:"+b);return!1}
|
function Ui(a,b,c,d){var e={},f=a.I[b].Dc,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.I[b].ja[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}function Vi(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return ri(a)||a.i("no variables"),!0;if(!c[2])return ri(a,c[1]);if(!c[3])return delete a.ea[c[1]],!0;b=ni(a,c[3]);return void 0!==b?(a.ea[c[1]]=b,!0):!1}a.i("invalid assignment:"+b);return!1}
|
||||||
function Yi(a,b,c){var d=null;if(b=Ei(a,b,!0)){a.da(b);var e=Vi(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.H-e[1])&&(g=" + "+q(f)),f=e[0]+" ("+L(a,e[1])+")"+g,c&&a.i(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.H)&&(g=" - "+q(f)),f=e[4]+" ("+L(a,e[5])+")"+g,c&&a.i(f),d||(d=f))}else c&&a.i("no symbols")}return d}
|
function Wi(a,b,c){var d=null;if(b=Ci(a,b,!0)){a.ca(b);var e=Ti(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.H-e[1])&&(g=" + "+q(f)),f=e[0]+" ("+L(a,e[1])+")"+g,c&&a.i(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.H)&&(g=" - "+q(f)),f=e[4]+" ("+L(a,e[5])+")"+g,c&&a.i(f),d||(d=f))}else c&&a.i("no symbols")}return d}
|
||||||
function Li(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trm\tdump misc registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.b;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.i("missing value for "+b[1]);return}g=pi(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.u[6]=g&65535;break;case "PC":case "R7":T(e,
|
function Ji(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trm\tdump misc registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.b;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.i("missing value for "+b[1]);return}g=ni(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.u[6]=g&65535;break;case "PC":case "R7":T(e,
|
||||||
g);a.L=Y(e.u[7]);break;case "N":e.Z=g?32768:0;break;case "Z":e.ca=g?0:1;break;case "V":e.W=g?32768:0;break;case "C":e.V=g?65536:0;break;case "PS":gd(e,g);break;case "IR":ed(e,g);break;case "ER":e.sa=g;d=!0;break;case "SL":e.ob=g|255;break;case "MMR0":ad(e,g);d=!0;break;case "MMR3":dd(e,g);d=!0;break;case "AR":a.w&&(d=a.w,Yb(d,d.Ba=g));d=!0;break;case "DR":a.w&&(d=a.w,Xb(d,d.Bb=g));d=!0;break;case "SR":if(a.w&&nc(a.w)){Zb(a.w,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.u[b]=
|
g);a.L=Y(e.u[7]);break;case "N":e.Z=g?32768:0;break;case "Z":e.ba=g?0:1;break;case "V":e.W=g?32768:0;break;case "C":e.V=g?65536:0;break;case "PS":ed(e,g);break;case "IR":cd(e,g);break;case "ER":e.sa=g;d=!0;break;case "SL":e.nb=g|255;break;case "MMR0":Rc(e,g);d=!0;break;case "MMR3":bd(e,g);d=!0;break;case "AR":a.w&&(d=a.w,Yb(d,d.Ba=g));d=!0;break;case "DR":a.w&&(d=a.w,Xb(d,d.Ab=g));d=!0;break;case "SR":if(a.w&&nc(a.w)){Zb(a.w,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.u[b]=
|
||||||
g&65535;break}a.i("unknown register: "+f);return}a.B.ya();a.i("updated registers:")}}a.i(Ui(a,d));c&&(a.L=Y(e.u[7]),Mi(a,L(a,a.L.H)))}}function Zi(a,b){b=ua(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.i(c[2]):si(a,null,c[2].charCodeAt(0)):pi(a,b,!0)}
|
g&65535;break}a.i("unknown register: "+f);return}a.A.ya();a.i("updated registers:")}}a.i(Si(a,d));c&&(a.L=Y(e.u[7]),Ki(a,L(a,a.L.H)))}}function Xi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.i(c[2]):qi(a,null,c[2].charCodeAt(0)):ni(a,b,!0)}
|
||||||
function $i(a,b,c){if("?"==c)a.i("trace commands:"),a.i("\tt [#]\ttrace # instructions"),a.i("\ttr [#]\ttrace # instructions with register updates"),a.i("\ttc [#]\ttrace # cycles"),a.i("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=ri(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);a.vb=b;Oa(c,function(){return pb(a,!0)&&a.sb(e,d,!1)},function(){a.w&&a.w.stop&&a.w.stop();a.B.ya(-1);pb(a,!1)})}}
|
function Yi(a,b,c){if("?"==c)a.i("trace commands:"),a.i("\tt [#]\ttrace # instructions"),a.i("\ttr [#]\ttrace # instructions with register updates"),a.i("\ttc [#]\ttrace # cycles"),a.i("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=pi(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);a.ub=b;Oa(c,function(){return pb(a,!0)&&a.rb(e,d,!1)},function(){a.w&&a.w.stop&&a.w.stop();a.A.ya(-1);pb(a,!1)})}}
|
||||||
function Mi(a,b,c,d){if(b=Ei(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=ri(a,c.substr(1)),null!=c&&(d=c);else{d=Ei(a,c,!0);if(!d||d.H<b.H)return;e=d.H-b.H;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=qb(a,!1)||a.R?a.K:null;var g=null!=f?"cycles":null,h=Vi(a,b),l=b.H;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Si(a,b,g,f);a.i(f);a.L=b;e-=b.H-l;c++}}}
|
function Ki(a,b,c,d){if(b=Ci(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=pi(a,c.substr(1)),null!=c&&(d=c);else{d=Ci(a,c,!0);if(!d||d.H<b.H)return;e=d.H-b.H;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=qb(a,!1)||a.R?a.K:null;var g=null!=f?"cycles":null,h=Ti(a,b),l=b.H;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Qi(a,b,g,f);a.i(f);a.L=b;e-=b.H-l;c++}}}
|
||||||
function Ri(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.H)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(yb(a)&&0<b.length){a.U&&(b="a "+L(a,a.T.H)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],l=h.charAt(0),m=1;m<h.length;m++){var n=h.charAt(m);if("?"==l||"r"==l||"a">n||"z"<n){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var r=
|
function Pi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.H)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(yb(a)&&0<b.length){a.U&&(b="a "+L(a,a.T.H)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],l=h.charAt(0),m=1;m<h.length;m++){var n=h.charAt(m);if("?"==l||"r"==l||"a">n||"z"<n){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var r=
|
||||||
Ei(a,g[1],!0);if(r)if(a.T=r,void 0===g[2])a.i("begin assemble at "+L(a,r.H)),a.U=!0,a.B.ya();else{var t;a.i("not supported yet");t=[];if(t.length){for(var v=0;v<t.length;v++)a.Nb(r,t[v],1);a.i(Si(a,a.T))}}break;case "b":a:{var A=g[0],y=g[1],C=b;if("?"==y)a.i("breakpoint commands:"),a.i("\tbp [#]\tset exec breakpoint at addr #"),a.i("\tbr [#]\tset read breakpoint at addr #"),a.i("\tbw [#]\tset write breakpoint at addr #"),a.i("\tbc [#]\tclear breakpoint at addr #"),a.i("\tbl\tlist all breakpoints"),
|
Ci(a,g[1],!0);if(r)if(a.T=r,void 0===g[2])a.i("begin assemble at "+L(a,r.H)),a.U=!0,a.A.ya();else{var t;a.i("not supported yet");t=[];if(t.length){for(var v=0;v<t.length;v++)a.Nb(r,t[v],1);a.i(Qi(a,a.T))}}break;case "b":a:{var A=g[0],y=g[1],C=b;if("?"==y)a.i("breakpoint commands:"),a.i("\tbp [#]\tset exec breakpoint at addr #"),a.i("\tbr [#]\tset read breakpoint at addr #"),a.i("\tbw [#]\tset write breakpoint at addr #"),a.i("\tbc [#]\tclear breakpoint at addr #"),a.i("\tbl\tlist all breakpoints"),
|
||||||
a.i("\tbn [#]\tbreak after # instruction(s)");else{var sa=A.charAt(1);if("l"==sa){var Sa;Sa=0+Qi(a,a.f);Sa+=Qi(a,a.N);(Sa+=Qi(a,a.F))||a.i("no breakpoints")}else if("n"==sa)a.Ca=ri(a,y),a.i("break after "+a.Ca+" instruction(s)");else if(void 0===y)a.i("missing breakpoint address");else{var R=Y();if("*"!=y&&(R=Ei(a,y,!0),!R))break a;"c"==sa?null==R.H?(vi(a),a.i("all breakpoints cleared")):Oi(a,a.f,R)||Oi(a,a.N,R)||Oi(a,a.F,R)||a.i("breakpoint missing: "+L(a,R.H)):null!=R.H&&(Ii(a,R,C),"p"==sa?a.wb(a.f,
|
a.i("\tbn [#]\tbreak after # instruction(s)");else{var ra=A.charAt(1);if("l"==ra){var Ra;Ra=0+Oi(a,a.f);Ra+=Oi(a,a.N);(Ra+=Oi(a,a.F))||a.i("no breakpoints")}else if("n"==ra)a.Ca=pi(a,y),a.i("break after "+a.Ca+" instruction(s)");else if(void 0===y)a.i("missing breakpoint address");else{var R=Y();if("*"!=y&&(R=Ci(a,y,!0),!R))break a;"c"==ra?null==R.H?(ti(a),a.i("all breakpoints cleared")):Mi(a,a.f,R)||Mi(a,a.N,R)||Mi(a,a.F,R)||a.i("breakpoint missing: "+L(a,R.H)):null!=R.H&&(Gi(a,R,C),"p"==ra?a.vb(a.f,
|
||||||
R):"r"==sa?a.wb(a.N,R):"w"==sa?a.wb(a.F,R):a.i("unknown breakpoint command: "+sa))}}}break;case "c":a.bb&&(a.bb.value="");break;case "d":a:{var rb,Ua=g[0],va=g[1],Va=g[2],sj=g[3];if("?"==va){var sb="";for(rb in Db)a.Pa[rb]&&(sb&&(sb+=","),sb+=rb);sb+=",state,symbols";a.i("dump memory commands:");a.i("\tdb [a] [n] dump n bytes at address a");a.i("\tdw [a] [n] dump n words at address a");a.i("\tdd [a] [n] dump n dwords at address a");a.i("\tds [a] [n] dump n words at address a as JSON");
|
R):"r"==ra?a.vb(a.N,R):"w"==ra?a.vb(a.F,R):a.i("unknown breakpoint command: "+ra))}}}break;case "c":a.ab&&(a.ab.value="");break;case "d":a:{var rb,Ta=g[0],ua=g[1],Ua=g[2],qj=g[3];if("?"==ua){var sb="";for(rb in Db)a.Pa[rb]&&(sb&&(sb+=","),sb+=rb);sb+=",state,symbols";a.i("dump memory commands:");a.i("\tdb [a] [n] dump n bytes at address a");a.i("\tdw [a] [n] dump n words at address a");a.i("\tdd [a] [n] dump n dwords at address a");a.i("\tds [a] [n] dump n words at address a as JSON");
|
||||||
a.i("\tdh [p] [n] dump n instructions from history position p");sb.length&&a.i("dump extension commands:\n\t"+sb)}else if("state"==va){var bh=aj(a.B,!0);"console"==Va?console.log(bh):(a.bb&&(a.bb.value=""),a.i(bh))}else if("symbols"==va)for(var ae=0;ae<a.I.length;ae++){var be=a.I[ae],tb;for(tb in be.ja)if("."!=tb.charAt(0)){var ch=be.ja[tb].o;if(void 0!==ch){var dh=be.ja[tb].l;dh&&(tb=dh);a.i(L(a,ch)+" "+tb)}}}else{if("d"==Ua){for(rb in Db)if(g[1]==rb){var eh=a.Pa[rb];eh?(g.shift(),g.shift(),eh(g)):
|
a.i("\tdh [p] [n] dump n instructions from history position p");sb.length&&a.i("dump extension commands:\n\t"+sb)}else if("state"==ua){var $g=Zi(a.A,!0);"console"==Ua?console.log($g):(a.ab&&(a.ab.value=""),a.i($g))}else if("symbols"==ua)for(var Zd=0;Zd<a.I.length;Zd++){var $d=a.I[Zd],tb;for(tb in $d.ja)if("."!=tb.charAt(0)){var ah=$d.ja[tb].o;if(void 0!==ah){var bh=$d.ja[tb].l;bh&&(tb=bh);a.i(L(a,ah)+" "+tb)}}}else{if("d"==Ta){for(rb in Db)if(g[1]==rb){var ch=a.Pa[rb];ch?(g.shift(),g.shift(),ch(g)):
|
||||||
a.i("no dump registered for "+va);break a}va||(Ua=a.Tb||"dw")}else a.Tb=Ua;if("dh"==Ua){var fh=va,gh=Va,hh="",ih=0,ka=a.ga,wa=a.G;if(wa.length){var fa=+fh||a.tb,ac=+gh||10;isNaN(fa)?fa=ac:hh="more ";fa>wa.length&&(a.i("note: only "+wa.length+" available"),fa=wa.length);ka-=fa;0>ka&&(null==wa[wa.length-1].H?(fa=ka+fa,ka=0):ka+=wa.length);var ce=[];"call"==gh&&(ac=1E5,ce=["CALL"]);for(void 0!==fh&&a.i(fa+" instructions earlier:");0<ac&&ka!=a.ga;){var jh=wa[ka++];if(null==jh.H)break;var bc=Y(jh.H),tj=
|
a.i("no dump registered for "+ua);break a}ua||(Ta=a.Tb||"dw")}else a.Tb=Ta;if("dh"==Ta){var dh=ua,eh=Ua,fh="",gh=0,ja=a.fa,va=a.G;if(va.length){var ea=+dh||a.sb,ac=+eh||10;isNaN(ea)?ea=ac:fh="more ";ea>va.length&&(a.i("note: only "+va.length+" available"),ea=va.length);ja-=ea;0>ja&&(null==va[va.length-1].H?(ea=ja+ea,ja=0):ja+=va.length);var ae=[];"call"==eh&&(ac=1E5,ae=["CALL"]);for(void 0!==dh&&a.i(ea+" instructions earlier:");0<ac&&ja!=a.fa;){var hh=va[ja++];if(null==hh.H)break;var bc=Y(hh.H),rj=
|
||||||
fa--,kh=Si(a,bc,"history",tj);(!ce.length||0<=kh.indexOf(ce[0]))&&a.i(kh);bc.oc&&(ka+=bc.oc,ac-=bc.oc,fa-=bc.oc);ka>=wa.length&&(ka=0);a.tb=fa;ih++;ac--}}ih||(a.i("no "+hh+"history available"),a.tb=void 0)}else{var ub=Ei(a,va);if(ub){var cc=0,de=!1,ee="ds"==Ua;Va&&(de=!0,"l"==Va.charAt(0)&&(de=!1,Va=Va.substr(1)||sj),cc=ri(a,Va)>>>0,65536<cc&&(cc=65536));for(var vb="dd"==Ua?4:"db"==Ua?1:2,Sc=(de?cc-ub.H:vb*cc)||128,fe=ee?16:a.na,uj=(Sc+fe-1)/fe|0||1,Wa="";uj--&&0<Sc;){for(var Xa="",ge="",va=L(a,ub.H),
|
ea--,ih=Qi(a,bc,"history",rj);(!ae.length||0<=ih.indexOf(ae[0]))&&a.i(ih);bc.oc&&(ja+=bc.oc,ac-=bc.oc,ea-=bc.oc);ja>=va.length&&(ja=0);a.sb=ea;gh++;ac--}}gh||(a.i("no "+fh+"history available"),a.sb=void 0)}else{var ub=Ci(a,ua);if(ub){var cc=0,be=!1,ce="ds"==Ta;Ua&&(be=!0,"l"==Ua.charAt(0)&&(be=!1,Ua=Ua.substr(1)||qj),cc=pi(a,Ua)>>>0,65536<cc&&(cc=65536));for(var vb="dd"==Ta?4:"db"==Ta?1:2,Sc=(be?cc-ub.H:vb*cc)||128,de=ce?16:a.na,sj=(Sc+de-1)/de|0||1,Va="";sj--&&0<Sc;){for(var Wa="",ee="",ua=L(a,ub.H),
|
||||||
Tc=fe,dc=0,ec=0;0<Tc&&0<Sc;){var wb=1,Uc=1==vb?a.dc(ub,wb):a.va(ub,wb=2),dc=dc|Uc<<(ec<<3),ec=ec+wb;ec==vb&&(ee?(Xa&&(Xa+=","),Xa+="0x"+p(dc,2*vb)):(Xa+=L(a,dc,vb),Xa+=1==vb?9==Tc?"-":" ":" "),dc=ec=0);Tc-=wb;for(Sc-=wb;wb--;)var he=Uc&255,ge=ge+(32<=he&&128>he?String.fromCharCode(he):"."),Uc=Uc>>8}Wa&&(Wa+="\n");Wa=ee?Wa+(Xa+","):Wa+(va+" "+Xa+(0==Tc?" "+ge:""))}Wa&&a.i(Wa);a.Za=ub}}}}break;case "e":if("else"==g[0])break;var xb,ie,je,ke,le=g[0],me=g[1];"eb"==le?(xb=1,ie=255,je=a.dc,ke=a.Nb):"e"==
|
Tc=de,dc=0,ec=0;0<Tc&&0<Sc;){var wb=1,Uc=1==vb?a.dc(ub,wb):a.va(ub,wb=2),dc=dc|Uc<<(ec<<3),ec=ec+wb;ec==vb&&(ce?(Wa&&(Wa+=","),Wa+="0x"+p(dc,2*vb)):(Wa+=L(a,dc,vb),Wa+=1==vb?9==Tc?"-":" ":" "),dc=ec=0);Tc-=wb;for(Sc-=wb;wb--;)var fe=Uc&255,ee=ee+(32<=fe&&128>fe?String.fromCharCode(fe):"."),Uc=Uc>>8}Va&&(Va+="\n");Va=ce?Va+(Wa+","):Va+(ua+" "+Wa+(0==Tc?" "+ee:""))}Va&&a.i(Va);a.Ya=ub}}}}break;case "e":if("else"==g[0])break;var xb,ge,he,ie,je=g[0],ke=g[1];"eb"==je?(xb=1,ge=255,he=a.dc,ie=a.Nb):"e"==
|
||||||
le||"ew"==le?(xb=2,ie=65535,je=a.va,ke=a.Db):me=null;if(null==me)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Vc=Ei(a,me);if(Vc)for(var Wc=2;Wc<g.length;Wc++){var fc=pi(a,g[Wc]);if(void 0===fc){a.i("unrecognized value: "+g[Wc]);break}fc&~ie&&a.i("warning: "+p(fc)+" exceeds "+xb+"-byte value");a.i("changing "+L(a,Vc.H)+(I(a,16)?"":" from "+L(a,je.call(a,Vc),xb))+" to "+L(a,fc,xb));ke.call(a,Vc,fc,xb)}}break;case "g":a:{var lh=
|
je||"ew"==je?(xb=2,ge=65535,he=a.va,ie=a.Cb):ke=null;if(null==ke)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Vc=Ci(a,ke);if(Vc)for(var Wc=2;Wc<g.length;Wc++){var fc=ni(a,g[Wc]);if(void 0===fc){a.i("unrecognized value: "+g[Wc]);break}fc&~ge&&a.i("warning: "+p(fc)+" exceeds "+xb+"-byte value");a.i("changing "+L(a,Vc.H)+(I(a,16)?"":" from "+L(a,he.call(a,Vc),xb))+" to "+L(a,fc,xb));ie.call(a,Vc,fc,xb)}}break;case "g":a:{var jh=
|
||||||
g[1],vj=b;if(void 0!==lh){var ne=Ei(a,lh,!0);if(!ne)break a;Ii(a,ne,vj);a.wb(a.f,ne,!0)}a.rb(!0,c)}break;case "h":a.C.X?(c||a.i("halting"),a.ea()):qb(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var oe;var gc=b.substr(2),gc=ua(gc);pi(a,gc)?(c||a.i("true: "+gc),oe=!0):(c||a.i("false: "+gc),oe=!1);oe||(d=!1);break}f=!0;break;case "k":var wj=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var pe=0,qe=Y(),hc=Y(a.b.u[6]);
|
g[1],tj=b;if(void 0!==jh){var le=Ci(a,jh,!0);if(!le)break a;Gi(a,le,tj);a.vb(a.f,le,!0)}a.qb(!0,c)}break;case "h":a.C.X?(c||a.i("halting"),a.da()):qb(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var me;var gc=b.substr(2),gc=ya(gc);ni(a,gc)?(c||a.i("true: "+gc),me=!0):(c||a.i("false: "+gc),me=!1);me||(d=!1);break}f=!0;break;case "k":var uj=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var ne=0,oe=Y(),hc=Y(a.b.u[6]);
|
||||||
for(a.i("stack trace for "+L(a,hc.H));10>pe;){for(var Ya=null,xj=256;65536>hc.H>>>0;){qe.H=a.va(hc,2);if(null==hc.H||!xj--)break;if(!(qe.H&1)){for(var yj=a,Xc=qe,mh=null,ic=Xc.H,nh=ic,re=1;6>=re&⁣re++){if(2<re){Xc.H=ic;var Yc=Si(yj,Xc);if(0<=Yc.indexOf("JSR")){var oh=Yc.indexOf(" ");if(ic+(Yc.indexOf(" ",oh+1)-oh-1)/2==nh){mh=Yc;break}}}ic-=2}Xc.H=nh;if(Ya=mh)break}}if(!Ya||null==Ya)break;var ph=null;if("ks"==wj){var qh=Ya.match(/[0-9A-F]+$/);qh&&(ph=Yi(a,qh[0]))}Ya=ta(Ya,50)+" ;"+(ph||"stack="+
|
for(a.i("stack trace for "+L(a,hc.H));10>ne;){for(var Xa=null,vj=256;65536>hc.H>>>0;){oe.H=a.va(hc,2);if(null==hc.H||!vj--)break;if(!(oe.H&1)){for(var wj=a,Xc=oe,kh=null,ic=Xc.H,lh=ic,pe=1;6>=pe&⁣pe++){if(2<pe){Xc.H=ic;var Yc=Qi(wj,Xc);if(0<=Yc.indexOf("JSR")){var mh=Yc.indexOf(" ");if(ic+(Yc.indexOf(" ",mh+1)-mh-1)/2==lh){kh=Yc;break}}}ic-=2}Xc.H=lh;if(Xa=kh)break}}if(!Xa||null==Xa)break;var nh=null;if("ks"==uj){var oh=Xa.match(/[0-9A-F]+$/);oh&&(nh=Wi(a,oh[0]))}Xa=ta(Xa,50)+" ;"+(nh||"stack="+
|
||||||
L(a,hc.H));a.i(Ya);pe++}pe||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){Yi(a,g[1],!0);break}f=!0;break;case "m":a:{var xa,ya=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var La=0;if("all"==H)La=1879046143,H=null;else if("on"==H)ya=!0,H=null;else if("off"==H)ya=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(xa in Db)if(H==xa){La=Db[xa];ya=!!(a.oa&La);break}if(!La){a.i("unknown message category: "+H);break a}}if(La)if("on"==g[2])a.oa|=La,ya=!0;else if("off"==g[2]&&
|
L(a,hc.H));a.i(Xa);ne++}ne||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){Wi(a,g[1],!0);break}f=!0;break;case "m":a:{var wa,xa=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var Ka=0;if("all"==H)Ka=1879046143,H=null;else if("on"==H)xa=!0,H=null;else if("off"==H)xa=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(wa in Db)if(H==wa){Ka=Db[wa];xa=!!(a.oa&Ka);break}if(!Ka){a.i("unknown message category: "+H);break a}}if(Ka)if("on"==g[2])a.oa|=Ka,xa=!0;else if("off"==g[2]&&
|
||||||
(a.oa&=~La,ya=!1,1073741824==La)){for(var rh=1E3<=a.aa.length?a.aa.length-1E3:0;rh<a.aa.length;)a.i(a.aa[rh++]);a.aa=[]}}var zj=0,jc="";for(xa in Db)if(!H||H==xa){var Aj=!!(a.oa&Db[xa]);if(null===ya||ya==Aj)jc&&(jc+=","),++zj%10||(jc+="\n\t"),"key"==xa&&(xa="keys"),jc+=xa}void 0===H&&a.i("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.i((null!==ya?ya?"messages on: ":"messages off: ":"message categories:\n\t")+(jc||"none"));wi(a)}break;case "p":if("print"==g[0]){Zi(a,b.substr(5));
|
(a.oa&=~Ka,xa=!1,1073741824==Ka)){for(var ph=1E3<=a.aa.length?a.aa.length-1E3:0;ph<a.aa.length;)a.i(a.aa[ph++]);a.aa=[]}}var xj=0,jc="";for(wa in Db)if(!H||H==wa){var yj=!!(a.oa&Db[wa]);if(null===xa||xa==yj)jc&&(jc+=","),++xj%10||(jc+="\n\t"),"key"==wa&&(wa="keys"),jc+=wa}void 0===H&&a.i("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.i((null!==xa?xa?"messages on: ":"messages off: ":"message categories:\n\t")+(jc||"none"));ui(a)}break;case "p":if("print"==g[0]){Xi(a,b.substr(5));
|
||||||
break}var Bj=g[0];if("?"==g[1])a.i("step commands:"),a.i("\tp\tstep over instruction"),a.i("\tpr\tstep over instruction with register update");else{var sh="pr"==Bj?1:0,th=1+sh;if(a.R)a.i("step in progress");else{var Zc=Y(a.b.u[7]),kc=a.va(Zc);3==kc||4==kc||34816==(kc&65280)||35072==(kc&65280)?(a.R=th,Fi(Zc,2)):2048==(kc&65024)&&(Si(a,Zc),a.R=th);a.R?(a.wb(a.f,Zc,!0),a.rb()||(a.B&&a.B.pb(),a.R=0)):$i(a,sh?"tr":"t")}}break;case "r":if("reset"==b){a.B&&a.B.reset();break}Li(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var lc=
|
break}var zj=g[0];if("?"==g[1])a.i("step commands:"),a.i("\tp\tstep over instruction"),a.i("\tpr\tstep over instruction with register update");else{var qh="pr"==zj?1:0,rh=1+qh;if(a.R)a.i("step in progress");else{var Zc=Y(a.b.u[7]),kc=a.va(Zc);3==kc||4==kc||34816==(kc&65280)||35072==(kc&65280)?(a.R=rh,Di(Zc,2)):2048==(kc&65024)&&(Qi(a,Zc),a.R=rh);a.R?(a.vb(a.f,Zc,!0),a.qb()||(a.A&&a.A.ob(),a.R=0)):Yi(a,qh?"tr":"t")}}break;case "r":if("reset"==b){a.A&&a.A.reset();break}Ji(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var lc=
|
||||||
+g[2];if(8==lc||10==lc||16==lc)a.na=lc;else{a.i("invalid base: "+lc);break}}a.i("default base: "+a.na);break;case "cs":var mc;void 0!==g[3]&&(mc=+g[3]);switch(g[2]){case "int":a.b.Ib=mc;break;case "start":a.b.Wb=mc;break;case "stop":a.b.Jb=mc;break;default:a.i("unknown cs option");break a}void 0!==mc&&Cd(a.b);a.i("checksums "+(a.b.C.Fb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Gd(a.b,+g[2])||a.i("warning: using 1x multiplier, previous target not reached"));a.i("target speed: "+(a.b.Ab.toFixed(2)+
|
+g[2];if(8==lc||10==lc||16==lc)a.na=lc;else{a.i("invalid base: "+lc);break}}a.i("default base: "+a.na);break;case "cs":var mc;void 0!==g[3]&&(mc=+g[3]);switch(g[2]){case "int":a.b.Ib=mc;break;case "start":a.b.Wb=mc;break;case "stop":a.b.Jb=mc;break;default:a.i("unknown cs option");break a}void 0!==mc&&Ad(a.b);a.i("checksums "+(a.b.C.Eb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ed(a.b,+g[2])||a.i("warning: using 1x multiplier, previous target not reached"));a.i("target speed: "+(a.b.zb.toFixed(2)+
|
||||||
"Mhz")+" ("+a.b.mb+"x)");break;default:if(g[1]){a.i("unknown option: "+g[1]);break}case "?":a.i("debugger options:"),a.i("\tbase #\t\tset default base to #"),a.i("\tcs int #\tset checksum cycle interval to #"),a.i("\tcs start #\tset checksum cycle start count to #"),a.i("\tcs stop #\tset checksum cycle stop count to #"),a.i("\tsp #\t\tset speed multiplier to #")}break;case "t":$i(a,g[0],g[1]);break;case "u":Mi(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Xi(a,b.substr(3))||(d=!1);break}if("ver"==
|
"Mhz")+" ("+a.b.lb+"x)");break;default:if(g[1]){a.i("unknown option: "+g[1]);break}case "?":a.i("debugger options:"),a.i("\tbase #\t\tset default base to #"),a.i("\tcs int #\tset checksum cycle interval to #"),a.i("\tcs start #\tset checksum cycle start count to #"),a.i("\tcs stop #\tset checksum cycle stop count to #"),a.i("\tsp #\t\tset speed multiplier to #")}break;case "t":Yi(a,g[0],g[1]);break;case "u":Ki(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Vi(a,b.substr(3))||(d=!1);break}if("ver"==
|
||||||
g[0]){a.i("PDPjs version 1.30.5 ("+a.b.lb+",RELEASE"+(Bb?",TYPEDARRAYS":",LONGARRAYS")+")");a.i(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Zi(a,b.substr(1));break}var se="commands:",te;for(te in yi)se+="\n"+ta(te,9)+yi[te];Ke(a)||(se+="\nnote: history disabled if no exec breakpoints");a.i(se);break;default:f=!0}f&&(a.i("unknown command: "+b),d=!1)}}catch(uh){a.i("debugger error: "+(uh.stack||uh.message)),d=!1}return d}
|
g[0]){a.i("PDPjs version 1.30.5 ("+a.b.kb+",RELEASE"+(Bb?",TYPEDARRAYS":",LONGARRAYS")+")");a.i(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Xi(a,b.substr(1));break}var qe="commands:",re;for(re in wi)qe+="\n"+ta(re,9)+wi[re];Ie(a)||(qe+="\nnote: history disabled if no exec breakpoints");a.i(qe);break;default:f=!0}f&&(a.i("unknown command: "+b),d=!1)}}catch(sh){a.i("debugger error: "+(sh.stack||sh.message)),d=!1}return d}
|
||||||
function Ed(a,b,c){b=ni(a,b,c);for(var d in b)if(!Ri(a,b[+d]))return!1;return!0}ab(function(){for(var a=F(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new ui(d);E(d,c)}});
|
function Cd(a,b,c){b=li(a,b,c);for(var d in b)if(!Pi(a,b[+d]))return!1;return!0}ab(function(){for(var a=F(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new si(d);E(d,c)}});
|
||||||
function bj(a,b,c){x.call(this,"Computer",a,bj,33554432);this.C.ma=!1;cj(this,b);this.L=Ad(this,"autoPower",a);this.g=0;this.aa=a.busWidth||a.buswidth;this.f=dj;this.I=null;this.F=this.T=!1;this.fa=Ad(this,"url")||"";(Math.random()+.1).toString(36);this.B=ej(this);if(this.b=ob("CPU",this.id)){this.j=ob("Debugger",this.id);this.v=new pc({id:this.ib+".bus",busWidth:this.aa},this.b,this.j);var d,e=mb(this.id);if((this.w=ob("Panel",this.id))&&this.w.bb)for(b=0;b<e.length;b++)d=e[b],d.O=this.w.O,d.i=this.w.i,
|
function $i(a,b,c){x.call(this,"Computer",a,$i,33554432);this.C.ma=!1;aj(this,b);this.L=yd(this,"autoPower",a);this.g=0;this.aa=a.busWidth||a.buswidth;this.f=bj;this.I=null;this.F=this.T=!1;this.ea=yd(this,"url")||"";(Math.random()+.1).toString(36);this.A=cj(this);if(this.b=ob("CPU",this.id)){this.j=ob("Debugger",this.id);this.v=new pc({id:this.hb+".bus",busWidth:this.aa},this.b,this.j);var d,e=mb(this.id);if((this.w=ob("Panel",this.id))&&this.w.ab)for(b=0;b<e.length;b++)d=e[b],d.O=this.w.O,d.i=this.w.i,
|
||||||
d.bb=this.w.bb;this.i("PDPjs v1.30.5\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ha&&d.Ha(this,this.v,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.G=d:this.f=parseInt(d,10));var f;if(a=Ad(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.F=!0,this.f=dj),this.f&&(this.K=
|
d.ab=this.w.ab;this.i("PDPjs v1.30.5\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ha&&d.Ha(this,this.v,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.G=d:this.f=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.F=!0,this.f=bj),this.f&&(this.K=
|
||||||
new S(this,"1.30.5"),fj(this.K)?b=null:delete this.K);!b&&this.f&&(b=gj(this))&&(this.F=!0);if(b){var g=this;Da(b,null,!0,function(a,b,c){c?(g.G=null,g.F=!1,g.O("Unable to load machine state from server (error "+c+(b?": "+ua(b):"")+")")):(g.I=b,g.T=!0);J(g)})}else J(this);this.D.power||(this.L=!0);!c&&this.L&&hj(this,this.Xb)}else w("Unable to find CPU component")}B(bj);var dj=0;
|
new S(this,"1.30.5"),dj(this.K)?b=null:delete this.K);!b&&this.f&&(b=ej(this))&&(this.F=!0);if(b){var g=this;Da(b,null,!0,function(a,b,c){c?(g.G=null,g.F=!1,g.O("Unable to load machine state from server (error "+c+(b?": "+ya(b):"")+")")):(g.I=b,g.T=!0);J(g)})}else J(this);this.D.power||(this.L=!0);!c&&this.L&&fj(this,this.Xb)}else w("Unable to find CPU component")}B($i);var bj=0;
|
||||||
function cj(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.U=b}function Ad(a,b,c){var d=b.toLowerCase(),d=fb[b]||fb[d];void 0===d&&a.U&&(d=a.U[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function hj(a,b,c){for(var d=mb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!yb(f)){yb(f,function(){hj(a,b,c)});return}}b.call(a,c)}
|
function aj(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.U=b}function yd(a,b,c){var d=b.toLowerCase(),d=fb[b]||fb[d];void 0===d&&a.U&&(d=a.U[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function fj(a,b,c){for(var d=mb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!yb(f)){yb(f,function(){fj(a,b,c)});return}}b.call(a,c)}
|
||||||
function ij(a,b){var c=new S(a,"1.30.5","validate");if(fj(c)&&jj(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.O("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=bj.prototype;
|
function gj(a,b){var c=new S(a,"1.30.5","validate");if(dj(c)&&hj(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.O("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=$i.prototype;
|
||||||
k.Xb=function(a){void 0===a&&(a=this.f||(this.I?1:dj));if(!this.g){this.g++;var b=!1,c=!1;this.R=!1;var d=this.K||new S(this,"1.30.5");if(-1==a)b=!0;else if(a>dj){if(fj(d,this.I)){this.A=new S(this,"1.30.5","failsafe");fj(this.A)&&(kj(this,d),a=2,lj(this.A));this.A.set("timestamp",Ca());mj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=jj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fj(d,g):("error"==
|
k.Xb=function(a){void 0===a&&(a=this.f||(this.I?1:bj));if(!this.g){this.g++;var b=!1,c=!1;this.R=!1;var d=this.K||new S(this,"1.30.5");if(-1==a)b=!0;else if(a>bj){if(dj(d,this.I)){this.B=new S(this,"1.30.5","failsafe");dj(this.B)&&(ij(this,d),a=2,jj(this.B));this.B.set("timestamp",Ca());kj(this.B);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=hj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?dj(d,g):("error"==
|
||||||
f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.B=null)):this.i(f+": "+g),lj(d),fj(d)?(c=jj(d),e=!0):c=!1))}e&&ij(this,c?d:null)}else 2==a&&d.clear()}else ij(this);delete this.I;delete this.K}e=mb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=nj(this,g,d,b,c));b=[d,a,c];-1!=a?hj(this,this.Gc,b):this.Gc(b)}};
|
f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(La("user",""),this.A=null)):this.i(f+": "+g),jj(d),dj(d)?(c=hj(d),e=!0):c=!1))}e&&gj(this,c?d:null)}else 2==a&&d.clear()}else gj(this);delete this.I;delete this.K}e=mb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=lj(this,g,d,b,c));b=[d,a,c];-1!=a?fj(this,this.Gc,b):this.Gc(b)}};
|
||||||
function nj(a,b,c,d,e){if(!b.C.ma){b.C.ma=!0;if(b.Ka){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ka(f,d)&&f&&(w("Unable to restore state for "+b.type),a.N&&!a.T?(c.clear(),a.f=dj,window&&window.location.reload()):a.R=!0,b.Ka(null),e=!1)}if(!d&&b.yc)for(a=b.yc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function lj(a,b,c,d,e){if(!b.C.ma){b.C.ma=!0;if(b.Ka){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ka(f,d)&&f&&(w("Unable to restore state for "+b.type),a.N&&!a.T?(c.clear(),a.f=bj,window&&window.location.reload()):a.R=!0,b.Ka(null),e=!1)}if(!d&&b.yc)for(a=b.yc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
k.Gc=function(a){var b=a[0],c=0>a[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(nj(this,this.b,b,c,a),this.ya(),this.b.Eb());this.R&&(kj(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
|
k.Gc=function(a){var b=a[0],c=0>a[1];a=a[2];this.fa=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(lj(this,this.b,b,c,a),this.ya(),this.b.Db());this.R&&(ij(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.g=0};
|
||||||
function kj(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function ij(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.ea;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||||
function aj(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l<h.length;l++){var m=h[l];m.C.ma&&(m.Ja&&(d=m.Ja(b,c),"object"===typeof d&&f.set(m.id,
|
function Zi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.da(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l<h.length;l++){var m=h[l];m.C.ma&&(m.Ja&&(d=m.Ja(b,c),"object"===typeof d&&f.set(m.id,
|
||||||
d)),c&&(m.C.ma=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&oj(a,a.B,f.toString()),mj(g)&&mj(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.C.ma=!1,b=a.D.power)&&(b.textContent="Power");a.g=0;return e}
|
d)),c&&(m.C.ma=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.A&&mj(a,a.A,f.toString()),kj(g)&&kj(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.C.ma=!1,b=a.D.power)&&(b.textContent="Power");a.g=0;return e}
|
||||||
k.reset=function(){this.v&&this.v.reset&&(G(this,"Resetting "+this.v.type),this.v.reset());this.b&&this.b.reset&&(G(this,"Resetting "+this.b.type),this.b.reset());for(var a=mb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.b&&c.reset&&(G(this,"Resetting "+c.type),c.reset())}this.ya(-1)};k.start=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.ya(-1)};
|
k.reset=function(){this.v&&this.v.reset&&(G(this,"Resetting "+this.v.type),this.v.reset());this.b&&this.b.reset&&(G(this,"Resetting "+this.b.type),this.b.reset());for(var a=mb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.b&&c.reset&&(G(this,"Resetting "+c.type),c.reset())}this.ya(-1)};k.start=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.ya(-1)};
|
||||||
k.stop=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.ya(-1)};
|
k.stop=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.ya(-1)};
|
||||||
k.ya=function(a){if(this.b){var b=this.b,c=a||0,d=b.D.speed;d&&(0>=c||30<=(b.Qb+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Qb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.J&8);if(0>=a||60<=(b.A+=a)){for(var e=0;e<b.b.u.length;e++)Rb(b,"R"+e,b.b.u[e]);e=fd(b.b);Rb(b,"PS",e);Rb(b,"NF",e&8?1:0,1);Rb(b,"ZF",e&4?1:0,1);Rb(b,"VF",e&2?1:0,1);Rb(b,"CF",e&1?1:0,1);b.A=0}Yb(b,0<a&&c&&!d?b.b.Ub:b.Ba);Xb(b,b.Bb);a=b.b;a=a.R?a.Ya&16?1:2:4;$b(b,"B22",a&1);$b(b,"B18",a&2);$b(b,"B16",
|
k.ya=function(a){if(this.b){var b=this.b,c=a||0,d=b.D.speed;d&&(0>=c||30<=(b.Qb+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Qb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.J&8);if(0>=a||60<=(b.B+=a)){for(var e=0;e<b.b.u.length;e++)Rb(b,"R"+e,b.b.u[e]);e=dd(b.b);Rb(b,"PS",e);Rb(b,"NF",e&8?1:0,1);Rb(b,"ZF",e&4?1:0,1);Rb(b,"VF",e&2?1:0,1);Rb(b,"CF",e&1?1:0,1);b.B=0}Yb(b,0<a&&c&&!d?b.b.Ub:b.Ba);Xb(b,b.Ab);a=b.b;a=a.R?a.Xa&16?1:2:4;$b(b,"B22",a&1);$b(b,"B18",a&2);$b(b,"B16",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
k.xa=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?aj(d,!1,!0):hj(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.G){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");aj(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.pc=!0),d.Xb(dj),d.pc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
|
k.xa=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?Zi(d,!1,!0):fj(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.G){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Zi(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.pc=!0),d.Xb(bj),d.pc=!1)}else d.reset(),d.b&&d.b.Db()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
|
||||||
c,c.onclick=function(){var a=ej(d,!0);if(a){var b=!!(d.f&&!d.G||d.N),c=aj(d,b);b?oj(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=cj(d,!0);if(a){var b=!!(d.f&&!d.G||d.N),c=Zi(d,b);b?mj(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function ej(a,b){var c=a.B;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=pj(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c}
|
function cj(a,b){var c=a.A;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=nj(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c}
|
||||||
function pj(a,b){a.B=null;b=Da(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.B=b.data)}catch(d){w(d.message+" ("+c+")")}return a.B}function gj(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+qj(a,"1.30.5"));return b}
|
function nj(a,b){a.A=null;b=Da(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La("user",b.data),a.A=b.data)}catch(d){w(d.message+" ("+c+")")}return a.A}function ej(a){var b=null;a.A&&(b=Fa()+"/api/v1/user?req=load&user="+a.A+"&state="+oj(a,"1.30.5"));return b}
|
||||||
function oj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=qj(a,"1.30.5");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.O("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.O(c),Ka("user",""),a.B=null)}}
|
function mj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=oj(a,"1.30.5");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.O("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.O(c),La("user",""),a.A=null)}}
|
||||||
function xh(a){var b;a=mb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.pb=function(a){if(this.bb){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.bb.focus();!a&&window&&window.scrollTo(b,c)}};ab(function(){for(var a=F(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=D(c),c=F(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=D(f),g=new bj(g,d,!0);E(g,f);g.L&&hj(g,g.Xb)}});
|
function vh(a){var b;a=mb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.ob=function(a){if(this.ab){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.ab.focus();!a&&window&&window.scrollTo(b,c)}};ab(function(){for(var a=F(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=D(c),c=F(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=D(f),g=new $i(g,d,!0);E(g,f);g.L&&fj(g,g.Xb)}});
|
||||||
Qa.show.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.ga&&!c.C.ma&&c.Xb(-1)}});Qa.exit.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.C.ma&&aj(c,!(!c.f||c.G),!0)}});function S(a,b,c){this.id=a.id;this.key=qj(a,b,c);this.j=a.j;lj(this,a.Tc)}function qj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
Qa.show.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.fa&&!c.C.ma&&c.Xb(-1)}});Qa.exit.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.C.ma&&Zi(c,!(!c.f||c.G),!0)}});function S(a,b,c){this.id=a.id;this.key=oj(a,b,c);this.j=a.j;jj(this,a.Tc)}function oj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
S.prototype={constructor:S,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){lj(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
S.prototype={constructor:S,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){jj(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
||||||
1);c=0}}};function lj(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function mj(a){var b=!0;if(Ia()){var c=JSON.stringify(a[a.id]);Ka(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function jj(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function fj(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ia()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var rj=0;
|
1);c=0}}};function jj(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function kj(a){var b=!0;if(Ia()){var c=JSON.stringify(a[a.id]);La(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function hj(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function dj(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ia()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var pj=0;
|
||||||
function Cj(a,b,c,d,e,f){e("Loading "+a+"...");Da(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Dj(h,a,b,c,d,e,f)})}
|
function Aj(a,b,c,d,e,f){e("Loading "+a+"...");Da(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Bj(h,a,b,c,d,e,f)})}
|
||||||
function Dj(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(lb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
function Bj(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(lb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
||||||
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Ej(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Cj(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
||||||
function Ej(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
function Cj(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||||
"");a=a.replace(d[0],g);Ej(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],g);Cj(a,b,c)}})}else c(a,null)}
|
||||||
function Fj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);l&&(--rj||cb(!0));l=!1}var g,h,l=!0;rj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
|
function Dj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--pj||cb(!0));l=!1}var g,h,l=!0;pj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
|
||||||
(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?Cj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--rj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--rj||cb(!0)):f("invalid machine element: "+
|
(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?Aj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--pj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--pj||cb(!0)):f("invalid machine element: "+
|
||||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Cj(b,a,d,!0,e,m):Dj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Fj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11-dbg.map
|
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Aj(b,a,d,!0,e,m):Bj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Dj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11-dbg.map
|
||||||
|
|
|
||||||
|
|
@ -34,237 +34,237 @@
|
||||||
*/
|
*/
|
||||||
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var ea=ca[da];ea in ba||(ba[ea]={});ba=ba[ea]}var fa=ca[ca.length-1],ga=ba[fa],ha=ga?ga:function(a){return Math.log(a)/Math.LN2};
|
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var ea=ca[da];ea in ba||(ba[ea]={});ba=ba[ea]}var fa=ca[ca.length-1],ga=ba[fa],ha=ga?ga:function(a){return Math.log(a)/Math.LN2};
|
||||||
ha!=ga&&null!=ha&&aa(ba,fa,{configurable:!0,writable:!0,value:ha});
|
ha!=ga&&null!=ha&&aa(ba,fa,{configurable:!0,writable:!0,value:ha});
|
||||||
var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},m={Re:0,kc:1,Te:2,Ue:3,Ve:4,We:5,Xe:6,Ye:7,Tb:8,Ze:9,lc:10,$e:11,af:12,mc:13,bf:14,cf:15,df:16,ef:17,ff:18,gf:19,hf:20,jf:21,kf:22,lf:23,mf:24,nf:25,pf:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},m={Ue:0,nc:1,We:2,Xe:3,Ye:4,Ze:5,$e:6,af:7,Ub:8,bf:9,oc:10,cf:11,df:12,pc:13,ef:14,ff:15,gf:16,hf:17,jf:18,kf:19,lf:20,mf:21,nf:22,pf:23,qf:24,rf:25,sf:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
||||||
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Sb:65,Qe:66,Se:67,qf:68,E:69,rf:70,sf:71,tf:72,uf:73,vf:74,wf:75,xf:76,yf:77,zf:78,Af:79,Bf:80,Q:81,Cf:82,Df:83,Ef:84,Ff:85,Gf:86,Hf:87,If:88,Jf:89,wc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Kf:97,Lf:98,Mf:99,d:100,e:101,Nf:102,Of:103,Pf:104,Qf:105,Tf:106,k:107,Uf:108,Vf:109,n:110,Wf:111,p:112,q:113,r:114,Xf:115,t:116,Yf:117,Zf:118,$f:119,x:120,y:121,z:122,"{":123,
|
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Tb:65,Te:66,Ve:67,tf:68,E:69,uf:70,vf:71,wf:72,xf:73,yf:74,zf:75,Af:76,Bf:77,Cf:78,Df:79,Ef:80,Q:81,Ff:82,Gf:83,Hf:84,If:85,Jf:86,Kf:87,Lf:88,Mf:89,zc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Nf:97,Of:98,Pf:99,d:100,e:101,Qf:102,Rf:103,Sf:104,Tf:105,Wf:106,k:107,Xf:108,Yf:109,n:110,Zf:111,p:112,q:113,r:114,$f:115,t:116,ag:117,bg:118,cg:119,x:120,y:121,z:122,"{":123,
|
||||||
"|":124,"}":125,"~":126,nc:127};
|
"|":124,"}":125,"~":126,qc:127};
|
||||||
function q(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
|
function q(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
|
||||||
e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ja(a,b){var c="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;)c=String.fromCharCode((a&7)+48)+c,a>>=3;return""+c}function ka(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ja(a,b){var c="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;)c=String.fromCharCode((a&7)+48)+c,a>>=3;return""+c}function r(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
||||||
function r(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function la(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ma(a,b){return-1!==a.indexOf(b,a.length-b.length)}var na={"&":"&","<":"<",">":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})}
|
function t(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function ka(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function la(a,b){return-1!==a.indexOf(b,a.length-b.length)}var ma={"&":"&","<":"<",">":">",'"':""","'":"'"};function na(a){return a.replace(/[&<>"']/g,function(a){return ma[a]})}
|
||||||
function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date};
|
function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},qa=Date.now||function(){return+new Date};
|
||||||
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
function ra(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||||
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
function w(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
||||||
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
||||||
function ta(a,b){var c,d={N:null,ca:null,na:null,ma:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.N=e;else if(e=g.words)for(d.N=Array(2*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255,d.N[f++]=e[c]>>8&255;else if(e=g.data)for(d.N=Array(4*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&
|
function sa(a,b){var c,d={N:null,ca:null,na:null,ma:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.N=e;else if(e=g.words)for(d.N=Array(2*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&255,d.N[f++]=e[c]>>8&255;else if(e=g.data)for(d.N=Array(4*e.length),f=c=0;c<e.length;c++)d.N[f++]=e[c]&
|
||||||
255,d.N[f++]=e[c]>>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=g;d.ca=g.symbols;d.N.length?1==d.N.length&&(w(d.N[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){w("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.N=e)}return d}
|
255,d.N[f++]=e[c]>>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=g;d.ca=g.symbols;d.N.length?1==d.N.length&&(x(d.N[0]),d=null):(x("Empty resource: "+a),d=null)}catch(k){x("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){x("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.N=e)}return d}
|
||||||
function ua(){return"http://"+(window?window.location.host:"www.pcjs.org")}function w(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}
|
function ta(){return"http://"+(window?window.location.host:"www.pcjs.org")}function x(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 ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ca(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 xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function ya(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function za(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 Da(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}var Ea={init:[],show:[],exit:[]},Fa=!1,Ga=!1,Ha=!0;
|
function Ca(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}var Da={init:[],show:[],exit:[]},Ea=!1,Fa=!1,Ga=!0;
|
||||||
function Ia(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ja(a){Ea.init.push(a)}function Ka(a){if(Ha)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function La(a){!Ha&&a?(Ha=!0,Fa&&Ma("init"),Ga&&Ma("show")):Ha=a}function Ma(a){Ea[a]&&Ka(Ea[a])}Ia("onload",function(){Fa=!0;Ka(Ea.init)});Ia("onpageshow",function(){Ga=!0;Ka(Ea.show)});
|
function Ha(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ia(a){Da.init.push(a)}function Ja(a){if(Ga)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){x(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ka(a){!Ga&&a?(Ga=!0,Ea&&La("init"),Fa&&La("show")):Ga=a}function La(a){Da[a]&&Ja(Da[a])}Ha("onload",function(){Ea=!0;Ja(Da.init)});Ha("onpageshow",function(){Fa=!0;Ja(Da.show)});
|
||||||
Ia(Ca("Opera")||Ca("iOS")?"onunload":"onbeforeunload",function(){Ka(Ea.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Xb=b.comment;this.Kc=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Ia:!1,Jb:!1,S:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Ic=d||0;y.push(this)}var Na=void 0,Oa={};
|
Ha(za("Opera")||za("iOS")?"onunload":"onbeforeunload",function(){Ja(Da.exit)});function y(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Yb=b.comment;this.Nc=b;b=this.id.indexOf(".");0>b?this.Ba=this.id:(this.ta=this.id.substr(0,b),this.Ba=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Fa:!1,Jb:!1,S:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Lc=d||0;z.push(this)}var Ma=void 0,Na={};
|
||||||
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
if(window){Ma||(Ma=window.location.search.substr(1));for(var Oa,Pa=/\+/g,Qa=/([^&=]+)=?([^&]*)/g;Oa=Qa.exec(Ma);)Na[decodeURIComponent(Oa[1].replace(Pa," "))]=decodeURIComponent(Oa[2].replace(Pa," "))}function Ra(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
||||||
function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ta=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ta={},y=[];function Ua(a,b,c){Ta[a]&&b&&(Ta[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<y.length;b++){var d=y[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
function A(a,b){b||(b=y);a.prototype=Ra(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Sa=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else Sa={},z=[];function Ta(a,b,c){Sa[a]&&b&&(Sa[a][b]=c)}function B(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<z.length;b++){var d=z[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||||
function Va(a){if(void 0!==a){var b;for(b=0;b<y.length;b++)if(y[b].id===a)return y[b]}return null}function Wa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<y.length;d++)if(c)c==y[d]&&(c=null);else if(!(a!=y[d].type||b&&y[d].id.indexOf(b)))return y[d]}return null}function B(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
function Ua(a){if(void 0!==a){var b;for(b=0;b<z.length;b++)if(z[b].id===a)return z[b]}return null}function Va(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<z.length;d++)if(c)c==z[d]&&(c=null);else if(!(a!=z[d].type||b&&z[d].id.indexOf(b)))return z[d]}return null}function C(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){x(c.message+" ("+a+")")}return b}
|
||||||
function C(a,b){b=D(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var k=g.split(" "),l=0;l<k.length;l++)switch(g=k[l],g){case "pdp11-binding":(g=B(f))&&g.binding&&a.ba(g.type,g.binding,f,g.value),l=k.length}}}}
|
function D(a,b){b=E(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var k=g.split(" "),l=0;l<k.length;l++)switch(g=k[l],g){case "pdp11-binding":(g=C(f))&&g.binding&&a.ba(g.type,g.binding,f,g.value),l=k.length}}}}
|
||||||
function D(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function E(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},ba:function(a,b,c){switch(b){case "clear":return this.j[b]||(this.j[b]=c,c.onclick=function(a){return function(){a.j.print&&(a.j.print.value="")}}(this)),!0;case "print":return this.j[b]||(this.hb=this.j[b]=c,c.value="",this.X=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
y.prototype={constructor:y,parent:null,toString:function(){return this.name?this.name:this.id||this.type},ba:function(a,b,c){switch(b){case "clear":return this.j[b]||(this.j[b]=c,c.onclick=function(a){return function(){a.j.print&&(a.j.print.value="")}}(this)),!0;case "print":return this.j[b]||(this.hb=this.j[b]=c,c.value="",this.X=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
this.D=function(a){this.X(a,this.Ca)}),!0;default:return!1}},log:function(){},X:function(){},status:function(a){this.X(this.Ca+": "+a)},D:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},ia:function(){return this.o.S=!0},ha:function(a,b){b&&(this.o.S=!1);return!0}};function Xa(a,b){a.o.Jb?(a.o.Ia=!1,a.o.Jb=!1):a.o.error?a.X(a.toString()+" error"):a.o.Ia=b}function E(a,b){a.o.error||(a.o.ready=!1!==b,a.o.ready&&(b=a.wb,a.wb=null,b&&b()))}
|
this.C=function(a){this.X(a,this.Ba)}),!0;default:return!1}},log:function(){},X:function(){},status:function(a){this.X(this.Ba+": "+a)},C:function(a,b,c){c=c||this.type;b||x((c?c+": ":"")+a)},ia:function(){return this.o.S=!0},ha:function(a,b){b&&(this.o.S=!1);return!0}};function Wa(a,b){a.o.Jb?(a.o.Fa=!1,a.o.Jb=!1):a.o.error?a.X(a.toString()+" error"):a.o.Fa=b}function F(a,b){a.o.error||(a.o.ready=!1!==b,a.o.ready&&(b=a.wb,a.wb=null,b&&b()))}
|
||||||
function Ya(a,b){b&&(a.o.ready?b():a.wb=b);return a.o.ready}function Za(a,b){a.o.error=!0;a.D(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
function Xa(a,b){b&&(a.o.ready?b():a.wb=b);return a.o.ready}function Ya(a,b){a.o.error=!0;a.C(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var $a="undefined"!==typeof ArrayBuffer;
|
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Za="undefined"!==typeof ArrayBuffer;
|
||||||
function ab(a){x.call(this,"Panel",a,ab,512);this.ja=this.i=this.c=this.m=this.s=this.v=0;this.w=this.C=this.B=!1;this.H=bb;this.h={};this.b={START:[1,1,!0,!1,this.Rc],STEP:[1,1,!1,!1,this.Sc],ENABLE:[1,1,!1,!1,this.Nc],CONT:[1,1,!0,!1,this.Lc],DEP:[0,0,!0,!1,this.Mc],EXAM:[1,1,!0,!1,this.Oc],LOAD:[1,1,!0,!1,this.Qc],TEST:[0,0,!0,!1,this.Pc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Tc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
|
function $a(a){y.call(this,"Panel",a,$a,512);this.ja=this.i=this.c=this.l=this.s=this.v=0;this.w=this.D=this.B=!1;this.H=ab;this.h={};this.b={START:[1,1,!0,!1,this.Uc],STEP:[1,1,!1,!1,this.Vc],ENABLE:[1,1,!1,!1,this.Qc],CONT:[1,1,!0,!1,this.Oc],DEP:[0,0,!0,!1,this.Pc],EXAM:[1,1,!0,!1,this.Rc],LOAD:[1,1,!0,!1,this.Tc],TEST:[0,0,!0,!1,this.Sc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Wc,a]}A($a);var ab=7;function bb(a,b){return a.b[b]&&a.b[b][1]}h=$a.prototype;h.reset=function(){this.stop()};
|
||||||
h.ba=function(a,b,c,d){if(this.l&&this.l.ba(a,b,c,d)||this.a&&this.a.ba(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
|
h.ba=function(a,b,c,d){if(this.m&&this.m.ba(a,b,c,d)||this.a&&this.a.ba(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){cb(a,
|
||||||
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.ba.call(this,a,b,c,d)}};h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ia=function(a,b){b||(kb(),this.reset());return!0};h.ha=function(){return!0};
|
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){db(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){cb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){db(a,b)}}(this,b),!0):this.parent.ba.call(this,a,b,c,d)}};h.ga=function(a,b,c,d){this.m=a;this.g=b;this.a=c;this.G=d;eb(b,this,fb);gb(b,this.reset.bind(this));hb(this);ib(this)};h.ia=function(a,b){b||(jb(),this.reset());return!0};h.ha=function(){return!0};
|
||||||
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.G&&a.G.g||8)?ja(c,d):ka(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
function kb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function hb(a,b){for(var c in a.h)kb(a,c,null!=b?b:a.h[c])}function lb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a){for(var b in a.b)lb(a,b,a.b[b][1])}function mb(a,b,c,d){a.j[b]&&(void 0===c&&(Ya(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.G&&a.G.g||8)?ja(c,d):r(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
||||||
function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rc=function(a){a||this.a.o.U||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Sc=function(){};h.Nc=function(a){a||F(this.a)};
|
function cb(a,b){var c=a.b[b];lb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.D="EXAM"==b)}function db(a,b){var c=a.b[b];c[2]&&c[3]&&(lb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Uc=function(a){a||this.a.o.U||(a=this.a,a.g.reset(),nb(a),bb(this,"ENABLE")&&ob(this.a))};h.Vc=function(){};h.Qc=function(a){a||G(this.a)};
|
||||||
h.Lc=function(a){if(!a&&!this.a.o.U)if(cb(this,"ENABLE"))pb(this.a);else{a=this.G;var b;if(b=a)a.o.Ia&&(a.o.Jb=!0),b=!a.o.Ia;if(b)Xa(a,!0),a.zb(0,null),Xa(a,!1);else try{var c=this.a.zb(1);0<c&&(qb(this.a,c),rb(this.a,c,!0),sb(this.a,c))}catch(d){"number"!=typeof d&&Za(this.a,d.stack||d.message)}this.stop();this.l&&this.l.Ba()}};h.Mc=function(a){a&&!this.a.o.U&&(this.w&&tb(this),a=ub(this,this.c),this.H==bb?this.g.Xa(this.ja,a):this.a.Xa(this.ja,a))};
|
h.Oc=function(a){if(!a&&!this.a.o.U)if(bb(this,"ENABLE"))ob(this.a);else{a=this.G;var b;if(b=a)a.o.Fa&&(a.o.Jb=!0),b=!a.o.Fa;if(b)Wa(a,!0),a.zb(0,null),Wa(a,!1);else try{var c=this.a.zb(1);0<c&&(pb(this.a,c),qb(this.a,c,!0),rb(this.a,c))}catch(d){"number"!=typeof d&&Ya(this.a,d.stack||d.message)}this.stop();this.m&&this.m.Aa()}};h.Pc=function(a){a&&!this.a.o.U&&(this.w&&sb(this),a=tb(this,this.c),this.H==ab?this.g.Xa(this.ja,a):this.a.Xa(this.ja,a))};
|
||||||
h.Oc=function(a){a||this.a.o.U||(this.C&&tb(this),a=this.H==bb?this.g.Qa(this.ja):this.a.Qa(this.ja),ub(this,a))};h.Qc=function(a){a||this.a.o.U||vb(this,this.c)};h.Pc=function(a){if(a)this.B=!0,ib(this,!0);else if(this.B=!1,ib(this),void 0!==this.j.S0){for(a=this.c=0;22>a;a++)this.b["S"+a][1]=0&1<<a?1:0;jb(this)}};h.Tc=function(a,b){this.c=a?this.c|1<<b:this.c&~(1<<b)};
|
h.Rc=function(a){a||this.a.o.U||(this.D&&sb(this),a=this.H==ab?this.g.Qa(this.ja):this.a.Qa(this.ja),tb(this,a))};h.Tc=function(a){a||this.a.o.U||ub(this,this.c)};h.Sc=function(a){if(a)this.B=!0,hb(this,!0);else if(this.B=!1,hb(this),void 0!==this.j.S0){for(a=this.c=0;22>a;a++)this.b["S"+a][1]=0&1<<a?1:0;ib(this)}};h.Wc=function(a,b){this.c=a?this.c|1<<b:this.c&~(1<<b)};
|
||||||
function tb(a){var b=1145>a.a.Ta?8:16,c=65472<=a.ja&&a.ja<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ja&~c|a.ja+b&c)}function vb(a,b){a.ja=b&a.g.qa;b=a.ja;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<<c)}function ub(a,b){a.i=b&65535;b=a.i;for(var c=0;16>c;c++)wb(a,"D"+c,b&1<<c);return a.i}function wb(a,b,c){a.h[b]=c;a.B||lb(a,b,c)}h.stop=function(){vb(this,this.a.f[7])};h.setData=function(a,b){b?this.m=a:this.i=a};h.Uc=function(a,b){return(b?this.m:this.c)&65535};h.Vd=function(a){this.m=a};
|
function sb(a){var b=1145>a.a.Ta?8:16,c=65472<=a.ja&&a.ja<65472+b,b=c?1:2,c=c?15:a.g.Da;bb(a,"STEP")||(b=-b);ub(a,a.ja&~c|a.ja+b&c)}function ub(a,b){a.ja=b&a.g.Da;b=a.ja;for(var c=0;22>c;c++)vb(a,"A"+c,b&1<<c)}function tb(a,b){a.i=b&65535;b=a.i;for(var c=0;16>c;c++)vb(a,"D"+c,b&1<<c);return a.i}function vb(a,b,c){a.h[b]=c;a.B||kb(a,b,c)}h.stop=function(){ub(this,this.a.f[7])};h.setData=function(a,b){b?this.l=a:this.i=a};h.Xc=function(a,b){return(b?this.l:this.c)&65535};h.Yd=function(a){this.l=a};
|
||||||
var xb={},gb=(xb[65400]=[null,null,ab.prototype.Uc,ab.prototype.Vd,"CNSW"],xb);function kb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=B(d),f=Va(e.id);f||(a=!0,f=new ab(e));C(f,d);a&&E(f)}}Ja(kb);
|
var wb={},fb=(wb[65400]=[null,null,$a.prototype.Xc,$a.prototype.Yd,"CNSW"],wb);function jb(){for(var a=!1,b=E(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=C(d),f=Ua(e.id);f||(a=!0,f=new $a(e));D(f,d);a&&F(f)}}Ia(jb);
|
||||||
function yb(a,b,c){x.call(this,"Bus",a,yb,16);this.a=b;this.G=c;this.R=a.busWidth||16;this.v=0;this.m=[];this.i=null;this.B=1<<this.R;this.qa=this.B-1;this.b=G;this.c=Math.log2(this.b);this.M=this.b>>2;this.l=this.b-1;this.I=this.B/this.b|0;this.H=this.K=(this.B-G&this.qa)>>>this.c;this.Ga=[];this.h=0;this.s=!1;this.C=0;this.w=[];this.xc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.I);for(b=0;b<this.I;b++)this.g[b]=a;E(this)}z(yb);var G=8192,Eb=G-1;
|
function xb(a,b,c){y.call(this,"Bus",a,xb,16);this.a=b;this.G=c;this.R=a.busWidth||16;this.B=1<<this.R;this.Da=this.B-1;this.c=yb;this.b=Math.log2(this.c);this.M=this.c>>2;this.m=this.c-1;this.v=this.B/this.c|0;this.Ca=[];this.i=0;this.s=!1;this.D=0;this.w=[];this.Ac=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.v);this.h=Array(this.v);for(b=0;b<this.v;b++)this.g[b]=this.h[b]=a;a=this.B-yb;Eb(this,a,yb,Fb,this);this.K=this.J=(a&this.Da)>>>this.b;this.H=0;this.l=this.Da;F(this)}A(xb);
|
||||||
function zb(a,b){var c=-1,d=this.controller,e=d.Ga[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Ga[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
|
var yb=8192,Gb=yb-1;function zb(a,b){var c=-1,d=this.controller,e=d.Ca[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Ca[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
|
||||||
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Ga[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ga[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Ga[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Ca[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ca[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Ca[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
||||||
function Cb(a,b,c){var d=!1,e=this.controller;a=e.Ga[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.v){var c;a.v&&(c=(1<<a.v)-G,Gb(a,c,G,a.m),a.v=0);b&&(a.v=b,c=1<<b,a.qa=c-1,c-=G,a.H=(c&a.qa)>>>a.c,a.m=Hb(a,c,G),a.i?Gb(a,c,G,a.i):(Ib(a,c,G,Jb,a),a.i=Hb(a,c,G)))}}h=yb.prototype;h.reset=function(){for(var a=0;a<this.w.length;a++)this.w[a]();Fb(this,16)};h.ia=function(a,b){b||this.reset();return!0};
|
function Cb(a,b,c){var d=!1,e=this.controller;a=e.Ca[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Hb(a,b){if(b!=a.H){for(var c=0;c<a.v;c++)a.h[c]=a.g[c];a.H=0;a.l=a.Da;b&&(a.H=b,b=1<<b,a.l=b-1,b-=yb,a.K=(b&a.l)>>>a.b,a.h[a.K]=a.g[a.J])}}h=xb.prototype;h.reset=function(){for(var a=0;a<this.w.length;a++)this.w[a]();Hb(this,16)};h.ia=function(a,b){b||this.reset();return!0};
|
||||||
function Ib(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0<g&&k<a.g.length;){var l=a.g[k],n=k*a.b,p=a.b-(f-n);p>g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.C+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Kb(2,b,c)}
|
function Eb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.b;0<g&&k<a.g.length;){var l=a.g[k],n=k*a.c,p=a.c-(f-n);p>g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.c;g-=p;k++;continue}}return Ib(1,f,g)}f=new H(a,f,p,a.c,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.c;g-=p}return 0>=g?(d==Jb&&(a.D+=c),a.status((c>>10)+"Kb "+Kb[d]+" at "+ja(b)),!0):Ib(2,b,c)}
|
||||||
function Hb(a,b,c){var d=[];for(b>>>=a.c;0<c&&b<a.g.length;)d.push(a.g[b++]),c-=a.b;return d}function Gb(a,b,c,d){var e=0;for(b>>>=a.c;0<c&&b<a.g.length;){var f=d[e++];if(!f)break;a.g[b++]=f;c-=a.b}}function Nb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Nb(b&a.l,b)}function Pb(a,b){b=(b&a.qa)>>>a.c;var c=a.g[b];b==a.H&&a.m.length?c=a.m[0]:b==a.K&&(c=a.g[a.H]);return c}function Qb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}
|
function Lb(a,b){3932160<=b&&(b=Mb(a.a,b));return a.h[(b&a.l)>>>a.b].Nb(b&a.m,b)}function Nb(a,b){3932160<=b&&(b=Mb(a.a,b));return a.h[(b&a.l)>>>a.b].Y(b&a.m,b)}h.Qa=function(a){this.s=!1;this.i++;3932160<=a&&(a=Mb(this.a,a));a=this.g[(a&this.Da)>>>this.b].fc(a&this.m,a);this.i--;return a};function Ob(a,b,c){3932160<=b&&(b=Mb(a.a,b));a.h[(b&a.l)>>>a.b].Rb(b&a.m,c&255,b)}h.kb=function(a,b){this.s=!1;this.i++;3932160<=a&&(a=Mb(this.a,a));this.g[(a&this.Da)>>>this.b].Sb(a&this.m,b&255,a);this.i--};
|
||||||
h.Qa=function(a){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));a=Pb(this,a).C(a&this.l,a);this.h--;return a};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));Pb(this,a).s(a&this.l,b&255,a);this.h--};function Sb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Xa=function(a,b){this.s=!1;this.h++;3932160<=a&&(a=Ob(this.a,a));Pb(this,a).I(a&this.l,b&65535,a);this.h--};
|
function Pb(a,b,c){3932160<=b&&(b=Mb(a.a,b));a.h[(b&a.l)>>>a.b].Bb(b&a.m,c&65535,b)}h.Xa=function(a,b){this.s=!1;this.i++;3932160<=a&&(a=Mb(this.a,a));this.g[(a&this.Da)>>>this.b].lc(a&this.m,b&65535,a);this.i--};function Qb(a){for(var b=0,c=[],d=0;d<a.v;d++){var e=a.g[d];if(e.ya||e.Gc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var n=e[g],p=g+1;p<e.length&&e[p]===n;)p++;l[k++]=p-g;l[k++]=n;g=p}l.length<e.length&&(e=l)}c[f]=e}}return c}
|
||||||
function Tb(a){for(var b=0,c=[],d=0;d<a.I;d++){var e=a.g[d];if(e.za||e.Dc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var n=e[g],p=g+1;p<e.length&&e[p]===n;)p++;l[k++]=p-g;l[k++]=n;g=p}l.length<e.length&&(e=l)}c[f]=e}}return c}function Ub(a){var b=0;switch(Lb){case Lb:b=a.C}return b}function Vb(a,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Eb;if(void 0!==a.Ga[n])return w("I/O address already registered: "+ka(b,8,!0)),!1;a.Ga[n]=[d,e,f,g,l||"unknown",k||16,!1]}return!0}
|
function Rb(a){var b=0;switch(Jb){case Jb:b=a.D}return b}function Sb(a,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Gb;if(void 0!==a.Ca[n])return x("I/O address already registered: "+r(b,8,!0)),!1;a.Ca[n]=[d,e,f,g,l||"unknown",k||16,!1]}return!0}
|
||||||
function fb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ta)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v<u;v++,e+=2)if(p&&1<u&&(p=f[4]+v),!Vb(a,e,e,g,k,l,n,f[7]||b.Ic,p||b.Ca))return!1}}return!0}function hb(a,b){a.w.push(b)}
|
function eb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ta)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v<u;v++,e+=2)if(p&&1<u&&(p=f[4]+v),!Sb(a,e,e,g,k,l,n,f[7]||b.Lc,p||b.Ba))return!1}}return!0}function gb(a,b){a.w.push(b)}
|
||||||
function I(a,b,c){a.s=!0;a.h||(c&&(a.a.Z|=c),J(a.a,4,0,b))}function Wb(a){var b=a.s;a.s=!1;return b}function Kb(a,b,c){w("Memory block error ("+a+": "+ka(b)+","+ka(c)+")");return!1}function K(a){x.call(this,"Device",a,K,256);this.b={A:0,Qb:-1}}z(K);h=K.prototype;
|
function I(a,b,c){a.s=!0;a.i||(c&&(a.a.Z|=c),J(a.a,4,0,b))}function Tb(a){var b=a.s;a.s=!1;return b}function Ib(a,b,c){x("Memory block error ("+a+": "+r(b)+","+r(c)+")");return!1}function K(a){y.call(this,"Device",a,K,256);this.b={A:0,Qb:-1}}A(K);h=K.prototype;
|
||||||
h.ga=function(a,b,c,d){this.g=b;this.l=a;this.a=c;this.G=d;var e=this;this.b.Qb=Xb(c,function(){e.b.Sa|=128;e.b.Sa&64&&Yb(e.a,e.b.Ra);e.l&&e.l.Ba(1);Zb(e.a,e.b.Qb,1E3/60)});this.b.Ra=$b(64,6,524288);fb(b,this,ac);hb(b,this.reset.bind(this));E(this)};h.reset=function(){this.b.Sa=128;Zb(this.a,this.b.Qb,1E3/60,!0)};h.ad=function(){return this.b.Sa};h.be=function(a){this.b.Sa=a&192;this.b.Sa&64||bc(this.a,this.b.Ra)};h.cd=function(){var a=this.a,b=a.aa;b&57344||(b=b&-3199|a.mb<<5|a.nb<<1);return b};
|
h.ga=function(a,b,c,d){this.g=b;this.m=a;this.a=c;this.G=d;var e=this;this.b.Qb=Ub(c,function(){e.b.Sa|=128;e.b.Sa&64&&Vb(e.a,e.b.Ra);e.m&&e.m.Aa(1);Wb(e.a,e.b.Qb,1E3/60)});this.b.Ra=Xb(64,6,524288);eb(b,this,Yb);gb(b,this.reset.bind(this));F(this)};h.reset=function(){this.b.Sa=128;Wb(this.a,this.b.Qb,1E3/60,!0)};h.dd=function(){return this.b.Sa};h.ee=function(a){this.b.Sa=a&192;this.b.Sa&64||Zb(this.a,this.b.Ra)};h.fd=function(){var a=this.a,b=a.aa;b&57344||(b=b&-3199|a.mb<<5|a.nb<<1);return b};
|
||||||
h.de=function(a){cc(this.a,a&-129|this.a.aa&128)};h.dd=function(){var a=this.a;a.aa&57344||(a.Ib=a.w>>16&65535);a=a.Ib;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.aa&57344||(a.Kb=a.w&65535);return a.Kb};h.fd=function(){return this.a.Ha};h.ee=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ha!=a&&(b.Ha=a,b.$a=a&16?4194303:262143,dc(b))};h.Od=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
|
h.ge=function(a){$b(this.a,a&-129|this.a.aa&128)};h.gd=function(){var a=this.a;a.aa&57344||(a.Ib=a.w>>16&65535);a=a.Ib;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.hd=function(){var a=this.a;a.aa&57344||(a.Kb=a.w&65535);return a.Kb};h.jd=function(){return this.a.Ea};h.he=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.$a=a&16?4194303:262143,ac(b))};h.Rd=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
|
||||||
h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Hd=function(a){return this.a.J[1][a>>1&7]};h.Fe=function(a,b){this.a.J[1][b>>1&7]=a&65295};h.Fd=function(a){return this.a.J[1][(a>>1&7)+8]};h.De=function(a,b){this.a.J[1][(b>>1&7)+8]=a&65295};h.Gd=function(a){return this.a.da[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.da[1][b]=a;this.a.J[1][b]&=65295};h.Ed=function(a){return this.a.da[1][(a>>1&7)+8]};
|
h.Pe=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Kd=function(a){return this.a.I[1][a>>1&7]};h.Ie=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Id=function(a){return this.a.I[1][(a>>1&7)+8]};h.Ge=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Jd=function(a){return this.a.da[1][a>>1&7]};h.He=function(a,b){b=b>>1&7;this.a.da[1][b]=a;this.a.I[1][b]&=65295};h.Hd=function(a){return this.a.da[1][(a>>1&7)+8]};
|
||||||
h.Ce=function(a,b){b=(b>>1&7)+8;this.a.da[1][b]=a;this.a.J[1][b]&=65295};h.$c=function(a){return this.a.J[0][a>>1&7]};h.ae=function(a,b){this.a.J[0][b>>1&7]=a&65295};h.Yc=function(a){return this.a.J[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.J[0][(b>>1&7)+8]=a&65295};h.Zc=function(a){return this.a.da[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.da[0][b]=a;this.a.J[0][b]&=65295};h.Xc=function(a){return this.a.da[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.da[0][b]=a;this.a.J[0][b]&=65295};
|
h.Fe=function(a,b){b=(b>>1&7)+8;this.a.da[1][b]=a;this.a.I[1][b]&=65295};h.cd=function(a){return this.a.I[0][a>>1&7]};h.de=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.ad=function(a){return this.a.I[0][(a>>1&7)+8]};h.be=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.bd=function(a){return this.a.da[0][a>>1&7]};h.ce=function(a,b){b=b>>1&7;this.a.da[0][b]=a;this.a.I[0][b]&=65295};h.$c=function(a){return this.a.da[0][(a>>1&7)+8]};h.ae=function(a,b){b=(b>>1&7)+8;this.a.da[0][b]=a;this.a.I[0][b]&=65295};
|
||||||
h.Nd=function(a){return this.a.J[3][a>>1&7]};h.Le=function(a,b){this.a.J[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.J[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.J[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.da[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Kd=function(a){return this.a.da[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ma[a]:this.a.f[a]};
|
h.Qd=function(a){return this.a.I[3][a>>1&7]};h.Oe=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Od=function(a){return this.a.I[3][(a>>1&7)+8]};h.Me=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Pd=function(a){return this.a.da[3][a>>1&7]};h.Ne=function(a,b){b=b>>1&7;this.a.da[3][b]=a;this.a.I[3][b]&=65295};h.Nd=function(a){return this.a.da[3][(a>>1&7)+8]};h.Le=function(a,b){b=(b>>1&7)+8;this.a.da[3][b]=a;this.a.I[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]};
|
||||||
h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ma[b]=a:this.a.f[b]=a};h.ld=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.od=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ma[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ma[b]=a};h.md=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
|
h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.od=function(){return this.a.F&49152?this.a.qa[0]:this.a.f[6]};h.me=function(a){this.a.F&49152?this.a.qa[0]=a:this.a.f[6]=a};h.rd=function(){return this.a.f[7]};h.pe=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.pd=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.qa[1]};
|
||||||
h.ke=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.nd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.le=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Wc=function(a){return this.a.gc[a-65504>>1]};h.Xd=function(a,b){this.a.gc[b-65504>>1]=a};h.dc=function(a){return 65520==a?(Ub(this.g)>>6)-1:0};h.ic=function(){};h.Jd=function(){return 1};h.He=function(){};h.Vc=function(){return this.a.Z};h.Wd=function(){this.a.Z=0};h.bd=function(){return this.a.fc};
|
h.ne=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.qa[1]=a};h.qd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.qa[3]};h.oe=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.qa[3]=a};h.Zc=function(a){return this.a.ic[a-65504>>1]};h.$d=function(a,b){this.a.ic[b-65504>>1]=a};h.ec=function(a){return 65520==a?(Rb(this.g)>>6)-1:0};h.kc=function(){};h.Md=function(){return 1};h.Ke=function(){};h.Yc=function(){return this.a.Z};h.Zd=function(){this.a.Z=0};h.ed=function(){return this.a.hc};
|
||||||
h.ce=function(a,b){b&1||(a&=255);this.a.fc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return ec(this.a)};h.ie=function(a){fc(this.a,a&-1793|ec(this.a)&1792);this.a.u|=256};h.hc=function(){};
|
h.fe=function(a,b){b&1||(a&=255);this.a.hc=a};h.kd=function(a,b){return b?0:this.a.yb};h.ie=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Ld=function(a,b){return b?0:this.a.jb&65280};h.Je=function(a){this.a.jb=a|255};h.nd=function(){return bc(this.a)};h.le=function(a){cc(this.a,a&-1793|bc(this.a)&1792);this.a.u|=256};h.jc=function(){};
|
||||||
var L={},ac=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]=
|
var L={},Yb=(L[61568]=[null,null,K.prototype.Rd,K.prototype.Pe,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Kd,K.prototype.Ie,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Id,K.prototype.Ge,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Jd,K.prototype.He,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Hd,K.prototype.Fe,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.cd,K.prototype.de,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.ad,K.prototype.be,"KDPDR",8,1145,64],L[62688]=
|
||||||
[null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.hc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.hc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le,
|
[null,null,K.prototype.bd,K.prototype.ce,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.$c,K.prototype.ae,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.jd,K.prototype.he,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.dd,K.prototype.ee,"LKS"],L[65402]=[null,null,K.prototype.fd,K.prototype.ge,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.gd,K.prototype.jc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.hd,K.prototype.jc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Qd,K.prototype.Oe,
|
||||||
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va,
|
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Od,K.prototype.Me,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Pd,K.prototype.Ne,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Nd,K.prototype.Le,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va,
|
||||||
K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa,
|
K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.od,K.prototype.me,"R6KERNEL"],L[65479]=[null,null,K.prototype.rd,K.prototype.pe,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa,
|
||||||
K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.dc,K.prototype.ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.dc,K.prototype.ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]=
|
K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.pd,K.prototype.ne,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.qd,K.prototype.oe,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Zc,K.prototype.$d,"CTRL",8,1170],L[65520]=[null,null,K.prototype.ec,K.prototype.kc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.ec,K.prototype.kc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Md,K.prototype.Ke,"SYSID",1,1170],L[65526]=
|
||||||
[null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L);
|
[null,null,K.prototype.Yc,K.prototype.Zd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.ed,K.prototype.fe,"MB",1,1170],L[65530]=[null,null,K.prototype.kd,K.prototype.ie,"PIR"],L[65532]=[null,null,K.prototype.Ld,K.prototype.Je,"SL"],L[65534]=[null,null,K.prototype.nd,K.prototype.le,"PSW"],L);
|
||||||
Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=B(d);switch(c.type){case "default":c=new K(c);C(c,d);break;case "pc11":c=new gc(c);C(c,d);break;case "rl11":c=new M(c);C(c,d);break;case "rk11":c=new N(c),C(c,d)}}});var hc;if($a){var ic=new ArrayBuffer(2);(new DataView(ic)).setUint16(0,256,!0);hc=256===(new Uint16Array(ic))[0]}else hc=!1;var jc=hc;
|
Ia(function(){for(var a=E(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=C(d);switch(c.type){case "default":c=new K(c);D(c,d);break;case "pc11":c=new dc(c);D(c,d);break;case "rl11":c=new M(c);D(c,d);break;case "rk11":c=new N(c),D(c,d)}}});var ec;if(Za){var fc=new ArrayBuffer(2);(new DataView(fc)).setUint16(0,256,!0);ec=256===(new Uint16Array(fc))[0]}else ec=!1;var gc=ec;
|
||||||
function H(a,b,c,d,e,f){this.g=a;this.id=kc+=2;this.a=null;this.Pa=b;this.Ab=c;this.size=d||0;this.type=e||lc;this.l=e==mc;this.controller=null;Db(this);this.za=this.Dc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],nc(this,f.xc);else if($a)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.j=new Uint8Array(this.b,0,this.size),this.v=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),nc(this,jc?oc:pc);else{a=this.a=Array(this.size>>
|
function H(a,b,c,d,e,f){this.g=a;this.id=hc+=2;this.a=null;this.Pa=b;this.Ab=c;this.size=d||0;this.type=e||ic;this.m=e==jc;this.controller=null;Db(this);this.ya=this.Gc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],kc(this,f.Ac);else if(Za)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.j=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),kc(this,gc?lc:mc);else{a=this.a=Array(this.size>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;nc(this,qc)}else nc(this)}var lc=0,Lb=1,mc=2,Jb=4,Mb=["NONE","RAM","ROM","VID","H/W"],kc=0;
|
2);for(f=0;f<a.length;f++)a[f]=0;kc(this,nc)}else kc(this)}var ic=0,Jb=1,jc=2,Fb=4,Kb=["NONE","RAM","ROM","VID","H/W"],hc=0;
|
||||||
H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if($a)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.c.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if($a)for(b=0;b<a.length;b++)this.c.setInt32(b<<2,a[b],!0);else this.a=a;return this.za=!0}return!1},B:function(a,b){I(this.g,b,32);return 255},h:function(a,b,c){I(this.g,c,32)},w:function(a,b){return this.Nb(a++,b++)|
|
H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Za)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.c.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Za)for(b=0;b<a.length;b++)this.c.setInt32(b<<2,a[b],!0);else this.a=a;return this.ya=!0}return!1},v:function(a,b){I(this.g,b,32);return 255},h:function(a,b,c){I(this.g,c,32)},B:function(a,b){return this.Nb(a++,b++)|
|
||||||
this.Nb(a,b)<<8},H:function(a,b,c){this.Rb(a++,b&255,c++);this.Rb(a,b>>8,c)},ka:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Ca:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.za=!0},Fa:function(a,b,c){a&1&&I(this.g,c,64);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|
|
this.Nb(a,b)<<8},w:function(a,b,c){this.Rb(a++,b&255,c++);this.Rb(a,b>>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.ya=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|
|
||||||
b>>8);this.za=!0},M:function(a,b){return this.R(a,b)},sa:function(a,b){return this.C(a,b)},va:function(a,b,c){this.l?this.h(a,b,c):this.s(a,b,c)},Da:function(a,b,c){this.l?this.h(a,b,c):this.I(a,b,c)},K:function(a){return this.j[a]},V:function(a){return this.j[a]},la:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ta:function(a,b){a&1&&I(this.g,b,64);return this.v[a>>1]},ua:function(a,b){this.j[a]=b;this.za=!0},wa:function(a,b){this.j[a]=b;this.za=!0},ya:function(a,b,c){a&1&&I(this.g,
|
b>>8);this.ya=!0},H:function(a,b){return this.J(a,b)},V:function(a,b){return this.fc(a,b)},sa:function(a,b,c){this.m?this.h(a,b,c):this.Sb(a,b,c)},va:function(a,b,c){this.m?this.h(a,b,c):this.lc(a,b,c)},D:function(a){return this.j[a]},K:function(a){return this.j[a]},R:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},ra:function(a,b){this.j[a]=b;this.ya=!0},Ba:function(a,b){this.j[a]=b;this.ya=!0},ua:function(a,b,c){a&1&&I(this.g,
|
||||||
c,64);this.c.setUint16(a,b,!0);this.za=!0},Ea:function(a,b,c){a&1&&I(this.g,c,64);this.v[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&rc(a,uc,!1),(a.m=c.m)&&vc(a,uc,!1))}function vc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.H);if(c||void 0===c)a.s=b[1]||a.h,a.I=b[3]||a.H}function rc(a,b,c){c&&a.i||(a.Nb=b[0]||a.B,a.Y=b[2]||a.w);if(c||void 0===c)a.R=b[0]||a.B,a.C=b[2]||a.w}function nc(a,b){b||(b=wc);rc(a,b,void 0);vc(a,b,void 0)}
|
c,64);this.c.setUint16(a,b,!0);this.ya=!0},wa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.ya=!0}};function Db(a,b,c){a.G=b;a.i=a.l=0;c&&((a.i=c.i)&&oc(a,rc,!1),(a.l=c.l)&&sc(a,rc,!1))}function sc(a,b,c){c&&a.l||(a.Rb=!a.m&&b[1]||a.h,a.Bb=!a.m&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.lc=b[3]||a.w}function oc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.B);if(c||void 0===c)a.J=b[0]||a.v,a.fc=b[2]||a.B}function kc(a,b){b||(b=tc);oc(a,b,void 0);sc(a,b,void 0)}
|
||||||
var wc=[],qc=[H.prototype.ka,H.prototype.xa,H.prototype.Ca,H.prototype.Fa],uc=[H.prototype.M,H.prototype.va,H.prototype.sa,H.prototype.Da];if($a)var pc=[H.prototype.K,H.prototype.ua,H.prototype.la,H.prototype.ya],oc=[H.prototype.V,H.prototype.wa,H.prototype.ta,H.prototype.Ea];
|
var tc=[],nc=[H.prototype.M,H.prototype.ta,H.prototype.la,H.prototype.xa],rc=[H.prototype.H,H.prototype.sa,H.prototype.V,H.prototype.va];if(Za)var mc=[H.prototype.D,H.prototype.ra,H.prototype.R,H.prototype.ua],lc=[H.prototype.K,H.prototype.Ba,H.prototype.ka,H.prototype.wa];
|
||||||
function xc(a,b){x.call(this,"CPU",a,xc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Cb=Math.round(this.rb/1E4)/100;this.Fa=this.Cb*this.xa;this.o.U=!1;this.o.Pb=!1;this.o.gb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.M=[];this.cc=this.Sd.bind(this);E(this)}z(xc);var yc=["power","reset"];h=xc.prototype;
|
function uc(a,b){y.call(this,"CPU",a,uc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.wa=c;this.Cb=Math.round(this.rb/1E4)/100;this.Ma=this.Cb*this.wa;this.o.U=!1;this.o.Pb=!1;this.o.gb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.M=[];this.dc=this.Vd.bind(this);F(this)}A(uc);var vc=["power","reset"];h=uc.prototype;
|
||||||
h.ga=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.B=a.B;for(b=0;b<yc.length;b++)(c=this.j[yc[b]])&&this.l.ba(null,yc[b],c);a=zc(a,"autoStart");null!=a&&(this.o.gb="true"==a?!0:"false"==a?!1:!!a);E(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};h.ia=function(a,b){if(!b){if(a&&this.restore){Ac(this);if(!this.restore(a))return!1;Bc(this)}else this.reset();this.X("No debugger detected")}return!0};h.ha=function(a){return a?this.save():!0};
|
h.ga=function(a,b,c,d){this.m=a;this.g=b;this.G=d;this.B=a.B;for(b=0;b<vc.length;b++)(c=this.j[vc[b]])&&this.m.ba(null,vc[b],c);a=wc(a,"autoStart");null!=a&&(this.o.gb="true"==a?!0:"false"==a?!1:!!a);F(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};h.ia=function(a,b){if(!b){if(a&&this.restore){xc(this);if(!this.restore(a))return!1;yc(this)}else this.reset();this.X("No debugger detected")}return!0};h.ha=function(a){return a?this.save():!0};
|
||||||
h.gb=function(){return this.o.gb||void 0===this.j.run?(pb(this),!0):!1};h.Zb=function(){return 0};function Bc(a){void 0===a.qb&&(a.qb=0);void 0===a.ab&&(a.ab=-1);void 0===a.bb&&(a.bb=-1);a.o.ub=0<=a.qb&&0<a.ab;a.o.ub&&(a.pb=0,a.Na=a.qb-a.ya)}function sb(a,b){if(a.o.ub){var c=!1;a.pb=a.pb+a.Zb()|0;a.Na-=b;0>=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=Cc(a)&&(a.ab=a.bb=-1,Bc(a),F(a),c=!0);c&&a.X(Cc(a)+" cycles: checksum="+ka(a.pb))}}
|
h.gb=function(){return this.o.gb||void 0===this.j.run?(ob(this),!0):!1};h.$b=function(){return 0};function yc(a){void 0===a.qb&&(a.qb=0);void 0===a.ab&&(a.ab=-1);void 0===a.bb&&(a.bb=-1);a.o.ub=0<=a.qb&&0<a.ab;a.o.ub&&(a.pb=0,a.Na=a.qb-a.xa)}function rb(a,b){if(a.o.ub){var c=!1;a.pb=a.pb+a.$b()|0;a.Na-=b;0>=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=zc(a)&&(a.ab=a.bb=-1,yc(a),G(a),c=!0);c&&a.X(zc(a)+" cycles: checksum="+r(a.pb))}}
|
||||||
h.ba=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.S)a=!0;else{var b=null,c,k=A(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.o.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.o.S);c++);c==k.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.o.ready?"powered yet":"ready yet"+(b.wb?" (waiting for notification)":""))+".");a=!1}a&&(d.o.U?F(d):pb(d))},!0;case "speed":return this.j[b]=
|
h.ba=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.m)if(a=d.m,a.o.S)a=!0;else{var b=null,c,k=B(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.o.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.o.S);c++);c==k.length&&(b=a);x("The "+b.type+" component ("+b.id+") is not "+(b.o.ready?"powered yet":"ready yet"+(b.wb?" (waiting for notification)":""))+".");a=!1}a&&(d.o.U?G(d):ob(d))},!0;case "speed":return this.j[b]=
|
||||||
c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Dc(d,d.xa<<1,!0)},c.textContent=this.Fa.toFixed(2)+"Mhz",!0}return!1};h.Ba=function(a){this.l&&this.l.Ba(a)};function rb(a,b,c){a.ya+=b;c&&(a.wa=a.a=a.K=0)}function Ec(a,b){var c=1;b&&1<a.xa&&a.Ea&&(c=a.Ea/a.Cb);a.$b=Math.round(1E3/30);a.sb=Math.floor(a.rb/30*c);b||(a.cb=a.sb);a.Gb=0}function Cc(a){return a.ya+a.ta+a.wa-a.a}function Ac(a){a.Ea=0;a.ac=0;a.ya=a.ta=a.wa=a.a=a.K=0;Bc(a);Dc(a,1)}
|
c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Ac(d,d.wa<<1,!0)},c.textContent=this.Ma.toFixed(2)+"Mhz",!0}return!1};h.Aa=function(a){this.m&&this.m.Aa(a)};function qb(a,b,c){a.xa+=b;c&&(a.va=a.a=a.K=0)}function Bc(a,b){var c=1;b&&1<a.wa&&a.La&&(c=a.La/a.Cb);a.ac=Math.round(1E3/30);a.sb=Math.floor(a.rb/30*c);b||(a.cb=a.sb);a.Gb=0}function zc(a){return a.xa+a.sa+a.va-a.a}function xc(a){a.La=0;a.bc=0;a.xa=a.sa=a.va=a.a=a.K=0;yc(a);Ac(a,1)}
|
||||||
function Dc(a,b,c){if(void 0!==b){.8>a.Ea/a.Fa&&(b=1);a.xa=b;b=a.Cb*a.xa;if(a.Fa!=b){a.Fa=b;b=a.Fa.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Fc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Ec(a)}function Xb(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Zb(a,b,c,d){0<=b&&b<a.M.length&&(d||0>a.M[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.U&&(c+=Gc(a)),a.M[b][0]=c)}
|
function Ac(a,b,c){if(void 0!==b){.8>a.La/a.Ma&&(b=1);a.wa=b;b=a.Cb*a.wa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.m&&Cc(a.m)}qb(a,a.sa);a.sa=0;a.la=qa();a.ua=0;Bc(a)}function Ub(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Wb(a,b,c,d){0<=b&&b<a.M.length&&(d||0>a.M[b][0])&&(c=a.rb*a.wa/1E3*c|0,a.o.U&&(c+=Dc(a)),a.M[b][0]=c)}
|
||||||
function qb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gc(a,b){var c=a.wa-=a.a;a.a=a.K=0;b&&(a.wa=0);return c}
|
function pb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Dc(a,b){var c=a.va-=a.a;a.a=a.K=0;b&&(a.va=0);return c}
|
||||||
h.Sd=function(){if(this.o.U){this.Gb>=this.rb&&Ec(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.$b&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Gc(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.ac&&(this.Ba(),this.ac=0);break}}while(this.o.U)}catch(f){F(this);
|
h.Vd=function(){if(this.o.U){this.Gb>=this.rb&&Bc(this,!0);this.eb=0;this.ob=qa();if(this.ua){var a=this.ob-this.ua;a>this.ac&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Dc(this,!0);this.eb+=b;this.sa+=b;rb(this,b);pb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.bc&&(this.Aa(),this.bc=0);break}}while(this.o.U)}catch(f){G(this);
|
||||||
this.l&&this.l.stop(ra(),Cc(this));Za(this,f.stack||f.message);return}if(this.o.U){a=setTimeout;b=this.cc;this.va=ra();c=this.$b;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.Ea=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Dc(this));if(0>c||this.Ea<this.Fa)-1E3>c&&(this.la-=c),c=0;this.Gb+=this.eb;this.va+=c;a(b,c)}}};
|
this.m&&this.m.stop(qa(),zc(this));Ya(this,f.stack||f.message);return}if(this.o.U){a=setTimeout;b=this.dc;this.ua=qa();c=this.ac;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.ua-this.ob;if(d=this.ua-this.la)this.La=Math.round(this.sa/(10*d))/100,864E5<=d&&(this.xa=0,Ac(this));if(0>c||this.La<this.Ma)-1E3>c&&(this.la-=c),c=0;this.Gb+=this.eb;this.ua+=c;a(b,c)}}};
|
||||||
function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.U)a.X(a.toString()+" busy");else{Dc(a);a.o.U=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,Cc(a));setTimeout(a.cc,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.U){Gc(a);rb(a,a.ta);a.ta=0;a.o.U=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),Cc(a));b=!0}a.o.complete=void 0;return b}
|
function ob(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.U)a.X(a.toString()+" busy");else{Ac(a);a.o.U=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.m&&a.m.start(a.la,zc(a));setTimeout(a.dc,0)}}h.zb=function(){return 0};function G(a){var b=!1;if(a.o.U){Dc(a);qb(a,a.sa);a.sa=0;a.o.U=!1;if(b=a.j.run)b.textContent="Run";a.m&&a.m.stop(qa(),zc(a));b=!0}a.o.complete=void 0;return b}
|
||||||
function Hc(a){this.Ta=+a.model||1170;this.Wb=a.addrReset||0;xc.call(this,a,6666667);this.tb=0;this.Yb=255;1120==this.Ta?(this.decode=Ic.bind(this),this.Da=this.Bc,this.tb=8,this.Yb=-1):(this.decode=Jc.bind(this),this.Da=this.Cc);Kc(this);this.sa=0;this.I=null;this.o.complete=!1}z(Hc,xc);h=Hc.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.U&&F(this);Kc(this);Ac(this);this.o.error=!1;this.parent.reset.call(this)};
|
function Ec(a){this.Ta=+a.model||1170;this.Xb=a.addrReset||0;uc.call(this,a,6666667);this.tb=0;this.Zb=255;1120==this.Ta?(this.decode=Fc.bind(this),this.Ka=this.Ec,this.tb=8,this.Zb=-1):(this.decode=Gc.bind(this),this.Ka=this.Fc);Hc(this);this.ra=0;this.J=null;this.o.complete=!1}A(Ec,uc);h=Ec.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.U&&G(this);Hc(this);xc(this);this.o.error=!1;this.parent.reset.call(this)};
|
||||||
function Kc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Wb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ma=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.J=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.da=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
function Hc(a){a.l=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Xb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.qa=[0,0,0,0];a.v=0;a.nb=0;a.Mc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.da=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0]];a.lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.gc=[0,0,0,0,0,0,0,0];a.fc=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Fb=0;a.Oa=-1;ob(a)}function ob(a){a.aa=0;a.Ib=0;a.Kb=0;a.Ha=0;a.Z=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.fb=0;a.w=0;a.I=null;a.g&&(dc(a),a.Hc=Ub(a.g))}function dc(a){a.ka?(a.V=65536,a.Eb=a.Ha&16?4186112:253952,a.R=a.Fc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ha&16?22:18)):(a.V=0,a.Eb=57344,a.R=a.Ec,a.Y=a.ec,a.Bb=a.jc,Fb(a.g,16))}
|
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.ic=[0,0,0,0,0,0,0,0];a.hc=0;a.u=0;a.D=a.H=0;a.c=a.b=a.Fb=0;a.Oa=-1;nb(a)}function nb(a){a.aa=0;a.Ib=0;a.Kb=0;a.Ea=0;a.Z=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.fb=0;a.w=0;a.J=null;a.g&&(ac(a),a.Kc=Rb(a.g))}function ac(a){a.ka?(a.V=65536,a.Eb=a.Ea&16?4186112:253952,a.R=a.Ic,a.Y=a.Sd,a.Bb=a.Qe,Hb(a.g,a.Ea&16?22:18)):(a.V=0,a.Eb=57344,a.R=a.Hc,a.Y=a.gc,a.Bb=a.mc,Hb(a.g,16))}
|
||||||
function cc(a,b){b&=-3073;if(a.aa!=b){b&57344&&!(a.aa&57344)&&(a.Ib=a.w>>16&65535,a.Kb=a.w&65535);a.aa=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,dc(a))}}h.Zb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Tb(this.g));return a.data()};
|
function $b(a,b){b&=-3073;if(a.aa!=b){b&57344&&!(a.aa&57344)&&(a.Ib=a.w>>16&65535,a.Kb=a.w&65535);a.aa=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,ac(a))}}h.$b=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.xa,this.wa]);a.set(2,Qb(this.g));return a.data()};
|
||||||
h.restore=function(a){var b=a[1];this.ya=b[1];Dc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.M){for(var f=0,g=Array(b.M),k=0;k<e.length-1;)for(var l=e[k++],n=e[k++];l--;)g[f++]=n;e=g}f=b.g[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function P(a){return a.m&65536?1:0}function Lc(a){return a.s&32768?8:0}function Mc(a){var b=a.f[7];a.w=b;var c=a.Y(b);a.f[7]=b+2&65535;return c}
|
h.restore=function(a){var b=a[1];this.xa=b[1];Ac(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.M){for(var f=0,g=Array(b.M),k=0;k<e.length-1;)for(var l=e[k++],n=e[k++];l--;)g[f++]=n;e=g}f=b.g[d];if(!f||!f.restore(e)){x("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function P(a){return a.l&65536?1:0}function Ic(a){return a.s&32768?8:0}function Jc(a){var b=a.f[7];a.w=b;var c=a.Y(b);a.f[7]=b+2&65535;return c}
|
||||||
function Nc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function Q(a,b){a.f[7]=b&65535}function $b(a,b,c){return{Ud:a,Ua:b,message:c||0,next:null}}function bc(a,b){var c=a.I;if(c==b)a.I=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.I&&(a.u|=1)}function Yb(a,b){if(b!=a.I){var c=a.I;if(!c||c.Ua<=b.Ua)b.next=c,a.I=b;else{do{var d=c.next;if(!d||d.Ua<=b.Ua){b.next=d;c.next=b;break}c=d}while(c)}}a.u|=1}
|
function Kc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function Q(a,b){a.f[7]=b&65535}function Xb(a,b,c){return{Xd:a,Ua:b,message:c||0,next:null}}function Zb(a,b){var c=a.J;if(c==b)a.J=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.J&&(a.u|=1)}function Vb(a,b){if(b!=a.J){var c=a.J;if(!c||c.Ua<=b.Ua)b.next=c,a.J=b;else{do{var d=c.next;if(!d||d.Ua<=b.Ua){b.next=d;c.next=b;break}c=d}while(c)}}a.u|=1}
|
||||||
function Oc(a){return a.u&64?(J(a,168,64,-5),!0):a.u&32?(J(a,4,32,-4),!0):a.u&16?(J(a,12,16,-6),!0):!1}function ec(a){return a.F=a.F&63728|Lc(a)|(a.i&65535?0:4)|(a.h&32768?2:0)|P(a)}function fc(a,b){a.s=b<<12;a.i=~b&4;a.h=b<<14;a.m=b<<16;if((b^a.F)&2048)for(var c=a.Ma.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ma[c];a.Ma[c]=d}a.v=b>>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.I?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)}
|
function Lc(a){return a.u&64?(J(a,168,64,-5),!0):a.u&32?(J(a,4,32,-4),!0):a.u&16?(J(a,12,16,-6),!0):!1}function bc(a){return a.F=a.F&63728|Ic(a)|(a.i&65535?0:4)|(a.h&32768?2:0)|P(a)}function cc(a,b){a.s=b<<12;a.i=~b&4;a.h=b<<14;a.l=b<<16;if((b^a.F)&2048)for(var c=a.Ja.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ja[c];a.Ja[c]=d}a.v=b>>14&3;c=a.F>>14&3;a.v!=c&&(a.qa[c]=a.f[6],a.f[6]=a.qa[a.v]);a.F=b;a.u&=-3;a.u|=a.J?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)}
|
||||||
function Pc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Rc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Sc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}
|
function Mc(a,b,c){a.u&256||(a.s=a.i=a.l=b,a.h=c||0)}function Nc(a,b,c,d){a.u&256||(a.s=a.i=a.l=b,a.h=(c^b)&(d^b))}function Oc(a,b){a.u&256||(a.s=a.i=a.l=b,a.h=a.s^a.l>>1)}function Pc(a,b,c,d){a.u&256||(a.s=a.i=a.l=b,a.h=(c^d)&(d^b))}
|
||||||
function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=ec(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.Z|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);fc(a,g&-12289|a.Oa>>2&12288);Tc(a,a.Oa,e);Tc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Uc(a){var b=Vc(a),c=Vc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);fc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ha&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
|
function J(a,b,c,d){if(!a.ra){0>a.Oa?a.Oa=bc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.Z|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);cc(a,g&-12289|a.Oa>>2&12288);Qc(a,a.Oa,e);Qc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Rc(a){var b=Sc(a),c=Sc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);cc(a,c);a.u&=-17}function Mb(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||||
function Wc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Eb),f;d=b>>13;a.Ha&a.Jc[a.v]||(d&=7);e=a.J[a.v][d];f=(a.da[a.v][d]<<6)+(b&8191)&a.$a;3932160<=f&&(f=Ob(a,f));if(a.sa)return f;f>=a.Hc&&f<a.Eb?(a.Z|=32,J(a,4,0,f)):f&1&&!(c&1)&&(a.Z|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&
|
function Tc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Eb),f;d=b>>13;a.Ea&a.Mc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.da[a.v][d]<<6)+(b&8191)&a.$a;3932160<=f&&(f=Mb(a,f));if(a.ra)return f;f>=a.Kc&&f<a.Eb?(a.Z|=32,J(a,4,0,f)):f&1&&!(c&1)&&(a.Z|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&
|
||||||
(g|=16384));a.J[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.aa&57344||(g|=a.aa&4096|a.mb<<5|a.nb<<1,cc(a,a.aa&-61695|g&61694)),J(a,168,64,-1)),a.aa&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.aa|=4096,a.aa&512&&(a.u|=64)));return f}function Vc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Tc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Da(4,-2,d);a.Bb(d,b)}
|
(g|=16384));a.I[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.aa&57344||(g|=a.aa&4096|a.mb<<5|a.nb<<1,$b(a,a.aa&-61695|g&61694)),J(a,168,64,-1)),a.aa&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.aa|=4096,a.aa&512&&(a.u|=64)));return f}function Sc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Qc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)}
|
||||||
function Xc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Da(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Da(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Da(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,6==c&&a.Da(d,0,
|
function Uc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0,
|
||||||
e),a.a-=6,e|g;case 7:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Bc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Cc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.Z|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.ec(Wc(this,a,2));this.sa--;return a};
|
e),a.a-=6,e|g;case 7:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Ec=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Fc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.Z|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.ra++;a=this.gc(Tc(this,a,2));this.ra--;return a};
|
||||||
h.kb=function(a,b){this.ka?(this.sa++,a=Wc(this,a,5),a&1&&this.a--,Rb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.jc(Wc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Ec=function(a,b,c){return Xc(this,a,b,c)};h.Fc=function(a,b,c){return Wc(this,Xc(this,a,b,c),c)};h.ec=function(a){return Qb(this.g,this.fb=a)};h.Pd=function(a){return Qb(this.g,this.fb=Wc(this,a,2))};h.jc=function(a,b){Sb(this.g,this.fb=a,b&65535)};h.Ne=function(a,b){Sb(this.g,this.fb=Wc(this,a,4),b)};
|
h.kb=function(a,b){this.ka?(this.ra++,a=Tc(this,a,5),a&1&&this.a--,Ob(this.g,a,b),this.ra--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.ra++,this.mc(Tc(this,a,4),b),this.ra--):this.g.Xa(a,b)};h.Hc=function(a,b,c){return Uc(this,a,b,c)};h.Ic=function(a,b,c){return Tc(this,Uc(this,a,b,c),c)};h.gc=function(a){return Nb(this.g,this.fb=a)};h.Sd=function(a){return Nb(this.g,this.fb=Tc(this,a,2))};h.mc=function(a,b){Pb(this.g,this.fb=a,b&65535)};h.Qe=function(a,b){Pb(this.g,this.fb=Tc(this,a,4),b)};
|
||||||
function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Zc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Wc(a,e|c&65536,4),a.v=a.F>>14&3,Sb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
|
function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Uc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.qa[a.F>>12&3];return c}function Wc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Uc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Tc(a,e|c&65536,4),a.v=a.F>>14&3,Pb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.qa[a.F>>12&3]=d}
|
||||||
function $c(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.Yb;return a}function ad(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Qb(a.g,a.R(b,c,2)):a.f[c+a.tb]}function bd(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xc(a,b,c,8)}function cd(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function dd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Qb(a.g,a.R(b,c,2)):a.f[c]}
|
function Xc(a,b){b>>=6;var c=a.H=b&7;(b=a.D=(b&56)>>3)?(c=a.R(b,c,3),a=Lb(a.g,c)):a=a.f[c+a.tb]&a.Zb;return a}function Yc(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Nb(a.g,a.R(b,c,2)):a.f[c+a.tb]}function Zc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Uc(a,b,c,8)}function $c(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.R(b,c,3),a=Lb(a.g,c)):a=a.f[c]&255;return a}function ad(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Nb(a.g,a.R(b,c,2)):a.f[c]}
|
||||||
function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Fb=a.R(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Rb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.R(b,e,6),Sb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Qb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
|
function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Fb=a.R(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Lb(a.g,e)),e&1&&a.a--,Ob(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.R(b,e,6),Pb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Nb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
|
||||||
function ed(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Rb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function fd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,d,4),Sb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
function bd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Ob(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function cd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,d,4),Pb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
||||||
h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.I&&this.I.Ua>d?this.I:null;e&&(c=e.Ud,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Nc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&bc(this,e),a=!0);this.I||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Oc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Mc(this))}while(0<this.a);return this.o.complete?
|
h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.va=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.J&&this.J.Ua>d?this.J:null;e&&(c=e.Xd,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Kc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&Zb(this,e),a=!0);this.J||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Lc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Jc(this))}while(0<this.a);return this.o.complete?
|
||||||
this.wa-this.a:void 0===this.o.complete?0:-1};Ja(function(){for(var a=D(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Hc(d);C(d,c)}});function gd(a,b){var c=b+a;Qc(this,c,a,b);return c&65535}function hd(a,b){var c=b+a;Qc(this,c<<8,a<<8,b<<8);return c&255}function id(a,b){a=b<<1;Rc(this,a);return a&65535}function jd(a,b){a=b<<1;Rc(this,a<<8);return a&255}function kd(a,b){a=b&32768|b>>1|b<<16;Rc(this,a);return a&65535}
|
this.va-this.a:void 0===this.o.complete?0:-1};Ia(function(){for(var a=E(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new Ec(d);D(d,c)}});function dd(a,b){var c=b+a;Nc(this,c,a,b);return c&65535}function ed(a,b){var c=b+a;Nc(this,c<<8,a<<8,b<<8);return c&255}function fd(a,b){a=b<<1;Oc(this,a);return a&65535}function gd(a,b){a=b<<1;Oc(this,a<<8);return a&255}function hd(a,b){a=b&32768|b>>1|b<<16;Oc(this,a);return a&65535}
|
||||||
function ld(a,b){a=b&128|b>>1|b<<8;Rc(this,a<<8);return a&255}function md(a,b){a=b&~a;R(this,a);return a}function nd(a,b){a=b&~a;R(this,a<<8);return a}function od(a,b){a|=b;R(this,a);return a}function pd(a,b){a|=b;R(this,a<<8);return a}function qd(a,b){a=~b|65536;Pc(this,a);return a&65535}function rd(a,b){a=~b|256;Pc(this,a<<8);return a&255}function sd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
|
function id(a,b){a=b&128|b>>1|b<<8;Oc(this,a<<8);return a&255}function jd(a,b){a=b&~a;R(this,a);return a}function kd(a,b){a=b&~a;R(this,a<<8);return a}function ld(a,b){a|=b;R(this,a);return a}function md(a,b){a|=b;R(this,a<<8);return a}function nd(a,b){a=~b|65536;Mc(this,a);return a&65535}function od(a,b){a=~b|256;Mc(this,a<<8);return a&255}function pd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
|
||||||
function td(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function ud(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function vd(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function wd(a,b){a=-b;Pc(this,a,a&b&32768);return a&65535}function xd(a,b){a=-b;Pc(this,a<<8,(a&b&128)<<8);return a&255}function yd(a,b){a=b<<1|this.m>>16&1;Rc(this,a);return a&65535}
|
function qd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function rd(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function sd(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function td(a,b){a=-b;Mc(this,a,a&b&32768);return a&65535}function ud(a,b){a=-b;Mc(this,a<<8,(a&b&128)<<8);return a&255}function vd(a,b){a=b<<1|this.l>>16&1;Oc(this,a);return a&65535}
|
||||||
function zd(a,b){a=b<<1|this.m>>16&1;Rc(this,a<<8);return a&255}function Ad(a,b){a=(this.m&65536|b)>>1|b<<16;Rc(this,a);return a&65535}function Bd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Rc(this,a<<8);return a&255}function Cd(a,b){var c=b-a;Sc(this,c,a,b);return c&65535}function Dd(a,b){var c=b-a;Sc(this,c<<8,a<<8,b<<8);return c&255}function Ed(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Fd(a,b){a^=b;R(this,a);return a&65535}
|
function wd(a,b){a=b<<1|this.l>>16&1;Oc(this,a<<8);return a&255}function xd(a,b){a=(this.l&65536|b)>>1|b<<16;Oc(this,a);return a&65535}function yd(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Oc(this,a<<8);return a&255}function zd(a,b){var c=b-a;Pc(this,c,a,b);return c&65535}function Ad(a,b){var c=b-a;Pc(this,c<<8,a<<8,b<<8);return c&255}function Bd(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.l=0);return(b<<8|b>>8)&65535}function Cd(a,b){a^=b;R(this,a);return a&65535}
|
||||||
function Gd(a){T(this,a,ad(this,a),gd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Hd(a){var b=dd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.m=c<<17-b,c>>=b;else if(b)if(16<b)this.h=c,c=0;else{this.m=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
|
function Dd(a){U(this,a,Yc(this,a),dd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Ed(a){var b=ad(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.h=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.l=c<<17-b,c>>=b;else if(b)if(16<b)this.h=c,c=0;else{this.l=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
|
||||||
function Id(a){var b=dd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.m=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.h=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Jd(a){V(this,a,!P(this))}function Kd(a){V(this,a,P(this))}
|
function Fd(a){var b=ad(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.h=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.l=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.l=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.h=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Gd(a){V(this,a,!P(this))}function Hd(a){V(this,a,P(this))}
|
||||||
function Ld(a){T(this,a,ad(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,$c(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Nd(a){T(this,a,ad(this,a),od);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Od(a){S(this,a,$c(this,a),pd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}
|
function Id(a){U(this,a,Yc(this,a),jd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Jd(a){S(this,a,Xc(this,a),kd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Kd(a){U(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Ld(a){S(this,a,Xc(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}
|
||||||
function Pd(a){var b=ad(this,a);a=dd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Qd(a){var b=$c(this,a);a=cd(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Rd(a){V(this,a,this.i&65535?0:4)}function Sd(a){V(this,a,!Lc(this)==!(this.h&32768))}function Td(a){V(this,a,!!(this.i&65535)&&!Lc(this)==!(this.h&32768))}
|
function Md(a){var b=Yc(this,a);a=ad(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function Nd(a){var b=Xc(this,a);a=$c(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function Od(a){V(this,a,this.i&65535?0:4)}function Pd(a){V(this,a,!Ic(this)==!(this.h&32768))}function Qd(a){V(this,a,!!(this.i&65535)&&!Ic(this)==!(this.h&32768))}
|
||||||
function Ud(a){V(this,a,!P(this)&&!!(this.i&65535))}function Vd(a){V(this,a,(this.i&65535?0:4)||!Lc(this)!=!(this.h&32768))}function Wd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Xd(a){V(this,a,!Lc(this)!=!(this.h&32768))}function Yd(a){V(this,a,Lc(this))}function Zd(a){V(this,a,!!(this.i&65535))}function $d(a){V(this,a,!Lc(this))}function ae(){J(this,12,0,-8);this.a-=5}function be(a){V(this,a,!0)}function ce(a){V(this,a,!(this.h&32768))}function de(a){V(this,a,this.h&32768?2:0)}
|
function Rd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Sd(a){V(this,a,(this.i&65535?0:4)||!Ic(this)!=!(this.h&32768))}function Td(a){V(this,a,P(this)||(this.i&65535?0:4))}function Ud(a){V(this,a,!Ic(this)!=!(this.h&32768))}function Vd(a){V(this,a,Ic(this))}function Wd(a){V(this,a,!!(this.i&65535))}function Xd(a){V(this,a,!Ic(this))}function Yd(){J(this,12,0,-8);this.a-=5}function Zd(a){V(this,a,!0)}function $d(a){V(this,a,!(this.h&32768))}function ae(a){V(this,a,this.h&32768?2:0)}
|
||||||
function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ee(a){var b=ad(this,a);a=dd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Sc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function fe(a){var b=$c(this,a);a=cd(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Sc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}
|
function W(a){a&1&&(this.l=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function be(a){var b=Yc(this,a);a=ad(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Pc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function ce(a){var b=Xc(this,a);a=$c(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Pc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}
|
||||||
function ge(a){var b=dd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function he(){J(this,24,0,-8);this.a-=25}
|
function de(a){var b=ad(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.l=65536,this.a-=7}function ee(){J(this,24,0,-8);this.a-=25}
|
||||||
function ie(){this.F&49152?(this.Z|=128,J(this,4,0,-7)):(this.B&&1120==this.Ta&&this.B.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function je(){J(this,16,0,-8);this.a-=25}var ke=[0,7,7,10,7,11,9,13];function le(a){this.K=this.a;Q(this,bd(this,a));this.a=this.K-ke[this.c]}var me=[0,14,14,17,14,18,16,20];function ne(a){this.K=this.a;var b=bd(this,a);a=a>>6&7;Tc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.K-me[this.c]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
|
function fe(){this.F&49152?(this.Z|=128,J(this,4,0,-7)):(this.B&&1120==this.Ta&&this.B.setData(this.f[0],!0),this.G?this.G.b():G(this));this.a-=7}function ge(){J(this,16,0,-8);this.a-=25}var he=[0,7,7,10,7,11,9,13];function ie(a){this.K=this.a;Q(this,Zc(this,a));this.a=this.K-he[this.c]}var je=[0,14,14,17,14,18,16,20];function ke(a){this.K=this.a;var b=Zc(this,a);a=a>>6&7;Qc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.K-je[this.c]}var le=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
|
||||||
function pe(a){var b=ad(this,a);this.K=this.a;R(this,fd(this,a,b));this.a=this.K-oe[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function qe(a){var b=$c(this,a);R(this,ed(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var re=[7,13,13,17,14,18,17,21];
|
function me(a){var b=Yc(this,a);this.K=this.a;R(this,cd(this,a,b));this.a=this.K-le[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ne(a){var b=Xc(this,a);R(this,bd(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}var oe=[7,13,13,17,14,18,17,21];
|
||||||
function se(a){var b=dd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767<b?65536:0);this.a-=23}function te(){this.a-=5}function ue(){this.F&49152||(this.g.reset(),ob(this),this.B&&this.B.setData(this.f[0],!0));this.a-=667}function ve(a){if(a&8)J(this,8,0,-8);else{var b=Vc(this);a&=7;7==a?Q(this,b):(Q(this,this.f[a]),this.f[a]=b);this.a-=9}}
|
function pe(a){var b=ad(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.l=-32768>b||32767<b?65536:0);this.a-=23}function qe(){this.a-=5}function re(){this.F&49152||(this.g.reset(),nb(this),this.B&&this.B.setData(this.f[0],!0));this.a-=667}function se(a){if(a&8)J(this,8,0,-8);else{var b=Sc(this);a&=7;7==a?Q(this,b):(Q(this,this.f[a]),this.f[a]=b);this.a-=9}}
|
||||||
function we(){Uc(this);this.a-=13}function X(a){a&1&&(this.m=65536);a&2&&(this.h=32768);a&4&&(this.i=0);a&8&&(this.s=32768);this.a-=5}function xe(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ye(a){T(this,a,ad(this,a),Cd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function ze(a){T(this,a,0,Ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Ae(){J(this,28,0,-8);this.a-=5}
|
function te(){Rc(this);this.a-=13}function X(a){a&1&&(this.l=65536);a&2&&(this.h=32768);a&4&&(this.i=0);a&8&&(this.s=32768);this.a-=5}function ue(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ve(a){U(this,a,Yc(this,a),zd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function we(a){U(this,a,0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)}function xe(){J(this,28,0,-8);this.a-=5}
|
||||||
function Be(){this.B&&(this.B.ja=this.f[7],this.B.setData(this.f[0],!0));this.u|=8;Nc(this,-2);this.a-=3}function Ce(a){T(this,a,this.f[(a>>6&7)+this.tb],Fd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Ic(a){De[a>>12].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a&15].call(this,a)}function Oe(a){Pe[a>>6&3].call(this,a)}
|
function ye(){this.B&&(this.B.ja=this.f[7],this.B.setData(this.f[0],!0));this.u|=8;Kc(this,-2);this.a-=3}function ze(a){U(this,a,this.f[(a>>6&7)+this.tb],Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Fc(a){Ae[a>>12].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a&15].call(this,a)}function Je(a){Ke[a&15].call(this,a)}function Le(a){Me[a>>6&3].call(this,a)}
|
||||||
function Qe(a){Re[a>>6&3].call(this,a)}function Se(a){Te[a>>6&3].call(this,a)}
|
function Ne(a){Oe[a>>6&3].call(this,a)}function Pe(a){Qe[a>>6&3].call(this,a)}
|
||||||
var De=[function(a){Ue[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,Gd,Y,function(a){Ve[a>>8&15].call(this,a)},qe,fe,Qd,Md,Od,ye,Y],Ue=[function(a){We[a>>4&15].call(this,a)},be,Zd,Rd,Sd,Xd,Td,Vd,ne,ne,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Pc(this,fd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,
|
var Ae=[function(a){Re[a>>8&15].call(this,a)},me,be,Md,Id,Kd,Dd,Y,function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,ve,Y],Re=[function(a){Te[a>>4&15].call(this,a)},Zd,Wd,Od,Pd,Ud,Qd,Sd,ke,ke,Be,De,Fe,Y,Y,Y],Ce=[function(a){Mc(this,cd(this,a,0));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,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,pd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ee=[function(a){U(this,a,0,
|
||||||
wd);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=dd(this,a);Pc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Je=[function(a){T(this,a,0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)}],
|
td);this.a-=this.c?11:6},function(a){U(this,a,P(this)?1:0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,P(this)?1:0,zd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Mc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Ge=[function(a){U(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,hd);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)}],
|
||||||
We=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,le,le,le,le,ve,Y,Ke,Me,ze,ze,ze,ze],Xe=[ie,Be,we,ae,je,ue,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Le=[te,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ne=[te,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ve=[$d,Yd,Ud,Wd,ce,de,Jd,Kd,he,Ae,Oe,Qe,Se,Y,Y,Y],Pe=[function(a){Pc(this,
|
Te=[function(a){Ue[a&15].call(this,a)},Y,Y,Y,ie,ie,ie,ie,se,Y,He,Je,we,we,we,we],Ue=[fe,ye,te,Yd,ge,re,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ie=[qe,function(){this.l=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ke=[qe,function(){this.l=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Se=[Xd,Vd,Rd,Td,$d,ae,Gd,Hd,ee,xe,Le,Ne,Pe,Y,Y,Y],Me=[function(a){Mc(this,
|
||||||
ed(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){S(this,a,0,xd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cd(this,a);Pc(this,a<<8);this.a-=this.c?4:3+(7==
|
bd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Oe=[function(a){S(this,a,0,ud);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=$c(this,a);Mc(this,a<<8);this.a-=this.c?4:3+(7==
|
||||||
this.b?2:0)}],Te=[function(a){S(this,a,0,Bd);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,ld);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Jc(a){Ye[a>>12].call(this,a)}
|
this.b?2:0)}],Qe=[function(a){S(this,a,0,yd);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,id);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Gc(a){Ve[a>>12].call(this,a)}
|
||||||
var Ye=[function(a){Ze[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,Gd,function(a){$e[a>>8&15].call(this,a)},function(a){af[a>>8&15].call(this,a)},qe,fe,Qd,Md,Od,ye,Y],Ze=[function(a){bf[a>>4&15].call(this,a)},be,Zd,Rd,Sd,Xd,Td,Vd,ne,ne,Ee,Ge,Ie,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yc(this,a,0);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=
|
var Ve=[function(a){We[a>>8&15].call(this,a)},me,be,Md,Id,Kd,Dd,function(a){Xe[a>>8&15].call(this,a)},function(a){Ye[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,ve,Y],We=[function(a){Ze[a>>4&15].call(this,a)},Zd,Wd,Od,Pd,Ud,Qd,Sd,ke,ke,Be,De,Fe,function(a){$e[a>>6&3].call(this,a)},Y,Y],$e=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Vc(this,a,0);Qc(this,a);R(this,a);this.a-=11},function(a){var b=Sc(this);this.K=
|
||||||
this.a;Zc(this,a,0,b);R(this,b);this.a=this.K-re[this.c]},function(a){R(this,fd(this,a,Lc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],bf=[function(a){df[a&15].call(this,a)},Y,Y,Y,le,le,le,le,ve,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ke,Me,ze,ze,ze,ze],df=[ie,Be,function(){Uc(this);this.u|=this.F&16;this.a-=13},ae,je,ue,we,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],$e=[se,se,ge,ge,Hd,Hd,Id,Id,Ce,Ce,Y,Y,Y,Y,xe,xe],af=[$d,
|
this.a;Wc(this,a,0,b);R(this,b);this.a=this.K-oe[this.c]},function(a){R(this,cd(this,a,Ic(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ze=[function(a){af[a&15].call(this,a)},Y,Y,Y,ie,ie,ie,ie,se,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},He,Je,we,we,we,we],af=[fe,ye,function(){Rc(this);this.u|=this.F&16;this.a-=13},Yd,ge,re,te,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Xe=[pe,pe,de,de,Ed,Ed,Fd,Fd,ze,ze,Y,Y,Y,Y,ue,ue],Ye=[Xd,
|
||||||
Yd,Ud,Wd,ce,de,Jd,Kd,he,Ae,Oe,Qe,Se,function(a){ef[a>>6&3].call(this,a)},Y,Y],ef=[Y,function(a){a=Yc(this,a,65536);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=this.a;Zc(this,a,65536,b);R(this,b);this.a=this.K-re[this.c]},Y];
|
Vd,Rd,Td,$d,ae,Gd,Hd,ee,xe,Le,Ne,Pe,function(a){bf[a>>6&3].call(this,a)},Y,Y],bf=[Y,function(a){a=Vc(this,a,65536);Qc(this,a);R(this,a);this.a-=11},function(a){var b=Sc(this);this.K=this.a;Wc(this,a,65536,b);R(this,b);this.a=this.K-oe[this.c]},Y];
|
||||||
function ff(a){x.call(this,"ROM",a,ff,128);this.ca=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.N,c.ca=a.ca):c.l=null);gf(c)})}}z(ff);h=ff.prototype;
|
function cf(a){y.call(this,"ROM",a,cf,128);this.ca=this.c=null;this.i=a.addr;this.b=a.size;this.l=!1;this.h=a.alias;this.m=a.file;this.s=t(this.m);if(this.m){a=this.m;var b=ka(this.s);"json"!=b&&"hex"!=b&&(a=ta()+"/api/v1/dump?file="+this.m+"&format=bytes&decimal=true");var c=this;w(a,null,!0,function(a,b,f){f?(c.C("Unable to load ROM resource (error "+f+": "+a+")"),c.m=null):(Ta(c.ta,a,b),(a=sa(a,b))?(c.c=a.N,c.ca=a.ca):c.m=null);df(c)})}}A(cf);h=cf.prototype;
|
||||||
h.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;gf(this)};h.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.i,this.b,this.ca),delete this.ca);return!0};h.ha=function(){return!0};
|
h.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;df(this)};h.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.i,this.b,this.ca),delete this.ca);return!0};h.ha=function(){return!0};
|
||||||
function gf(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+ka(a.c.length,8,!0)+") does not match specified size ("+ka(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[ff.prototype.Dd,ff.prototype.Be,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,mc)){for(c=0;c<a.c.length;c++)a.g.kb(b+c,a.c[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.h?b.push(a.h):
|
function df(a){if(!Xa(a)){if(a.m){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Ya(a,"ROM size ("+r(a.c.length,8,!0)+") does not match specified size ("+r(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+yb){var c={};b=(c[b]=[cf.prototype.Gd,cf.prototype.Ee,null,null,null,a.b>>1],c);if(eb(a.g,a,b)){b=a.l=!0;break a}}else if(Eb(a.g,b,a.b,jc)){for(c=0;c<a.c.length;c++)a.g.kb(b+c,a.c[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.h?b.push(a.h):
|
||||||
null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Hb(d.g,d.i,d.b);Gb(d.g,e,d.b,f)}a.m||delete a.c}}}E(a)}}h.Dd=function(a){return this.c[a-this.i]};h.Be=function(){};Ja(function(){for(var a=D(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new ff(d);C(d,c)}});
|
null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.g,g=d.b,k=[],l=d.i>>>f.b;0<g&&l<f.g.length;)k.push(f.g[l++]),g-=f.c;f=d.g;d=d.b;g=0;for(e>>>=f.b;0<d&&e<f.g.length;){l=k[g++];if(!l)break;f.g[e++]=l;d-=f.c}}a.l||delete a.c}}}F(a)}}h.Gd=function(a){return this.c[a-this.i]};h.Ee=function(){};Ia(function(){for(var a=E(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new cf(d);D(d,c)}});
|
||||||
function hf(a){x.call(this,"RAM",a,hf);this.ca=this.c=null;this.l=a.addr;this.i=a.size;this.na=a.load;this.ma=a.exec;this.h=!1;this.b=a.file;this.m=r(this.b);if(this.b){a=this.b;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.N,c.ca=a.ca,null==c.na&&(c.na=a.na),null==c.ma&&(c.ma=a.ma)):c.b=null);jf(c)})}}
|
function ef(a){y.call(this,"RAM",a,ef);this.ca=this.c=null;this.m=a.addr;this.i=a.size;this.na=a.load;this.ma=a.exec;this.h=!1;this.b=a.file;this.l=t(this.b);if(this.b){a=this.b;var b=ka(this.l);"json"!=b&&"hex"!=b&&(a=ta()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;w(a,null,!0,function(a,b,f){f?(c.C("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(Ta(c.ta,a,b),(a=sa(a,b))?(c.c=a.N,c.ca=a.ca,null==c.na&&(c.na=a.na),null==c.ma&&(c.ma=a.ma)):c.b=null);ff(c)})}}
|
||||||
z(hf);hf.prototype.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;jf(this)};hf.prototype.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.l,this.i,this.ca),delete this.ca);return!0};hf.prototype.ha=function(){return!0};function jf(a){if(a.g&&(!a.h&&a.i&&Ib(a.g,a.l,a.i,Lb)&&(a.h=!0),!Ya(a))){if(!a.h)w("No RAM allocated");else if(a.b){if(!a.c||!a.g)return;kf(a,a.c,a.na,a.ma,a.l)}E(a)}}
|
A(ef);ef.prototype.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;ff(this)};ef.prototype.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.m,this.i,this.ca),delete this.ca);return!0};ef.prototype.ha=function(){return!0};function ff(a){if(a.g&&(!a.h&&a.i&&Eb(a.g,a.m,a.i,Jb)&&(a.h=!0),!Xa(a))){if(!a.h)x("No RAM allocated");else if(a.b){if(!a.c||!a.g)return;gf(a,a.c,a.na,a.ma,a.m)}F(a)}}
|
||||||
hf.prototype.reset=function(){if(this.h){for(var a=this.g,b=this.l,c=this.i,d=b&a.l,b=b>>>a.c;0<c&&b<a.g.length;){var e=a.g[b];if(e.controller&&a.i&&a.i.length==a.m.length){var f=a.i.indexOf(e);0<=f&&(e=a.m[f])}if(e){var f=c,g=0,k,d=d||0,g=g&255;void 0===f&&(f=e.size);if($a&&e.j)for(k=d;f--&&k<e.j.length;k++)e.j[k]=g;else for(k=d;f--&&k<e.size;k++)e.s(d,g,e.Pa+d)}c-=a.b;b++;d=0}this.c&&kf(this,this.c,this.na,this.ma,this.l,!0)}};
|
ef.prototype.reset=function(){if(this.h){for(var a=this.g,b=this.m,c=this.i,d=b&a.m,b=b>>>a.b;0<c&&b<a.g.length;){var e=a.g[b],f=c,g=0,k,d=d||0,g=g&255;void 0===f&&(f=e.size);if(Za&&e.j)for(k=d;f--&&k<e.j.length;k++)e.j[k]=g;else for(k=d;f--&&k<e.size;k++)e.Sb(d,g,e.Pa+d);c-=a.c;b++;d=0}this.c&&gf(this,this.c,this.na,this.ma,this.m,!0)}};
|
||||||
function kf(a,b,c,d,e,f){var g=!1;if(null==c)for(var k=0;k<b.length-1;){var l=b[k]&255|(b[k+1]&255)<<8;if(l)if(l&255){if(1!=l)break;if(k+6>=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0<n&&k<b.length;)l+=b[k++]&255,n--;if(n||k>=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.a.kb(c+
|
function gf(a,b,c,d,e,f){var g=!1;if(null==c)for(var k=0;k<b.length-1;){var l=b[k]&255|(b[k+1]&255)<<8;if(l)if(l&255){if(1!=l)break;if(k+6>=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0<n&&k<b.length;)l+=b[k++]&255,n--;if(n||k>=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?G(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.a.kb(c+
|
||||||
g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Wb=d,a.g.reset(),ob(a),Q(a,d),fc(a,0),!f&&a.G&&(F(a)||a.G.c()));return g}Ja(function(){for(var a=D(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new hf(d);C(d,c)}});function lf(a){x.call(this,"Keyboard",a,lf,1024);E(this)}z(lf);lf.prototype.ba=function(){return!1};lf.prototype.ga=function(a,b,c,d){this.l=a;this.a=c;this.G=d};Ja(function(){for(var a=D(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new lf(d);C(d,c)}});
|
g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Xb=d,a.g.reset(),nb(a),Q(a,d),cc(a,0),!f&&a.G&&(G(a)||a.G.c()));return g}Ia(function(){for(var a=E(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new ef(d);D(d,c)}});function hf(a){y.call(this,"Keyboard",a,hf,1024);F(this)}A(hf);hf.prototype.ba=function(){return!1};hf.prototype.ga=function(a,b,c,d){this.m=a;this.a=c;this.G=d};Ia(function(){for(var a=E(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new hf(d);D(d,c)}});
|
||||||
function Z(a){this.H=a.baudReceive||9600;this.ka=a.baudTransmit||9600;this.R=a.upperCase;this.h=this.i=null;this.K=a.tabSize;this.I=a.charBOL;this.m=0;x.call(this,"SerialPort",a,Z,262144);var b=a.binding;if("console"==b)this.i="";else{var c;a=mf;b&&(void 0===c&&(c="Panel"),(c=Wa(c,this.id))&&(b=c.j[b])&&this.ba(null,a,b))}this.v=this.w=null;this.exports={connect:this.bc,receiveData:this.xb}}z(Z);var mf="buffer";h=Z.prototype;
|
function Z(a){this.H=a.baudReceive||9600;this.ka=a.baudTransmit||9600;this.R=a.upperCase;this.h=this.i=null;this.K=a.tabSize;this.J=a.charBOL;this.l=0;y.call(this,"SerialPort",a,Z,262144);var b=a.binding;if("console"==b)this.i="";else{var c;a=jf;b&&(void 0===c&&(c="Panel"),(c=Va(c,this.id))&&(b=c.j[b])&&this.ba(null,a,b))}this.v=this.w=null;this.exports={connect:this.cc,receiveData:this.xb}}A(Z);var jf="buffer";h=Z.prototype;
|
||||||
h.ba=function(a,b,c){var d=this;switch(b){case mf:return this.j[b]=this.h=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?m.Tb:m.nc:46==c?b=m.Tb:a.ctrlKey&&c>=m.Sb&&c<=m.wc&&(b=c-(m.Sb-m.kc));b&&(a.preventDefault&&a.preventDefault(),d.xb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.mc&&(b=m.lc);d.xb(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&
|
h.ba=function(a,b,c){var d=this;switch(b){case jf:return this.j[b]=this.h=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?m.Ub:m.qc:46==c?b=m.Ub:a.ctrlKey&&c>=m.Tb&&c<=m.zc&&(b=c-(m.Tb-m.nc));b&&(a.preventDefault&&a.preventDefault(),d.xb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.pc&&(b=m.oc);d.xb(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&
|
||||||
a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.xb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.xb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
||||||
h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=$b(48,4,262144);this.M=Xb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.R&&97<=a&&122>a&&(a-=32),Zb(e.a,e.M,1E3/Math.round(e.H/10)));0<=a&&(e.B=a,e.b&128?e.B|=49152:e.b|=128,e.b&64&&Yb(c,e.V))});this.C=$b(52,4,262144);this.la=Xb(this.a,function(){e.c|=128;e.c&64&&Yb(c,e.C)});fb(b,this,nf);hb(b,this.reset.bind(this));E(this)};
|
h.ga=function(a,b,c,d){this.m=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=Xb(48,4,262144);this.M=Ub(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.R&&97<=a&&122>a&&(a-=32),Wb(e.a,e.M,1E3/Math.round(e.H/10)));0<=a&&(e.B=a,e.b&128?e.B|=49152:e.b|=128,e.b&64&&Vb(c,e.V))});this.D=Xb(52,4,262144);this.la=Ub(this.a,function(){e.c|=128;e.c&64&&Vb(c,e.D)});eb(b,this,kf);gb(b,this.reset.bind(this));F(this)};
|
||||||
h.bc=function(){if(!this.v){var a=zc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ia=function(a,b){if(!b)if(this.bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
h.cc=function(){if(!this.v){var a=wc(this.m,"connection");if(a){var b=a.split("->");if(2==b.length){var c=oa(b[0]);if(c!=this.Ba)return;b=oa(b[1]);if(this.v=Ua(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ia=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
h.ha=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.B=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.s.push(b)}else this.s=this.s.concat(a);Zb(this.a,this.M,1E3/Math.round(this.H/10));return!0};
|
h.ha=function(a){return a?this.save():!0};h.reset=function(){lf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return lf(this)};function lf(a){a.B=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.s.push(b)}else this.s=this.s.concat(a);Wb(this.a,this.M,1E3/Math.round(this.H/10));return!0};
|
||||||
h.qd=function(){return this.b&65534};h.oe=function(a){this.b=this.b&-112|a&111};h.pd=function(){this.b&=-129;return this.B};h.ne=function(){};h.Rd=function(){return this.c};h.Pe=function(a){this.c&128&&(a&64?Yb(this.a,this.C):bc(this.a,this.C));this.c=this.c&-70|a&69};h.Qd=function(){return 0};
|
h.td=function(){return this.b&65534};h.re=function(a){this.b=this.b&-112|a&111};h.sd=function(){this.b&=-129;return this.B};h.qe=function(){};h.Ud=function(){return this.c};h.Se=function(a){this.c&128&&(a&64?Vb(this.a,this.D):Zb(this.a,this.D));this.c=this.c&-70|a&69};h.Td=function(){return 0};
|
||||||
h.Oe=function(a){a&=255;this.w&&this.w.call(this.v,a);a&=127;if(this.h)if(13==a)this.m=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.m&&this.m--;else{if(a){var b;b=(b=qa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.m%a,this.K&&(b=" ".slice(0,c)));this.I&&!this.m&&c&&(b=String.fromCharCode(this.I)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a||
|
h.Re=function(a){a&=255;this.w&&this.w.call(this.v,a);a&=127;if(this.h)if(13==a)this.l=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.l&&this.l--;else{if(a){var b;b=(b=pa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.l%a,this.K&&(b=" ".slice(0,c)));this.J&&!this.l&&c&&(b=String.fromCharCode(this.J)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.l+=c}}else if(null!=this.i){if(10==a||
|
||||||
1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Zb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var pf={},nf=(pf[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],pf[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],pf[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],pf[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],pf);
|
1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Wb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var mf={},kf=(mf[65392]=[null,null,Z.prototype.td,Z.prototype.re,"RCSR"],mf[65394]=[null,null,Z.prototype.sd,Z.prototype.qe,"RBUF"],mf[65396]=[null,null,Z.prototype.Ud,Z.prototype.Se,"XCSR"],mf[65398]=[null,null,Z.prototype.Td,Z.prototype.Re,"XBUF"],mf);
|
||||||
Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Z(d);C(d,c)}});function gc(a){x.call(this,"PC11",a,gc);this.c=a.autoMount||null;this.m=0;this.R=a.baudReceive||3600;this.B=this.w=this.b=0;this.v=[];this.s=qf;this.h=rf;this.C=this.i="";this.N=this.na=this.ma=null;this.K=-1;this.H=!Ca("Mobi")&&window&&"FileReader"in window}z(gc);var qf="",rf=0;h=gc.prototype;
|
Ia(function(){for(var a=E(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new Z(d);D(d,c)}});function dc(a){y.call(this,"PC11",a,dc);this.c=a.autoMount||null;this.l=0;this.R=a.baudReceive||3600;this.B=this.w=this.b=0;this.v=[];this.s=nf;this.h=of;this.D=this.i="";this.N=this.na=this.ma=null;this.K=-1;this.H=!za("Mobi")&&window&&"FileReader"in window}A(dc);var nf="",of=0;h=dc.prototype;
|
||||||
h.ba=function(a,b,c){var d=this,e=rf;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
|
h.ba=function(a,b,c){var d=this,e=of;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){x("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
|
||||||
function(){var a=d.j.listTapes;a&&sf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;sf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
function(){var a=d.j.listTapes;a&&pf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;pf(d,t(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
||||||
h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.M=tf(a);var e=this;if((this.c=zc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.I=$b(56,4,4096);this.V=Xb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.B<e.v.length&&(e.w=e.v[e.B++]&255,uf(e,e.B/e.v.length*100),e.b|=128,e.b&=-2049,e.b&64&&Yb(e.a,e.I))});fb(b,this,vf);hb(b,this.reset.bind(this));wf(this,"None",qf,!0);
|
h.ga=function(a,b,c,d){this.m=a;this.g=b;this.a=c;this.G=d;this.M=qf(a);var e=this;if((this.c=wc(this.m,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){x("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.J=Xb(56,4,4096);this.V=Ub(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.B<e.v.length&&(e.w=e.v[e.B++]&255,rf(e,e.B/e.v.length*100),e.b|=128,e.b&=-2049,e.b&64&&Vb(e.a,e.J))});eb(b,this,sf);gb(b,this.reset.bind(this));tf(this,"None",nf,!0);
|
||||||
this.H&&wf(this,"Local Tape","?");wf(this,"Remote Tape","??");xf(this)||E(this)};h.ia=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){this.b&=-2241;this.w=0};
|
this.H&&tf(this,"Local Tape","?");tf(this,"Remote Tape","??");uf(this)||F(this)};h.ia=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){this.b&=-2241;this.w=0};
|
||||||
function xf(a){a.m=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.j.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=r(b,!0)}b&&c?yf(a,c,b,1,!0):zf(a)}return!!a.m}
|
function uf(a){a.l=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.j.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=t(b,!0)}b&&c?vf(a,c,b,1,!0):wf(a)}return!!a.l}
|
||||||
function sf(a,b,c,d,e){if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;yf(a,b,c,d,!1,e)}else Af(a,!1)}function yf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.h!=d)g++,Af(a,!0),a.o.Ia?a.D("PC11 busy"):(e&&a.m++,Bf(a,b,c,d,f)?g++:a.o.Ia=!0);g&&Cf(a,a.C,a.i,a.h,a.N,a.na,a.ma)}
|
function pf(a,b,c,d,e){if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;vf(a,b,c,d,!1,e)}else xf(a,!1)}function vf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.h!=d)g++,xf(a,!0),a.o.Fa?a.C("PC11 busy"):(e&&a.l++,yf(a,b,c,d,f)?g++:a.o.Fa=!0);g&&zf(a,a.D,a.i,a.h,a.N,a.na,a.ma)}
|
||||||
function Bf(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Cf(a,b,c,d,e),a.s="?");zf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!t(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.S;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Cf(a,b,c,d,e.N,e.na,e.ma));
|
function yf(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),zf(a,b,c,d,e),a.s="?");wf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=ka(c),f="json"==e||"gz"==e?encodeURI(c):ta()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!w(f,null,!0,function(e,f,g){var k=0>g&&a.m&&!a.m.o.S;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ta(a.ta,e,f),(e=sa(e,f))&&zf(a,b,c,d,e.N,e.na,e.ma));
|
||||||
a.o.Ia=!1;a.m&&(a.m--,a.m||E(a));zf(a)})}function wf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function zf(a){var b=a.j.listTapes;if(b&&b.options){a=a.s||a.i;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}
|
a.o.Fa=!1;a.l&&(a.l--,a.l||F(a));wf(a)})}function tf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function wf(a){var b=a.j.listTapes;if(b&&b.options){a=a.s||a.i;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}
|
||||||
function uf(a,b){b|=0;if(b!==a.K){var c=a.j.readProgress;c&&(c=(c=D(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.K=b}}function Cf(a,b,c,d,e,f,g){a.C=b;a.i=c;a.h=d;a.N=e;a.na=f;a.ma=g;2==d?a.M&&kf(a.M,e,f,g)?a.status("tape loaded: "+b):(a.C="",a.i="",a.s=qf,a.h=rf,a.D("No load address available for tape: "+b)):(a.B=0,a.v=e,a.status("tape attached: "+b),uf(a,0))}
|
function rf(a,b){b|=0;if(b!==a.K){var c=a.j.readProgress;c&&(c=(c=E(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.K=b}}function zf(a,b,c,d,e,f,g){a.D=b;a.i=c;a.h=d;a.N=e;a.na=f;a.ma=g;2==d?a.M&&gf(a.M,e,f,g)?a.status("tape loaded: "+b):(a.D="",a.i="",a.s=nf,a.h=of,a.C("No load address available for tape: "+b)):(a.B=0,a.v=e,a.status("tape attached: "+b),rf(a,0))}
|
||||||
function Af(a,b){if(a.i||!1===b)a.C="",a.i="",b||(a.h&&a.status(1==a.h?"tape detached":"tape unloaded"),a.s=qf,a.h=rf,zf(a))}h.save=function(){return(new O(this)).data()};h.restore=function(){return!0};h.jd=function(){return this.b&65534};h.he=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&Yb(this.a,this.I)):(this.b&=-129,this.b|=2048,this.w=0,Zb(this.a,this.V,1E3/Math.round(this.R/10))));this.b=this.b&-66|a&65};h.hd=function(){this.b&=-129;this.b|=2048;return this.w};h.ge=function(){};
|
function xf(a,b){if(a.i||!1===b)a.D="",a.i="",b||(a.h&&a.status(1==a.h?"tape detached":"tape unloaded"),a.s=nf,a.h=of,wf(a))}h.save=function(){return(new O(this)).data()};h.restore=function(){return!0};h.md=function(){return this.b&65534};h.ke=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&Vb(this.a,this.J)):(this.b&=-129,this.b|=2048,this.w=0,Wb(this.a,this.V,1E3/Math.round(this.R/10))));this.b=this.b&-66|a&65};h.ld=function(){this.b&=-129;this.b|=2048;return this.w};h.je=function(){};
|
||||||
var Df={},vf=(Df[65384]=[null,null,gc.prototype.jd,gc.prototype.he,"PRS"],Df[65386]=[null,null,gc.prototype.hd,gc.prototype.ge,"PRB"],Df);function Ef(a,b,c){x.call(this,"Disk",{id:a.ua+".disk"+ka(++Ff,4)},Ef,8192);this.controller=a;this.l=a.l;this.G=a.G;this.h=b;this.oa=b.name;this.vb=b.vb;Gf(this,c,b.P,b.T,b.O,b.W);E(this)}var Ff=0;z(Ef);h=Ef.prototype;h.ga=function(a,b,c,d){this.G=d};
|
var Af={},sf=(Af[65384]=[null,null,dc.prototype.md,dc.prototype.ke,"PRS"],Af[65386]=[null,null,dc.prototype.ld,dc.prototype.je,"PRB"],Af);function Bf(a,b,c){y.call(this,"Disk",{id:a.ta+".disk"+r(++Cf,4)},Bf,8192);this.controller=a;this.m=a.m;this.G=a.G;this.h=b;this.oa=b.name;this.vb=b.vb;Df(this,c,b.P,b.T,b.O,b.W);F(this)}var Cf=0;A(Bf);h=Bf.prototype;h.ga=function(a,b,c,d){this.G=d};
|
||||||
function Gf(a,b,c,d,e,f){a.mode=b;a.P=c;a.T=d;a.O=e;a.W=f;a.a=[];if("preload"!=a.mode){b=Array(a.P);for(c=0;c<b.length;c++){d=Array(a.T);for(e=0;e<d.length;e++){f=Array(a.O);for(var g=1;g<=f.length;g++)f[g-1]=Hf(null,c,e,g,a.W,0);d[e]=f}b[c]=d}a.a=b}a.b=null}
|
function Df(a,b,c,d,e,f){a.mode=b;a.P=c;a.T=d;a.O=e;a.W=f;a.a=[];if("preload"!=a.mode){b=Array(a.P);for(c=0;c<b.length;c++){d=Array(a.T);for(e=0;e<d.length;e++){f=Array(a.O);for(var g=1;g<=f.length;g++)f[g-1]=Ef(null,c,e,g,a.W,0);d[e]=f}b[c]=d}a.a=b}a.b=null}
|
||||||
function If(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.ea=c;a.Ob=r(c);a.g=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.P=e[0];a.T=e[1];a.O=e[2];a.W=e[3]||512;c=a.W>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.P);for(d=0;d<a.a.length;d++)for(var v=a.a[d]=Array(a.T),U=0;U<v.length;U++)for(var Aa=v[U]=Array(a.O),Ba=0;Ba<Aa.length;Ba++){for(var sc=Hf(null,d,U,Ba+1,a.W,0),tg=sc.data,tc=0;tc<c;tc++,f+=4)var ug=tg[tc]=b.getInt32(f,
|
function Ff(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.ea=c;a.Ob=t(c);a.g=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.P=e[0];a.T=e[1];a.O=e[2];a.W=e[3]||512;c=a.W>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.P);for(d=0;d<a.a.length;d++)for(var v=a.a[d]=Array(a.T),T=0;T<v.length;T++)for(var Aa=v[T]=Array(a.O),Ba=0;Ba<Aa.length;Ba++){for(var pc=Ef(null,d,T,Ba+1,a.W,0),qg=pc.data,qc=0;qc<c;qc++,f+=4)var rg=qg[qc]=b.getInt32(f,
|
||||||
!0),e=e+ug&-1;sc.fa=c;Aa[Ba]=sc}a.b=e;c=a}else a.D("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.h,c,a.oa,a.ea),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f,
|
!0),e=e+rg&-1;pc.fa=c;Aa[Ba]=pc}a.b=e;c=a}else a.C("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.h,c,a.oa,a.ea),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=ka(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"):la(c,"/")&&(d="dir"),f=ta()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!w(f,
|
||||||
null,!0,function(b,c,d){Jf(a,b,c,d)})}
|
null,!0,function(b,c,d){Gf(a,b,c,d)})}
|
||||||
function Jf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.S;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(0<r(a.Ob,!0).toLowerCase().indexOf("-readonly"))a.c=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.c=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.oa]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
function Gf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.m&&!a.m.o.S;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ta(a.controller.ta,b,c);try{if(0<t(a.Ob,!0).toLowerCase().indexOf("-readonly"))a.c=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.c=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.oa]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
||||||
c+")");if(k.length)if(1==k.length)w(k[0]);else{a.P=k.length;a.T=k[0].length;a.O=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d<a.P;d++)for(f=0;f<a.T;f++)for(g=0;g<a.O;g++)if(l=k[d][f][g]){var n=l.length;void 0===n&&(n=l.length=512);var n=n>>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,Aa=v.length;Aa<U;Aa++)v[Aa]=p;Kf(l,v)}else u=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=u;delete l.bytes}Hf(l,d,f);for(U=
|
c+")");if(k.length)if(1==k.length)x(k[0]);else{a.P=k.length;a.T=k[0].length;a.O=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d<a.P;d++)for(f=0;f<a.T;f++)for(g=0;g<a.O;g++)if(l=k[d][f][g]){var n=l.length;void 0===n&&(n=l.length=512);var n=n>>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var T=n<<2,Aa=v.length;Aa<T;Aa++)v[Aa]=p;Hf(l,v)}else u=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=u;delete l.bytes}Ef(l,d,f);for(T=
|
||||||
0;U<u.length;U++)c=c+u[U]&-1}a.a=k;a.b=c;e=a}else w("Empty disk image: "+a.oa)}catch(Ba){w("Disk image error ("+b+"): "+Ba.message)}}a.g&&(a.g.call(a.i,a.h,e,a.oa,a.ea),a.g=null)}function Hf(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Rf=b;a.Sf=c;a.pa=a.fa=0;a.za=!1;return a}function Lf(a){return a.a.length?[a.a.length,a.a[0].length,a.a[0][0].length,a.a[0][0][0].length]:[0,0,0,0]}
|
0;T<u.length;T++)c=c+u[T]&-1}a.a=k;a.b=c;e=a}else x("Empty disk image: "+a.oa)}catch(Ba){x("Disk image error ("+b+"): "+Ba.message)}}a.g&&(a.g.call(a.i,a.h,e,a.oa,a.ea),a.g=null)}function Ef(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Uf=b;a.Vf=c;a.pa=a.fa=0;a.ya=!1;return a}function If(a){return a.a.length?[a.a.length,a.a[0].length,a.a[0][0].length,a.a[0][0][0].length]:[0,0,0,0]}
|
||||||
h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!k&&f.zc&&b<f.T)for(k=g[b]=Array(f.Ub),g=0;g<k.length;g++)k[g]=Hf(null,a,b,g+1,f.Mb,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.zc&&9==f.Hb&&(d=k[g]=Hf(null,a,b,f.Hb,f.Mb,0))}}e&&e(d,!1);return d};function Kf(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!k&&f.Cc&&b<f.T)for(k=g[b]=Array(f.Vb),g=0;g<k.length;g++)k[g]=Ef(null,a,b,g+1,f.Mb,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.Cc&&9==f.Hb&&(d=k[g]=Ef(null,a,b,f.Hb,f.Mb,0))}}e&&e(d,!1);return d};function Hf(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||||
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.fa?f<a.pa?(a.fa+=a.pa-f,a.pa=f):f>=a.pa+a.fa&&(a.fa+=f-(a.pa+a.fa)+1):(a.pa=f,a.fa=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.fa?f<a.pa?(a.fa+=a.pa-f,a.pa=f):f>=a.pa+a.fa&&(a.fa+=f-(a.pa+a.fa)+1):(a.pa=f,a.fa=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||||
function Mf(a,b){var c=a.T*a.O,d=b/c|0;return d<a.P?(b%=c,a.seek(d,b/a.O|0,b%a.O+1)):null}function Nf(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Of(a){for(var b="",c=0,d;d=Mf(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Nf(a,d,e));return btoa(b)}
|
function Jf(a,b){var c=a.T*a.O,d=b/c|0;return d<a.P?(b%=c,a.seek(d,b/a.O|0,b%a.O+1)):null}function Kf(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Lf(a){for(var b="",c=0,d;d=Jf(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Kf(a,d,e));return btoa(b)}
|
||||||
h.save=function(){var a=0,b=[];b[a++]=[this.ea,this.b,this.P,this.T,this.O,this.W];if(!this.c)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.fa){for(var k=[],l=0,n=g.pa,p=g.pa+g.fa;n<p;)k[l++]=g.data[n++];b[a++]=[d,e,f,g.pa,k]}}return b};
|
h.save=function(){var a=0,b=[];b[a++]=[this.ea,this.b,this.P,this.T,this.O,this.W];if(!this.c)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.fa){for(var k=[],l=0,n=g.pa,p=g.pa+g.fa;n<p;)k[l++]=g.data[n++];b[a++]=[d,e,f,g.pa,k]}}return b};
|
||||||
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.a.length&&6<=e.length?Gf(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.b&&e[1]!=this.b&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.b+")",b=-2));for(this.a.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],n=g[f++];if(k>=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+
|
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.a.length&&6<=e.length?Df(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.b&&e[1]!=this.b&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.b+")",b=-2));for(this.a.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],n=g[f++];if(k>=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;l<e;)k.data[l++]=k.pattern;l=0;k.pa=e;for(k.fa=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.D("Unable to restore disk '"+this.oa+": "+c);return b};
|
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;l<e;)k.data[l++]=k.pattern;l=0;k.pa=e;for(k.fa=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.C("Unable to restore disk '"+this.oa+": "+c);return b};
|
||||||
h.toJSON=function(){var a;a=0;for(var b;b=Mf(this,a++);)Pf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
h.toJSON=function(){var a;a=0;for(var b;b=Jf(this,a++);)Mf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Pf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.B=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
|
function Mf(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){y.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.l=0;this.c=Array(8);this.B=!za("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype;
|
||||||
h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Qf(d,a)},!0;case "loadDrive":return this.j[b]=
|
h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){x("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Nf(d,a)},!0;case "loadDrive":return this.j[b]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&Rf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&Of(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Ca(Lf(a),a.Ob.replace(".json",".img")),x(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Rf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Of(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=zc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Sf(this);this.Ra=$b(144,5,65536);fb(b,this,Tf);hb(b,this.reset.bind(this));Uf(this,"None","",!0);this.B&&Uf(this,"Local Disk","?");Uf(this,"Remote Disk","??");Vf(this)||E(this)};
|
h.ga=function(a,b,c,d){this.m=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.m,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){x(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Pf(this);this.Ra=Xb(144,5,65536);eb(b,this,Qf);gb(b,this.reset.bind(this));Rf(this,"None","",!0);this.B&&Rf(this,"Local Disk","?");Rf(this,"Remote Disk","??");Sf(this)||F(this)};
|
||||||
h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)Wf(this,a,!0);Vf(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Qf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Sf(this)};h.save=function(){return(new O(this)).data()};
|
h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.m.Lb){for(a=0;a<this.c.length;a++)Tf(this,a,!0);Sf(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Nf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Pf(this)};h.save=function(){return(new O(this)).data()};
|
||||||
h.restore=function(a){return Sf(this,a[0])};function Vf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!Xf(a,g,f,e,!0)&&b&&E(a,!1);continue}a.D("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.m}
|
h.restore=function(a){return Pf(this,a[0])};function Sf(a,b){b||(a.l=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=t(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!Uf(a,g,f,e,!0)&&b&&F(a,!1);continue}a.C("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.l}
|
||||||
function Rf(a,b,c,d){var e=a.j.listDrives,e=e&&q(e.value);if(void 0===e||0>e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Xf(a,e,b,c,!1,d)}else Wf(a,e)}
|
function Of(a,b,c,d){var e=a.j.listDrives,e=e&&q(e.value);if(void 0===e||0>e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('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=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}Uf(a,e,b,c,!1,d)}else Tf(a,e)}
|
||||||
function Xf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,Wf(a,b,!0),k.Ka?a.D("RK11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.m++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.pc)&&g++));return g}
|
function Uf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,Tf(a,b,!0),k.Ha?a.C("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.l++),k.za=!!f,Ff(new Bf(a,k,"preload"),c,d,f,a.sc)&&g++));return g}
|
||||||
h.pc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.m||E(this));Qf(this,a.La)};
|
h.sc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=If(b),b&&f[0]>a.P||f[1]>a.T)&&(this.C('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.C('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.m&&Cc(this.m)):a.za=!1;a.Ga&&(a.Ga=!1,--this.l||F(this));Nf(this,a.Ia)};
|
||||||
function Uf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function Rf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Qf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=q(a.value),c=c.Aa?"?":c.ea,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Wf(a,b,c){var d=a.c[b];if(d.L||!1===c)d.oa="",d.ea="",d.L=null,d.Aa=!1,c||(a.D("Drive RK"+b+" unloaded",c),Qf(a,b))}
|
function Nf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=q(a.value),c=c.za?"?":c.ea,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Tf(a,b,c){var d=a.c[b];if(d.L||!1===c)d.oa="",d.ea="",d.L=null,d.za=!1,c||(a.C("Drive RK"+b+" unloaded",c),Nf(a,b))}
|
||||||
function Sf(a,b){var c=0;b||(b=[]);a.w=b[c++]||2496;a.i=b[c++]||0;a.A=b[c++]||128;a.s=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.C=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.La=b;d.Ka=d.Aa=!1;d.name=c.Ca;d.P=203;d.T=2;d.O=12;d.W=512;d.vb=!0;d.Ac=0;d.yc=0;d.Hb=1;d.Ub=d.O;d.Mb=d.W;d.Gc=0;d.Td=null;d.L||(d.ea="");d.status=2496}return!0}h.oc=function(a,b,c,d,e,f){this.h=f&65535;this.A=this.A&-49|f>>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.A|=49152);return!0};
|
function Pf(a,b){var c=0;b||(b=[]);a.w=b[c++]||2496;a.i=b[c++]||0;a.A=b[c++]||128;a.s=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.D=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.za=!1;d.name=c.Ba;d.P=203;d.T=2;d.O=12;d.W=512;d.vb=!0;d.Dc=0;d.Bc=0;d.Hb=1;d.Vb=d.O;d.Mb=d.W;d.Jc=0;d.Wd=null;d.L||(d.ea="");d.status=2496}return!0}h.rc=function(a,b,c,d,e,f){this.h=f&65535;this.A=this.A&-49|f>>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.A|=49152);return!0};
|
||||||
h.qc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Wb(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};
|
h.tc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Tb(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};
|
||||||
h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Wb(this.g)){k=1024;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};h.vd=function(){return this.w};h.te=function(){};h.wd=function(){return this.i};h.ue=function(){};h.sd=function(){return this.A&61438};
|
h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Tb(this.g)){k=1024;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=64;break}}return g(k,b,c,d,e,f)};h.yd=function(){return this.w};h.we=function(){};h.zd=function(){return this.i};h.xe=function(){};h.vd=function(){return this.A&61438};
|
||||||
h.qe=function(a){this.A=this.A&-3968|a&3967;if(this.A&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.A&=-129;switch(this.A&14){case 0:this.w=d.status;this.i=0;this.A=128;this.b=0;break;case 4:b=this.qc;case 2:b||(b=this.rc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.P?(this.i|=32832,this.A|=49152):g>=d.O?(this.i|=32800,this.A|=49152):(k=(this.A&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.oc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.A&=
|
h.te=function(a){this.A=this.A&-3968|a&3967;if(this.A&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.A&=-129;switch(this.A&14){case 0:this.w=d.status;this.i=0;this.A=128;this.b=0;break;case 4:b=this.tc;case 2:b||(b=this.uc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.P?(this.i|=32832,this.A|=49152):g>=d.O?(this.i|=32800,this.A|=49152):(k=(this.A&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.rc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.A&=
|
||||||
-2,this.A|=128,this.A&64&&Yb(this.a,this.Ra))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a};
|
-2,this.A|=128,this.A&64&&Vb(this.a,this.Ra))}};h.Ad=function(){return this.s};h.ye=function(a){this.s=a};h.ud=function(){return this.h};h.se=function(a){this.h=a};h.wd=function(){return this.b};h.ue=function(a){this.b=a};h.xd=function(){return this.D};h.ve=function(a){this.D=a};
|
||||||
var Yf={},Tf=(Yf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Yf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Yf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Yf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Yf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Yf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Yf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Yf);
|
var Vf={},Qf=(Vf[65280]=[null,null,N.prototype.yd,N.prototype.we,"RKDS"],Vf[65282]=[null,null,N.prototype.zd,N.prototype.xe,"RKER"],Vf[65284]=[null,null,N.prototype.vd,N.prototype.te,"RKCS"],Vf[65286]=[null,null,N.prototype.Ad,N.prototype.ye,"RKWC"],Vf[65288]=[null,null,N.prototype.ud,N.prototype.se,"RKBA"],Vf[65290]=[null,null,N.prototype.wd,N.prototype.ue,"RKDA"],Vf[65294]=[null,null,N.prototype.xd,N.prototype.ve,"RKDB"],Vf);
|
||||||
function M(a){x.call(this,"RL11",a,M,131072);this.B=a.autoMount||{};this.v=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
|
function M(a){y.call(this,"RL11",a,M,131072);this.B=a.autoMount||{};this.v=0;this.c=Array(4);this.w=!za("Mobi")&&window&&"FileReader"in window}A(M);h=M.prototype;
|
||||||
h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Zf(d,a)},!0;case "loadDrive":return this.j[b]=
|
h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){x("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Wf(d,a)},!0;case "loadDrive":return this.j[b]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&$f(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&Xf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Ca(Lf(a),a.Ob.replace(".json",".img")),x(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;$f(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Xf(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=zc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.B[e]=a[e]);ag(this);this.Ra=$b(112,5,131072);fb(b,this,bg);hb(b,this.reset.bind(this));cg(this,"None","",!0);this.w&&cg(this,"Local Disk","?");cg(this,"Remote Disk","??");dg(this)||E(this)};
|
h.ga=function(a,b,c,d){this.m=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.m,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){x(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.B[e]=a[e]);Yf(this);this.Ra=Xb(112,5,131072);eb(b,this,Zf);gb(b,this.reset.bind(this));$f(this,"None","",!0);this.w&&$f(this,"Local Disk","?");$f(this,"Remote Disk","??");ag(this)||F(this)};
|
||||||
h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)eg(this,a,!0);dg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Zf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){ag(this)};h.save=function(){return(new O(this)).data()};
|
h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.m.Lb){for(a=0;a<this.c.length;a++)bg(this,a,!0);ag(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Wf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Yf(this)};h.save=function(){return(new O(this)).data()};
|
||||||
h.restore=function(a){return ag(this,a[0])};function dg(a,b){b||(a.v=0);for(var c in a.B){var d=a.B[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!fg(a,g,f,e,!0)&&b&&E(a,!1);continue}a.D("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.v}
|
h.restore=function(a){return Yf(this,a[0])};function ag(a,b){b||(a.v=0);for(var c in a.B){var d=a.B[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=t(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!cg(a,g,f,e,!0)&&b&&F(a,!1);continue}a.C("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.v}
|
||||||
function $f(a,b,c,d){var e=a.j.listDrives,e=e&&q(e.value);if(void 0===e||0>e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}fg(a,e,b,c,!1,d)}else eg(a,e)}
|
function Xf(a,b,c,d){var e=a.j.listDrives,e=e&&q(e.value);if(void 0===e||0>e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('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=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}cg(a,e,b,c,!1,d)}else bg(a,e)}
|
||||||
function fg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,eg(a,b,!0),k.Ka?a.D("RL11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.v++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
|
function cg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,bg(a,b,!0),k.Ha?a.C("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.v++),k.za=!!f,Ff(new Bf(a,k,"preload"),c,d,f,a.wc)&&g++));return g}
|
||||||
h.tc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.v||E(this));Zf(this,a.La)};
|
h.wc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=If(b),b&&f[0]>a.P||f[1]>a.T)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.m&&Cc(this.m)):a.za=!1;a.Ga&&(a.Ga=!1,--this.v||F(this));Wf(this,a.Ia)};
|
||||||
function cg(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function $f(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Zf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=q(a.value),c=c.Aa?"?":c.ea,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function eg(a,b,c){var d=a.c[b];if(d.L||!1===c)d.oa="",d.ea="",d.L=null,d.Aa=!1,c||(a.D("Drive RL"+b+" unloaded",c),Zf(a,b))}
|
function Wf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=q(a.value),c=c.za?"?":c.ea,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function bg(a,b,c){var d=a.c[b];if(d.L||!1===c)d.oa="",d.ea="",d.L=null,d.za=!1,c||(a.C("Drive RL"+b+" unloaded",c),Wf(a,b))}
|
||||||
function ag(a,b){var c=0;b||(b=[]);a.A=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.i=b[c++]||0;a.s=b[c++]||0;a.m=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.La=b;d.Ka=d.Aa=!1;d.name=c.Ca;d.P=512;d.T=2;d.O=40;d.W=256;d.vb=!0;d.Ac=0;d.yc=0;d.Hb=1;d.Ub=d.O;d.Mb=d.W;d.Gc=0;d.Td=null;d.L||(d.ea="");d.status=29|(512==d.P?128:0)}return!0}
|
function Yf(a,b){var c=0;b||(b=[]);a.A=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.i=b[c++]||0;a.s=b[c++]||0;a.l=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.za=!1;d.name=c.Ba;d.P=512;d.T=2;d.O=40;d.W=256;d.vb=!0;d.Dc=0;d.Bc=0;d.Hb=1;d.Vb=d.O;d.Mb=d.W;d.Jc=0;d.Wd=null;d.L||(d.ea="");d.status=29|(512==d.P?128:0)}return!0}
|
||||||
h.sc=function(a,b,c,d,e,f){this.h=f&65535;this.A=this.A&-49|f>>12&48;this.m=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.s=65536-e&65535;a&&(this.A=this.A|a|32768);return!0};
|
h.vc=function(a,b,c,d,e,f){this.h=f&65535;this.A=this.A&-49|f>>12&48;this.l=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.s=65536-e&65535;a&&(this.A=this.A|a|32768);return!0};
|
||||||
h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Wb(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};
|
h.xc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.L.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.L.read(n,p++))||0>(v=a.L.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Tb(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};
|
||||||
h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Wb(this.g)){k=8192;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Ad=function(){return this.A&65535};
|
h.yc=function(a,b,c,d,e,f,g){var k=0,l=a.L,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Tb(this.g)){k=8192;break}f+=2;if(!n){n=a.L.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.L.write(n,p++,u&255)||!a.L.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.O&&(d=0,++c>=l.T&&(c=0,++b>=l.P)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Dd=function(){return this.A&65535};
|
||||||
h.ye=function(a){this.A=this.A&-1023|a&1022;this.m=this.m&60|(a&48)>>4;if(!(this.A&128)){var b;a=!0;var c=this.c[(this.A&768)>>8],d,e,f,g;this.A&=-2;switch(this.A&14){case 4:this.b&8&&(this.A&=63);this.s=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.uc;case 10:b||(b=this.vc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.P||f>=c.O?this.A|=37888:(g=(this.m&
|
h.Be=function(a){this.A=this.A&-1023|a&1022;this.l=this.l&60|(a&48)>>4;if(!(this.A&128)){var b;a=!0;var c=this.c[(this.A&768)>>8],d,e,f,g;this.A&=-2;switch(this.A&14){case 4:this.b&8&&(this.A&=63);this.s=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.xc;case 10:b||(b=this.yc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.P||f>=c.O?this.A|=37888:(g=(this.l&
|
||||||
63)<<16|this.h,a=65536-this.s&65535,a=b.call(this,c,d,e,f,a,g,this.sc.bind(this)))}a&&(this.A|=129,this.A&64&&Yb(this.a,this.Ra))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.s};h.Ae=function(a){this.s=a};h.zd=function(){return this.m};h.xe=function(a){this.m=a&63;this.A=this.A&-49|(this.m&3)<<4};
|
63)<<16|this.h,a=65536-this.s&65535,a=b.call(this,c,d,e,f,a,g,this.vc.bind(this)))}a&&(this.A|=129,this.A&64&&Vb(this.a,this.Ra))}};h.Bd=function(){return this.h};h.ze=function(a){this.h=a&65534};h.Ed=function(){return this.b};h.Ce=function(a){this.b=a};h.Fd=function(){return this.s};h.De=function(a){this.s=a};h.Cd=function(){return this.l};h.Ae=function(a){this.l=a&63;this.A=this.A&-49|(this.l&3)<<4};
|
||||||
var gg={},bg=(gg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],gg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],gg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],gg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],gg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],gg);
|
var dg={},Zf=(dg[63744]=[null,null,M.prototype.Dd,M.prototype.Be,"RLCS"],dg[63746]=[null,null,M.prototype.Bd,M.prototype.ze,"RLBA"],dg[63748]=[null,null,M.prototype.Ed,M.prototype.Ce,"RLDA"],dg[63750]=[null,null,M.prototype.Fd,M.prototype.De,"RLMP"],dg[63752]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLBE"],dg);
|
||||||
function hg(a,b,c){x.call(this,"Computer",a,hg,33554432);this.o.S=!1;ig(this,b);this.w=zc(this,"autoPower",a);this.l=0;this.M=a.busWidth||a.buswidth;this.b=jg;this.s=null;this.i=this.I=!1;this.R=zc(this,"url")||"";(Math.random()+.1).toString(36);this.c=kg(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.M},this.a,this.G);var d,e=A(this.id);if((this.B=Wa("Panel",this.id))&&this.B.hb)for(b=0;b<e.length;b++)d=e[b],d.D=this.B.D,d.X=this.B.X,
|
function eg(a,b,c){y.call(this,"Computer",a,eg,33554432);this.o.S=!1;fg(this,b);this.w=wc(this,"autoPower",a);this.m=0;this.M=a.busWidth||a.buswidth;this.b=gg;this.s=null;this.i=this.J=!1;this.R=wc(this,"url")||"";(Math.random()+.1).toString(36);this.c=hg(this);if(this.a=Va("CPU",this.id)){this.G=Va("Debugger",this.id);this.g=new xb({id:this.ta+".bus",busWidth:this.M},this.a,this.G);var d,e=B(this.id);if((this.B=Va("Panel",this.id))&&this.B.hb)for(b=0;b<e.length;b++)d=e[b],d.C=this.B.C,d.X=this.B.X,
|
||||||
d.hb=this.B.hb;this.X("PDPjs v1.30.5\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.ga&&d.ga(this,this.g,this.a,this.G);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.m=d:this.b=parseInt(d,10));var f;if(a=zc(this,"state")||(f=!0,a.state))b=this.C=a,f||(this.i=!0,this.b=jg),this.b&&(this.v=
|
d.hb=this.B.hb;this.X("PDPjs v1.30.5\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.ga&&d.ga(this,this.g,this.a,this.G);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.l=d:this.b=parseInt(d,10));var f;if(a=wc(this,"state")||(f=!0,a.state))b=this.D=a,f||(this.i=!0,this.b=gg),this.b&&(this.v=
|
||||||
new O(this,"1.30.5"),lg(this.v)?b=null:delete this.v);!b&&this.b&&(b=mg(this))&&(this.i=!0);if(b){var g=this;t(b,null,!0,function(a,b,c){c?(g.m=null,g.i=!1,g.D("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(g.s=b,g.I=!0);E(g)})}else E(this);this.j.power||(this.w=!0);!c&&this.w&&ng(this,this.ib)}else w("Unable to find CPU component")}z(hg);var jg=0;
|
new O(this,"1.30.5"),ig(this.v)?b=null:delete this.v);!b&&this.b&&(b=jg(this))&&(this.i=!0);if(b){var g=this;w(b,null,!0,function(a,b,c){c?(g.l=null,g.i=!1,g.C("Unable to load machine state from server (error "+c+(b?": "+oa(b):"")+")")):(g.s=b,g.J=!0);F(g)})}else F(this);this.j.power||(this.w=!0);!c&&this.w&&kg(this,this.ib)}else x("Unable to find CPU component")}A(eg);var gg=0;
|
||||||
function ig(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.K=b}function zc(a,b,c){var d=b.toLowerCase(),d=Oa[b]||Oa[d];void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function ng(a,b,c){for(var d=A(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ya(f)){Ya(f,function(){ng(a,b,c)});return}}b.call(a,c)}
|
function fg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){x(d.message+" ("+c+")")}}a.K=b}function wc(a,b,c){var d=b.toLowerCase(),d=Na[b]||Na[d];void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function kg(a,b,c){for(var d=B(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Xa(f)){Xa(f,function(){kg(a,b,c)});return}}b.call(a,c)}
|
||||||
function og(a,b){var c=new O(a,"1.30.5","validate");if(lg(c)&&pg(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.D("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=hg.prototype;
|
function lg(a,b){var c=new O(a,"1.30.5","validate");if(ig(c)&&mg(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.C("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=eg.prototype;
|
||||||
h.ib=function(a){void 0===a&&(a=this.b||(this.s?1:jg));if(!this.l){this.l++;var b=!1,c=!1;this.H=!1;var d=this.v||new O(this,"1.30.5");if(-1==a)b=!0;else if(a>jg){if(lg(d,this.s)){this.h=new O(this,"1.30.5","failsafe");lg(this.h)&&(qg(this,d),a=2,rg(this.h));this.h.set("timestamp",sa());sg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=pg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?lg(d,g):("error"==
|
h.ib=function(a){void 0===a&&(a=this.b||(this.s?1:gg));if(!this.m){this.m++;var b=!1,c=!1;this.H=!1;var d=this.v||new O(this,"1.30.5");if(-1==a)b=!0;else if(a>gg){if(ig(d,this.s)){this.h=new O(this,"1.30.5","failsafe");ig(this.h)&&(ng(this,d),a=2,og(this.h));this.h.set("timestamp",ra());pg(this.h);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=mg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ig(d,g):("error"==
|
||||||
f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.X(f+": "+g),rg(d),lg(d)?(c=pg(d),e=!0):c=!1))}e&&og(this,c?d:null)}else 2==a&&d.clear()}else og(this);delete this.s;delete this.v}e=A(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.a&&(c=vg(this,g,d,b,c));b=[d,a,c];-1!=a?ng(this,this.Vb,b):this.Vb(b)}};
|
f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(ya("user",""),this.c=null)):this.X(f+": "+g),og(d),ig(d)?(c=mg(d),e=!0):c=!1))}e&&lg(this,c?d:null)}else 2==a&&d.clear()}else lg(this);delete this.s;delete this.v}e=B(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.a&&(c=sg(this,g,d,b,c));b=[d,a,c];-1!=a?kg(this,this.Wb,b):this.Wb(b)}};
|
||||||
function vg(a,b,c,d,e){if(!b.o.S){b.o.S=!0;if(b.ia){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ia(f,d)&&f&&(w("Unable to restore state for "+b.type),a.C&&!a.I?(c.clear(),a.b=jg,window&&window.location.reload()):a.H=!0,b.ia(null),e=!1)}if(!d&&b.Xb)for(a=b.Xb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function sg(a,b,c,d,e){if(!b.o.S){b.o.S=!0;if(b.ia){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ia(f,d)&&f&&(x("Unable to restore state for "+b.type),a.D&&!a.J?(c.clear(),a.b=gg,window&&window.location.reload()):a.H=!0,b.ia(null),e=!1)}if(!d&&b.Yb)for(a=b.Yb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
h.Vb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.S=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(vg(this,this.a,b,c,a),this.Ba(),this.a.gb());this.H&&(qg(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
|
h.Wb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.S=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(sg(this,this.a,b,c,a),this.Aa(),this.a.gb());this.H&&(ng(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.m=0};
|
||||||
function qg(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.R;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function ng(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.5"};d.url=a.R;d.user=c;d.type="bug";d.data=b;w("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||||
function wg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ha&&(c&&F(a.a),d=a.a.ha(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.S=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l<k.length;l++){var n=k[l];n.o.S&&(n.ha&&(d=n.ha(b,c),"object"===typeof d&&f.set(n.id,
|
function tg(a,b,c){var d,e="none";if(a.m)return null;a.m--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=ra();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ha&&(c&&G(a.a),d=a.a.ha(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.S=!1,!1===d&&(e=null)));for(var k=B(a.id),l=0;l<k.length;l++){var n=k[l];n.o.S&&(n.ha&&(d=n.ha(b,c),"object"===typeof d&&f.set(n.id,
|
||||||
d)),c&&(n.o.S=!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.c&&xg(a,a.c,f.toString()),sg(g)&&sg(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=3==a.b),d&&f.clear(k)):e=f.toString());c&&(a.o.S=!1,b=a.j.power)&&(b.textContent="Power");a.l=0;return e}h.reset=function(){this.g&&this.g.reset&&this.g.reset();this.a&&this.a.reset&&this.a.reset();for(var a=A(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.g&&c!==this.a&&c.reset&&c.reset()}this.Ba(-1)};
|
d)),c&&(n.o.S=!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.c&&ug(a,a.c,f.toString()),pg(g)&&pg(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=3==a.b),d&&f.clear(k)):e=f.toString());c&&(a.o.S=!1,b=a.j.power)&&(b.textContent="Power");a.m=0;return e}h.reset=function(){this.g&&this.g.reset&&this.g.reset();this.a&&this.a.reset&&this.a.reset();for(var a=B(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.g&&c!==this.a&&c.reset&&c.reset()}this.Aa(-1)};
|
||||||
h.start=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.Ba(-1)};h.stop=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.Ba(-1)};
|
h.start=function(a,b){for(var c=B(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.Aa(-1)};h.stop=function(a,b){for(var c=B(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.Aa(-1)};
|
||||||
h.Ba=function(a){if(this.a){var b=this.a,c=a||0,d=b.j.speed;d&&(0>=c||30<=(b.Db+=c))&&(d.textContent=b.o.U?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.B&&(b=this.B,a=a||0,b.v)){c=b.a.o.U;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e<b.a.f.length;e++)nb(b,"R"+e,b.a.f[e]);e=ec(b.a);nb(b,"PS",e);nb(b,"NF",e&8?1:0,1);nb(b,"ZF",e&4?1:0,1);nb(b,"VF",e&2?1:0,1);nb(b,"CF",e&1?1:0,1);b.s=0}vb(b,0<a&&c&&!d?b.a.fb:b.ja);ub(b,b.m);a=b.a;a=a.ka?a.Ha&16?1:2:4;wb(b,"B22",a&1);wb(b,"B18",a&2);wb(b,"B16",
|
h.Aa=function(a){if(this.a){var b=this.a,c=a||0,d=b.j.speed;d&&(0>=c||30<=(b.Db+=c))&&(d.textContent=b.o.U?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.B&&(b=this.B,a=a||0,b.v)){c=b.a.o.U;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e<b.a.f.length;e++)mb(b,"R"+e,b.a.f[e]);e=bc(b.a);mb(b,"PS",e);mb(b,"NF",e&8?1:0,1);mb(b,"ZF",e&4?1:0,1);mb(b,"VF",e&2?1:0,1);mb(b,"CF",e&1?1:0,1);b.s=0}ub(b,0<a&&c&&!d?b.a.fb:b.ja);tb(b,b.l);a=b.a;a=a.ka?a.Ea&16?1:2:4;vb(b,"B22",a&1);vb(b,"B18",a&2);vb(b,"B16",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
h.ba=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.l||(d.o.S?wg(d,!1,!0):ng(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.S&&!d.l)if(d.b&&!d.m){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");wg(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Lb=!0),d.ib(jg),d.Lb=!1)}else d.reset(),d.a&&d.a.gb()},!0;case "save":if(ma(ua(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
|
h.ba=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.m||(d.o.S?tg(d,!1,!0):kg(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.S&&!d.m)if(d.b&&!d.l){var a=ua("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");tg(d,a,!0);!a&&d.D?window&&window.location.reload():(a||(d.Lb=!0),d.ib(gg),d.Lb=!1)}else d.reset(),d.a&&d.a.gb()},!0;case "save":if(la(ta(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
|
||||||
c,c.onclick=function(){var a=kg(d,!0);if(a){var b=!!(d.b&&!d.m||d.C),c=wg(d,b);b?xg(d,a,c):d.D("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=hg(d,!0);if(a){var b=!!(d.b&&!d.l||d.D),c=tg(d,b);b?ug(d,a,c):d.C("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function kg(a,b){var c=a.c;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=yg(a,c))||a.D("The user ID is invalid.")):b&&a.D("Browser local storage is not available"));return c}
|
function hg(a,b){var c=a.c;c||((c=xa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=vg(a,c))||a.C("The user ID is invalid.")):b&&a.C("Browser local storage is not available"));return c}
|
||||||
function yg(a,b){a.c=null;b=t(ua()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(za("user",b.data),a.c=b.data)}catch(d){w(d.message+" ("+c+")")}return a.c}function mg(a){var b=null;a.c&&(b=ua()+"/api/v1/user?req=load&user="+a.c+"&state="+zg(a,"1.30.5"));return b}
|
function vg(a,b){a.c=null;b=w(ta()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(ya("user",b.data),a.c=b.data)}catch(d){x(d.message+" ("+c+")")}return a.c}function jg(a){var b=null;a.c&&(b=ta()+"/api/v1/user?req=load&user="+a.c+"&state="+wg(a,"1.30.5"));return b}
|
||||||
function xg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=zg(a,"1.30.5");d.data=c;b=t(ua()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.D("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.D(c),za("user",""),a.c=null)}}
|
function ug(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=wg(a,"1.30.5");d.data=c;b=w(ta()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.C("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.C(c),ya("user",""),a.c=null)}}
|
||||||
function tf(a){var b;a=A(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}function Fc(a){if(a.hb){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.hb.focus();window&&window.scrollTo(b,c)}}Ja(function(){for(var a=D(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=B(c),c=D(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=B(f),g=new hg(g,d,!0);C(g,f);g.w&&ng(g,g.ib)}});
|
function qf(a){var b;a=B(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}function Cc(a){if(a.hb){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.hb.focus();window&&window.scrollTo(b,c)}}Ia(function(){for(var a=E(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=C(c),c=E(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=C(f),g=new eg(g,d,!0);D(g,f);g.w&&kg(g,g.ib)}});
|
||||||
Ea.show.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.V&&!c.o.S&&c.ib(-1)}});Ea.exit.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.o.S&&wg(c,!(!c.b||c.m),!0)}});function O(a,b,c){this.id=a.id;this.key=zg(a,b,c);this.G=a.G;rg(this,a.Kc)}function zg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
Da.show.push(function(){for(var a=E(document,"pdp11","computer"),b=0;b<a.length;b++){var c=C(a[b]);(c=Va("Computer",c.id))&&c.V&&!c.o.S&&c.ib(-1)}});Da.exit.push(function(){for(var a=E(document,"pdp11","computer"),b=0;b<a.length;b++){var c=C(a[b]);(c=Va("Computer",c.id))&&c.o.S&&tg(c,!(!c.b||c.l),!0)}});function O(a,b,c){this.id=a.id;this.key=wg(a,b,c);this.G=a.G;og(this,a.Nc)}function wg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){rg(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){og(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
||||||
1);c=0}}};function rg(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function sg(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);za(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function pg(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function lg(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.a=!0):!1}var Ag=0;
|
1);c=0}}};function og(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function pg(a){var b=!0;if(wa()){var c=JSON.stringify(a[a.id]);ya(a.key,c)||(x("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function mg(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){x(c.message||c),b=!1}return b}function ig(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:wa()&&(b=xa(a.key))?(a[a.id]=b,a.a=!0):!1}var xg=0;
|
||||||
function Bg(a,b,c,d,e,f){e("Loading "+a+"...");t(a,null,!0,function(g,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),f(k,null)):Cg(k,a,b,c,d,e,f)})}
|
function yg(a,b,c,d,e,f){e("Loading "+a+"...");w(a,null,!0,function(g,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),f(k,null)):zg(k,a,b,c,d,e,f)})}
|
||||||
function Cg(a,b,c,d,e,f,g){function k(a,f){if(f)g(f,null);else{c&&(Ua(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
function zg(a,b,c,d,e,f,g){function k(a,f){if(f)g(f,null);else{c&&(Ta(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
||||||
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Dg(a,f,k):k(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Ag(a,f,k):k(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
||||||
function Dg(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");t(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
function Ag(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");w(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||||
"");a=a.replace(d[0],g);Dg(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],g);Ag(a,b,c)}})}else c(a,null)}
|
||||||
function Eg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Ag||La(!0));l=!1}var g,k,l=!0;Ag++;Ta[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
|
function Bg(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=na(a))}function f(a){e("Error: "+a);l&&(--xg||Ka(!0));l=!1}var g,k,l=!0;xg++;Sa[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
|
||||||
(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?Bg(c,null,null,!1,e,function(d,l){l?(Ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Ag||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ag||La(!0)):f("invalid machine element: "+
|
(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?yg(c,null,null,!1,e,function(d,l){l?(Ta(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--xg||Ka(!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),--xg||Ka(!0)):f("invalid machine element: "+
|
||||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Bg(b,a,d,!0,e,n):Cg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return l}window.embedPDP11=function(a,b,c,d){La(!1);return Eg(a,b,c,d)};window.enableEvents=La;window.sendEvent=Ma;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11.map
|
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?yg(b,a,d,!0,e,n):zg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return l}window.embedPDP11=function(a,b,c,d){Ka(!1);return Bg(a,b,c,d)};window.enableEvents=Ka;window.sendEvent=La;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11.map
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue