Hacked the Bus component to permit devices to access the actual memory map (better solution will be maintain two separate maps: one for the CPU and a separate map for device access)
This commit is contained in:
parent
469d446ab7
commit
375146f6bb
9 changed files with 733 additions and 698 deletions
13
devices/pdp11/machine/1170/4mb/README.md
Normal file
13
devices/pdp11/machine/1170/4mb/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: PDP-11/70 with 4Mb and Front Panel
|
||||||
|
permalink: /devices/pdp11/machine/1170/4mb/debugger/
|
||||||
|
machines:
|
||||||
|
- id: test1170
|
||||||
|
type: pdp11
|
||||||
|
autoMount:
|
||||||
|
RL0:
|
||||||
|
path: http://archive.pcjs.org/disks/dec/rl01k/RL01K-RSTS-V70.json
|
||||||
|
---
|
||||||
|
|
||||||
|
{% include machine.html id="test1170" %}
|
||||||
15
devices/pdp11/machine/1170/4mb/debugger/README.md
Normal file
15
devices/pdp11/machine/1170/4mb/debugger/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: PDP-11/70 with 4Mb, Front Panel, and Debugger
|
||||||
|
permalink: /devices/pdp11/machine/1170/4mb/debugger/
|
||||||
|
machines:
|
||||||
|
- id: test1170
|
||||||
|
type: pdp11
|
||||||
|
debugger: true
|
||||||
|
autoStart: true
|
||||||
|
autoMount:
|
||||||
|
RL0:
|
||||||
|
path: http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json
|
||||||
|
---
|
||||||
|
|
||||||
|
{% include machine.html id="test1170" %}
|
||||||
15
devices/pdp11/machine/1170/4mb/debugger/machine.xml
Normal file
15
devices/pdp11/machine/1170/4mb/debugger/machine.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.5/machine.xsl"?>
|
||||||
|
<machine id="test1170" class="pdp11" border="1" pos="center" background="#FAEBD7">
|
||||||
|
<name pos="center">PDP-11/70 with 4Mb, Front Panel and Debugger</name>
|
||||||
|
<computer id="computer" busWidth="22"/>
|
||||||
|
<cpu id="cpu" model="1170" cycles="6666667"/>
|
||||||
|
<ram id="ram" addr="0x00000" size="0x3BC000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
||||||
|
<device id="default" type="default"/>
|
||||||
|
<serial id="dl11" adapter="0" binding="print"/>
|
||||||
|
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
|
||||||
|
<debugger id="debugger" base="8" messages="" commands=""/>
|
||||||
|
<device ref="/devices/pdp11/pc11/default.xml"/>
|
||||||
|
<device ref="/devices/pdp11/rk11/default.xml"/>
|
||||||
|
<device ref="/devices/pdp11/rl11/default.xml"/>
|
||||||
|
</machine>
|
||||||
14
devices/pdp11/machine/1170/4mb/machine.xml
Normal file
14
devices/pdp11/machine/1170/4mb/machine.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.5/machine.xsl"?>
|
||||||
|
<machine id="test1170" class="pdp11" border="1" pos="center" background="#FAEBD7">
|
||||||
|
<name pos="center">PDP-11/70 with 4Mb, Front Panel and Debugger</name>
|
||||||
|
<computer id="computer" busWidth="22"/>
|
||||||
|
<cpu id="cpu" model="1170" cycles="6666667"/>
|
||||||
|
<ram id="ram" addr="0x00000" size="0x3C0000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
||||||
|
<device id="default" type="default"/>
|
||||||
|
<serial id="dl11" adapter="0" binding="print"/>
|
||||||
|
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
|
||||||
|
<device ref="/devices/pdp11/pc11/default.xml"/>
|
||||||
|
<device ref="/devices/pdp11/rk11/default.xml"/>
|
||||||
|
<device ref="/devices/pdp11/rl11/default.xml"/>
|
||||||
|
</machine>
|
||||||
|
|
@ -103,6 +103,9 @@ 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:
|
||||||
|
|
@ -171,7 +174,6 @@ BusPDP11.IOPAGE_LENGTH = 0x2000; // ie, 8Kb
|
||||||
BusPDP11.IOPAGE_MASK = BusPDP11.IOPAGE_LENGTH - 1;
|
BusPDP11.IOPAGE_MASK = BusPDP11.IOPAGE_LENGTH - 1;
|
||||||
|
|
||||||
BusPDP11.UNIBUS_22BIT = 0x3C0000; /*017000000*/
|
BusPDP11.UNIBUS_22BIT = 0x3C0000; /*017000000*/
|
||||||
BusPDP11.MAX_MEMORY = BusPDP11.UNIBUS_22BIT - 16384; // Maximum memory address (need less memory for BSD 2.9 boot)
|
|
||||||
|
|
||||||
BusPDP11.ERROR = {
|
BusPDP11.ERROR = {
|
||||||
RANGE_INUSE: 1,
|
RANGE_INUSE: 1,
|
||||||
|
|
@ -497,6 +499,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange)
|
||||||
addr = (1 << nRange);
|
addr = (1 << nRange);
|
||||||
this.nBusMask = (addr - 1);
|
this.nBusMask = (addr - 1);
|
||||||
addr -= BusPDP11.IOPAGE_LENGTH;
|
addr -= BusPDP11.IOPAGE_LENGTH;
|
||||||
|
this.iBlockIOPageActive = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||||
this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
||||||
if (this.aIOPageBlocks) {
|
if (this.aIOPageBlocks) {
|
||||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPageBlocks);
|
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPageBlocks);
|
||||||
|
|
@ -922,17 +925,33 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.getByte = function(addr)
|
BusPDP11.prototype.getByte = function(addr)
|
||||||
{
|
{
|
||||||
/*
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr);
|
return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getBlockDirect(addr)
|
||||||
|
*
|
||||||
|
* This checks for block requests matching the active IOPAGE block and redirects to the original block;
|
||||||
|
* conversely, if the request is for the default IOPAGE block, then the request is redirected to the active
|
||||||
|
* IOPAGE block.
|
||||||
|
*
|
||||||
|
* @this {BusPDP11}
|
||||||
|
* @param {number} addr is a physical address
|
||||||
|
* @return {MemoryPDP11}
|
||||||
|
*/
|
||||||
|
BusPDP11.prototype.getBlockDirect = function(addr)
|
||||||
|
{
|
||||||
|
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||||
|
var block = this.aMemBlocks[iBlock];
|
||||||
|
if (iBlock == this.iBlockIOPageActive && this.aIOPrevBlocks.length) {
|
||||||
|
block = this.aIOPrevBlocks[0];
|
||||||
|
} else if (iBlock == this.iBlockIOPageDefault) {
|
||||||
|
block = this.aMemBlocks[this.iBlockIOPageActive];
|
||||||
|
}
|
||||||
|
return block;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getByteDirect(addr)
|
* getByteDirect(addr)
|
||||||
*
|
*
|
||||||
|
|
@ -944,17 +963,10 @@ BusPDP11.prototype.getByte = function(addr)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.getByteDirect = function(addr)
|
BusPDP11.prototype.getByteDirect = function(addr)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
this.fFault = false;
|
this.fFault = false;
|
||||||
this.nDisableFaults++;
|
this.nDisableFaults++;
|
||||||
var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
|
var b = this.getBlockDirect(addr).readByteDirect(addr & this.nBlockLimit, addr);
|
||||||
this.nDisableFaults--;
|
this.nDisableFaults--;
|
||||||
return b;
|
return b;
|
||||||
};
|
};
|
||||||
|
|
@ -968,14 +980,7 @@ BusPDP11.prototype.getByteDirect = function(addr)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.getWord = function(addr)
|
BusPDP11.prototype.getWord = function(addr)
|
||||||
{
|
{
|
||||||
/*
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
var off = addr & this.nBlockLimit;
|
var off = addr & this.nBlockLimit;
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
|
|
@ -995,23 +1000,16 @@ BusPDP11.prototype.getWord = function(addr)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.getWordDirect = function(addr)
|
BusPDP11.prototype.getWordDirect = function(addr)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
var w;
|
var w;
|
||||||
var off = addr & this.nBlockLimit;
|
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
|
||||||
this.fFault = false;
|
this.fFault = false;
|
||||||
this.nDisableFaults++;
|
this.nDisableFaults++;
|
||||||
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
|
var off = addr & this.nBlockLimit;
|
||||||
|
var block = this.getBlockDirect(addr);
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8);
|
w = block.readByteDirect(off, addr) | (this.getBlockDirect(addr + 1).readByteDirect(0, addr + 1) << 8);
|
||||||
} else {
|
} else {
|
||||||
w = this.aMemBlocks[iBlock].readWordDirect(off, addr);
|
w = block.readWordDirect(off, addr);
|
||||||
}
|
}
|
||||||
this.nDisableFaults--;
|
this.nDisableFaults--;
|
||||||
return w;
|
return w;
|
||||||
|
|
@ -1026,14 +1024,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 bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr);
|
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1049,17 +1040,10 @@ BusPDP11.prototype.setByte = function(addr, b)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.setByteDirect = function(addr, b)
|
BusPDP11.prototype.setByteDirect = function(addr, b)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
this.fFault = false;
|
this.fFault = false;
|
||||||
this.nDisableFaults++;
|
this.nDisableFaults++;
|
||||||
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
|
this.getBlockDirect(addr).writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
|
||||||
this.nDisableFaults--;
|
this.nDisableFaults--;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1072,14 +1056,7 @@ BusPDP11.prototype.setByteDirect = function(addr, b)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.setWord = function(addr, w)
|
BusPDP11.prototype.setWord = function(addr, w)
|
||||||
{
|
{
|
||||||
/*
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
var off = addr & this.nBlockLimit;
|
var off = addr & this.nBlockLimit;
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
|
|
@ -1102,23 +1079,16 @@ BusPDP11.prototype.setWord = function(addr, w)
|
||||||
*/
|
*/
|
||||||
BusPDP11.prototype.setWordDirect = function(addr, w)
|
BusPDP11.prototype.setWordDirect = function(addr, w)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the
|
|
||||||
* UNIBUS relocation map.
|
|
||||||
*/
|
|
||||||
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
|
||||||
addr = this.cpu.mapUnibus(addr);
|
|
||||||
}
|
|
||||||
var off = addr & this.nBlockLimit;
|
|
||||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
|
||||||
this.fFault = false;
|
this.fFault = false;
|
||||||
this.nDisableFaults++;
|
this.nDisableFaults++;
|
||||||
|
if (addr >= BusPDP11.UNIBUS_22BIT) addr = this.cpu.mapUnibus(addr);
|
||||||
|
var off = addr & this.nBlockLimit;
|
||||||
|
var block = this.getBlockDirect(addr);
|
||||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||||
this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr);
|
block.writeByteDirect(off, w & 0xff, addr);
|
||||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
|
this.getBlockDirect(addr + 1).writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
|
||||||
} else {
|
} else {
|
||||||
this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr);
|
block.writeWordDirect(off, w & 0xffff, addr);
|
||||||
}
|
}
|
||||||
this.nDisableFaults--;
|
this.nDisableFaults--;
|
||||||
};
|
};
|
||||||
|
|
@ -1246,8 +1216,8 @@ BusPDP11.prototype.restoreMemory = function(a)
|
||||||
/**
|
/**
|
||||||
* getMemorySize(type)
|
* getMemorySize(type)
|
||||||
*
|
*
|
||||||
* NOTE: The original pdp11.js defined MAX_MEMORY as IOBASE_UNIBUS - 16384, where IOBASE_UNIBUS
|
* NOTE: The original pdp11.js defined a constant named MAX_MEMORY equal to UNIBUS_22BIT - 16384,
|
||||||
* is 4Mb less 256Kb, and then it subtracted another 16Kb so that BSD 2.9 could boot.
|
* where UNIBUS_22BIT is 4Mb less 256Kb, from which it then subtracted another 16Kb "for BSD 2.9 boot."
|
||||||
*
|
*
|
||||||
* @this {BusPDP11}
|
* @this {BusPDP11}
|
||||||
* @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported)
|
* @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported)
|
||||||
|
|
|
||||||
|
|
@ -271,12 +271,15 @@ CPUStatePDP11.prototype.resetMMU = function()
|
||||||
this.mmuLastMode = 0;
|
this.mmuLastMode = 0;
|
||||||
this.mmuMask = 0x3ffff;
|
this.mmuMask = 0x3ffff;
|
||||||
|
|
||||||
this.lastAddr = 0; // this is queried by the Panel when it's not using its own ADDRESS register
|
this.addrLast = 0; // this is queried by the Panel when it's not using its own ADDRESS register
|
||||||
this.lastOp = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
|
this.opLast = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
|
||||||
|
|
||||||
this.resetIRQs();
|
this.resetIRQs();
|
||||||
|
|
||||||
if (this.bus) this.setMemoryAccess();
|
if (this.bus) {
|
||||||
|
this.setMemoryAccess();
|
||||||
|
this.addrInvalid = this.bus.getMemorySize(MemoryPDP11.TYPE.RAM);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -356,11 +359,11 @@ CPUStatePDP11.prototype.setMMR0 = function(newMMR0)
|
||||||
if (newMMR0 & PDP11.MMR0.ABORT) {
|
if (newMMR0 & PDP11.MMR0.ABORT) {
|
||||||
/*
|
/*
|
||||||
* If updates to MMR0[1-7], MMR1, and MMR2 are being shut off (ie, MMR0.ABORT bits are transitioning
|
* If updates to MMR0[1-7], MMR1, and MMR2 are being shut off (ie, MMR0.ABORT bits are transitioning
|
||||||
* from clear to set), then do one final sync with their real-time counterparts in lastOp.
|
* from clear to set), then do one final sync with their real-time counterparts in opLast.
|
||||||
*/
|
*/
|
||||||
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
||||||
this.regMMR1 = (this.lastOp >> 16) & 0xffff;
|
this.regMMR1 = (this.opLast >> 16) & 0xffff;
|
||||||
this.regMMR2 = this.lastOp & 0xffff;
|
this.regMMR2 = this.opLast & 0xffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
@ -393,10 +396,10 @@ CPUStatePDP11.prototype.getMMR1 = function()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If updates to MMR1 have not been shut off (ie, MMR0.ABORT bits are clear),
|
* If updates to MMR1 have not been shut off (ie, MMR0.ABORT bits are clear),
|
||||||
* then we are allowed to sync MMR1 with its real-time counterpart in lastOp.
|
* then we are allowed to sync MMR1 with its real-time counterpart in opLast.
|
||||||
*/
|
*/
|
||||||
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
||||||
this.regMMR1 = (this.lastOp >> 16) & 0xffff;
|
this.regMMR1 = (this.opLast >> 16) & 0xffff;
|
||||||
}
|
}
|
||||||
var result = this.regMMR1;
|
var result = this.regMMR1;
|
||||||
if (result & 0xff00) {
|
if (result & 0xff00) {
|
||||||
|
|
@ -415,10 +418,10 @@ CPUStatePDP11.prototype.getMMR2 = function()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If updates to MMR2 have not been shut off (ie, MMR0.ABORT bits are clear),
|
* If updates to MMR2 have not been shut off (ie, MMR0.ABORT bits are clear),
|
||||||
* then we are allowed to sync MMR2 with its real-time counterpart in lastOp.
|
* then we are allowed to sync MMR2 with its real-time counterpart in opLast.
|
||||||
*/
|
*/
|
||||||
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
|
||||||
this.regMMR2 = this.lastOp & 0xffff;
|
this.regMMR2 = this.opLast & 0xffff;
|
||||||
}
|
}
|
||||||
return this.regMMR2;
|
return this.regMMR2;
|
||||||
};
|
};
|
||||||
|
|
@ -662,7 +665,7 @@ CPUStatePDP11.prototype.setNF = function()
|
||||||
CPUStatePDP11.prototype.getOpcode = function()
|
CPUStatePDP11.prototype.getOpcode = function()
|
||||||
{
|
{
|
||||||
var pc = this.regsGen[PDP11.REG.PC];
|
var pc = this.regsGen[PDP11.REG.PC];
|
||||||
this.lastOp = pc;
|
this.opLast = pc;
|
||||||
/*
|
/*
|
||||||
* If PC is unaligned, a BUS trap will be generated, and because it will generate an
|
* If PC is unaligned, a BUS trap will be generated, and because it will generate an
|
||||||
* exception, the next line (the equivalent of advancePC(2)) will not be executed, ensuring that
|
* exception, the next line (the equivalent of advancePC(2)) will not be executed, ensuring that
|
||||||
|
|
@ -710,7 +713,7 @@ CPUStatePDP11.prototype.getPC = function()
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.getLastAddr = function()
|
CPUStatePDP11.prototype.getLastAddr = function()
|
||||||
{
|
{
|
||||||
return this.lastAddr;
|
return this.addrLast;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -721,7 +724,7 @@ CPUStatePDP11.prototype.getLastAddr = function()
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.getLastPC = function()
|
CPUStatePDP11.prototype.getLastPC = function()
|
||||||
{
|
{
|
||||||
return this.lastOp & 0xffff;
|
return this.opLast & 0xffff;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1365,14 +1368,14 @@ CPUStatePDP11.prototype.trap = function(vector, flag, reason)
|
||||||
* diagnostic (PC 056710), which tests what happens when a misaligned read triggers a BUS trap,
|
* diagnostic (PC 056710), which tests what happens when a misaligned read triggers a BUS trap,
|
||||||
* and that trap then triggers an MMU trap during the first pushWord() below.
|
* and that trap then triggers an MMU trap during the first pushWord() below.
|
||||||
*
|
*
|
||||||
* One would think it would be fine to zero those bits by setting lastOp to vector alone,
|
* One would think it would be fine to zero those bits by setting opLast to vector alone,
|
||||||
* and then letting each of the pushWord() calls below shift their own 0xF6 auto-dec value into
|
* and then letting each of the pushWord() calls below shift their own 0xF6 auto-dec value into
|
||||||
* lastOp. When the first pushWord() triggers an MMU trap, we obviously won't get to the second
|
* opLast. When the first pushWord() triggers an MMU trap, we obviously won't get to the second
|
||||||
* pushWord(), yet the diagnostic expects TWO auto-decs to be recorded. I'm puzzled why the
|
* pushWord(), yet the diagnostic expects TWO auto-decs to be recorded. I'm puzzled why the
|
||||||
* hardware apparently indicates TWO auto-decs, if SP wasn't actually decremented twice, but who
|
* hardware apparently indicates TWO auto-decs, if SP wasn't actually decremented twice, but who
|
||||||
* am I to judge.
|
* am I to judge.
|
||||||
*/
|
*/
|
||||||
this.lastOp = vector | 0xf6f60000;
|
this.opLast = vector | 0xf6f60000;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read from kernel D space
|
* Read from kernel D space
|
||||||
|
|
@ -1476,7 +1479,7 @@ CPUStatePDP11.prototype.getTrapStatus = function()
|
||||||
/**
|
/**
|
||||||
* mapUnibus(addr)
|
* mapUnibus(addr)
|
||||||
*
|
*
|
||||||
* If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
* If bits 18-21 of addr are all set (which callers check using addr >= BusPDP11.UNIBUS_22BIT aka 0x3C0000),
|
||||||
* then we have a 22-bit address pointing to the top 256Kb range, so if the UNIBUS relocation map is enabled,
|
* then we have a 22-bit address pointing to the top 256Kb range, so if the UNIBUS relocation map is enabled,
|
||||||
* we must pass the lower 18 bits of that address through the map.
|
* we must pass the lower 18 bits of that address through the map.
|
||||||
*
|
*
|
||||||
|
|
@ -1532,7 +1535,7 @@ CPUStatePDP11.prototype.mapUnibus = function(addr)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mapVirtualToPhysical(virtualAddress, access)
|
* mapVirtualToPhysical(addrVirtual, access)
|
||||||
*
|
*
|
||||||
* mapVirtualToPhysical() does memory management. It converts a 17-bit I/D virtual address to a
|
* mapVirtualToPhysical() does memory management. It converts a 17-bit I/D virtual address to a
|
||||||
* 22-bit physical address. A real PDP 11/70 memory management unit can be enabled separately
|
* 22-bit physical address. A real PDP 11/70 memory management unit can be enabled separately
|
||||||
|
|
@ -1582,60 +1585,55 @@ CPUStatePDP11.prototype.mapUnibus = function(addr)
|
||||||
* physical address to the next 8Kb page.
|
* physical address to the next 8Kb page.
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} virtualAddress
|
* @param {number} addrVirtual
|
||||||
* @param {number} access
|
* @param {number} access
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
|
CPUStatePDP11.prototype.mapVirtualToPhysical = function(addrVirtual, access)
|
||||||
{
|
{
|
||||||
var page, pdr, physicalAddress;
|
var page, pdr, addr;
|
||||||
|
|
||||||
this.assert(!(virtualAddress & ~0x1ffff) && access);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This can happen when the DSTMODE (MAINT) bit of MMR0 is set but *not* the ENABLED bit.
|
* This can happen when the DSTMODE (MAINT) bit of MMR0 is set but *not* the ENABLED bit.
|
||||||
*/
|
*/
|
||||||
if (!(access & this.mmuEnable)) {
|
if (!(access & this.mmuEnable)) {
|
||||||
physicalAddress = virtualAddress & 0xffff;
|
addr = addrVirtual & 0xffff;
|
||||||
if (physicalAddress >= BusPDP11.IOPAGE_16BIT) {
|
if (addr >= BusPDP11.IOPAGE_16BIT) {
|
||||||
physicalAddress |= this.addrIOPage;
|
addr |= this.addrIOPage;
|
||||||
}
|
}
|
||||||
return physicalAddress;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
page = virtualAddress >> 13;
|
page = addrVirtual >> 13;
|
||||||
if (!(this.regMMR3 & this.mapMMR3[this.mmuMode])) page &= 7;
|
if (!(this.regMMR3 & this.mapMMR3[this.mmuMode])) page &= 7;
|
||||||
pdr = this.mmuPDR[this.mmuMode][page];
|
pdr = this.mmuPDR[this.mmuMode][page];
|
||||||
physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask;
|
addr = ((this.mmuPAR[this.mmuMode][page] << 6) + (addrVirtual & 0x1fff)) & this.mmuMask;
|
||||||
|
|
||||||
if (this.nDisableTraps) return physicalAddress;
|
if (addr >= BusPDP11.UNIBUS_22BIT) {
|
||||||
|
addr = this.mapUnibus(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.nDisableTraps) return addr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This next bit is the weirdness that Paul mentions in the function description above:
|
* TEST #122 ("KT BEND") in the "EKBEE1" diagnostic (PC 076060) triggers a NOMEMORY error
|
||||||
*
|
* using this instruction:
|
||||||
* As an aside it turns out that it is the memory management unit that does odd address and
|
|
||||||
* non-existent memory trapping: who knew? :-) I thought these would have been handled at access time.
|
|
||||||
*
|
|
||||||
* TEST #122 ("KT BEND") in the "EKBEE1" diagnostic (PC 076060) triggers an ODDADDR error using this
|
|
||||||
* instruction:
|
|
||||||
*
|
|
||||||
* 076356: 005037 140001 CLR @#140001
|
|
||||||
*
|
|
||||||
* and it expects that instruction to generate a BUS error rather than an MMU error, so we deal with that
|
|
||||||
* next. However, the test also claims to check for an NEXM (non-existent memory) error, using this
|
|
||||||
* instruction:
|
|
||||||
*
|
*
|
||||||
* 076170: 005037 140100 CLR @#140100
|
* 076170: 005037 140100 CLR @#140100
|
||||||
*
|
*
|
||||||
* but that error never materializes, so I've NOT included any NEXM checks yet. I assume that any such
|
* It also triggers an ODDADDR error using this instruction:
|
||||||
* checks would be limited to whatever's recorded in the Memory Size registers (177760), because actually
|
|
||||||
* checking every physical address at this stage -- even in a real MMU -- seems prohibitively expensive.
|
|
||||||
*
|
*
|
||||||
* TODO: Investigate why the test's NEXM error doesn't occur.
|
* 076356: 005037 140001 CLR @#140001
|
||||||
|
*
|
||||||
|
* These tests exercise the MMU checks that Paul mentions in the function description above.
|
||||||
*/
|
*/
|
||||||
if ((physicalAddress & 0x1) && !(access & PDP11.ACCESS.BYTE)) {
|
if (addr >= this.addrInvalid && addr < this.addrIOPage) {
|
||||||
|
this.regErr |= PDP11.CPUERR.NOMEMORY;
|
||||||
|
this.trap(PDP11.TRAP.BUS, 0, addr);
|
||||||
|
}
|
||||||
|
else if ((addr & 0x1) && !(access & PDP11.ACCESS.BYTE)) {
|
||||||
this.regErr |= PDP11.CPUERR.ODDADDR;
|
this.regErr |= PDP11.CPUERR.ODDADDR;
|
||||||
this.trap(PDP11.TRAP.BUS, 0, physicalAddress);
|
this.trap(PDP11.TRAP.BUS, 0, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
var newMMR0 = 0;
|
var newMMR0 = 0;
|
||||||
|
|
@ -1679,12 +1677,12 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
|
||||||
*/
|
*/
|
||||||
if (pdr & PDP11.PDR.ED) {
|
if (pdr & PDP11.PDR.ED) {
|
||||||
if (pdr & PDP11.PDR.PLF) {
|
if (pdr & PDP11.PDR.PLF) {
|
||||||
if ((virtualAddress & 0x1FC0) < ((pdr >> 2) & 0x1FC0)) {
|
if ((addrVirtual & 0x1FC0) < ((pdr >> 2) & 0x1FC0)) {
|
||||||
newMMR0 |= PDP11.MMR0.ABORT_PL;
|
newMMR0 |= PDP11.MMR0.ABORT_PL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((virtualAddress & 0x1FC0) > ((pdr >> 2) & 0x1FC0)) {
|
if ((addrVirtual & 0x1FC0) > ((pdr >> 2) & 0x1FC0)) {
|
||||||
newMMR0 |= PDP11.MMR0.ABORT_PL;
|
newMMR0 |= PDP11.MMR0.ABORT_PL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1695,7 +1693,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
this.mmuPDR[this.mmuMode][page] = pdr;
|
this.mmuPDR[this.mmuMode][page] = pdr;
|
||||||
if (physicalAddress != ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.MMR0) & this.mmuMask) || this.mmuMode) {
|
if (addr != ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.MMR0) & this.mmuMask) || this.mmuMode) {
|
||||||
this.mmuLastMode = this.mmuMode;
|
this.mmuLastMode = this.mmuMode;
|
||||||
this.mmuLastPage = page;
|
this.mmuLastPage = page;
|
||||||
}
|
}
|
||||||
|
|
@ -1721,8 +1719,8 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
|
||||||
/*
|
/*
|
||||||
* TODO: Review the code below, because the address range seems over-inclusive.
|
* TODO: Review the code below, because the address range seems over-inclusive.
|
||||||
*/
|
*/
|
||||||
if (physicalAddress < ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.SIPDR0) & this.mmuMask) ||
|
if (addr < ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.SIPDR0) & this.mmuMask) ||
|
||||||
physicalAddress > ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.UDPAR7 | 0x1) & this.mmuMask)) {
|
addr > ((BusPDP11.IOPAGE_22BIT | PDP11.UNIBUS.UDPAR7 | 0x1) & this.mmuMask)) {
|
||||||
this.regMMR0 |= PDP11.MMR0.TRAP_MMU;
|
this.regMMR0 |= PDP11.MMR0.TRAP_MMU;
|
||||||
if (this.regMMR0 & PDP11.MMR0.MMU_TRAPS) {
|
if (this.regMMR0 & PDP11.MMR0.MMU_TRAPS) {
|
||||||
this.opFlags |= PDP11.OPFLAG.TRAP_MMU;
|
this.opFlags |= PDP11.OPFLAG.TRAP_MMU;
|
||||||
|
|
@ -1730,32 +1728,32 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, access)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return physicalAddress;
|
return addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* readByteFromPhysical(physicalAddress)
|
* readByteFromPhysical(addr)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} physicalAddress
|
* @param {number} addr
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.readByteFromPhysical = function(physicalAddress)
|
CPUStatePDP11.prototype.readByteFromPhysical = function(addr)
|
||||||
{
|
{
|
||||||
return this.bus.getByte(physicalAddress);
|
return this.bus.getByte(addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* writeByteToPhysical(physicalAddress, data)
|
* writeByteToPhysical(addr, data)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} physicalAddress
|
* @param {number} addr
|
||||||
* @param {number} data
|
* @param {number} data
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.writeByteToPhysical = function(physicalAddress, data)
|
CPUStatePDP11.prototype.writeByteToPhysical = function(addr, data)
|
||||||
{
|
{
|
||||||
if (physicalAddress & 1) this.nStepCycles--;
|
if (addr & 1) this.nStepCycles--;
|
||||||
this.bus.setByte(physicalAddress, data);
|
this.bus.setByte(addr, data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1780,11 +1778,11 @@ CPUStatePDP11.prototype.popWord = function()
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.pushWord = function(data, fRed)
|
CPUStatePDP11.prototype.pushWord = function(data, fRed)
|
||||||
{
|
{
|
||||||
var virtualAddress = (this.regsGen[6] - 2) & 0xffff;
|
var addrVirtual = (this.regsGen[6] - 2) & 0xffff;
|
||||||
this.regsGen[6] = virtualAddress; // BSD needs SP updated before any fault :-(
|
this.regsGen[6] = addrVirtual; // BSD needs SP updated before any fault :-(
|
||||||
this.lastOp = (this.lastOp & 0xffff) | ((this.lastOp & ~0xffff) << 8) | (0x00f6 << 16);
|
this.opLast = (this.opLast & 0xffff) | ((this.opLast & ~0xffff) << 8) | (0x00f6 << 16);
|
||||||
if (!fRed) this.checkStackLimit(PDP11.ACCESS.WRITE_WORD, -2, virtualAddress);
|
if (!fRed) this.checkStackLimit(PDP11.ACCESS.WRITE_WORD, -2, addrVirtual);
|
||||||
this.writeWord(virtualAddress, data);
|
this.writeWord(addrVirtual, data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1835,7 +1833,7 @@ CPUStatePDP11.prototype.pushWord = function(data, fRed)
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
{
|
{
|
||||||
var virtualAddress, step;
|
var addrVirtual, step;
|
||||||
var addrDSpace = (access & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace;
|
var addrDSpace = (access & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1868,10 +1866,10 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
*/
|
*/
|
||||||
case 2:
|
case 2:
|
||||||
step = 2;
|
step = 2;
|
||||||
virtualAddress = this.regsGen[reg];
|
addrVirtual = this.regsGen[reg];
|
||||||
if (reg == 6) this.checkStackLimit(access, step, virtualAddress);
|
if (reg == 6) this.checkStackLimit(access, step, addrVirtual);
|
||||||
if (reg != 7) {
|
if (reg != 7) {
|
||||||
virtualAddress |= addrDSpace;
|
addrVirtual |= addrDSpace;
|
||||||
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = 1;
|
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = 1;
|
||||||
}
|
}
|
||||||
this.nStepCycles -= (2 + 1);
|
this.nStepCycles -= (2 + 1);
|
||||||
|
|
@ -1882,10 +1880,10 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
*/
|
*/
|
||||||
case 3:
|
case 3:
|
||||||
step = 2;
|
step = 2;
|
||||||
virtualAddress = this.regsGen[reg];
|
addrVirtual = this.regsGen[reg];
|
||||||
if (reg != 7) virtualAddress |= addrDSpace;
|
if (reg != 7) addrVirtual |= addrDSpace;
|
||||||
virtualAddress = this.readWord(virtualAddress);
|
addrVirtual = this.readWord(addrVirtual);
|
||||||
virtualAddress |= addrDSpace;
|
addrVirtual |= addrDSpace;
|
||||||
this.nStepCycles -= (5 + 2);
|
this.nStepCycles -= (5 + 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1895,9 +1893,9 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
case 4:
|
case 4:
|
||||||
step = -2;
|
step = -2;
|
||||||
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = -1;
|
if (reg < 6 && (access & PDP11.ACCESS.BYTE)) step = -1;
|
||||||
virtualAddress = (this.regsGen[reg] + step) & 0xffff;
|
addrVirtual = (this.regsGen[reg] + step) & 0xffff;
|
||||||
if (reg == 6) this.checkStackLimit(access, step, virtualAddress);
|
if (reg == 6) this.checkStackLimit(access, step, addrVirtual);
|
||||||
if (reg != 7) virtualAddress |= addrDSpace;
|
if (reg != 7) addrVirtual |= addrDSpace;
|
||||||
this.nStepCycles -= (3 + 1);
|
this.nStepCycles -= (3 + 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1906,9 +1904,9 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
*/
|
*/
|
||||||
case 5:
|
case 5:
|
||||||
step = -2;
|
step = -2;
|
||||||
virtualAddress = (this.regsGen[reg] - 2) & 0xffff;
|
addrVirtual = (this.regsGen[reg] - 2) & 0xffff;
|
||||||
if (reg != 7) virtualAddress |= addrDSpace;
|
if (reg != 7) addrVirtual |= addrDSpace;
|
||||||
virtualAddress = this.readWord(virtualAddress) | addrDSpace;
|
addrVirtual = this.readWord(addrVirtual) | addrDSpace;
|
||||||
this.nStepCycles -= (6 + 2);
|
this.nStepCycles -= (6 + 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1916,27 +1914,27 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, access)
|
||||||
* Mode 6: d(R)
|
* Mode 6: d(R)
|
||||||
*/
|
*/
|
||||||
case 6:
|
case 6:
|
||||||
virtualAddress = this.readWord(this.advancePC(2));
|
addrVirtual = this.readWord(this.advancePC(2));
|
||||||
virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff;
|
addrVirtual = (addrVirtual + this.regsGen[reg]) & 0xffff;
|
||||||
if (reg == 6) this.checkStackLimit(access, 0, virtualAddress);
|
if (reg == 6) this.checkStackLimit(access, 0, addrVirtual);
|
||||||
this.nStepCycles -= (4 + 2);
|
this.nStepCycles -= (4 + 2);
|
||||||
return virtualAddress | addrDSpace;
|
return addrVirtual | addrDSpace;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mode 7: @d(R)
|
* Mode 7: @d(R)
|
||||||
*/
|
*/
|
||||||
case 7:
|
case 7:
|
||||||
virtualAddress = this.readWord(this.advancePC(2));
|
addrVirtual = this.readWord(this.advancePC(2));
|
||||||
virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff;
|
addrVirtual = (addrVirtual + this.regsGen[reg]) & 0xffff;
|
||||||
virtualAddress = this.readWord(virtualAddress | this.addrDSpace);
|
addrVirtual = this.readWord(addrVirtual | this.addrDSpace);
|
||||||
this.nStepCycles -= (7 + 3);
|
this.nStepCycles -= (7 + 3);
|
||||||
return virtualAddress | addrDSpace;
|
return addrVirtual | addrDSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.regsGen[reg] = (this.regsGen[reg] + step) & 0xffff;
|
this.regsGen[reg] = (this.regsGen[reg] + step) & 0xffff;
|
||||||
this.lastOp = (this.lastOp & 0xffff) | ((this.lastOp & ~0xffff) << 8) | ((((step << 3) & 0xf8) | reg) << 16);
|
this.opLast = (this.opLast & 0xffff) | ((this.opLast & ~0xffff) << 8) | ((((step << 3) & 0xf8) | reg) << 16);
|
||||||
|
|
||||||
return virtualAddress;
|
return addrVirtual;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2127,59 +2125,59 @@ CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, access)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* readWordFromPhysical(physicalAddress)
|
* readWordFromPhysical(addr)
|
||||||
*
|
*
|
||||||
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
|
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} physicalAddress
|
* @param {number} addr
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress)
|
CPUStatePDP11.prototype.readWordFromPhysical = function(addr)
|
||||||
{
|
{
|
||||||
return this.bus.getWord(this.lastAddr = physicalAddress);
|
return this.bus.getWord(this.addrLast = addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* readWordFromVirtual(virtualAddress)
|
* readWordFromVirtual(addrVirtual)
|
||||||
*
|
*
|
||||||
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
|
* This is a handler set up by setMemoryAccess(). All calls should go through readWord().
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} virtualAddress (input address is 17 bit (I&D))
|
* @param {number} addrVirtual (input address is 17 bit (I&D))
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress)
|
CPUStatePDP11.prototype.readWordFromVirtual = function(addrVirtual)
|
||||||
{
|
{
|
||||||
return this.bus.getWord(this.lastAddr = this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD));
|
return this.bus.getWord(this.addrLast = this.mapVirtualToPhysical(addrVirtual, PDP11.ACCESS.READ_WORD));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* writeWordToPhysical(physicalAddress, data)
|
* writeWordToPhysical(addr, data)
|
||||||
*
|
*
|
||||||
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
|
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} physicalAddress
|
* @param {number} addr
|
||||||
* @param {number} data
|
* @param {number} data
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data)
|
CPUStatePDP11.prototype.writeWordToPhysical = function(addr, data)
|
||||||
{
|
{
|
||||||
this.bus.setWord(this.lastAddr = physicalAddress, data & 0xffff);
|
this.bus.setWord(this.addrLast = addr, data & 0xffff);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* writeWordToVirtual(virtualAddress, data)
|
* writeWordToVirtual(addrVirtual, data)
|
||||||
*
|
*
|
||||||
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
|
* This is a handler set up by setMemoryAccess(). All calls should go through writeWord().
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} virtualAddress (input address is 17 bit (I&D))
|
* @param {number} addrVirtual (input address is 17 bit (I&D))
|
||||||
* @param {number} data
|
* @param {number} data
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.writeWordToVirtual = function(virtualAddress, data)
|
CPUStatePDP11.prototype.writeWordToVirtual = function(addrVirtual, data)
|
||||||
{
|
{
|
||||||
this.bus.setWord(this.lastAddr = this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.WRITE_WORD), data);
|
this.bus.setWord(this.addrLast = this.mapVirtualToPhysical(addrVirtual, PDP11.ACCESS.WRITE_WORD), data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2223,7 +2221,7 @@ CPUStatePDP11.prototype.readWordFromPrevSpace = function(opCode, access)
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, access, data)
|
CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, access, data)
|
||||||
{
|
{
|
||||||
this.lastOp = (this.lastOp & 0xffff) | (0x0016 << 16);
|
this.opLast = (this.opLast & 0xffff) | (0x0016 << 16);
|
||||||
var reg = this.dstReg = opCode & PDP11.OPREG.MASK;
|
var reg = this.dstReg = opCode & PDP11.OPREG.MASK;
|
||||||
var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT;
|
var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT;
|
||||||
if (!mode) {
|
if (!mode) {
|
||||||
|
|
|
||||||
|
|
@ -956,6 +956,10 @@ RL11.prototype.processCommand = function()
|
||||||
}
|
}
|
||||||
addr = (((this.ber & PDP11.RL11.RLBE.MASK)) << 16) | this.bar; // 22 bit mode
|
addr = (((this.ber & PDP11.RL11.RLBE.MASK)) << 16) | this.bar; // 22 bit mode
|
||||||
nWords = (0x10000 - this.mpr) & 0xffff;
|
nWords = (0x10000 - this.mpr) & 0xffff;
|
||||||
|
if (DEBUG && this.messageEnabled(MessagesPDP11.READ)) {
|
||||||
|
var pos = ((((iCylinder << 1) + iHead) * drive.nSectors) + iSector) * 128;
|
||||||
|
this.printMessage((fnReadWrite == this.readData? "readData" : "writeData") + "(pos=" + pos + ",addr=" + str.toOct(addr) + ",bytes=" + (nWords * 2) + ")", true, true);
|
||||||
|
}
|
||||||
fInterrupt = fnReadWrite.call(this, drive, iCylinder, iHead, iSector, nWords, addr, this.endReadWrite.bind(this));
|
fInterrupt = fnReadWrite.call(this, drive, iCylinder, iHead, iSector, nWords, addr, this.endReadWrite.bind(this));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1140,9 +1144,7 @@ RL11.prototype.readRLCS = function(addr)
|
||||||
RL11.prototype.writeRLCS = function(data, addr)
|
RL11.prototype.writeRLCS = function(data, addr)
|
||||||
{
|
{
|
||||||
this.csr = (this.csr & ~PDP11.RL11.RLCS.WMASK) | (data & PDP11.RL11.RLCS.WMASK);
|
this.csr = (this.csr & ~PDP11.RL11.RLCS.WMASK) | (data & PDP11.RL11.RLCS.WMASK);
|
||||||
|
this.ber = (this.ber & 0x3C) | ((data & PDP11.RL11.RLCS.BAE) >> PDP11.RL11.RLCS.SHIFT.BAE);
|
||||||
this.bae = (this.bae & ~0x3) | ((data & PDP11.RL11.RLCS.BAE) >> 4);
|
|
||||||
|
|
||||||
if (!(this.csr & PDP11.RL11.RLCS.CRDY)) this.processCommand();
|
if (!(this.csr & PDP11.RL11.RLCS.CRDY)) this.processCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1233,6 +1235,12 @@ RL11.prototype.readRLBE = function(addr)
|
||||||
/**
|
/**
|
||||||
* writeRLBE(data, addr)
|
* writeRLBE(data, addr)
|
||||||
*
|
*
|
||||||
|
* Curiously, we see RSTS/E v7.0 writing RLBE bits that aren't documented:
|
||||||
|
*
|
||||||
|
* R0=000000 R1=000000 R2=174410 R3=000000 R4=102076 R5=045166
|
||||||
|
* SP=052662 PC=067624 PS=034344 IR=000000 SL=000377 T0 N0 Z1 V0 C0
|
||||||
|
* 067624: 012712 000300 MOV #300,@R2
|
||||||
|
*
|
||||||
* @this {RL11}
|
* @this {RL11}
|
||||||
* @param {number} data
|
* @param {number} data
|
||||||
* @param {number} addr (eg, PDP11.UNIBUS.RLBE or 174410)
|
* @param {number} addr (eg, PDP11.UNIBUS.RLBE or 174410)
|
||||||
|
|
@ -1240,6 +1248,7 @@ RL11.prototype.readRLBE = function(addr)
|
||||||
RL11.prototype.writeRLBE = function(data, addr)
|
RL11.prototype.writeRLBE = function(data, addr)
|
||||||
{
|
{
|
||||||
this.ber = data & PDP11.RL11.RLBE.MASK;
|
this.ber = data & PDP11.RL11.RLBE.MASK;
|
||||||
|
this.csr = (this.csr & ~PDP11.RL11.RLCS.BAE) | ((this.ber & 0x3) << PDP11.RL11.RLCS.SHIFT.BAE);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -32,324 +32,325 @@
|
||||||
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 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};
|
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};
|
||||||
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={If:0,Zc:1,Kf:2,Lf:3,Mf:4,Nf:5,Of:6,Pf:7,Ac:8,Qf:9,$c:10,Rf:11,Sf:12,ad:13,Tf:14,Uf:15,Vf:16,Wf:17,Xf:18,Yf:19,Zf:20,$f:21,ag:22,bg:23,cg:24,dg:25,eg:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
var ja={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Ef:0,Uc:1,Gf:2,Hf:3,If:4,Jf:5,Kf:6,Lf:7,wc:8,Mf:9,Vc:10,Nf:11,Of:12,Wc:13,Pf:14,Qf:15,Rf:16,Sf:17,Tf:18,Uf:19,Vf:20,Wf:21,Xf:22,Yf:23,Zf:24,$f:25,ag:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
||||||
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,zc:65,Hf:66,Jf:67,fg:68,E:69,gg:70,hg:71,ig:72,jg:73,kg:74,lg:75,mg:76,ng:77,og:78,pg:79,qg:80,Q:81,rg:82,sg:83,tg:84,ug:85,vg:86,wg:87,xg:88,yg:89,md:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,zg:97,Ag:98,Bg:99,d:100,e:101,Cg:102,Dg:103,Eg:104,Fg:105,Ig:106,k:107,Jg:108,Kg:109,n:110,Lg:111,p:112,q:113,r:114,Mg:115,t:116,Og:117,Pg:118,Qg:119,x:120,y:121,z:122,"{":123,
|
"+":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,bd: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 sa(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 ra(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})}
|
||||||
function ta(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
function ta(a,b){return(a+" ").slice(0,b)}function ua(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
||||||
function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<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,Ra:null,Qa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ra=g.load;d.Qa=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c<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 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 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:[]},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 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,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 x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Dc=b.comment;this.nd=b;b=this.id.indexOf(".");0>b?this.eb=this.id:(this.fb=this.id.substr(0,b),this.eb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,hb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.pa=d||0;z.push(this)}var eb=void 0,fb={};
|
function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.yc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.hb=this.id:(this.ib=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,kb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.oa=d||0;z.push(this)}var eb=void 0,fb={};
|
||||||
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
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.va(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},va: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.Za=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.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),
|
||||||
this.N=function(a){this.i(a,this.eb)}),!0;default:return!1}},log:function(){},i:function(){},status:function(a){this.i(this.eb+": "+a)},N: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.pa;var c=a.j.pa&b;return!!b&&c===b||!!(c&a.j.ud)}return!1}
|
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}
|
||||||
function pb(a,b){if(a.C.nc)return a.C.hb=!1,a.C.nc=!1;if(a.C.error)return a.i(a.toString()+" error"),!1;a.C.hb=b;return a.C.hb}function qb(a,b){a.C.hb&&(b?a.C.nc=!0:void 0===b&&a.i(a.toString()+" busy"));return a.C.hb}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.N(b)}
|
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)}
|
||||||
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.Aa=this.w=this.bb=this.Bb=this.A=this.F=0;this.J=this.K=this.H=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Id],STEP:[1,1,!1,!1,this.Jd],ENABLE:[1,1,!1,!1,this.Ed],CONT:[1,1,!0,!1,this.Cd],DEP:[0,0,!0,!1,this.Dd],EXAM:[1,1,!0,!1,this.Fd],LOAD:[1,1,!0,!1,this.Hd],TEST:[0,0,!0,!1,this.Gd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Kd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
function Eb(a){x.call(this,"Panel",a,Eb,512);this.Ba=this.w=this.fb=this.Bb=this.A=this.F=0;this.I=this.K=this.G=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ed],STEP:[1,1,!1,!1,this.Fd],ENABLE:[1,1,!1,!1,this.Ad],CONT:[1,1,!0,!1,this.yd],DEP:[0,0,!0,!1,this.zd],EXAM:[1,1,!0,!1,this.Bd],LOAD:[1,1,!0,!1,this.Dd],TEST:[0,0,!0,!1,this.Cd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Gd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
||||||
k.va=function(a,b,c,d){if(this.B&&this.B.va(a,b,c,d)||this.b&&this.b.va(a,b,c,d)||this.j&&this.j.va(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
k.xa=function(a,b,c,d){if(this.B&&this.B.xa(a,b,c,d)||this.b&&this.b.xa(a,b,c,d)||this.j&&this.j.xa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
||||||
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.va.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.xa.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
||||||
function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.oa||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.ea()),c=8==(a.j&&a.j.na||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
|
||||||
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Id=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.ob())};k.Jd=function(){};k.Ed=function(a){a||this.b.ea()};
|
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ed=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.rb())};k.Fd=function(){};k.Ad=function(a){a||this.b.ea()};
|
||||||
k.Cd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.ob();else{if((a=this.j)&&!qb(a,!0))pb(a,!0),a.pb(0,null),pb(a,!1);else try{var b=this.b.pb(1);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.xa()}};k.Dd=function(a){a&&!this.b.C.X&&(this.J&&Wb(this),a=Xb(this,this.bb),this.L==Fb?this.v.nb(this.Aa,a):this.b.nb(this.Aa,a))};
|
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.Fd=function(a){a||this.b.C.X||(this.K&&Wb(this),a=this.L==Fb?this.v.Va(this.Aa):this.b.Va(this.Aa),Xb(this,a))};k.Hd=function(a){a||this.b.C.X||Yb(this,this.bb)};k.Gd=function(a){a?(this.H=!0,Mb(this,!0)):(this.H=!1,Mb(this),Zb(this,0))};k.Kd=function(a,b){this.bb=a?this.bb|1<<b:this.bb&~(1<<b)};function Wb(a){var b=1145>a.b.ib?8:16,c=65472<=a.Aa&&a.Aa<65472+b,b=c?1:2,c=c?15:a.v.Sa;Gb(a,"STEP")||(b=-b);Yb(a,a.Aa&~c|a.Aa+b&c)}
|
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)}
|
||||||
function Yb(a,b){a.Aa=b&a.v.Sa;b=a.Aa;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<<c)}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.H||Pb(a,b,c)}function nc(a){return void 0!==a.D.S0}function Zb(a,b){if(nc(a)){a.bb=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.vc=function(a){this.Aa=a};k.setData=function(a,b){b?this.Bb=a:this.w=a};k.Ld=function(a,b){return(b?this.Bb:this.bb)&65535};
|
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};
|
||||||
k.Ke=function(a){this.Bb=a};var oc={},Kb=(oc[65400]=[null,null,Eb.prototype.Ld,Eb.prototype.Ke,"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.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);
|
||||||
function pc(a,b,c){x.call(this,"Bus",a,pc,16);this.b=b;this.j=c;this.K=a.busWidth||16;this.g=0;this.w=[];this.B=null;this.H=1<<this.K;this.Sa=this.H-1;this.Ia=qc;this.na=Math.log2(this.Ia);this.J=this.Ia>>2;this.v=this.Ia-1;this.F=this.H/this.Ia|0;this.gb=[];this.qa=0;this.f=!1;this.pc=0;this.A=[];this.qd=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.Y=Array(this.F);for(b=0;b<this.F;b++)this.Y[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.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 rc(a,b){var c=-1,d=this.controller,e=d.gb[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.gb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
function 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}
|
||||||
function sc(a,b,c){var d=!1,e=this.controller,f=e.gb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.gb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
function sc(a,b,c){var d=!1,e=this.controller,f=e.jb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.jb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
||||||
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.gb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.jb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
||||||
function uc(a,b,c){var d=!1,e=this.controller;a=e.gb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
function uc(a,b,c){var d=!1,e=this.controller;a=e.jb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
||||||
function xc(a,b){if(b!=a.g){var c;a.g&&(c=(1<<a.g)-qc,yc(a,c,qc,a.w),a.g=0);b&&(a.g=b,c=1<<b,a.Sa=c-1,c-=qc,a.w=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.A.length;a++)this.A[a]();xc(this,16)};k.Ka=function(a,b){b||this.reset();return!0};
|
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 Ac(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.na;0<g&&h<a.Y.length;){var l=a.Y[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.G)return l.Zb+=l.G-f,l.G=f,!0;if(f>=l.G+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.G+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.Y[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.pc+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
|
function 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 zc(a,b,c){var d=[];for(b>>>=a.na;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-=a.Ia;return d}function yc(a,b,c,d){var e=0;for(b>>>=a.na;0<c&&b<a.Y.length;){var f=d[e++];if(!f)break;a.Y[b++]=f;c-=a.Ia}}k.dc=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].fc(a&this.v,a)};k.ec=function(a){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;a=this.Y[(a&this.Sa)>>>this.na].sc(a&this.v,a);this.qa--;return a};
|
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.ta=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].tc(b,a);this.qa--;return a};k.Nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].jc(a&this.v,b&255,a);this.qa--};
|
k.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.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].$b(a&this.v,b&65535,a)};k.nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));var c=a&this.v,d=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;this.Y[d].yc(c,b&65535,a);this.qa--};
|
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 Gc(a){for(var b=0,c=[],d=0;d<a.F;d++){var e=a.Y[d];if(e.$a||e.xd){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 Hc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&wc;if(void 0!==a.gb[m])return w("I/O address already registered: "+p(b,8,!0)),!1;a.gb[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.ib)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;t<r;t++,e+=2)if(n&&1<r&&(n=f[4]+t),!Hc(a,e,e,g,h,l,m,f[7]||b.pa,n||b.eb))return!1}}return!0}function Lb(a,b){a.A.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.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.Ba|=b),this.b.wa(4,0,a))};function Ic(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,wc:-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.B=a;this.b=c;this.j=d;var e=this;this.f.wc=Jc(c,function(){e.f.Hb|=128;e.f.Hb&64&&Kc(e.b,e.f.Gb);e.B&&e.B.xa(1);Lc(e.b,e.f.wc,1E3/60)});this.f.Gb=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.R[0],0,a[0]);N(e,"KDPDR",b.R[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.R[1],0,a[0]);N(e,"SDPDR",b.R[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.R[3],0,a[0]);N(e,"UDPDR",b.R[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;Lc(this.b,this.f.wc,1E3/60,!0)};k.Sd=function(){return this.f.Hb};k.Re=function(a){this.f.Hb=a&192;this.f.Hb&64||Pc(this.b,this.f.Gb)};k.Ud=function(){return Qc(this.b)};k.Te=function(a){Zc(this.b,a&-129|this.b.Da&128)};
|
"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.Vd=function(){return $c(this.b)};k.Wd=function(){return ad(this.b)};k.Xd=function(){return this.b.Xa};k.Ue=function(a){bd(this.b,a)};k.Ee=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.Df=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.xe=function(a){return this.b.R[1][a>>1&7]};k.wf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.ve=function(a){return this.b.R[1][(a>>1&7)+8]};
|
k.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.uf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};k.we=function(a){return this.b.ka[1][a>>1&7]};k.vf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.ue=function(a){return this.b.ka[1][(a>>1&7)+8]};k.tf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.Rd=function(a){return this.b.R[0][a>>1&7]};k.Qe=function(a,b){b=b>>1&7;this.b.R[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Pd=function(a){return this.b.R[0][(a>>1&7)+8]};
|
k.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.Oe=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.ka[0][a>>1&7]};k.Pe=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Od=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ne=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.De=function(a){return this.b.R[3][a>>1&7]};k.Cf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.Be=function(a){return this.b.R[3][(a>>1&7)+8]};k.Af=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};
|
k.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.Ce=function(a){return this.b.ka[3][a>>1&7]};k.Bf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Ae=function(a){return this.b.ka[3][(a>>1&7)+8]};k.zf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.be=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.Ze=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};
|
k.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.ee=function(){return this.b.u[7]};k.bf=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.ce=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.$e=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.de=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.af=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};
|
k.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.Nd=function(a){return this.b.Tc[a-65504>>1]};k.Me=function(a,b){this.b.Tc[b-65504>>1]=a};k.Qc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.pc}a=(a>>6)-1}else a=0;return a};k.Wc=function(){};k.ze=function(){return 1};k.yf=function(){};k.Md=function(){return this.b.Ba};k.Le=function(){this.b.Ba=0};k.Td=function(){return this.b.Sc};k.Se=function(a,b){b&1||(a&=255);this.b.Sc=a};k.Yd=function(a,b){return b?0:this.b.Mb};k.Ve=function(a){cd(this.b,a)};
|
k.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.ye=function(a,b){return b?0:this.b.lb&65280};k.xf=function(a){this.b.lb=a|255};k.ae=function(){return dd(this.b)};k.Ye=function(a){ed(this.b,a&-1793|dd(this.b)&1792);this.b.I|=256};k.Vc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
k.Xd=function(){return fd(this.b)};k.Ue=function(a){gd(this.b,a&-1793|fd(this.b)&1792);this.b.J|=256};k.Qc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
||||||
var O={},Nc=(O[61568]=[null,null,M.prototype.Ee,M.prototype.Df,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.xe,M.prototype.wf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.ve,M.prototype.uf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.we,M.prototype.vf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.ue,M.prototype.tf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Rd,M.prototype.Qe,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Pd,M.prototype.Oe,"KDPDR",8,1145,64],O[62688]=
|
var O={},Pc=(O[61568]=[null,null,M.prototype.Ae,M.prototype.zf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.te,M.prototype.sf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.re,M.prototype.qf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.se,M.prototype.rf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.qe,M.prototype.pf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Nd,M.prototype.Me,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPDR",8,1145,64],O[62688]=
|
||||||
[null,null,M.prototype.Qd,M.prototype.Pe,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Od,M.prototype.Ne,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Xd,M.prototype.Ue,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Sd,M.prototype.Re,"LKS"],O[65402]=[null,null,M.prototype.Ud,M.prototype.Te,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Vd,M.prototype.Vc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Wd,M.prototype.Vc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.De,M.prototype.Cf,
|
[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.Be,M.prototype.Af,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.Ce,M.prototype.Bf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.Ae,M.prototype.zf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb,
|
"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.be,M.prototype.Ze,"R6KERNEL"],O[65479]=[null,null,M.prototype.ee,M.prototype.bf,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb,
|
M.prototype.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.ce,M.prototype.$e,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.de,M.prototype.af,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Nd,M.prototype.Me,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Qc,M.prototype.Wc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Qc,M.prototype.Wc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ze,M.prototype.yf,"SYSID",1,1170],O[65526]=
|
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.Md,M.prototype.Le,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Td,M.prototype.Se,"MB",1,1170],O[65530]=[null,null,M.prototype.Yd,M.prototype.Ve,"PIR"],O[65532]=[null,null,M.prototype.ye,M.prototype.xf,"SL"],O[65534]=[null,null,M.prototype.ae,M.prototype.Ye,"PSW"],O);
|
[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 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;
|
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;
|
||||||
function K(a,b,c,d,e,f){this.v=a;this.id=jd+=2;this.b=null;this.G=b;this.Zb=c;this.size=d||0;this.type=e||kd;this.f=e==ld;this.controller=null;vc(this);this.$a=this.xd=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],md(this,f.qd);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.J=new Uint16Array(this.A,0,this.size>>1),this.b=new Int32Array(this.A,0,this.size>>2),md(this,id?nd:od);else{a=this.b=Array(this.size>>
|
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>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;md(this,pd)}else md(this)}var kd=0,Dc=1,ld=2,Bc=4,Ec=["NONE","RAM","ROM","VID","H/W"],jd=0;
|
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;
|
||||||
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.$a=!0}return!1},wb:function(a,b){b?this.g++||qd(this,rd,!1):this.B++||sd(this,rd,!1)},K: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.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,
|
||||||
"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)},L:function(a,b){return this.fc(a++,b++)|this.fc(a,b)<<8},H:function(a,b,c){this.ic(a++,b&255,c++);this.ic(a,b>>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
|
"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+
|
||||||
1]&255)<<8},Ea:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.$a=!0},Pa: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.$a=!0},S:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,1,c.O)&&c.ea(!0)}return this.sc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,2,c.O)&&c.ea(!0)}return this.tc(a,b)},oa:function(a,
|
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,
|
||||||
b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.jc(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.yc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2);
|
b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.G(a,b,c)},Za:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;vd(d,this.H+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.N(a,b,c)},aa:function(a){return this.D[a]},ib:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},ua:function(a,b){a&1&&this.v.Na(b,64,2);
|
||||||
a=this.J[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){this.D[a]=b;this.$a=!0},sa:function(a,b,c){this.D[a]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ca:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.$a=!0},Ga:function(a,b,c){a&1&&this.v.Na(c,64,4);this.J[a>>1]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
a=this.R[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Ca:function(a,b){this.D[a]=b;this.cb=!0},Ga:function(a,b,c){this.D[a]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Qa:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.cb=!0},$a:function(a,b,c){a&1&&this.v.Na(c,64,4);this.R[a>>1]=b;this.cb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
||||||
b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&sd(a,rd,!1),(a.g=c.g)&&qd(a,rd,!1))}function ud(a,b){b?--a.g||(a.ic=a.f?a.w:a.jc,a.$b=a.f?a.H:a.yc):--a.B||(a.fc=a.sc,a.za=a.tc)}function qd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.H);if(c||void 0===c)a.jc=b[1]||a.w,a.yc=b[3]||a.H}function sd(a,b,c){c&&a.B||(a.fc=b[0]||a.K,a.za=b[2]||a.L);if(c||void 0===c)a.sc=b[0]||a.K,a.tc=b[2]||a.L}function md(a,b){b||(b=vd);sd(a,b,void 0);qd(a,b,void 0)}
|
b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&ud(a,td,!1),(a.g=c.g)&&sd(a,td,!1))}function wd(a,b){b?--a.g||(a.ic=a.f?a.w:a.G,a.$b=a.f?a.L:a.N):--a.B||(a.fc=a.I,a.Aa=a.K)}function sd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.w,a.N=b[3]||a.L}function ud(a,b,c){c&&a.B||(a.fc=b[0]||a.T,a.Aa=b[2]||a.U);if(c||void 0===c)a.I=b[0]||a.T,a.K=b[2]||a.U}function od(a,b){b||(b=xd);ud(a,b,void 0);sd(a,b,void 0)}
|
||||||
var vd=[],pd=[K.prototype.U,K.prototype.Ea,K.prototype.fa,K.prototype.Pa],rd=[K.prototype.S,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var od=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ca],nd=[K.prototype.T,K.prototype.sa,K.prototype.fb,K.prototype.Ga];
|
var xd=[],rd=[K.prototype.fa,K.prototype.Pa,K.prototype.Ea,K.prototype.ab],td=[K.prototype.hb,K.prototype.Fa,K.prototype.na,K.prototype.Za];if(Bb)var qd=[K.prototype.aa,K.prototype.Ca,K.prototype.ga,K.prototype.Qa],pd=[K.prototype.ib,K.prototype.Ga,K.prototype.ua,K.prototype.$a];
|
||||||
function wd(a,b){x.call(this,"CPU",a,wd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.jb=c;this.Sb=Math.round(this.tb/1E4)/100;this.Ab=this.Sb*this.jb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.O=[];this.Hc=this.Ie.bind(this);J(this)}B(wd);var xd=["power","reset"];k=wd.prototype;
|
function yd(a,b){x.call(this,"CPU",a,yd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.mb=c;this.Tb=Math.round(this.tb/1E4)/100;this.Ab=this.Tb*this.mb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.N=[];this.Cc=this.Ee.bind(this);J(this)}B(yd);var zd=["power","reset"];k=yd.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b<xd.length;b++)(c=this.D[xd[b]])&&this.B.va(null,xd[b],c);a=yd(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.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.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.Eb,a.rb=!0,a.i("Type ? for help with PDPjs Debugger commands"),Bd(a),b||a.mb(),a.Ya&&(b=a.Ya,a.Ya=null,Cd(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.ob(),!0):!1};k.Mc=function(){return 0};
|
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};
|
||||||
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.Fb=0<=a.Wb&&0<a.Ib;a.C.Fb&&(a.Vb=0,a.Ca=a.Wb-a.oa)}function Vb(a,b){if(a.C.Fb){var c=!1;a.Vb=a.Vb+a.Mc()|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.ea(),c=!0);c&&a.i(Dd(a)+" cycles: checksum="+p(a.Vb))}}
|
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))}}
|
||||||
k.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;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.ob())},
|
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())},
|
||||||
!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Ed(d,d.jb<<1,!0)},c.textContent=this.Ab.toFixed(2)+"Mhz",!0}return!1};k.xa=function(a){this.B&&this.B.xa(a)};function Ub(a,b,c){a.oa+=b;c&&(a.ga=a.b=a.K=0)}function Fd(a,b){var c=1;b&&1<a.jb&&a.Ea&&(c=a.Ea/a.Sb);a.Fc=Math.round(1E3/30);a.ub=Math.floor(a.tb/30*c);b||(a.Fa=a.ub);a.Tb=0}function Dd(a){return a.oa+a.ba+a.ga-a.b}function zd(a){a.Ea=0;a.Gc=0;a.oa=a.ba=a.ga=a.b=a.K=0;Ad(a);Ed(a,1)}
|
!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)}
|
||||||
function Ed(a,b,c){var d=!1;if(void 0!==b){.8>a.Ea/a.Ab?b=1:d=!0;a.jb=b;b=a.Sb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Fd(a);return d}function Jc(a,b){var c=a.O.length;a.O.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&b<a.O.length&&(d||0>a.O[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Gd(a)),a.O[b][0]=c)}
|
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 Hd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gd(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c}
|
function Jd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Id(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c}
|
||||||
k.Ie=function(){if(this.C.X){this.Tb>=this.tb&&Fd(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Fc&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Hd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Gd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Gc&&(this.xa(),this.Gc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Dd(this));Ab(this,e.stack||
|
k.Ee=function(){if(this.C.X){this.jc>=this.tb&&Hd(this,!0);this.Qa=0;this.ab=Ba();if(this.fa){var a=this.ab-this.fa;a>this.Ac&&(this.U+=a,this.U>this.ab&&(this.U=this.ab))}try{do{var b=Jd(this,this.C.Fb?1:this.ub);try{this.sb(b)}catch(e){if("number"!=typeof e)throw e;}b=Id(this,!0);this.Qa+=b;this.aa+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Bc&&(this.ya(),this.Bc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Fd(this));Ab(this,e.stack||
|
||||||
e.message);return}if(this.C.X){a=setTimeout;b=this.Hc;this.fa=Ba();var c=this.Fc;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Ea=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Ed(this)));if(0>c||this.Ea<this.Ab)-1E3>c&&(this.U-=c),c=0;this.Tb+=this.Ya;this.fa+=c;a(b,c)}}};
|
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)}}};
|
||||||
k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Ed(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Dd(this)));setTimeout(this.Hc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Gd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Dd(this));b=!0}this.C.complete=a;return b};
|
k.rb=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Gd(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.pb(!0),this.B.start(this.U,Fd(this)));setTimeout(this.Cc,0);return!0};k.sb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Id(this);Ub(this,this.aa);this.aa=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Fd(this));b=!0}this.C.complete=a;return b};
|
||||||
function Id(a){this.ib=+a.model||1170;this.Cc=a.addrReset||0;wd.call(this,a,6666667);this.vb=0;this.Ec=255;1120==this.ib?(this.decode=Jd.bind(this),this.sa=this.vd,this.vb=8,this.Ec=-1):(this.decode=Kd.bind(this),this.sa=this.wd);Ld(this);this.L=0;this.J=null;this.C.complete=!1}B(Id,wd);k=Id.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Ld(this);zd(this);this.C.error=!1;this.parent.reset.call(this)};
|
function 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 Ld(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Cc,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.ld=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
function Nd(a){a.V=65536;a.W=32768;a.ca=65535;a.Z=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.xc,-1,-2,-3,-4,-5,-6,-7,-8];a.gb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.$a=0;a.hd=[4,2,0,1];a.S=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0]];a.Yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Tc=[0,0,0,0,0,0,0,0];a.Sc=0;a.I=0;a.F=a.H=0;a.g=a.f=a.Rb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.Ba=0;a.Mb=0;a.lb=255;a.S=0;a.qb=0;a.Pa=262143;a.Ub=0;a.ua=0;a.J=null;a.v&&Md(a)}function Md(a){a.S?(a.T=65536,a.Bc=a.Xa&16?4186112:253952,a.da=a.zd,a.za=a.Fe,a.$b=a.Ef,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.Bc=57344,a.da=a.yd,a.za=a.Rc,a.$b=a.Xc,xc(a.v,16))}
|
0,0,0,0,0,0,0,0,0,0]];a.Yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Oc=[0,0,0,0,0,0,0,0];a.Nc=0;a.J=0;a.F=a.G=0;a.g=a.f=a.Sb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Ya=0;a.sa=0;a.Mb=0;a.ob=255;a.R=0;a.Za=0;a.Pa=262143;a.Ub=0;a.wa=0;a.I=null;a.v&&(Od(a),a.fd=Ic(a.v))}function Od(a){a.R?(a.T=65536,a.Rb=a.Ya&16?4186112:253952,a.da=a.vd,a.Aa=a.Be,a.$b=a.Af,xc(a.v,a.Ya&16?22:18)):(a.T=0,a.Rb=57344,a.da=a.ud,a.Aa=a.Mc,a.$b=a.Sc,xc(a.v,16))}
|
||||||
function Qc(a){var b=a.Da;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Zc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.ua>>16&65535,a.lc=a.ua&65535);a.Da=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.S!=c&&(a.S=c,Md(a))}}function $c(a){a.Da&57344||(a.kc=a.ua>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ad(a){a.Da&57344||(a.lc=a.ua&65535);return a.lc}function bd(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Md(a))}
|
function $c(a){var b=a.Da;b&57344||(b=b&-3199|a.Za<<5|a.$a<<1);return b}function ad(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.wa>>16&65535,a.lc=a.wa&65535);a.Da=b;a.Za=b>>5&3;a.$a=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.R!=c&&(a.R=c,Od(a))}}function bd(a){a.Da&57344||(a.kc=a.wa>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function cd(a){a.Da&57344||(a.lc=a.wa&65535);return a.lc}function dd(a,b){1170>a.lb&&(b&=-49);a.Ya!=b&&(a.Ya=b,a.Pa=b&16?4194303:262143,Od(a))}
|
||||||
k.Mc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Ed(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.J){for(var f=0,g=Array(b.J),h=0;h<e.length-1;)for(var l=e[h++],m=e[h++];l--;)g[f++]=m;e=g}f=b.Y[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.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};
|
||||||
function Nd(a){return a.V&65536?1:0}function Od(a){return a.W&32768?2:0}function Pd(a){return a.ca&65535?0:4}function Qd(a){return a.aa&32768?8:0}function Rd(a){var b=a.u[7];a.ua=b;var c=a.za(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{xc:a,kb:b,message:c||0,next:null}}function Td(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.I|=1)}
|
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 Kc(a,b){if(b!=a.J){var c=a.J;if(!c||c.kb<=b.kb)b.next=c,a.J=b;else{do{var d=c.next;if(!d||d.kb<=b.kb){b.next=d;c.next=b;break}c=d}while(c)}}a.I|=1;b.message&&I(a,b.message|8)&&G(a,"setIRQ(vector="+na(b.xc)+",priority="+b.kb+")",!0,!0)}function Pc(a,b){Td(a,b);b.message&&I(a,b.message|8)&&G(a,"clearIRQ(vector="+na(b.xc)+",priority="+b.kb+")",!0,!0)}function Ud(a){return a.I&64?(a.wa(168,64,-5),!0):a.I&32?(a.wa(4,32,-4),!0):a.I&16?(a.wa(12,16,-6),!0):!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 dd(a){return a.P=a.P&63728|Qd(a)|Pd(a)|Od(a)|Nd(a)}function ed(a,b){a.aa=b<<12;a.ca=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.cb.length;0<=--c;){var d=a.u[c];a.u[c]=a.cb[c];a.cb[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.I&=-3;a.I|=a.J?2:1}function cd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.I|=1}a.Mb=b}function U(a,b){a.I&256||(a.aa=a.ca=b,a.W=0)}function Vd(a,b,c){a.I&256||(a.aa=a.ca=a.V=b,a.W=c||0)}
|
function 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 Wd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Xd(a,b){a.I&256||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Yd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))}
|
function Yd(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Zd(a,b){a.J&256||(a.Z=a.ca=a.V=b,a.W=a.Z^a.V>>1)}function $d(a,b,c,d){a.J&256||(a.Z=a.ca=a.V=b,a.W=(c^d)&(d^b))}
|
||||||
k.wa=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=dd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);ed(this,f&-12289|this.Ga>>2&12288);Zd(this,this.Ga,d);Zd(this,this.u[7],d);T(this,e);this.I&=~(b|19);this.I|=129;this.Ga=-1;this.pd=a;this.Yc=c;if(-3<=c)throw a;}};function te(a){var b=ue(a),c=ue(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);ed(a,c);a.I&=-17}
|
k.ta=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=fd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.sa|=4,this.u[6]=4,d=!0);this.wa=a|4143316992;this.A=0;var e=this.Aa(a|this.T),f=this.Aa(a+2&65535|this.T);gd(this,f&-12289|this.Ga>>2&12288);ue(this,this.Ga,d);ue(this,this.u[7],d);T(this,e);this.J&=~(b|19);this.J|=129;this.Ga=-1;this.pd=a;this.kd=c;if(-3<=c)throw a;}};function ve(a){var b=we(a),c=we(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);gd(a,c);a.J&=-17}
|
||||||
function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
|
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 ve(a,b,c){var d,e,f;if(!(c&a.S))return f=b&65535,57344<=f&&(f|=a.Bc),f;d=b>>13;a.Xa&a.ld[a.A]||(d&=7);e=a.R[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.L)return f;f&1&&!(c&1)&&(a.Ba|=64,a.wa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb=
|
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&
|
||||||
a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.qb<<5|a.rb<<1,Zc(a,a.Da&-61695|g&61694)),a.wa(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.I|=64)));return f}function we(a,b){return a.v.dc(b)}function ue(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Zd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.sa(4,-2,d);a.$b(d,b)}
|
8128)&&(g|=16384));a.S[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.Za=a.A,a.$a=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.Za<<5|a.$a<<1,ad(a,a.Da&-61695|g&61694)),a.ta(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ye(a,b){return a.v.dc(b)}function we(a){var b=a.Aa(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}
|
||||||
function xe(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d,
|
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)}
|
||||||
0,e),a.b-=6,e|g;case 7:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.vd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.I|=32)};k.wd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.wa(4,0,-3):(this.Ba|=8,this.I|=32)))};k.ec=function(a){if(!this.S)return this.v.ec(a);this.L++;a=we(this,ve(this,a,3));this.L--;return a};
|
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,
|
||||||
k.Va=function(a){if(!this.S)return this.v.Va(a);this.L++;a=this.Rc(ve(this,a,2));this.L--;return a};k.Cb=function(a,b){this.S?(this.L++,a=ve(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Cb(a,b)};k.nb=function(a,b){this.S?(this.L++,this.Xc(ve(this,a,4),b),this.L--):this.v.nb(a,b)};k.yd=function(a,b,c){return xe(this,a,b,c)};k.zd=function(a,b,c){return ve(this,xe(this,a,b,c),c)};k.Rc=function(a){return this.v.ta(this.Ub=a)};k.Fe=function(a){return this.v.ta(this.Ub=ve(this,a,2))};
|
0,e),a.b-=6,e|g;case 7:return e=a.Aa(Ud(a,2)),e=e+a.u[c]&65535,e=a.Aa(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.wa=a.wa&65535|(a.wa&-65536)<<8|(f<<3&248|c)<<16;return e}k.rd=function(a,b,c){!this.A&&0>=b&&c<=this.ob&&(this.J|=32)};k.sd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.ob&&(c<=this.ob-32?this.ta(4,0,-3):(this.sa|=8,this.J|=32)))};k.ec=function(a){if(!this.R)return this.v.ec(a);this.L++;a=ye(this,xe(this,a,3));this.L--;return a};
|
||||||
k.Xc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Ef=function(a,b){this.v.Db(this.Ub=ve(this,a,4),b)};function ye(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xe(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
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))};
|
||||||
function ze(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xe(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ve(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c+a.vb]&a.Ec}function Be(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c+a.vb]}function Ce(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xe(a,b,c,8)}
|
k.Sc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Af=function(a,b){this.v.Db(this.Ub=xe(this,a,4),b)};function Ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ze(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.Aa(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
||||||
function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c]&255}function Ee(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c]}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Rb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,we(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
function 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 V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ge(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function He(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
function Fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ye(a,a.da(b,c,3)):a.u[c]&255}function Ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.va(a.da(b,c,2)):a.u[c]}function He(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Sb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ye(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
||||||
|
function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.va(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
||||||
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
||||||
k.pb=function(a){this.C.complete=!0;var b=this.j?Ie(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Je(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.I){if(a=this.I&11)if(a=!1,this.I&2){var d=160,e=(this.Mb&224)>>5,f=this.J&&this.J.kb>e?this.J:null;f&&(d=f.xc,e=f.kb);e>(this.P&224)>>5?(this.I&8&&(Sd(this,2),this.I&=-9),this.wa(d,0,-9),e=!0):e=!1;e&&(f&&Td(this,f),a=!0);this.J||this.Mb||(this.I&=-3)}else this.I&1&&this.I++;if(a){if(b&&Je(this.j,this.u[7],
|
k.sb=function(a){this.C.complete=!0;var b=this.j?Ke(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Le(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.J){if(a=this.J&11)if(a=!1,this.J&2){var d=160,e=(this.Mb&224)>>5,f=this.I&&this.I.nb>e?this.I:null;f&&(d=f.uc,e=f.nb);e>(this.P&224)>>5?(this.J&8&&(Ud(this,2),this.J&=-9),this.ta(d,0,-9),e=!0):e=!1;e&&(f&&Vd(this,f),a=!0);this.I||this.Mb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Le(this.j,this.u[7],
|
||||||
c)){this.ea();break}if(0>c)break}if(this.I&112&&Ud(this)){if(b&&Je(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.I=this.I&15|this.P&16;this.decode(Rd(this))}while(0<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 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}
|
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}
|
||||||
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 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 Ve(a,b){a=~b|256;Vd(this,a<<8);return a&255}function We(a,b){a=b-a;this.I&256||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function Xe(a,b){a=b-a;var c=a<<8;b<<=8;this.I&256||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Ye(a,b){a=b+a;this.I&256||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ze(a,b){a=b+a;var c=a<<8;this.I&256||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function $e(a,b){a=-b;Vd(this,a,a&b&32768);return a&65535}
|
function 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 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 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 hf(a,b){this.I&256||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function jf(a,b){a^=b;U(this,a);return a&65535}function kf(a){V(this,a,Be(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function 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 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.aa=this.ca=c;this.b-=(this.g?6:7)+b}
|
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 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.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function nf(a){W(this,a,!Nd(this))}function of(a){W(this,a,Nd(this))}
|
function 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 pf(a){V(this,a,Be(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){Fe(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){V(this,a,Be(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){Fe(this,a,Ae(this,a),Te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function 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 tf(a){var b=Be(this,a);a=Ee(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){var b=Ae(this,a);a=De(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function vf(a){W(this,a,Pd(this))}function wf(a){W(this,a,!Qd(this)==!Od(this))}function xf(a){W(this,a,!Pd(this)&&!Qd(this)==!Od(this))}function yf(a){W(this,a,!Nd(this)&&!Pd(this))}
|
function 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 zf(a){W(this,a,Pd(this)||!Qd(this)!=!Od(this))}function Af(a){W(this,a,Nd(this)||Pd(this))}function Bf(a){W(this,a,!Qd(this)!=!Od(this))}function Cf(a){W(this,a,Qd(this))}function Df(a){W(this,a,!Pd(this))}function Ef(a){W(this,a,!Qd(this))}function Ff(){this.wa(12,0,-8);this.b-=5}function Gf(a){W(this,a,!0)}function Hf(a){W(this,a,!Od(this))}function If(a){W(this,a,Od(this))}function Jf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5}
|
function 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 Kf(a){var b=Be(this,a);a=Ee(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Lf(a){var b=Ae(this,a);a=De(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
|
function Mf(a){var b=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 Mf(a){var b=Ee(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Nf(){this.wa(24,0,-8);this.b-=25}
|
function Of(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 Of(){this.P&49152?(this.Ba|=128,this.wa(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Pf(this.j):this.ea());this.b-=7}function Qf(){this.wa(16,0,-8);this.b-=25}var Rf=[0,7,7,10,7,11,9,13];function Sf(a){this.K=this.b;T(this,Ce(this,a));this.b=this.K-Rf[this.g]}var Tf=[0,14,14,17,14,18,16,20];function Uf(a){this.K=this.b;var b=Ce(this,a);a=a>>6&7;Zd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Tf[this.g]}
|
function Qf(){this.P&49152?(this.sa|=128,this.ta(4,0,-7)):(this.w&&1120==this.lb&&this.w.setData(this.u[0],!0),this.j?Rf(this.j):this.ea());this.b-=7}function Sf(){this.ta(16,0,-8);this.b-=25}var Tf=[0,7,7,10,7,11,9,13];function Uf(a){this.K=this.b;T(this,Ee(this,a));this.b=this.K-Tf[this.g]}var Vf=[0,14,14,17,14,18,16,20];function Wf(a){this.K=this.b;var b=Ee(this,a);a=a>>6&7;ue(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Vf[this.g]}
|
||||||
var Vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Wf(a){var b=Be(this,a);this.K=this.b;U(this,He(this,a,b));this.b=this.K-Vf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Xf(a){var b=Ae(this,a);U(this,Ge(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Yf=[7,13,13,17,14,18,17,21];
|
var Xf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Yf(a){var b=De(this,a);this.K=this.b;U(this,Je(this,a,b));this.b=this.K-Xf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Zf(a){var b=Ce(this,a);U(this,Ie(this,a,b,65535)<<8);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var $f=[7,13,13,17,14,18,17,21];
|
||||||
function Zf(a){var b=Ee(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&256||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767<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 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 cg(){te(this);this.b-=13}function dg(a){a&1&&(this.V=65536);a&2&&(this.W=32768);a&4&&(this.ca=0);a&8&&(this.aa=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.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function gg(a){V(this,a,0,hf);this.b-=this.g?9:3+(7==this.f?2:0)}function hg(){this.wa(28,0,-8);this.b-=5}
|
function 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 ig(){this.w&&(this.w.vc(this.u[7],!0),this.w.setData(this.u[0],!0));this.I|=8;Sd(this,-2);this.b-=3}function jg(a){V(this,a,this.u[(a>>6&7)+this.vb],jf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Pf(b)):b=!1;b||this.wa(8,0,-8)}function Jd(a){kg[a>>12].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}
|
function 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 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)}
|
function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a&15].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}function Bg(a){Cg[a>>6&3].call(this,a)}
|
||||||
var 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,
|
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,
|
||||||
$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)}],
|
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)}],
|
||||||
Dg=[function(a){Eg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,X,rg,tg,gg,gg,gg,gg],Eg=[Of,ig,cg,Ff,Qf,ag,X,X,X,X,X,X,X,X,X,X],sg=[$f,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Jf,function(){this.ca=1;this.b-=5},Jf,Jf,Jf,function(){this.aa=0;this.b-=5},Jf,Jf,Jf,Jf,Jf,Jf,Jf],ug=[$f,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},dg,function(){this.ca=0;this.b-=5},dg,dg,dg,function(){this.aa=32768;this.b-=5},dg,dg,dg,dg,dg,dg,dg],Cg=[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,
|
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,
|
||||||
hg,vg,xg,zg,X,X,X],wg=[function(a){Vd(this,Ge(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)}],yg=[function(a){Fe(this,a,0,af);this.b-=this.g?11:6},function(a){Fe(this,a,Nd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,Nd(this)?1:0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
|
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=
|
||||||
De(this,a);Vd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Ag=[function(a){Fe(this,a,0,ef);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Pe);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}];function Kd(a){Fg[a>>12].call(this,a)}
|
Fe(this,a);Xd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Cg=[function(a){He(this,a,0,gf);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){He(this,a,0,Re);this.b-=this.g?9+(this.Sb&1):3+(7==this.f?2:0)},function(a){He(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function Md(a){Hg[a>>12].call(this,a)}
|
||||||
var Fg=[function(a){Gg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,function(a){Hg[a>>8&15].call(this,a)},function(a){Ig[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Gg=[function(a){Jg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,function(a){Kg[a>>6&3].call(this,a)},X,X],Kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ye(this,a,0);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=
|
var Hg=[function(a){Ig[a>>8&15].call(this,a)},Yf,Mf,vf,rf,tf,mf,function(a){Jg[a>>8&15].call(this,a)},function(a){Kg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,hg,X],Ig=[function(a){Lg[a>>4&15].call(this,a)},If,Ff,xf,yf,Df,zf,Bf,Wf,Wf,ng,pg,rg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Aa(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ae(this,a,0);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=
|
||||||
this.b;ze(this,a,0,b);U(this,b);this.b=this.K-Yf[this.g]},function(a){U(this,He(this,a,Qd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Jg=[function(a){Lg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.I|=1,this.I&=-3),this.b-=5):X.call(this,a)},rg,tg,gg,gg,gg,gg],Lg=[Of,ig,function(){te(this);this.I|=this.P&16;this.b-=13},Ff,Qf,ag,cg,function(){this.wa(8,0,-8)},X,X,X,X,X,X,X,X],Hg=[Zf,Zf,Mf,Mf,lf,lf,mf,mf,jg,jg,X,X,X,X,eg,eg],Ig=
|
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=
|
||||||
[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,hg,vg,xg,zg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[X,function(a){a=ye(this,a,65536);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=this.b;ze(this,a,65536,b);U(this,b);this.b=this.K-Yf[this.g]},X];
|
[Gf,Ef,Af,Cf,Jf,Kf,pf,qf,Pf,jg,xg,zg,Bg,function(a){Og[a>>6&3].call(this,a)},X,X],Og=[X,function(a){a=Ae(this,a,65536);ue(this,a);U(this,a);this.b-=11},function(a){var b=we(this);this.K=this.b;Be(this,a,65536,b);U(this,b);this.b=this.K-$f[this.g]},X];
|
||||||
function Ng(a){x.call(this,"ROM",a,Ng,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Og(c)})}}B(Ng);k=Ng.prototype;
|
function Pg(a){x.call(this,"ROM",a,Pg,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.G=u(this.g);if(this.g){a=this.g;var b=oa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.ib,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Qg(c)})}}B(Pg);k=Pg.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Og(this)};k.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Qg(this)};k.Ka=function(){this.ja&&(this.j&&Rg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
||||||
function Og(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Ng.prototype.te,Ng.prototype.sf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,ld)){for(c=0;c<a.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 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):
|
||||||
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.te=function(a){return this.B[a-this.A]};k.sf=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)}});
|
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)}});
|
||||||
function Qg(a){x.call(this,"RAM",a,Qg);this.ja=this.B=null;this.g=a.addr;this.A=a.size;this.Ra=a.load;this.Qa=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.N("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja,null==c.Ra&&(c.Ra=a.Ra),null==c.Qa&&(c.Qa=a.Qa)):c.f=null);Rg(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)})}}
|
||||||
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.A,this.ja),delete this.ja);return!0};Qg.prototype.Ja=function(){return!0};function Rg(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;Sg(a,a.B,a.Ra,a.Qa,a.g)}J(a)}}
|
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)}}
|
||||||
Qg.prototype.reset=function(){if(this.w){for(var a=this.v,b=this.g,c=this.A,d=b&a.v,b=b>>>a.na;0<c&&b<a.Y.length;){var e=a.Y[b];if(e.controller&&a.B&&a.B.length==a.w.length){var f=a.B.indexOf(e);0<=f&&(e=a.w[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.jc(d,g,e.G+d)}c-=a.Ia;b++;d=0}this.B&&Sg(this,this.B,this.Ra,this.Qa,this.g,!0)}};
|
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)}};
|
||||||
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+=
|
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+=
|
||||||
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.Cc=d,a.v.reset(),Sb(a),T(a,d),ed(a,0),!f&&a.j&&(a.ea()||Bd(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.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}
|
||||||
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.va=function(){return!1};Tg.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 Tg(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 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)}});
|
||||||
function Ug(a){this.S=a.baudReceive||9600;this.oa=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,Ug,262144);var b=a.binding;if("console"==b)this.A="";else{var c;a=Vg;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.D[b])&&this.va(null,a,b))}this.J=this.L=null;this.exports={connect:this.Pc,receiveData:this.gc}}B(Ug);var Vg="buffer";k=Ug.prototype;
|
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;
|
||||||
k.va=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.Ac:la.bd:46==c?b=la.Ac:a.ctrlKey&&c>=la.zc&&c<=la.md&&(b=c-(la.zc-la.Zc));b&&(a.preventDefault&&a.preventDefault(),d.gc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.ad&&(b=la.$c);d.gc(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
k.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();
|
||||||
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=Mc(48,4,262144);this.ba=Jc(this.b,function(){var a;a=-1;e.H.length&&(a=e.H.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.fa&&97<=a&&122>a&&(a-=32),Lc(e.b,e.ba,1E3/Math.round(e.S/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.ga))});this.O=Mc(52,4,262144);this.sa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.O)});Jb(b,this,Wg);Lb(b,this.reset.bind(this));J(this)};
|
k.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.Pc=function(){if(!this.J){var a=yd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.J=nb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Pc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
k.Kc=function(){if(!this.I){var a=Ad(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ua(b[0]);if(c!=this.hb)return;b=ua(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.ib+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Kc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
k.Ja=function(a){return a?this.save():!0};k.reset=function(){Xg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.K=0;a.f=0;a.g=128;a.H=[];return!0}k.gc=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.H.push(b)}else this.H=this.H.concat(a);Lc(this.b,this.ba,1E3/Math.round(this.S/10));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.ge=function(){return this.f&65534};k.df=function(a){this.f=this.f&-112|a&111};k.fe=function(){this.f&=-129;return this.K};k.cf=function(){};k.He=function(){return this.g};k.Gf=function(a){this.g&128&&(a&64?Kc(this.b,this.O):Pc(this.b,this.O));this.g=this.g&-70|a&69};k.Ge=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?Mc(this.b,this.N):Rc(this.b,this.N));this.g=this.g&-70|a&69};k.Ce=function(){return 0};
|
||||||
k.Ff=function(a){a&=255;G(this,"transmitByte("+p(a,2,!0)+")");this.L&&this.L.call(this.J,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.A){if(10==a||1024<=
|
||||||
this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Lc(this.b,this.sa,1E3/Math.round(this.oa/10));this.g&=-129};var Yg={},Wg=(Yg[65392]=[null,null,Ug.prototype.ge,Ug.prototype.df,"RCSR"],Yg[65394]=[null,null,Ug.prototype.fe,Ug.prototype.cf,"RBUF"],Yg[65396]=[null,null,Ug.prototype.He,Ug.prototype.Gf,"XCSR"],Yg[65398]=[null,null,Ug.prototype.Ge,Ug.prototype.Ff,"XBUF"],Yg);
|
this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Nc(this.b,this.ua,1E3/Math.round(this.na/10));this.g&=-129};var $g={},Yg=($g[65392]=[null,null,Wg.prototype.ce,Wg.prototype.$e,"RCSR"],$g[65394]=[null,null,Wg.prototype.be,Wg.prototype.Ze,"RBUF"],$g[65396]=[null,null,Wg.prototype.De,Wg.prototype.Cf,"XCSR"],$g[65398]=[null,null,Wg.prototype.Ce,Wg.prototype.Bf,"XBUF"],$g);
|
||||||
ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b<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.fa=a.baudReceive||3600;this.K=this.L=this.f=0;this.J=[];this.H=Zg;this.w=th;this.O=this.A="";this.ha=this.Ra=this.Qa=null;this.U=-1;this.S=!Ma("Mobi")&&window&&"FileReader"in window}B(fd);var Zg="",th=0;k=fd.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 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;
|
||||||
k.va=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=
|
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=
|
||||||
function(){var a=d.D.listTapes;a&&uh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.S){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;uh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
function(){var a=d.D.listTapes;a&&wh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.ba=vh(a);var e=this;if((this.g=yd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.J.length&&(e.L=e.J[e.K++]&255,wh(e,e.K/e.J.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,
|
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,
|
||||||
!0);this.S&&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};
|
!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};
|
||||||
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 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 uh(a,b,c,d,e){if(c)if("?"==c)a.N('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.H="??"}else a.H=c;Ah(a,b,c,d,!1,e)}else Ch(a,!1)}
|
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 Ah(a,b,c,d,e,f){var g=-1;if(a.A.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Ch(a,!0),a.C.hb?a.N("PC11 busy"):(e&&(a.F++,I(a)&&G(a,"auto-loading tape: "+b)),Dh(a,b,c,d,f)?g++:a.C.hb=!0);g&&Eh(a,a.O,a.A,a.w,a.ha,a.Ra,a.Qa)}
|
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 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.H="?");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.B&&!a.B.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Eh(a,b,c,d,e.ha,e.Ra,
|
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,
|
||||||
e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Bh(a)})}function yh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e<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.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)}}
|
||||||
function Bh(a){var b=a.D.listTapes;if(b&&b.options){a=a.H||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 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 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 Eh(a,b,c,d,e,f,g){a.O=b;a.A=c;a.w=d;a.ha=e;a.Ra=f;a.Qa=g;2==d?a.ba&&Sg(a.ba,e,f,g)?a.status("tape loaded: "+b):(a.O="",a.A="",a.H=Zg,a.w=th,a.N("No load address available for tape: "+b)):(a.K=0,a.J=e,a.status("tape attached: "+b),wh(a,0))}function Ch(a,b){if(a.A||!1===b)a.O="",a.A="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.H=Zg,a.w=th,Bh(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.$d=function(){return this.f&65534};
|
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};
|
||||||
k.Xe=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.ga,1E3/Math.round(this.fa/10))));this.f=this.f&-66|a&65};k.Zd=function(){this.f&=-129;this.f|=2048;return this.L};k.We=function(){};var Fh={},xh=(Fh[65384]=[null,null,fd.prototype.$d,fd.prototype.Xe,"PRS"],Fh[65386]=[null,null,fd.prototype.Zd,fd.prototype.We,"PRB"],Fh);
|
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);
|
||||||
function Gh(a,b,c){x.call(this,"Disk",{id:a.fb+".disk"+p(++Hh,4)},Gh,8192);this.controller=a;this.B=a.B;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.ya);J(this)}var Hh=0;B(Gh);k=Gh.prototype;k.Ha=function(a,b,c,d){this.j=d};
|
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 Ih(a,b,c,d,e,f){a.mode=b;a.la=c;a.ra=d;a.ia=e;a.ya=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.ya,0);d[e]=f}b[c]=d}a.b=b}a.f=null}
|
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 Kh(a,b,c,d,e){var f=c;if(a.v)return!0;a.Ta=b;a.La=c;a.uc=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.ya=e[3]||512;c=a.ya>>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.ya,0),ra=C.data,Sa=0;Sa<c;Sa++,f+=4)var R=ra[Sa]=b.getInt32(f,
|
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,
|
||||||
!0),e=e+R&-1;C.Ma=c;A[y]=C}a.f=e;c=a}else a.N("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){Lh(a,b,c,d)})}
|
null,!0,function(b,c,d){Nh(a,b,c,d)})}
|
||||||
function Lh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0<u(a.uc,!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 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("("+
|
||||||
c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d<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=
|
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=
|
||||||
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 Jh(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Gg=b;a.Hg=c;a.Wa=a.Ma=0;a.$a=!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]}
|
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]}
|
||||||
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.sd&&b<f.ra)for(h=g[b]=Array(f.Jc),g=0;g<h.length;g++)h[g]=Jh(null,a,b,g+1,f.rc,0);if(h){for(g=0;g<h.length;g++)if(h[g]&&h[g].sector==c){d=h[g];break}!d&&f.sd&&9==f.mc&&(d=h[g]=Jh(null,a,b,f.mc,f.rc,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.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.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 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)}
|
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)}
|
||||||
k.save=function(){var a=0,b=[];b[a++]=[this.La,this.f,this.la,this.ra,this.ia,this.ya];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?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 ("+
|
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 ("+
|
||||||
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.N("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=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")};
|
k.toJSON=function(){var a;a=0;for(var b;b=Qh(this,a++);)Th(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Rh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.J=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
function Th(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
||||||
k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<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]=
|
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]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&Th(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&Vh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Th(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;Vh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);Uh(this);this.Gb=Mc(144,5,65536);Jb(b,this,Vh);Lb(b,this.reset.bind(this));Wh(this,"None","",!0);this.K&&Wh(this,"Local Disk","?");Wh(this,"Remote Disk","??");Xh(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Wh(this);this.Gb=Oc(144,5,65536);Jb(b,this,Xh);Lb(b,this.reset.bind(this));Yh(this,"None","",!0);this.K&&Yh(this,"Local Disk","?");Yh(this,"Remote Disk","??");Zh(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){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.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.restore=function(a){return Uh(this,a[0])};function Xh(a,b){b||(a.F=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;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.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.F}
|
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}
|
||||||
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.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Zh(a,e,b,c,!1,d)}else Yh(a,e)}
|
function 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 Zh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Yh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.dd)&&g++));return g}
|
function ai(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,$h(a,b,!0),h.yb?a.O("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.Zc)&&g++));return g}
|
||||||
k.dd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Sh(this,a.zb)};
|
k.Zc=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.F||J(this));Uh(this,a.zb)};
|
||||||
function 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 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 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.ab?"?":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.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RK"+b+" unloaded",c),Sh(a,b))}
|
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 Uh(a,b){var c=0;b||(b=[]);a.L=b[c++]||2496;a.A=b[c++]||0;a.M=b[c++]||128;a.H=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.O=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.ab=!1;d.name=c.eb;d.la=203;d.ra=2;d.ia=12;d.ya=512;d.bc=!0;d.td=0;d.rd=0;d.mc=1;d.Jc=d.ia;d.rc=d.ya;d.Ad=0;d.Je=null;d.Z||(d.La="");d.status=2496}return!0}
|
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}
|
||||||
k.cd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.H=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=32;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
|
k.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.fd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=32;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.le=function(){return this.L};k.jf=function(){};k.me=function(){return this.A};k.kf=function(){};k.ie=function(){return this.M&61438};
|
k.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.ff=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.ed;case 2:b||(b=this.fd),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.H&65535,c=b.call(this,d,e,f,g,c,h,this.cd.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
k.bf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.$c;case 2:b||(b=this.ad),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.G&65535,c=b.call(this,d,e,f,g,c,h,this.Yc.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
||||||
-2,this.M|=128,this.M&64&&Kc(this.b,this.Gb))}};k.ne=function(){return this.H};k.lf=function(a){this.H=a};k.he=function(){return this.w};k.ef=function(a){this.w=a};k.je=function(){return this.f};k.gf=function(a){this.f=a};k.ke=function(){return this.O};k.hf=function(a){this.O=a};
|
-2,this.M|=128,this.M&64&&Mc(this.b,this.Gb))}};k.je=function(){return this.G};k.gf=function(a){this.G=a};k.de=function(){return this.w};k.af=function(a){this.w=a};k.fe=function(){return this.f};k.cf=function(a){this.f=a};k.ge=function(){return this.N};k.df=function(a){this.N=a};
|
||||||
var $h={},Vh=($h[65280]=[null,null,Q.prototype.le,Q.prototype.jf,"RKDS"],$h[65282]=[null,null,Q.prototype.me,Q.prototype.kf,"RKER"],$h[65284]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKCS"],$h[65286]=[null,null,Q.prototype.ne,Q.prototype.lf,"RKWC"],$h[65288]=[null,null,Q.prototype.he,Q.prototype.ef,"RKBA"],$h[65290]=[null,null,Q.prototype.je,Q.prototype.gf,"RKDA"],$h[65294]=[null,null,Q.prototype.ke,Q.prototype.hf,"RKDB"],$h);
|
var bi={},Xh=(bi[65280]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDS"],bi[65282]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKER"],bi[65284]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKCS"],bi[65286]=[null,null,Q.prototype.je,Q.prototype.gf,"RKWC"],bi[65288]=[null,null,Q.prototype.de,Q.prototype.af,"RKBA"],bi[65290]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKDA"],bi[65294]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDB"],bi);
|
||||||
function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.H=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.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<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]=
|
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]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&bi(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&di(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Y)?(a=Na(Sh(a),a.rc.replace(".json",".img")),w(a)):d.O("No disk loaded in drive."):d.O("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;bi(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;di(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ci(this);this.Gb=Mc(112,5,131072);Jb(b,this,di);Lb(b,this.reset.bind(this));ei(this,"None","",!0);this.L&&ei(this,"Local Disk","?");ei(this,"Remote Disk","??");fi(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=Ad(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ei(this);this.Gb=Oc(112,5,131072);Jb(b,this,fi);Lb(b,this.reset.bind(this));gi(this,"None","",!0);this.L&&gi(this,"Local Disk","?");gi(this,"Remote Disk","??");hi(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){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.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.restore=function(a){return ci(this,a[0])};function fi(a,b){b||(a.H=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;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.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.H}
|
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}
|
||||||
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.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}hi(a,e,b,c,!1,d)}else gi(a,e)}
|
function 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 hi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,gi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.hd)&&g++));return g}
|
function ji(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,ii(a,b,!0),h.yb?a.O("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.I++,I(a)&&G(a,"auto-loading disk: "+c)),h.eb=!!f,Mh(new Ih(a,h,"preload"),c,d,f,a.cd)&&g++));return g}
|
||||||
k.hd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));ai(this,a.zb)};
|
k.cd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Ph(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Y=b,a.Ta=c,a.La=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.pb()):a.eb=!1;a.xb&&(a.xb=!1,--this.I||J(this));ci(this,a.zb)};
|
||||||
function 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 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 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.ab?"?":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.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RL"+b+" unloaded",c),ai(a,b))}
|
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 ci(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.F=b[c++]||0;a.J=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.ab=!1;d.name=c.eb;d.la=512;d.ra=2;d.ia=40;d.ya=256;d.bc=!0;d.td=0;d.rd=0;d.mc=1;d.Jc=d.ia;d.rc=d.ya;d.Ad=0;d.Je=null;d.Z||(d.La="");d.status=29|(512==d.la?128:0)}return!0}
|
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}
|
||||||
k.gd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.J=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
|
k.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.jd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=5120;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
|
k.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.kd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=5120;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.qe=function(){return this.M&65535};
|
k.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.pf=function(a){this.M=this.M&-1023|a&1022;this.O=this.O&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.F=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.F=this.A;break;case 12:b=this.jd;case 10:b||(b=this.kd),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.J&
|
k.kf=function(a){this.M=this.M&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.G=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.G=this.A;break;case 12:b=this.dd;case 10:b||(b=this.ed),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.F&
|
||||||
63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.gd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Gb))}};k.oe=function(){return this.w};k.mf=function(a){this.w=a&65534};k.re=function(){return this.f};k.qf=function(a){this.f=a};k.se=function(){return this.F};k.rf=function(a){this.F=a};k.pe=function(){return this.J};k.nf=function(a){this.J=a&63};
|
63)<<16|this.w,a=65536-this.G&65535,a=b.call(this,c,d,e,f,a,g,this.bd.bind(this)))}a&&(this.M|=129,this.M&64&&Mc(this.b,this.Gb))}};k.ke=function(){return this.w};k.hf=function(a){this.w=a&65534};k.ne=function(){return this.f};k.lf=function(a){this.f=a};k.oe=function(){return this.G};k.mf=function(a){this.G=a};k.le=function(){return this.F};k.jf=function(a){this.F=a&63;this.M=this.M&-49|(this.F&3)<<4};
|
||||||
var ii={},di=(ii[63744]=[null,null,P.prototype.qe,P.prototype.pf,"RLCS"],ii[63746]=[null,null,P.prototype.oe,P.prototype.mf,"RLBA"],ii[63748]=[null,null,P.prototype.re,P.prototype.qf,"RLDA"],ii[63750]=[null,null,P.prototype.se,P.prototype.rf,"RLMP"],ii[63752]=[null,null,P.prototype.pe,P.prototype.nf,"RLBE"],ii);function ji(a){x.call(this,"Debugger",a,ji);this.oa=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(ji);
|
var ki={},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 ki={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ji.prototype.Nc=function(){return-1};ji.prototype.Oc=function(){};
|
var mi={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};li.prototype.Ic=function(){return-1};li.prototype.Jc=function(){};
|
||||||
function li(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a}
|
function 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 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;
|
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;
|
||||||
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 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,
|
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,
|
||||||
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}
|
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}
|
||||||
function pi(a,b,c,d){var e;null!=b?(e=a.Nc(b),0<=e?e=a.Oc(e):(e=a.fa[b],null==e&&(e=ma(b,a.oa))),null!=e||d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return e}
|
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 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.fa[b]);var c=0;for(b in a.fa)qi(a,b,a.fa[b]),c++;return 0<c}
|
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 L(a,b,c,d){switch(a.oa){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 si(a){ji.call(this,a);this.rb=!1;this.Ga=!0;this.L=Y(0);this.qb=Y(0);this.T=Y(0);this.J=[];this.f=this.O=this.F=[];ti(this);this.Ca=0;ui(this);this.Pa={};vi(this,a.messages);this.Ya=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);
|
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);
|
||||||
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(" "),
|
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(" "),
|
||||||
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],
|
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],
|
||||||
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]}},Ai=[0],Bi=[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=si.prototype;
|
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;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.w=a.w;(a=yd(a,"messages"))&&vi(this,a);this.ub=zi;this.Qb=1145>this.b.ib?Bi:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Ci(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
|
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)+" %"+
|
||||||
p(e<<d.v.na,8)+" %%"+p(n.G,8)+" "+q(n.Zb)+" "+q(n.size)+" "+m),c!=kd&&(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!=md&&(c=-1),m=0);a+=d.v.Ia;e++}}});J(this)};
|
||||||
k.va=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.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="",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;
|
||||||
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.pb(a?1:0,null),pb(d,!1));return b}),!0}return!1};k.mb=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.G;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&&Di(a,b));return c};
|
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};
|
||||||
k.ta=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&&Di(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&&Di(a,c),this.B.xa(-1))};k.Db=function(a,b,c){var d=this.da(a,!0,2);-1!==d&&(a.ac?this.v.nb(d,b):this.b.nb(d,b),c&&Di(a,c),this.B.xa(-1))};function Y(a,b){return{G:a,ac:b,Ua:!1}}k.vc=function(a,b){a.G=b;a.Ua=!1;return a};function Ei(a){return[a.G,a.Ua]}function Fi(a){return{G:a[0],Ua:a[1]}}
|
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]}}
|
||||||
function Ci(a,b,c){var d,e=(c?a.L:a.qb).G;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.J.length;e++){var g=a.J[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.od=li(a,b.Uc=c[2]))}function Di(a,b){null!=a.G&&(a.G+=b||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 vi(a,b){a.j=a;a.pa=a.ud=536870912;a.sa=null;a.ba=[];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.pa|=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}}
|
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}}
|
||||||
k.Nc=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.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.Oc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=dd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Qc(c);break;case 25:b=$c(c);break;case 26:b=ad(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b};
|
k.Jc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.gb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=fd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.sa;break;case 23:b=c.ob;break;case 24:b=$c(c);break;case 25:b=bd(c);break;case 26:b=cd(c);break;case 27:b=c.Ya;break;case 28:d&&(b=d.Ba);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.fb)}}return b};
|
||||||
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).G));if(!this.sa||a!=this.sa)if(this.sa=a,this.pa&1073741824)this.ba.push(a);else{var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Gd(a),a.Fa=0,a.xa())}};
|
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.wa&65535).H));if(!this.ua||a!=this.ua)if(this.ua=a,this.oa&1073741824)this.aa.push(a);else{var c;if(this.oa&-2147483648&&this.b&&(c=this.b.C.X)||qb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Id(a),a.Fa=0,a.ya())}};
|
||||||
function ui(a){var b;if(!Ie(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ga=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b<a.H.length;b++)a.H[b]=Y();a.ga=0;a.i("instruction history buffer allocated")}}k.ob=function(a,b){if(!Ii(this,b))return!1;this.b.ob(a);return!0};
|
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};
|
||||||
k.pb=function(a,b,c){if(!Ii(this))return!1;null===b&&(b=!this.vb||"tr"==this.vb);this.K=0;a||Ie(this)&&Je(this,this.b.u[7],0);try{a=Hd(this.b,a);var d=this.b.pb(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.xa(-1));Bd(this,b||!1);return 0<this.K};k.ea=function(a){this.b&&this.b.ea(a)};
|
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)};
|
||||||
function Bd(a,b){if(a.rb){void 0===b&&(b=!0);var c;c=a.b;if(c=c.I&128?c.pd|c.Yc<<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.S?Ji(a):Ki(a)}}function Ii(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
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};
|
||||||
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ui(this);this.Fa=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Li(this);a||Bd(this)};k.save=function(){var a=new S(this);a.set(0,Ei(this.L));a.set(1,Ei(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.J);return a.data()};
|
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wi(this);this.Fa=0;this.ua=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ni(this);a||Dd(this)};k.save=function(){var a=new S(this);a.set(0,Gi(this.L));a.set(1,Gi(this.T));a.set(2,[this.g,this.U,this.oa]);a.set(3,this.I);return a.data()};
|
||||||
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Fi(a[b++]),this.T=Fi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
|
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Hi(a[b++]),this.T=Hi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b};
|
||||||
k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.S){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.mb();Li(this,this.b.u[7]);this.sa=null}};function Ie(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+=" (";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}
|
||||||
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.H.length&&(a.Fa++,0>d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.vc(a.H[a.ga],b),++a.ga==a.H.length&&(a.ga=0)));return!1}function Pf(a){var b=a.b;if(b.C.X)throw T(b,a.b.ua&65535),a.ea(),-1;return!1}
|
function 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 ti(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b<a.O.length;b++){c=a.O[b];var d=a.v;c=a.da(c);ud(d.Y[c>>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b<a.F.length;b++)c=a.F[b],d=a.v,c=a.da(c),ud(d.Y[c>>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Mi(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Ni(this,a,a.length-1,"set"),ui(this)));return d};
|
function 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 Mi(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||Ni(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.v,ud(d.Y[c>>>d.na],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.G)+(d?" "+d:c.Uc?' "'+c.Uc+'"':""))}
|
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 Li(a,b){if(void 0!==b)td(a,b,1,a.f,!0),a.S=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 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 td(a,b,c,d,e){var f=!1;if(!a.sb++)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&&(Mi(a,d,h,!0),e=!0);if(n=h.od){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.sb--;return f}
|
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 Qi(a,b,c,d){var e=Y(b.G),f=a.ta(b,2),g,h;for(h in a.ub)if(g=a.ub[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.G+((f&255)<<24>>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
|
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),
|
||||||
A&63)switch(A=C&7,C&56){case 0:y=Hi(A);break;case 8:y="@"+Hi(A);break;case 16:7>A?y="("+Hi(A)+")+":(C=v.ta(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Hi(A)+")+":(C=v.ta(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Hi(A)+")";break;case 40:y="@-("+Hi(A)+")";break;case 48:C=v.ta(t,2);y=L(v,C,0,!0)+"("+Hi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.ta(t,2),y="@"+L(v,C)+"("+Hi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
|
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]);
|
||||||
0<h.length&&(h+=",");h+=v||"???"}}f="";g=L(a,e.G)+":";if(-1!==e.G&&-1!==b.G){do if(f+=" "+L(a,a.ta(e,2)),null==e.G)break;while(e.G!=b.G)}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="+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")+" "}
|
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")+" "}
|
||||||
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.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,dd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Qc(d));break;case 25:c="MMR1="+L(a,$c(d));break;case 26:c="MMR2="+L(a,ad(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&&
|
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&&
|
||||||
(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Si(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ri(a,"T")+Ri(a,"N")+Ri(a,"Z")+Ri(a,"V")+Ri(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Kc=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
(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};
|
||||||
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.Kc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ng:b,G:c,Bd:d,ja:e,Ic:f})}function Ti(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b<a.J.length;b++){var f=a.J[b],g=f.G>>>0,h=f.Bd;if(e>=g&&e<g+h){e=Aa(f.Ic,[e-g],a.Kc);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 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 Ui(a,b,c,d){var e={},f=a.J[b].Ic,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.J[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.fa[c[1]],!0;b=ni(a,c[3]);return void 0!==b?(a.fa[c[1]]=b,!0):!1}a.i("invalid assignment:"+b);return!1}
|
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 Wi(a,b,c){var d=null;if(b=Ci(a,b,!0)){a.da(b);var e=Ti(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.G-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.G)&&(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 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 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,
|
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,
|
||||||
g);a.L=Y(e.u[7]);break;case "N":e.aa=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":ed(e,g);break;case "IR":cd(e,g);break;case "ER":e.Ba=g;d=!0;break;case "SL":e.lb=g|255;break;case "MMR0":Zc(e,g);d=!0;break;case "MMR3":bd(e,g);d=!0;break;case "AR":a.w&&(d=a.w,Yb(d,d.Aa=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.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&65535;break}a.i("unknown register: "+f);return}a.B.xa();a.i("updated registers:")}}a.i(Si(a,d));c&&(a.L=Y(e.u[7]),Ki(a,L(a,a.L.G)))}}function Xi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.i(c[2]):qi(a,null,c[2].charCodeAt(0)):ni(a,b,!0)}
|
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)}
|
||||||
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.vb=b;Oa(c,function(){return pb(a,!0)&&a.pb(e,d,!1)},function(){a.w&&a.w.stop&&a.w.stop();a.B.xa(-1);pb(a,!1)})}}
|
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 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.G<b.G)return;e=d.G-b.G;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=qb(a,!1)||a.S?a.K:null;var g=null!=f?"cycles":null,h=Ti(a,b),l=b.G;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.G-l;c++}}}
|
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 Pi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0<b.length){a.U&&(b="a "+L(a,a.T.G)+" "+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 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=
|
||||||
Ci(a,g[1],!0);if(r)if(a.T=r,void 0===g[2])a.i("begin assemble at "+L(a,r.G)),a.U=!0,a.B.xa();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"),
|
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"),
|
||||||
a.i("\tbn [#]\tbreak after # instruction(s)");else{var ra=A.charAt(1);if("l"==ra){var Sa;Sa=0+Oi(a,a.f);Sa+=Oi(a,a.O);(Sa+=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.G?(ti(a),a.i("all breakpoints cleared")):Mi(a,a.f,R)||Mi(a,a.O,R)||Mi(a,a.F,R)||a.i("breakpoint missing: "+L(a,R.G)):null!=R.G&&(Gi(a,R,C),"p"==ra?a.wb(a.f,
|
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,
|
||||||
R):"r"==ra?a.wb(a.O,R):"w"==ra?a.wb(a.F,R):a.i("unknown breakpoint command: "+ra))}}}break;case "c":a.Za&&(a.Za.value="");break;case "d":a:{var rb,Ua=g[0],ua=g[1],Va=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");
|
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");
|
||||||
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.B,!0);"console"==Va?console.log($g):(a.Za&&(a.Za.value=""),a.i($g))}else if("symbols"==ua)for(var $d=0;$d<a.J.length;$d++){var ae=a.J[$d],tb;for(tb in ae.ja)if("."!=tb.charAt(0)){var ah=ae.ja[tb].o;if(void 0!==ah){var bh=ae.ja[tb].l;bh&&(tb=bh);a.i(L(a,ah)+" "+tb)}}}else{if("d"==Ua){for(rb in Db)if(g[1]==rb){var ch=a.Pa[rb];ch?(g.shift(),g.shift(),ch(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"==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("no dump registered for "+ua);break a}ua||(Ua=a.Tb||"dw")}else a.Tb=Ua;if("dh"==Ua){var dh=ua,eh=Va,fh="",gh=0,ka=a.ga,va=a.H;if(va.length){var ea=+dh||a.tb,ac=+eh||10;isNaN(ea)?ea=ac:fh="more ";ea>va.length&&(a.i("note: only "+va.length+" available"),ea=va.length);ka-=ea;0>ka&&(null==va[va.length-1].G?(ea=ka+ea,ka=0):ka+=va.length);var be=[];"call"==eh&&(ac=1E5,be=["CALL"]);for(void 0!==dh&&a.i(ea+" instructions earlier:");0<ac&&ka!=a.ga;){var hh=va[ka++];if(null==hh.G)break;var bc=Y(hh.G),rj=
|
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=
|
||||||
ea--,ih=Qi(a,bc,"history",rj);(!be.length||0<=ih.indexOf(be[0]))&&a.i(ih);bc.oc&&(ka+=bc.oc,ac-=bc.oc,ea-=bc.oc);ka>=va.length&&(ka=0);a.tb=ea;gh++;ac--}}gh||(a.i("no "+fh+"history available"),a.tb=void 0)}else{var ub=Ci(a,ua);if(ub){var cc=0,ce=!1,de="ds"==Ua;Va&&(ce=!0,"l"==Va.charAt(0)&&(ce=!1,Va=Va.substr(1)||qj),cc=pi(a,Va)>>>0,65536<cc&&(cc=65536));for(var vb="dd"==Ua?4:"db"==Ua?1:2,Rc=(ce?cc-ub.G:vb*cc)||128,ee=de?16:a.oa,sj=(Rc+ee-1)/ee|0||1,Wa="";sj--&&0<Rc;){for(var Xa="",fe="",ua=L(a,ub.G),
|
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),
|
||||||
Sc=ee,dc=0,ec=0;0<Sc&&0<Rc;){var wb=1,Tc=1==vb?a.dc(ub,wb):a.ta(ub,wb=2),dc=dc|Tc<<(ec<<3),ec=ec+wb;ec==vb&&(de?(Xa&&(Xa+=","),Xa+="0x"+p(dc,2*vb)):(Xa+=L(a,dc,vb),Xa+=1==vb?9==Sc?"-":" ":" "),dc=ec=0);Sc-=wb;for(Rc-=wb;wb--;)var ge=Tc&255,fe=fe+(32<=ge&&128>ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Wa&&(Wa+="\n");Wa=de?Wa+(Xa+","):Wa+(ua+" "+Xa+(0==Sc?" "+fe:""))}Wa&&a.i(Wa);a.qb=ub}}}}break;case "e":if("else"==g[0])break;var xb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(xb=1,he=255,ie=a.dc,je=a.Nb):"e"==
|
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"==
|
||||||
ke||"ew"==ke?(xb=2,he=65535,ie=a.ta,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Ci(a,le);if(Uc)for(var Vc=2;Vc<g.length;Vc++){var fc=ni(a,g[Vc]);if(void 0===fc){a.i("unrecognized value: "+g[Vc]);break}fc&~he&&a.i("warning: "+p(fc)+" exceeds "+xb+"-byte value");a.i("changing "+L(a,Uc.G)+(I(a,16)?"":" from "+L(a,ie.call(a,Uc),xb))+" to "+L(a,fc,xb));je.call(a,Uc,fc,xb)}}break;case "g":a:{var jh=
|
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=
|
||||||
g[1],tj=b;if(void 0!==jh){var me=Ci(a,jh,!0);if(!me)break a;Gi(a,me,tj);a.wb(a.f,me,!0)}a.ob(!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 ne;var gc=b.substr(2),gc=ya(gc);ni(a,gc)?(c||a.i("true: "+gc),ne=!0):(c||a.i("false: "+gc),ne=!1);ne||(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 oe=0,pe=Y(),hc=Y(a.b.u[6]);
|
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]);
|
||||||
for(a.i("stack trace for "+L(a,hc.G));10>oe;){for(var Ya=null,vj=256;65536>hc.G>>>0;){pe.G=a.ta(hc,2);if(null==hc.G||!vj--)break;if(!(pe.G&1)){for(var wj=a,Wc=pe,kh=null,ic=Wc.G,lh=ic,qe=1;6>=qe&⁣qe++){if(2<qe){Wc.G=ic;var Xc=Qi(wj,Wc);if(0<=Xc.indexOf("JSR")){var mh=Xc.indexOf(" ");if(ic+(Xc.indexOf(" ",mh+1)-mh-1)/2==lh){kh=Xc;break}}}ic-=2}Wc.G=lh;if(Ya=kh)break}}if(!Ya||null==Ya)break;var nh=null;if("ks"==uj){var oh=Ya.match(/[0-9A-F]+$/);oh&&(nh=Wi(a,oh[0]))}Ya=ta(Ya,50)+" ;"+(nh||"stack="+
|
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="+
|
||||||
L(a,hc.G));a.i(Ya);oe++}oe||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 La=0;if("all"==H)La=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){La=Db[wa];xa=!!(a.pa&La);break}if(!La){a.i("unknown message category: "+H);break a}}if(La)if("on"==g[2])a.pa|=La,xa=!0;else if("off"==g[2]&&
|
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]&&
|
||||||
(a.pa&=~La,xa=!1,1073741824==La)){for(var ph=1E3<=a.ba.length?a.ba.length-1E3:0;ph<a.ba.length;)a.i(a.ba[ph++]);a.ba=[]}}var xj=0,jc="";for(wa in Db)if(!H||H==wa){var yj=!!(a.pa&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));
|
(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));
|
||||||
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.S)a.i("step in progress");else{var Yc=Y(a.b.u[7]),kc=a.ta(Yc);3==kc||4==kc||34816==(kc&65280)||35072==(kc&65280)?(a.S=rh,Di(Yc,2)):2048==(kc&65024)&&(Qi(a,Yc),a.S=rh);a.S?(a.wb(a.f,Yc,!0),a.ob()||(a.B&&a.B.mb(),a.S=0)):Yi(a,qh?"tr":"t")}}break;case "r":if("reset"==b){a.B&&a.B.reset();break}Ji(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var lc=
|
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=
|
||||||
+g[2];if(8==lc||10==lc||16==lc)a.oa=lc;else{a.i("invalid base: "+lc);break}}a.i("default base: "+a.oa);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.Fb?"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.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&&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)+
|
||||||
"Mhz")+" ("+a.b.jb+"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"==
|
"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"==
|
||||||
g[0]){a.i("PDPjs version 1.30.5 ("+a.b.ib+",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 re="commands:",se;for(se in wi)re+="\n"+ta(se,9)+wi[se];Ie(a)||(re+="\nnote: history disabled if no exec breakpoints");a.i(re);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}
|
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}
|
||||||
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 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 $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.ba=a.busWidth||a.buswidth;this.f=bj;this.J=null;this.F=this.T=!1;this.fa=yd(this,"url")||"";(Math.random()+.1).toString(36);this.B=cj(this);if(this.b=ob("CPU",this.id)){this.j=ob("Debugger",this.id);this.v=new pc({id:this.fb+".bus",busWidth:this.ba},this.b,this.j);var d,e=mb(this.id);if((this.w=ob("Panel",this.id))&&this.w.Za)for(b=0;b<e.length;b++)d=e[b],d.N=this.w.N,d.i=this.w.i,
|
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,
|
||||||
d.Za=this.w.Za;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.H=d:this.f=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.O=a,f||(this.F=!0,this.f=bj),this.f&&(this.K=
|
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=
|
||||||
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.H=null,g.F=!1,g.N("Unable to load machine state from server (error "+c+(b?": "+ya(b):"")+")")):(g.J=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;
|
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;
|
||||||
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 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 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.N("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=$i.prototype;
|
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;
|
||||||
k.Xb=function(a){void 0===a&&(a=this.f||(this.J?1:bj));if(!this.g){this.g++;var b=!1,c=!1;this.S=!1;var d=this.K||new S(this,"1.30.5");if(-1==a)b=!0;else if(a>bj){if(dj(d,this.J)){this.A=new S(this,"1.30.5","failsafe");dj(this.A)&&(ij(this,d),a=2,jj(this.A));this.A.set("timestamp",Ca());kj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=hj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?dj(d,g):("error"==
|
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"==
|
||||||
f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.B=null)):this.i(f+": "+g),jj(d),dj(d)?(c=hj(d),e=!0):c=!1))}e&&gj(this,c?d:null)}else 2==a&&d.clear()}else gj(this);delete this.J;delete this.K}e=mb(this.id);for(f=0;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.Lc,b):this.Lc(b)}};
|
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)}};
|
||||||
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.O&&!a.T?(c.clear(),a.f=bj,window&&window.location.reload()):a.S=!0,b.Ka(null),e=!1)}if(!d&&b.Dc)for(a=b.Dc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
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}
|
||||||
k.Lc=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&&(lj(this,this.b,b,c,a),this.xa(),this.b.Eb());this.S&&(ij(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
|
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};
|
||||||
function ij(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function 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 Zi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l<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 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,
|
||||||
d)),c&&(m.C.ma=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&mj(a,a.B,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}
|
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}
|
||||||
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.xa(-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.xa(-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.xa(-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.xa=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.I&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=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.A=0}Yb(b,0<a&&c&&!d?b.b.Ub:b.Aa);Xb(b,b.Bb);a=b.b;a=a.S?a.Xa&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.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",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
k.va=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.H){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.O?window&&window.location.reload():(a||(d.qc=!0),d.Xb(bj),d.qc=!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?aj(d,!1,!0):hj(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.G){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");aj(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.pc=!0),d.Xb(dj),d.pc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
|
||||||
c,c.onclick=function(){var a=cj(d,!0);if(a){var b=!!(d.f&&!d.H||d.O),c=Zi(d,b);b?mj(d,a,c):d.N("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=ej(d,!0);if(a){var b=!!(d.f&&!d.G||d.N),c=aj(d,b);b?oj(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function cj(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=nj(a,c))||a.N("The user ID is invalid.")):b&&a.N("Browser local storage is not available"));return c}
|
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 nj(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 ej(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+oj(a,"1.30.5"));return b}
|
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 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.N("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.N(c),Ka("user",""),a.B=null)}}
|
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 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.mb=function(a){if(this.Za){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Za.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)}});
|
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)}});
|
||||||
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&&Zi(c,!(!c.f||c.H),!0)}});function S(a,b,c){this.id=a.id;this.key=oj(a,b,c);this.j=a.j;jj(this,a.nd)}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}
|
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}
|
||||||
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,
|
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,
|
||||||
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]);Ka(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;
|
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;
|
||||||
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 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 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"),
|
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"),
|
||||||
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)}
|
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)}
|
||||||
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]*/,
|
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]*/,
|
||||||
"");a=a.replace(d[0],g);Cj(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],g);Ej(a,b,c)}})}else c(a,null)}
|
||||||
function Dj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--pj||cb(!0));l=!1}var g,h,l=!0;pj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
|
function Fj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);l&&(--rj||cb(!0));l=!1}var g,h,l=!0;rj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
|
||||||
(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?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: "+
|
(c="/versions/pdpjs/1.30.5/components.xsl");m=function(d,h){h?Cj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--rj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--rj||cb(!0)):f("invalid machine element: "+
|
||||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?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
|
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
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@
|
||||||
*/
|
*/
|
||||||
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<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={Ue:0,oc:1,We:2,Xe:3,Ye:4,Ze:5,$e:6,af:7,Ub:8,bf:9,pc:10,cf:11,df:12,qc: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,
|
var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},m={Re:0,kc:1,Te:2,Ue:3,Ve:4,We:5,Xe:6,Ye:7,Tb:8,Ze:9,lc:10,$e:11,af:12,mc:13,bf:14,cf:15,df:16,ef:17,ff:18,gf:19,hf:20,jf:21,kf:22,lf:23,mf:24,nf:25,pf:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,
|
||||||
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Tb:65,Te:66,Ve:67,tf:68,E:69,uf:70,vf:71,wf:72,xf:73,yf:74,zf:75,Af:76,Bf:77,Cf:78,Df:79,Ef:80,Q:81,Ff:82,Gf:83,Hf:84,If:85,Jf:86,Kf:87,Lf:88,Mf:89,Ac:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Nf:97,Of:98,Pf:99,d:100,e:101,Qf:102,Rf:103,Sf:104,Tf:105,Wf:106,k:107,Xf:108,Yf:109,n:110,Zf:111,p:112,q:113,r:114,$f:115,t:116,ag:117,bg:118,cg:119,x:120,y:121,z:122,"{":123,
|
"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Sb:65,Qe:66,Se:67,qf:68,E:69,rf:70,sf:71,tf:72,uf:73,vf:74,wf:75,xf:76,yf:77,zf:78,Af:79,Bf:80,Q:81,Cf:82,Df:83,Ef:84,Ff:85,Gf:86,Hf:87,If:88,Jf:89,wc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Kf:97,Lf:98,Mf:99,d:100,e:101,Nf:102,Of:103,Pf:104,Qf:105,Tf:106,k:107,Uf:108,Vf:109,n:110,Wf:111,p:112,q:113,r:114,Xf:115,t:116,Yf:117,Zf:118,$f:119,x:120,y:121,z:122,"{":123,
|
||||||
"|":124,"}":125,"~":126,rc:127};
|
"|":124,"}":125,"~":126,nc: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 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}
|
||||||
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 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]})}
|
||||||
|
|
@ -44,227 +44,227 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
|
||||||
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||||
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
||||||
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
||||||
function ta(a,b){var c,d={M:null,ba:null,na:null,ma:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.M=e;else if(e=g.words)for(d.M=Array(2*e.length),f=c=0;c<e.length;c++)d.M[f++]=e[c]&255,d.M[f++]=e[c]>>8&255;else if(e=g.data)for(d.M=Array(4*e.length),f=c=0;c<e.length;c++)d.M[f++]=e[c]&
|
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]&
|
||||||
255,d.M[f++]=e[c]>>8&255,d.M[f++]=e[c]>>16&255,d.M[f++]=e[c]>>24&255;else d.M=g;d.ba=g.symbols;d.M.length?1==d.M.length&&(w(d.M[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;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.M=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&&(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}
|
||||||
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 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 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 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 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 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 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 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)});
|
||||||
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.Zb=b.comment;this.Nc=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,Fa:!1,Jb:!1,R:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Lc=d||0;y.push(this)}var Na=void 0,Oa={};
|
Ia(Ca("Opera")||Ca("iOS")?"onunload":"onbeforeunload",function(){Ka(Ea.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Xb=b.comment;this.Kc=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Ia:!1,Jb:!1,S:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Ic=d||0;y.push(this)}var Na=void 0,Oa={};
|
||||||
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
||||||
function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ta=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ta={},y=[];function Ua(a,b,c){Ta[a]&&b&&(Ta[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<y.length;b++){var d=y[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
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 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 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 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.aa(g.type,g.binding,f,g.value),l=k.length}}}}
|
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,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 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}
|
||||||
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},aa: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.gb=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),
|
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),
|
||||||
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)},ha:function(){return this.o.R=!0},ga:function(a,b){b&&(this.o.R=!1);return!0}};function Xa(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 E(a,b){a.o.error||(a.o.ready=!1!==b,a.o.ready&&(b=a.wb,a.wb=null,b&&b()))}
|
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()))}
|
||||||
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 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.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 $a="undefined"!==typeof ArrayBuffer;
|
||||||
function ab(a){x.call(this,"Panel",a,ab,512);this.ia=this.i=this.c=this.m=this.s=this.v=0;this.w=this.C=this.A=!1;this.H=bb;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]}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 ab(a){x.call(this,"Panel",a,ab,512);this.ja=this.i=this.c=this.m=this.s=this.v=0;this.w=this.C=this.B=!1;this.H=bb;this.h={};this.b={START:[1,1,!0,!1,this.Rc],STEP:[1,1,!1,!1,this.Sc],ENABLE:[1,1,!1,!1,this.Nc],CONT:[1,1,!0,!1,this.Lc],DEP:[0,0,!0,!1,this.Mc],EXAM:[1,1,!0,!1,this.Oc],LOAD:[1,1,!0,!1,this.Qc],TEST:[0,0,!0,!1,this.Pc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Tc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
|
||||||
h.aa=function(a,b,c,d){if(this.l&&this.l.aa(a,b,c,d)||this.a&&this.a.aa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
|
h.ba=function(a,b,c,d){if(this.l&&this.l.ba(a,b,c,d)||this.a&&this.a.ba(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
|
||||||
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.aa.call(this,a,b,c,d)}};h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ha=function(a,b){b||(kb(),this.reset());return!0};h.ga=function(){return!0};
|
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.ba.call(this,a,b,c,d)}};h.ga=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ia=function(a,b){b||(kb(),this.reset());return!0};h.ha=function(){return!0};
|
||||||
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.G&&a.G.g||8)?ja(c,d):ka(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.G&&a.G.g||8)?ja(c,d):ka(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
||||||
function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Uc=function(a){a||this.a.o.T||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Vc=function(){};h.Qc=function(a){a||F(this.a)};
|
function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rc=function(a){a||this.a.o.U||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Sc=function(){};h.Nc=function(a){a||F(this.a)};
|
||||||
h.Oc=function(a){if(!a&&!this.a.o.T)if(cb(this,"ENABLE"))pb(this.a);else{a=this.G;var b;if(b=a)a.o.Fa&&(a.o.Jb=!0),b=!a.o.Fa;if(b)Xa(a,!0),a.zb(0,null),Xa(a,!1);else try{var c=this.a.zb(1);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.Pc=function(a){a&&!this.a.o.T&&(this.w&&tb(this),a=ub(this,this.c),this.H==bb?this.g.Xa(this.ia,a):this.a.Xa(this.ia,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.Rc=function(a){a||this.a.o.T||(this.C&&tb(this),a=this.H==bb?this.g.Qa(this.ia):this.a.Qa(this.ia),ub(this,a))};h.Tc=function(a){a||this.a.o.T||vb(this,this.c)};h.Sc=function(a){if(a)this.A=!0,ib(this,!0);else if(this.A=!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.Wc=function(a,b){this.c=a?this.c|1<<b:this.c&~(1<<b)};
|
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)};
|
||||||
function tb(a){var b=1145>a.a.Ta?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<<c)}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.A||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.Xc=function(a,b){return(b?this.m:this.c)&65535};h.Yd=function(a){this.m=a};
|
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};
|
||||||
var xb={},gb=(xb[65400]=[null,null,ab.prototype.Xc,ab.prototype.Yd,"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 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);
|
||||||
function yb(a,b,c){x.call(this,"Bus",a,yb,16);this.a=b;this.G=c;this.K=a.busWidth||16;this.s=0;this.v=[];this.i=null;this.C=1<<this.K;this.qa=this.C-1;this.b=G;this.c=Math.log2(this.b);this.H=this.b>>2;this.l=this.b-1;this.w=this.C/this.b|0;this.Da=[];this.h=0;this.m=!1;this.Kb=0;this.A=[];this.Bc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.w);for(b=0;b<this.w;b++)this.g[b]=a;E(this)}z(yb);var G=8192,Eb=G-1;
|
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 zb(a,b){var c=-1,d=this.controller,e=d.Da[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.Da[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
|
function 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}
|
||||||
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Da[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Da[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Da[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Ga[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ga[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Ga[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
||||||
function Cb(a,b,c){var d=!1,e=this.controller;a=e.Da[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.s){var c;a.s&&(c=(1<<a.s)-G,Gb(a,c,G,a.v),a.s=0);b&&(a.s=b,c=1<<b,a.qa=c-1,c-=G,a.v=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.A.length;a++)this.A[a]();Fb(this,16)};h.ha=function(a,b){b||this.reset();return!0};
|
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 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.Kb+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Kb(2,b,c)}
|
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 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){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}h.Qa=function(a){3932160<=a&&(a=Ob(this.a,a));var b=a&this.l,c=(a&this.qa)>>>this.c;this.m=!1;this.h++;a=this.g[c].gc(b,a);this.h--;return a};
|
function 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 Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Sb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Xa=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].mc(c,b&65535,a);this.h--};
|
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 Sb(a){for(var b=0,c=[],d=0;d<a.w;d++){var e=a.g[d];if(e.za||e.Hc){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,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Eb;if(void 0!==a.Da[n])return w("I/O address already registered: "+ka(b,8,!0)),!1;a.Da[n]=[d,e,f,g,l||"unknown",k||16,!1]}return!0}
|
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 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),!Tb(a,e,e,g,k,l,n,f[7]||b.Lc,p||b.Ca))return!1}}return!0}function hb(a,b){a.A.push(b)}
|
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 I(a,b,c){a.m=!0;a.h||(c&&(a.a.ja|=c),J(a.a,4,0,b))}function Ub(a){var b=a.m;a.m=!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={B:0,Qb:-1}}z(K);h=K.prototype;
|
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;
|
||||||
h.fa=function(a,b,c,d){this.g=b;this.l=a;this.a=c;this.G=d;var e=this;this.b.Qb=Vb(c,function(){e.b.Sa|=128;e.b.Sa&64&&Wb(e.a,e.b.Ra);e.l&&e.l.Ba(1);Xb(e.a,e.b.Qb,1E3/60)});this.b.Ra=Yb(64,6,524288);fb(b,this,Zb);hb(b,this.reset.bind(this));E(this)};h.reset=function(){this.b.Sa=128;Xb(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||$b(this.a,this.b.Ra)};h.fd=function(){var a=this.a,b=a.Z;b&57344||(b=b&-3199|a.mb<<5|a.nb<<1);return b};
|
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.ge=function(a){ac(this.a,a&-129|this.a.Z&128)};h.gd=function(){var a=this.a;a.Z&57344||(a.Gb=a.w>>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.hd=function(){var a=this.a;a.Z&57344||(a.Ib=a.w&65535);return a.Ib};h.jd=function(){return this.a.Ea};h.he=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.$a=a&16?4194303:262143,bc(b))};h.Rd=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
|
h.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.Pe=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Kd=function(a){return this.a.I[1][a>>1&7]};h.Ie=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Id=function(a){return this.a.I[1][(a>>1&7)+8]};h.Ge=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Jd=function(a){return this.a.ca[1][a>>1&7]};h.He=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Hd=function(a){return this.a.ca[1][(a>>1&7)+8]};
|
h.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.Fe=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.cd=function(a){return this.a.I[0][a>>1&7]};h.de=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.ad=function(a){return this.a.I[0][(a>>1&7)+8]};h.be=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.bd=function(a){return this.a.ca[0][a>>1&7]};h.ce=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};h.$c=function(a){return this.a.ca[0][(a>>1&7)+8]};h.ae=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};
|
h.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.Qd=function(a){return this.a.I[3][a>>1&7]};h.Oe=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Od=function(a){return this.a.I[3][(a>>1&7)+8]};h.Me=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Pd=function(a){return this.a.ca[3][a>>1&7]};h.Ne=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Nd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Le=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]};
|
h.Nd=function(a){return this.a.J[3][a>>1&7]};h.Le=function(a,b){this.a.J[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.J[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.J[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.da[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Kd=function(a){return this.a.da[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.da[3][b]=a;this.a.J[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ma[a]:this.a.f[a]};
|
||||||
h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.od=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.me=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.rd=function(){return this.a.f[7]};h.pe=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.pd=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
|
h.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.ne=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.qd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.oe=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Zc=function(a){return this.a.jc[a-65504>>1]};h.$d=function(a,b){this.a.jc[b-65504>>1]=a};h.fc=function(a){if(65520==a){a=0;switch(Lb){case Lb:a=this.g.Kb}a=(a>>6)-1}else a=0;return a};h.lc=function(){};h.Md=function(){return 1};h.Ke=function(){};h.Yc=function(){return this.a.ja};
|
h.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.Zd=function(){this.a.ja=0};h.ed=function(){return this.a.ic};h.fe=function(a,b){b&1||(a&=255);this.a.ic=a};h.kd=function(a,b){return b?0:this.a.yb};h.ie=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Ld=function(a,b){return b?0:this.a.jb&65280};h.Je=function(a){this.a.jb=a|255};h.nd=function(){return cc(this.a)};h.le=function(a){dc(this.a,a&-1793|cc(this.a)&1792);this.a.u|=256};h.kc=function(){};
|
h.ce=function(a,b){b&1||(a&=255);this.a.fc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return ec(this.a)};h.ie=function(a){fc(this.a,a&-1793|ec(this.a)&1792);this.a.u|=256};h.hc=function(){};
|
||||||
var L={},Zb=(L[61568]=[null,null,K.prototype.Rd,K.prototype.Pe,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Kd,K.prototype.Ie,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Id,K.prototype.Ge,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Jd,K.prototype.He,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Hd,K.prototype.Fe,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.cd,K.prototype.de,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.ad,K.prototype.be,"KDPDR",8,1145,64],L[62688]=
|
var L={},ac=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]=
|
||||||
[null,null,K.prototype.bd,K.prototype.ce,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.$c,K.prototype.ae,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.jd,K.prototype.he,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.dd,K.prototype.ee,"LKS"],L[65402]=[null,null,K.prototype.fd,K.prototype.ge,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.gd,K.prototype.kc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.hd,K.prototype.kc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Qd,K.prototype.Oe,
|
[null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.hc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.hc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le,
|
||||||
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.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,
|
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va,
|
||||||
K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.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.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa,
|
||||||
K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.pd,K.prototype.ne,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.qd,K.prototype.oe,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Zc,K.prototype.$d,"CTRL",8,1170],L[65520]=[null,null,K.prototype.fc,K.prototype.lc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.fc,K.prototype.lc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Md,K.prototype.Ke,"SYSID",1,1170],L[65526]=
|
K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.dc,K.prototype.ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.dc,K.prototype.ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]=
|
||||||
[null,null,K.prototype.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);
|
[null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L);
|
||||||
Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b<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 ec(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 fc;if($a){var gc=new ArrayBuffer(2);(new DataView(gc)).setUint16(0,256,!0);fc=256===(new Uint16Array(gc))[0]}else fc=!1;var hc=fc;
|
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;
|
||||||
function H(a,b,c,d,e,f){this.g=a;this.id=ic+=2;this.a=null;this.Pa=b;this.Ab=c;this.size=d||0;this.type=e||jc;this.l=e==kc;this.controller=null;Db(this);this.za=this.Hc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],lc(this,f.Bc);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.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),lc(this,hc?mc:nc);else{a=this.a=Array(this.size>>
|
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>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;lc(this,oc)}else lc(this)}var jc=0,Lb=1,kc=2,Jb=4,Mb=["NONE","RAM","ROM","VID","H/W"],ic=0;
|
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;
|
||||||
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},v:function(a,b){I(this.g,b,32);return 255},h:function(a,b,c){I(this.g,c,32)},A: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($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++)|
|
||||||
this.Nb(a,b)<<8},w:function(a,b,c){this.Rb(a++,b&255,c++);this.Rb(a,b>>8,c)},P:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.za=!0},ya: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},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|
|
||||||
b>>8);this.za=!0},H:function(a,b){return this.K(a,b)},V:function(a,b){return this.gc(a,b)},ta:function(a,b,c){this.l?this.h(a,b,c):this.Sb(a,b,c)},wa:function(a,b,c){this.l?this.h(a,b,c):this.mc(a,b,c)},C:function(a){return this.j[a]},L:function(a){return this.j[a]},U:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},sa:function(a,b){this.j[a]=b;this.za=!0},Ca:function(a,b){this.j[a]=b;this.za=!0},va:function(a,b,c){a&1&&I(this.g,
|
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,
|
||||||
c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&pc(a,qc,!1),(a.m=c.m)&&tc(a,qc,!1))}function tc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.mc=b[3]||a.w}function pc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.A);if(c||void 0===c)a.K=b[0]||a.v,a.gc=b[2]||a.A}function lc(a,b){b||(b=uc);pc(a,b,void 0);tc(a,b,void 0)}
|
c,64);this.c.setUint16(a,b,!0);this.za=!0},Ea:function(a,b,c){a&1&&I(this.g,c,64);this.v[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&rc(a,uc,!1),(a.m=c.m)&&vc(a,uc,!1))}function vc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.H);if(c||void 0===c)a.s=b[1]||a.h,a.I=b[3]||a.H}function rc(a,b,c){c&&a.i||(a.Nb=b[0]||a.B,a.Y=b[2]||a.w);if(c||void 0===c)a.R=b[0]||a.B,a.C=b[2]||a.w}function nc(a,b){b||(b=wc);rc(a,b,void 0);vc(a,b,void 0)}
|
||||||
var uc=[],oc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],qc=[H.prototype.H,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var nc=[H.prototype.C,H.prototype.sa,H.prototype.U,H.prototype.va],mc=[H.prototype.L,H.prototype.Ca,H.prototype.ka,H.prototype.xa];
|
var wc=[],qc=[H.prototype.ka,H.prototype.xa,H.prototype.Ca,H.prototype.Fa],uc=[H.prototype.M,H.prototype.va,H.prototype.sa,H.prototype.Da];if($a)var pc=[H.prototype.K,H.prototype.ua,H.prototype.la,H.prototype.ya],oc=[H.prototype.V,H.prototype.wa,H.prototype.ta,H.prototype.Ea];
|
||||||
function vc(a,b){x.call(this,"CPU",a,vc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Fb=Math.round(this.rb/1E4)/100;this.Ma=this.Fb*this.xa;this.o.T=!1;this.o.Pb=!1;this.o.fb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.P=[];this.ec=this.Vd.bind(this);E(this)}z(vc);var wc=["power","reset"];h=vc.prototype;
|
function xc(a,b){x.call(this,"CPU",a,xc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Cb=Math.round(this.rb/1E4)/100;this.Fa=this.Cb*this.xa;this.o.U=!1;this.o.Pb=!1;this.o.gb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.M=[];this.cc=this.Sd.bind(this);E(this)}z(xc);var yc=["power","reset"];h=xc.prototype;
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.A=a.A;for(b=0;b<wc.length;b++)(c=this.j[wc[b]])&&this.l.aa(null,wc[b],c);a=xc(a,"autoStart");null!=a&&(this.o.fb="true"==a?!0:"false"==a?!1:!!a);E(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};h.ha=function(a,b){if(!b){if(a&&this.restore){yc(this);if(!this.restore(a))return!1;zc(this)}else this.reset();this.X("No debugger detected")}return!0};h.ga=function(a){return a?this.save():!0};
|
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.fb=function(){return this.o.fb||void 0===this.j.run?(pb(this),!0):!1};h.ac=function(){return 0};function zc(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.ac()|0;a.Na-=b;0>=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=Ac(a)&&(a.ab=a.bb=-1,zc(a),F(a),c=!0);c&&a.X(Ac(a)+" cycles: checksum="+ka(a.pb))}}
|
h.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.aa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=A(a.id);for(c=0;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.R);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.T?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.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]=
|
||||||
c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Bc(d,d.xa<<1,!0)},c.textContent=this.Ma.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.L=0)}function Cc(a,b){var c=1;b&&1<a.xa&&a.La&&(c=a.La/a.Fb);a.bc=Math.round(1E3/30);a.sb=Math.floor(a.rb/30*c);b||(a.cb=a.sb);a.Cb=0}function Ac(a){return a.ya+a.ta+a.wa-a.a}function yc(a){a.La=0;a.cc=0;a.ya=a.ta=a.wa=a.a=a.L=0;zc(a);Bc(a,1)}
|
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)}
|
||||||
function Bc(a,b,c){if(void 0!==b){.8>a.La/a.Ma&&(b=1);a.xa=b;b=a.Fb*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Dc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Cc(a)}function Vb(a,b){var c=a.P.length;a.P.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&b<a.P.length&&(d||0>a.P[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.T&&(c+=Ec(a)),a.P[b][0]=c)}
|
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 qb(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ec(a,b){var c=a.wa-=a.a;a.a=a.L=0;b&&(a.wa=0);return c}
|
function qb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gc(a,b){var c=a.wa-=a.a;a.a=a.K=0;b&&(a.wa=0);return c}
|
||||||
h.Vd=function(){if(this.o.T){this.Cb>=this.rb&&Cc(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.bc&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.P.length-1;0<=d;d--){var e=this.P[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Ec(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.cc&&(this.Ba(),this.cc=0);break}}while(this.o.T)}catch(f){F(this);
|
h.Sd=function(){if(this.o.U){this.Gb>=this.rb&&Ec(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.$b&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Gc(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.ac&&(this.Ba(),this.ac=0);break}}while(this.o.U)}catch(f){F(this);
|
||||||
this.l&&this.l.stop(ra(),Ac(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.ec;this.va=ra();c=this.bc;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Bc(this));if(0>c||this.La<this.Ma)-1E3>c&&(this.la-=c),c=0;this.Cb+=this.eb;this.va+=c;a(b,c)}}};
|
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)}}};
|
||||||
function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Bc(a);a.o.T=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,Ac(a));setTimeout(a.ec,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.T){Ec(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),Ac(a));b=!0}a.o.complete=void 0;return b}
|
function 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 Fc(a){this.Ta=+a.model||1170;this.Yb=a.addrReset||0;vc.call(this,a,6666667);this.tb=0;this.$b=255;1120==this.Ta?(this.decode=Gc.bind(this),this.Ka=this.Fc,this.tb=8,this.$b=-1):(this.decode=Hc.bind(this),this.Ka=this.Gc);Ic(this);this.sa=0;this.K=null;this.o.complete=!1}z(Fc,vc);h=Fc.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.T&&F(this);Ic(this);yc(this);this.o.error=!1;this.parent.reset.call(this)};
|
function 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 Ic(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Yb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Mc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
function Kc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Wb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ma=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.J=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.da=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0]];a.lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.jc=[0,0,0,0,0,0,0,0];a.ic=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Eb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Gb=0;a.Ib=0;a.Ea=0;a.ja=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.hb=0;a.w=0;a.K=null;a.g&&bc(a)}function bc(a){a.ka?(a.V=65536,a.Wb=a.Ea&16?4186112:253952,a.U=a.Jc,a.Y=a.Sd,a.Bb=a.Qe,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Wb=57344,a.U=a.Ic,a.Y=a.hc,a.Bb=a.nc,Fb(a.g,16))}
|
0,0,0,0,0,0,0,0,0]];a.lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.gc=[0,0,0,0,0,0,0,0];a.fc=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Fb=0;a.Oa=-1;ob(a)}function ob(a){a.aa=0;a.Ib=0;a.Kb=0;a.Ha=0;a.Z=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.fb=0;a.w=0;a.I=null;a.g&&(dc(a),a.Hc=Ub(a.g))}function dc(a){a.ka?(a.V=65536,a.Eb=a.Ha&16?4186112:253952,a.R=a.Fc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ha&16?22:18)):(a.V=0,a.Eb=57344,a.R=a.Ec,a.Y=a.ec,a.Bb=a.jc,Fb(a.g,16))}
|
||||||
function ac(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Gb=a.w>>16&65535,a.Ib=a.w&65535);a.Z=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,bc(a))}}h.ac=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()};
|
function cc(a,b){b&=-3073;if(a.aa!=b){b&57344&&!(a.aa&57344)&&(a.Ib=a.w>>16&65535,a.Kb=a.w&65535);a.aa=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,dc(a))}}h.Zb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Tb(this.g));return a.data()};
|
||||||
h.restore=function(a){var b=a[1];this.ya=b[1];Bc(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.H){for(var f=0,g=Array(b.H),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 Jc(a){return a.s&32768?8:0}function Kc(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.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}
|
||||||
function Lc(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 Yb(a,b,c){return{Xd:a,Ua:b,message:c||0,next:null}}function $b(a,b){var c=a.K;if(c==b)a.K=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.K&&(a.u|=1)}function Wb(a,b){if(b!=a.K){var c=a.K;if(!c||c.Ua<=b.Ua)b.next=c,a.K=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 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 Mc(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 cc(a){return a.F=a.F&63728|Jc(a)|(a.i&65535?0:4)|(a.h&32768?2:0)|P(a)}function dc(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.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.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.K?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)}
|
function 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 Nc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Oc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Pc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}
|
function Pc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Rc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Sc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}
|
||||||
function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=cc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);dc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);dc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
|
function 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 Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Wb),f;d=b>>13;a.Ea&a.Mc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.$a;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.I[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=
|
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)&&
|
||||||
a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.mb<<5|a.nb<<1,ac(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)}
|
(g|=16384));a.J[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb=a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.aa&57344||(g|=a.aa&4096|a.mb<<5|a.nb<<1,cc(a,a.aa&-61695|g&61694)),J(a,168,64,-1)),a.aa&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.aa|=4096,a.aa&512&&(a.u|=64)));return f}function Vc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Tc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Da(4,-2,d);a.Bb(d,b)}
|
||||||
function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0,
|
function Xc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Da(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Da(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Da(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,6==c&&a.Da(d,0,
|
||||||
e),a.a-=6,e|g;case 7:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Fc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Gc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.ja|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.hc(Uc(this,a,2));this.sa--;return a};
|
e),a.a-=6,e|g;case 7:return e=a.Y(Nc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Bc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Cc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.Z|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.ec(Wc(this,a,2));this.sa--;return a};
|
||||||
h.kb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.nc(Uc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Ic=function(a,b,c){return Vc(this,a,b,c)};h.Jc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.hc=function(a){return Pb(this.g,this.hb=a)};h.Sd=function(a){return Pb(this.g,this.hb=Uc(this,a,2))};h.nc=function(a,b){Rb(this.g,this.hb=a,b&65535)};h.Qe=function(a,b){Rb(this.g,this.hb=Uc(this,a,4),b)};
|
h.kb=function(a,b){this.ka?(this.sa++,a=Wc(this,a,5),a&1&&this.a--,Rb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.jc(Wc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Ec=function(a,b,c){return Xc(this,a,b,c)};h.Fc=function(a,b,c){return Wc(this,Xc(this,a,b,c),c)};h.ec=function(a){return Qb(this.g,this.fb=a)};h.Pd=function(a){return Qb(this.g,this.fb=Wc(this,a,2))};h.jc=function(a,b){Sb(this.g,this.fb=a,b&65535)};h.Ne=function(a,b){Sb(this.g,this.fb=Wc(this,a,4),b)};
|
||||||
function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Vc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Xc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Vc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Uc(a,e|c&65536,4),a.v=a.F>>14&3,Rb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
|
function Yc(a,b,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 Yc(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.$b;return a}function Zc(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c+a.tb]}function $c(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Vc(a,b,c,8)}function ad(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function bd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c]}
|
function $c(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.Yb;return a}function ad(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Qb(a.g,a.R(b,c,2)):a.f[c+a.tb]}function bd(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xc(a,b,c,8)}function cd(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.R(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function dd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Qb(a.g,a.R(b,c,2)):a.f[c]}
|
||||||
function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Eb=a.U(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Qb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.U(b,e,6),Rb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Pb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
|
function 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 cd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Qb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function dd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,d,4),Rb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
function ed(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Rb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function fd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.R(b,d,4),Sb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
||||||
h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.K&&this.K.Ua>d?this.K:null;e&&(c=e.Xd,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Lc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&$b(this,e),a=!0);this.K||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Mc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Kc(this))}while(0<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.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?
|
||||||
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 Fc(d);C(d,c)}});function ed(a,b){var c=b+a;Oc(this,c,a,b);return c&65535}function fd(a,b){var c=b+a;Oc(this,c<<8,a<<8,b<<8);return c&255}function gd(a,b){a=b<<1;Pc(this,a);return a&65535}function hd(a,b){a=b<<1;Pc(this,a<<8);return a&255}function id(a,b){a=b&32768|b>>1|b<<16;Pc(this,a);return a&65535}
|
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}
|
||||||
function jd(a,b){a=b&128|b>>1|b<<8;Pc(this,a<<8);return a&255}function kd(a,b){a=b&~a;R(this,a);return a}function ld(a,b){a=b&~a;R(this,a<<8);return a}function md(a,b){a|=b;R(this,a);return a}function nd(a,b){a|=b;R(this,a<<8);return a}function od(a,b){a=~b|65536;Nc(this,a);return a&65535}function pd(a,b){a=~b|256;Nc(this,a<<8);return a&255}function qd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
|
function 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 rd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function sd(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function td(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function ud(a,b){a=-b;Nc(this,a,a&b&32768);return a&65535}function vd(a,b){a=-b;Nc(this,a<<8,(a&b&128)<<8);return a&255}function wd(a,b){a=b<<1|this.m>>16&1;Pc(this,a);return a&65535}
|
function 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 xd(a,b){a=b<<1|this.m>>16&1;Pc(this,a<<8);return a&255}function yd(a,b){a=(this.m&65536|b)>>1|b<<16;Pc(this,a);return a&65535}function zd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Pc(this,a<<8);return a&255}function Ad(a,b){var c=b-a;Qc(this,c,a,b);return c&65535}function Bd(a,b){var c=b-a;Qc(this,c<<8,a<<8,b<<8);return c&255}function Cd(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Dd(a,b){a^=b;R(this,a);return a&65535}
|
function 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 Ed(a){T(this,a,Zc(this,a),ed);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Fd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16<b&&(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 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 Gd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32<b&&(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 Hd(a){V(this,a,!P(this))}function Id(a){V(this,a,P(this))}
|
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 Jd(a){T(this,a,Zc(this,a),kd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Kd(a){S(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Ld(a){T(this,a,Zc(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,Yc(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}
|
function 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 Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Jc(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Jc(this)==!(this.h&32768))}
|
function 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 Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Jc(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Jc(this)!=!(this.h&32768))}function Wd(a){V(this,a,Jc(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Jc(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)}
|
function Ud(a){V(this,a,!P(this)&&!!(this.i&65535))}function Vd(a){V(this,a,(this.i&65535?0:4)||!Lc(this)!=!(this.h&32768))}function Wd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Xd(a){V(this,a,!Lc(this)!=!(this.h&32768))}function Yd(a){V(this,a,Lc(this))}function Zd(a){V(this,a,!!(this.i&65535))}function $d(a){V(this,a,!Lc(this))}function ae(){J(this,12,0,-8);this.a-=5}function be(a){V(this,a,!0)}function ce(a){V(this,a,!(this.h&32768))}function de(a){V(this,a,this.h&32768?2:0)}
|
||||||
function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ce(a){var b=Zc(this,a);a=bd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function de(a){var b=Yc(this,a);a=ad(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}
|
function 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 ee(a){var b=bd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function fe(){J(this,24,0,-8);this.a-=25}
|
function ge(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 ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.A&&1120==this.Ta&&this.A.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.L=this.a;Q(this,$c(this,a));this.a=this.L-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.L=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.L-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
|
function 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 ne(a){var b=Zc(this,a);this.L=this.a;R(this,dd(this,a,b));this.a=this.L-me[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function oe(a){var b=Yc(this,a);R(this,cd(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var pe=[7,13,13,17,14,18,17,21];
|
function 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 qe(a){var b=bd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767<b?65536:0);this.a-=23}function re(){this.a-=5}function se(){this.F&49152||(this.g.reset(),ob(this),this.A&&this.A.setData(this.f[0],!0));this.a-=667}function te(a){if(a&8)J(this,8,0,-8);else{var b=Tc(this);a&=7;7==a?Q(this,b):(Q(this,this.f[a]),this.f[a]=b);this.a-=9}}
|
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 ue(){Sc(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 ve(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 we(a){T(this,a,Zc(this,a),Ad);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function xe(a){T(this,a,0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function ye(){J(this,28,0,-8);this.a-=5}
|
function 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 ze(){this.A&&(this.A.ia=this.f[7],this.A.setData(this.f[0],!0));this.u|=8;Lc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.tb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Gc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}
|
function 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 Oe(a){Pe[a>>6&3].call(this,a)}function Qe(a){Re[a>>6&3].call(this,a)}
|
function Qe(a){Re[a>>6&3].call(this,a)}function Se(a){Te[a>>6&3].call(this,a)}
|
||||||
var Be=[function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,Y,function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Se=[function(a){Ue[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Nc(this,dd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,
|
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,
|
||||||
ud);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],
|
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)}],
|
||||||
Ue=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,Y,Ie,Ke,xe,xe,xe,xe],Ve=[ge,ze,ue,Zd,he,se,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Je=[re,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Le=[re,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Te=[Yd,Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,Y,Y,Y],Ne=[function(a){Nc(this,
|
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,
|
||||||
cd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){S(this,a,0,vd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Nc(this,a<<8);this.a-=this.c?4:3+(7==
|
ed(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){S(this,a,0,xd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cd(this,a);Pc(this,a<<8);this.a-=this.c?4:3+(7==
|
||||||
this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Hc(a){We[a>>12].call(this,a)}
|
this.b?2:0)}],Te=[function(a){S(this,a,0,Bd);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,ld);this.a-=this.c?9+(this.Fb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Jc(a){Ye[a>>12].call(this,a)}
|
||||||
var We=[function(a){Xe[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,function(a){Ye[a>>8&15].call(this,a)},function(a){Ze[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Xe=[function(a){$e[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,function(a){af[a>>6&3].call(this,a)},Y,Y],af=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Wc(this,a,0);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L=
|
var Ye=[function(a){Ze[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,Gd,function(a){$e[a>>8&15].call(this,a)},function(a){af[a>>8&15].call(this,a)},qe,fe,Qd,Md,Od,ye,Y],Ze=[function(a){bf[a>>4&15].call(this,a)},be,Zd,Rd,Sd,Xd,Td,Vd,ne,ne,Ee,Ge,Ie,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yc(this,a,0);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=
|
||||||
this.a;Xc(this,a,0,b);R(this,b);this.a=this.L-pe[this.c]},function(a){R(this,dd(this,a,Jc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.u|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd,
|
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,
|
||||||
Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[Y,function(a){a=Wc(this,a,65536);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L=this.a;Xc(this,a,65536,b);R(this,b);this.a=this.L-pe[this.c]},Y];
|
Yd,Ud,Wd,ce,de,Jd,Kd,he,Ae,Oe,Qe,Se,function(a){ef[a>>6&3].call(this,a)},Y,Y],ef=[Y,function(a){a=Yc(this,a,65536);Tc(this,a);R(this,a);this.a-=11},function(a){var b=Vc(this);this.K=this.a;Zc(this,a,65536,b);R(this,b);this.a=this.K-re[this.c]},Y];
|
||||||
function df(a){x.call(this,"ROM",a,df,128);this.ba=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.M,c.ba=a.ba):c.l=null);ef(c)})}}z(df);h=df.prototype;
|
function ff(a){x.call(this,"ROM",a,ff,128);this.ca=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.N,c.ca=a.ca):c.l=null);gf(c)})}}z(ff);h=ff.prototype;
|
||||||
h.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;ef(this)};h.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.i,this.b,this.ba),delete this.ba);return!0};h.ga=function(){return!0};
|
h.ga=function(a,b,c,d){this.g=b;this.a=c;this.G=d;gf(this)};h.ia=function(){this.ca&&(this.G&&this.G.a(this.id,this.i,this.b,this.ca),delete this.ca);return!0};h.ha=function(){return!0};
|
||||||
function ef(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+ka(a.c.length,8,!0)+") does not match specified size ("+ka(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[df.prototype.Gd,df.prototype.Ee,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,kc)){for(c=0;c<a.c.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 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):
|
||||||
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.Gd=function(a){return this.c[a-this.i]};h.Ee=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 df(d);C(d,c)}});
|
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)}});
|
||||||
function ff(a){x.call(this,"RAM",a,ff);this.ba=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.M,c.ba=a.ba,null==c.na&&(c.na=a.na),null==c.ma&&(c.ma=a.ma)):c.b=null);gf(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)})}}
|
||||||
z(ff);ff.prototype.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;gf(this)};ff.prototype.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.l,this.i,this.ba),delete this.ba);return!0};ff.prototype.ga=function(){return!0};function gf(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;hf(a,a.c,a.na,a.ma,a.l)}E(a)}}
|
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)}}
|
||||||
ff.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.v.length){var f=a.i.indexOf(e);0<=f&&(e=a.v[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.Sb(d,g,e.Pa+d)}c-=a.b;b++;d=0}this.c&&hf(this,this.c,this.na,this.ma,this.l,!0)}};
|
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)}};
|
||||||
function hf(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 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+
|
||||||
g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Yb=d,a.g.reset(),ob(a),Q(a,d),dc(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 ff(d);C(d,c)}});function jf(a){x.call(this,"Keyboard",a,jf,1024);E(this)}z(jf);jf.prototype.aa=function(){return!1};jf.prototype.fa=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 jf(d);C(d,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)}});
|
||||||
function Z(a){this.H=a.baudReceive||9600;this.ka=a.baudTransmit||9600;this.U=a.upperCase;this.h=this.i=null;this.L=a.tabSize;this.K=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=kf;b&&(void 0===c&&(c="Panel"),(c=Wa(c,this.id))&&(b=c.j[b])&&this.aa(null,a,b))}this.v=this.w=null;this.exports={connect:this.dc,receiveData:this.xb}}z(Z);var kf="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.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;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case kf: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.rc:46==c?b=m.Ub:a.ctrlKey&&c>=m.Tb&&c<=m.Ac&&(b=c-(m.Tb-m.oc));b&&(a.preventDefault&&a.preventDefault(),d.xb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.qc&&(b=m.pc);d.xb(b);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&
|
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&&
|
||||||
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.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=Yb(48,4,262144);this.P=Vb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.U&&97<=a&&122>a&&(a-=32),Xb(e.a,e.P,1E3/Math.round(e.H/10)));0<=a&&(e.A=a,e.b&128?e.A|=49152:e.b|=128,e.b&64&&Wb(c,e.V))});this.C=Yb(52,4,262144);this.la=Vb(this.a,function(){e.c|=128;e.c&64&&Wb(c,e.C)});fb(b,this,lf);hb(b,this.reset.bind(this));E(this)};
|
h.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.dc=function(){if(!this.v){var a=xc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.dc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
h.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.ga=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.A=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<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);Xb(this.a,this.P,1E3/Math.round(this.H/10));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.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.A};h.qe=function(){};h.Ud=function(){return this.c};h.Se=function(a){this.c&128&&(a&64?Wb(this.a,this.C):$b(this.a,this.C));this.c=this.c&-70|a&69};h.Td=function(){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.Re=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.L||8,c=a-this.m%a,this.L&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a||
|
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||
|
||||||
1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Xb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var nf={},lf=(nf[65392]=[null,null,Z.prototype.td,Z.prototype.re,"RCSR"],nf[65394]=[null,null,Z.prototype.sd,Z.prototype.qe,"RBUF"],nf[65396]=[null,null,Z.prototype.Ud,Z.prototype.Se,"XCSR"],nf[65398]=[null,null,Z.prototype.Td,Z.prototype.Re,"XBUF"],nf);
|
1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Zb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var pf={},nf=(pf[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],pf[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],pf[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],pf[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],pf);
|
||||||
Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Z(d);C(d,c)}});function ec(a){x.call(this,"PC11",a,ec);this.c=a.autoMount||null;this.m=0;this.U=a.baudReceive||3600;this.A=this.w=this.b=0;this.v=[];this.s=of;this.h=pf;this.C=this.i="";this.M=this.na=this.ma=null;this.L=-1;this.H=!Ca("Mobi")&&window&&"FileReader"in window}z(ec);var of="",pf=0;h=ec.prototype;
|
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;
|
||||||
h.aa=function(a,b,c){var d=this,e=pf;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=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=
|
||||||
function(){var a=d.j.listTapes;a&&qf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;qf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
function(){var a=d.j.listTapes;a&&sf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;sf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.P=rf(a);var e=this;if((this.c=xc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.K=Yb(56,4,4096);this.V=Vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.A<e.v.length&&(e.w=e.v[e.A++]&255,sf(e,e.A/e.v.length*100),e.b|=128,e.b&=-2049,e.b&64&&Wb(e.a,e.K))});fb(b,this,tf);hb(b,this.reset.bind(this));uf(this,"None",of,!0);
|
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);
|
||||||
this.H&&uf(this,"Local Tape","?");uf(this,"Remote Tape","??");vf(this)||E(this)};h.ha=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){this.b&=-2241;this.w=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};
|
||||||
function vf(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?wf(a,c,b,1,!0):xf(a)}return!!a.m}
|
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 qf(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;wf(a,b,c,d,!1,e)}else yf(a,!1)}function wf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.h!=d)g++,yf(a,!0),a.o.Fa?a.D("PC11 busy"):(e&&a.m++,zf(a,b,c,d,f)?g++:a.o.Fa=!0);g&&Af(a,a.C,a.i,a.h,a.M,a.na,a.ma)}
|
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 zf(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),Af(a,b,c,d,e),a.s="?");xf(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.R;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Af(a,b,c,d,e.M,e.na,e.ma));
|
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));
|
||||||
a.o.Fa=!1;a.m&&(a.m--,a.m||E(a));xf(a)})}function uf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e<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 xf(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.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)}}
|
||||||
function sf(a,b){b|=0;if(b!==a.L){var c=a.j.readProgress;c&&(c=(c=D(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.L=b}}function Af(a,b,c,d,e,f,g){a.C=b;a.i=c;a.h=d;a.M=e;a.na=f;a.ma=g;2==d?a.P&&hf(a.P,e,f,g)?a.status("tape loaded: "+b):(a.C="",a.i="",a.s=of,a.h=pf,a.D("No load address available for tape: "+b)):(a.A=0,a.v=e,a.status("tape attached: "+b),sf(a,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 yf(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=of,a.h=pf,xf(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&&Wb(this.a,this.K)):(this.b&=-129,this.b|=2048,this.w=0,Xb(this.a,this.V,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.ld=function(){this.b&=-129;this.b|=2048;return this.w};h.je=function(){};
|
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(){};
|
||||||
var Bf={},tf=(Bf[65384]=[null,null,ec.prototype.md,ec.prototype.ke,"PRS"],Bf[65386]=[null,null,ec.prototype.ld,ec.prototype.je,"PRB"],Bf);function Cf(a,b,c){x.call(this,"Disk",{id:a.ua+".disk"+ka(++Df,4)},Cf,8192);this.controller=a;this.l=a.l;this.G=a.G;this.h=b;this.oa=b.name;this.vb=b.vb;Ef(this,c,b.O,b.S,b.N,b.W);E(this)}var Df=0;z(Cf);h=Cf.prototype;h.fa=function(a,b,c,d){this.G=d};
|
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};
|
||||||
function Ef(a,b,c,d,e,f){a.mode=b;a.O=c;a.S=d;a.N=e;a.W=f;a.a=[];if("preload"!=a.mode){b=Array(a.O);for(c=0;c<b.length;c++){d=Array(a.S);for(e=0;e<d.length;e++){f=Array(a.N);for(var g=1;g<=f.length;g++)f[g-1]=Ff(null,c,e,g,a.W,0);d[e]=f}b[c]=d}a.a=b}a.b=null}
|
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 Gf(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.da=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.O=e[0];a.S=e[1];a.N=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.O);for(d=0;d<a.a.length;d++)for(var v=a.a[d]=Array(a.S),U=0;U<v.length;U++)for(var Aa=v[U]=Array(a.N),Ba=0;Ba<Aa.length;Ba++){for(var rc=Ff(null,d,U,Ba+1,a.W,0),rg=rc.data,sc=0;sc<c;sc++,f+=4)var sg=rg[sc]=b.getInt32(f,
|
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,
|
||||||
!0),e=e+sg&-1;rc.ea=c;Aa[Ba]=rc}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.da),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+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,
|
||||||
null,!0,function(b,c,d){Hf(a,b,c,d)})}
|
null,!0,function(b,c,d){Jf(a,b,c,d)})}
|
||||||
function Hf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(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 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("("+
|
||||||
c+")");if(k.length)if(1==k.length)w(k[0]);else{a.O=k.length;a.S=k[0].length;a.N=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d<a.O;d++)for(f=0;f<a.S;f++)for(g=0;g<a.N;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;If(l,v)}else u=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=u;delete l.bytes}Ff(l,d,f);for(U=
|
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=
|
||||||
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.da),a.g=null)}function Ff(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Uf=b;a.Vf=c;a.pa=a.ea=0;a.za=!1;return a}function Jf(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;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]}
|
||||||
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.Dc&&b<f.S)for(k=g[b]=Array(f.Vb),g=0;g<k.length;g++)k[g]=Ff(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.Dc&&9==f.Hb&&(d=k[g]=Ff(null,a,b,f.Hb,f.Mb,0))}}e&&e(d,!1);return d};function If(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.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.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.ea?f<a.pa?(a.ea+=a.pa-f,a.pa=f):f>=a.pa+a.ea&&(a.ea+=f-(a.pa+a.ea)+1):(a.pa=f,a.ea=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 Kf(a,b){var c=a.S*a.N,d=b/c|0;return d<a.O?(b%=c,a.seek(d,b/a.N|0,b%a.N+1)):null}function Lf(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 Mf(a){for(var b="",c=0,d;d=Kf(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Lf(a,d,e));return btoa(b)}
|
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)}
|
||||||
h.save=function(){var a=0,b=[];b[a++]=[this.da,this.b,this.O,this.S,this.N,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.ea){for(var k=[],l=0,n=g.pa,p=g.pa+g.ea;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?Ef(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?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 ("+
|
||||||
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.ea=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.D("Unable to restore disk '"+this.oa+": "+c);return b};
|
||||||
h.toJSON=function(){var a;a=0;for(var b;b=Kf(this,a++);)Nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
h.toJSON=function(){var a;a=0;for(var b;b=Mf(this,a++);)Pf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.A=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
|
function Pf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.B=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<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&&Of(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){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]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&Rf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pf(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;Rf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.Ra=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)};
|
h.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.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)Uf(this,a,!0);Tf(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";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()};
|
h.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.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;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)){!Vf(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 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}
|
||||||
function Pf(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+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)}
|
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 Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.D("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
|
function Xf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,Wf(a,b,!0),k.Ka?a.D("RK11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.m++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.pc)&&g++));return g}
|
||||||
h.tc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)};
|
h.pc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.m||E(this));Qf(this,a.La)};
|
||||||
function Sf(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 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 Of(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.da,!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 Uf(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.D("Drive RK"+b+" unloaded",c),Of(a,b))}
|
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 Qf(a,b){var c=0;b||(b=[]);a.w=b[c++]||2496;a.i=b[c++]||0;a.B=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.Ia=b;d.Ha=d.Aa=!1;d.name=c.Ca;d.O=203;d.S=2;d.N=12;d.W=512;d.vb=!0;d.Ec=0;d.Cc=0;d.Hb=1;d.Vb=d.N;d.Mb=d.W;d.Kc=0;d.Wd=null;d.J||(d.da="");d.status=2496}return!0}h.sc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.B|=49152);return!0};
|
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};
|
||||||
h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};
|
h.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.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=1024;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};h.yd=function(){return this.w};h.we=function(){};h.zd=function(){return this.i};h.xe=function(){};h.vd=function(){return this.B&61438};
|
h.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.te=function(a){this.B=this.B&-3968|a&3967;if(this.B&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.B&=-129;switch(this.B&14){case 0:this.w=d.status;this.i=0;this.B=128;this.b=0;break;case 4:b=this.uc;case 2:b||(b=this.vc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.O?(this.i|=32832,this.B|=49152):g>=d.N?(this.i|=32800,this.B|=49152):(k=(this.B&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.sc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.B&=
|
h.qe=function(a){this.A=this.A&-3968|a&3967;if(this.A&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.A&=-129;switch(this.A&14){case 0:this.w=d.status;this.i=0;this.A=128;this.b=0;break;case 4:b=this.qc;case 2:b||(b=this.rc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.P?(this.i|=32832,this.A|=49152):g>=d.O?(this.i|=32800,this.A|=49152):(k=(this.A&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.oc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.A&=
|
||||||
-2,this.B|=128,this.B&64&&Wb(this.a,this.Ra))}};h.Ad=function(){return this.s};h.ye=function(a){this.s=a};h.ud=function(){return this.h};h.se=function(a){this.h=a};h.wd=function(){return this.b};h.ue=function(a){this.b=a};h.xd=function(){return this.C};h.ve=function(a){this.C=a};
|
-2,this.A|=128,this.A&64&&Yb(this.a,this.Ra))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a};
|
||||||
var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.yd,N.prototype.we,"RKDS"],Wf[65282]=[null,null,N.prototype.zd,N.prototype.xe,"RKER"],Wf[65284]=[null,null,N.prototype.vd,N.prototype.te,"RKCS"],Wf[65286]=[null,null,N.prototype.Ad,N.prototype.ye,"RKWC"],Wf[65288]=[null,null,N.prototype.ud,N.prototype.se,"RKBA"],Wf[65290]=[null,null,N.prototype.wd,N.prototype.ue,"RKDA"],Wf[65294]=[null,null,N.prototype.xd,N.prototype.ve,"RKDB"],Wf);
|
var Yf={},Tf=(Yf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Yf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Yf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Yf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Yf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Yf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Yf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Yf);
|
||||||
function M(a){x.call(this,"RL11",a,M,131072);this.A=a.autoMount||{};this.s=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
|
function M(a){x.call(this,"RL11",a,M,131072);this.B=a.autoMount||{};this.v=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<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&&Xf(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){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]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&$f(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.L)?(a=Da(Of(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yf(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;$f(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.Ra=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.w&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)};
|
h.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.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)cg(this,a,!0);bg(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";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()};
|
h.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.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.s=0);for(var c in a.A){var d=a.A[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;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)){!dg(a,g,f,e,!0)&&b&&E(a,!1);continue}a.D("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.s}
|
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}
|
||||||
function Yf(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+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)}
|
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 dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.D("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.s++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.xc)&&g++));return g}
|
function fg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,eg(a,b,!0),k.Ka?a.D("RL11 busy"):(k.Ka=!0,e&&(k.Ja=!0,a.v++),k.Aa=!!f,If(new Ef(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
|
||||||
h.xc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)};
|
h.tc=function(a,b,c,d,e){var f;a.Ka=!1;b&&(f=Lf(b),b&&f[0]>a.P||f[1]>a.T)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.La)),b=null);b?(a.L=b,a.oa=c,a.ea=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.La),a.Ja||e),this.l&&Fc(this.l)):a.Aa=!1;a.Ja&&(a.Ja=!1,--this.v||E(this));Zf(this,a.La)};
|
||||||
function ag(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 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 Xf(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.da,!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 cg(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.D("Drive RL"+b+" unloaded",c),Xf(a,b))}
|
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 Zf(a,b){var c=0;b||(b=[]);a.B=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.i=b[c++]||0;a.m=b[c++]||0;a.v=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.Aa=!1;d.name=c.Ca;d.O=512;d.S=2;d.N=40;d.W=256;d.vb=!0;d.Ec=0;d.Cc=0;d.Hb=1;d.Vb=d.N;d.Mb=d.W;d.Kc=0;d.Wd=null;d.J||(d.da="");d.status=29|(512==d.O?128:0)}return!0}
|
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}
|
||||||
h.wc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.v=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.B=this.B|a|32768);return!0};
|
h.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.yc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};
|
h.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.zc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=8192;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Dd=function(){return this.B&65535};
|
h.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.Be=function(a){this.B=this.B&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.B&128)){var b;a=!0;var c=this.c[(this.B&768)>>8],d,e,f,g;this.B&=-2;switch(this.B&14){case 4:this.b&8&&(this.B&=63);this.m=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.yc;case 10:b||(b=this.zc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.O||f>=c.N?this.B|=37888:(g=(this.v&
|
h.ye=function(a){this.A=this.A&-1023|a&1022;this.m=this.m&60|(a&48)>>4;if(!(this.A&128)){var b;a=!0;var c=this.c[(this.A&768)>>8],d,e,f,g;this.A&=-2;switch(this.A&14){case 4:this.b&8&&(this.A&=63);this.s=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.uc;case 10:b||(b=this.vc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.P||f>=c.O?this.A|=37888:(g=(this.m&
|
||||||
63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.wc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.Ra))}};h.Bd=function(){return this.h};h.ze=function(a){this.h=a&65534};h.Ed=function(){return this.b};h.Ce=function(a){this.b=a};h.Fd=function(){return this.m};h.De=function(a){this.m=a};h.Cd=function(){return this.v};h.Ae=function(a){this.v=a&63};
|
63)<<16|this.h,a=65536-this.s&65535,a=b.call(this,c,d,e,f,a,g,this.sc.bind(this)))}a&&(this.A|=129,this.A&64&&Yb(this.a,this.Ra))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.s};h.Ae=function(a){this.s=a};h.zd=function(){return this.m};h.xe=function(a){this.m=a&63;this.A=this.A&-49|(this.m&3)<<4};
|
||||||
var eg={},$f=(eg[63744]=[null,null,M.prototype.Dd,M.prototype.Be,"RLCS"],eg[63746]=[null,null,M.prototype.Bd,M.prototype.ze,"RLBA"],eg[63748]=[null,null,M.prototype.Ed,M.prototype.Ce,"RLDA"],eg[63750]=[null,null,M.prototype.Fd,M.prototype.De,"RLMP"],eg[63752]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLBE"],eg);
|
var gg={},bg=(gg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],gg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],gg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],gg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],gg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],gg);
|
||||||
function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.w=xc(this,"autoPower",a);this.l=0;this.P=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.K=!1;this.U=xc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.P},this.a,this.G);var d,e=A(this.id);if((this.A=Wa("Panel",this.id))&&this.A.gb)for(b=0;b<e.length;b++)d=e[b],d.D=this.A.D,d.X=this.A.X,
|
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,
|
||||||
d.gb=this.A.gb;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.fa&&d.fa(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=xc(this,"state")||(f=!0,a.state))b=this.C=a,f||(this.i=!0,this.b=hg),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.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=
|
||||||
new O(this,"1.30.5"),jg(this.v)?b=null:delete this.v);!b&&this.b&&(b=kg(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.K=!0);E(g)})}else E(this);this.j.power||(this.w=!0);!c&&this.w&&lg(this,this.ib)}else w("Unable to find CPU component")}z(fg);var hg=0;
|
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;
|
||||||
function gg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.L=b}function xc(a,b,c){var d=b.toLowerCase(),d=Oa[b]||Oa[d];void 0===d&&a.L&&(d=a.L[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function lg(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(){lg(a,b,c)});return}}b.call(a,c)}
|
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 mg(a,b){var c=new O(a,"1.30.5","validate");if(jg(c)&&ng(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=fg.prototype;
|
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;
|
||||||
h.ib=function(a){void 0===a&&(a=this.b||(this.s?1:hg));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>hg){if(jg(d,this.s)){this.h=new O(this,"1.30.5","failsafe");jg(this.h)&&(og(this,d),a=2,pg(this.h));this.h.set("timestamp",sa());qg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"==
|
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"==
|
||||||
f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.X(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=A(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.a&&(c=tg(this,g,d,b,c));b=[d,a,c];-1!=a?lg(this,this.Xb,b):this.Xb(b)}};
|
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)}};
|
||||||
function tg(a,b,c,d,e){if(!b.o.R){b.o.R=!0;if(b.ha){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.ha(f,d)&&f&&(w("Unable to restore state for "+b.type),a.C&&!a.K?(c.clear(),a.b=hg,window&&window.location.reload()):a.H=!0,b.ha(null),e=!1)}if(!d&&b.Zb)for(a=b.Zb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function 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}
|
||||||
h.Xb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.fb());this.H&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
|
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};
|
||||||
function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.U;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function 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 ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&F(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l<k.length;l++){var n=k[l];n.o.R&&(n.ga&&(d=n.ga(b,c),"object"===typeof d&&f.set(n.id,
|
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,
|
||||||
d)),c&&(n.o.R=!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.c&&vg(a,a.c,f.toString()),qg(g)&&qg(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=3==a.b),d&&f.clear(k)):e=f.toString());c&&(a.o.R=!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&&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)};
|
||||||
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=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.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.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.A&&(b=this.A,a=a||0,b.v)){c=b.a.o.T;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e<b.a.f.length;e++)nb(b,"R"+e,b.a.f[e]);e=cc(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.hb:b.ia);ub(b,b.m);a=b.a;a=a.ka?a.Ea&16?1:2:4;wb(b,"B22",a&1);wb(b,"B18",a&2);wb(b,"B16",
|
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",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.l||(d.o.R?ug(d,!1,!0):lg(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.R&&!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.");ug(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Lb=!0),d.ib(hg),d.Lb=!1)}else d.reset(),d.a&&d.a.fb()},!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.l||(d.o.S?wg(d,!1,!0):ng(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.S&&!d.l)if(d.b&&!d.m){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");wg(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Lb=!0),d.ib(jg),d.Lb=!1)}else d.reset(),d.a&&d.a.gb()},!0;case "save":if(ma(ua(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
|
||||||
c,c.onclick=function(){var a=ig(d,!0);if(a){var b=!!(d.b&&!d.m||d.C),c=ug(d,b);b?vg(d,a,c):d.D("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=kg(d,!0);if(a){var b=!!(d.b&&!d.m||d.C),c=wg(d,b);b?xg(d,a,c):d.D("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function ig(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=wg(a,c))||a.D("The user ID is invalid.")):b&&a.D("Browser local storage is not available"));return c}
|
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 wg(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 kg(a){var b=null;a.c&&(b=ua()+"/api/v1/user?req=load&user="+a.c+"&state="+xg(a,"1.30.5"));return b}
|
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,c){if(c){var d={req:"store"};d.user=b;d.state=xg(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 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 rf(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 Dc(a){if(a.gb){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.gb.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 fg(g,d,!0);C(g,f);g.w&&lg(g,g.ib)}});
|
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)}});
|
||||||
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.R&&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.R&&ug(c,!(!c.b||c.m),!0)}});function O(a,b,c){this.id=a.id;this.key=xg(a,b,c);this.G=a.G;pg(this,a.Nc)}function xg(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}
|
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}
|
||||||
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){pg(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){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,
|
||||||
1);c=0}}};function pg(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function qg(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 ng(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function jg(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 yg=0;
|
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;
|
||||||
function zg(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)):Ag(k,a,b,c,d,e,f)})}
|
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 Ag(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 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"),
|
||||||
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?Bg(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?Dg(a,f,k):k(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
||||||
function Bg(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 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]*/,
|
||||||
"");a=a.replace(d[0],g);Bg(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],g);Dg(a,b,c)}})}else c(a,null)}
|
||||||
function Cg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--yg||La(!0));l=!1}var g,k,l=!0;yg++;Ta[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
|
function Eg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Ag||La(!0));l=!1}var g,k,l=!0;Ag++;Ta[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c||
|
||||||
(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?zg(c,null,null,!1,e,function(d,l){l?(Ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--yg||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--yg||La(!0)):f("invalid machine element: "+
|
(c="/versions/pdpjs/1.30.5/components.xsl");n=function(d,k){k?Bg(c,null,null,!1,e,function(d,l){l?(Ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Ag||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ag||La(!0)):f("invalid machine element: "+
|
||||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?zg(b,a,d,!0,e,n):Ag(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return l}window.embedPDP11=function(a,b,c,d){La(!1);return Cg(a,b,c,d)};window.enableEvents=La;window.sendEvent=Ma;})();//# sourceMappingURL=/tmp/pdpjs/1.30.5/pdp11.map
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue