From cd8b6464a3a48bf1339e5e7a04628a1d41981106 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 7 Oct 2016 10:58:15 -0700 Subject: [PATCH] Added more MMU handlers --- modules/pdp11/lib/cpustate.js | 29 +- modules/pdp11/lib/device.js | 431 ++++++++++++++++++++++++++- versions/pdpjs/1.30.1/pdp11-dbg.js | 448 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 308 ++++++++++---------- 4 files changed, 831 insertions(+), 385 deletions(-) diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index bc8345d31..fa8f8df0f 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -151,6 +151,21 @@ CPUStatePDP11.prototype.initRegs = function() this.mmuMode = 0; // current memory management mode (see PDP11.MODE.KERNEL | SUPER | UNUSED | USER) this.mmuLastPage = 0; this.mmuLastVirtual = 0; + + this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit + this.mmuPDR = [ // memory management PDR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff], // mode 2 with illegal PDRs + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 + ]; + this.mmuPAR = [ // memory management PAR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 + ]; + this.mmuMap = [ // memory management register by mode - 16 PDR (8 I then 8 D descriptors) followed by 16 PAR (I/D addresses) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super @@ -202,23 +217,9 @@ CPUStatePDP11.prototype.resetRegs = function() this.mmuEnable = 0; // MMU enabled for PDP11.ACCESS.READ or PDP11.ACCESS.WRITE this.mmuLastMode = 0; - this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit this.mmuMask = 0x3ffff; this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; - this.mmuPDR = [ // memory management PDR registers by mode - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 - [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff], // mode 2 with illegal PDRs - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 - ]; - this.mmuPAR = [ // memory management PAR registers by mode - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 - ]; - /** @type {Array.} */ this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index fbc74f654..ac1d91c11 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -259,6 +259,327 @@ DevicePDP11.prototype.writeMMR0 = function(data, addr) this.display.misc = (this.display.misc & ~7) | idx; }; +/** + * readSISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + * @return {number} + */ +DevicePDP11.prototype.readSISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[1][reg]; +}; + +/** + * writeSISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + */ +DevicePDP11.prototype.writeSISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[1][reg] = data & 0xff0f; +}; + +/** + * readSDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + * @return {number} + */ +DevicePDP11.prototype.readSDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[1][reg]; +}; + +/** + * writeSDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + */ +DevicePDP11.prototype.writeSDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[1][reg] = data & 0xff0f; +}; + +/** + * readSISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + * @return {number} + */ +DevicePDP11.prototype.readSISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[1][reg]; +}; + +/** + * writeSISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + */ +DevicePDP11.prototype.writeSISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[1][reg] = data; + this.cpu.mmuPDR[1][reg] &= 0xff0f; + +}; + +/** + * readSDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + * @return {number} + */ +DevicePDP11.prototype.readSDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[1][reg]; +}; + +/** + * writeSDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + */ +DevicePDP11.prototype.writeSDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[1][reg] = data; + this.cpu.mmuPDR[1][reg] &= 0xff0f; +}; + +/** + * readKISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + * @return {number} + */ +DevicePDP11.prototype.readKISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[0][reg]; +}; + +/** + * writeKISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + */ +DevicePDP11.prototype.writeKISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[0][reg] = data & 0xff0f; +}; + +/** + * readKDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + * @return {number} + */ +DevicePDP11.prototype.readKDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[0][reg]; +}; + +/** + * writeKDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + */ +DevicePDP11.prototype.writeKDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[0][reg] = data & 0xff0f; +}; + +/** + * readKISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + * @return {number} + */ +DevicePDP11.prototype.readKISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[0][reg]; +}; + +/** + * writeKISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + */ +DevicePDP11.prototype.writeKISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[0][reg] = data; + this.cpu.mmuPDR[0][reg] &= 0xff0f; + +}; + +/** + * readKDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + * @return {number} + */ +DevicePDP11.prototype.readKDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[0][reg]; +}; + +/** + * writeKDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + */ +DevicePDP11.prototype.writeKDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[0][reg] = data; + this.cpu.mmuPDR[0][reg] &= 0xff0f; +}; + +/** + * readUISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + * @return {number} + */ +DevicePDP11.prototype.readUISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[3][reg]; +}; + +/** + * writeUISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + */ +DevicePDP11.prototype.writeUISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[3][reg] = data & 0xff0f; +}; + +/** + * readUDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + * @return {number} + */ +DevicePDP11.prototype.readUDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[3][reg]; +}; + +/** + * writeUDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + */ +DevicePDP11.prototype.writeUDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[3][reg] = data & 0xff0f; +}; + +/** + * readUISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + * @return {number} + */ +DevicePDP11.prototype.readUISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[3][reg]; +}; + +/** + * writeUISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + */ +DevicePDP11.prototype.writeUISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[3][reg] = data; + this.cpu.mmuPDR[3][reg] &= 0xff0f; + +}; + +/** + * readUDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + * @return {number} + */ +DevicePDP11.prototype.readUDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[3][reg]; +}; + +/** + * writeUDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + */ +DevicePDP11.prototype.writeUDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[3][reg] = data; + this.cpu.mmuPDR[3][reg] &= 0xff0f; +}; + /** * readPSW(addr) * @@ -1466,11 +1787,119 @@ DevicePDP11.prototype.access = function(physicalAddress, data, byteFlag) * ES6 ALERT: As you can see below, I've finally started using computed property names. */ DevicePDP11.UNIBUS_IOTABLE = { + [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR"], + [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR"], + [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR"], + [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR"], + [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR"], + [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR"], + [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR"], + [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR"], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], - [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"] + [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR"], + [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR"], + [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR"], + [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR"], + [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"], }; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; + /** * DevicePDP11.init() * diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index a54258695..fb1e12144 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -681,233 +681,241 @@ for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ -var k; +var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} -function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function t(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 Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(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 Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Qb=this.id:(this.dc=this.id.substr(0,b),this.Qb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Eb:!1,ec:!1,ia:!1,error:!1};this.Sb=null;this.v.error=!1;this.L={};this.j=null;this.la=d||0;x.push(this)}var Ua=void 0,Va={}; -if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=w);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},x=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ja(a){return a.replace(/[&<>"']/g,function(a){return ia[a]})}function oa(a,b){return(a+" ").slice(0,b)} +function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function ra(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ua(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 m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}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 ha(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function wa(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){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}xa=a}return xa}function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function Da(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ea(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 Fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sb=this.id:(this.fc=this.id.substr(0,b),this.Sb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Gb:!1,gc:!1,ja:!1,error:!1};this.Ub=null;this.v.error=!1;this.L={};this.j=null;this.ma=d||0;v.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=u);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},v=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ba&&(this.ba=10);15>2;this.f=this.Ba-1;this.w=this.F/this.Ba|0;this.Sa=[];this.D=null;this.Fb=this.xd;a=new I;Ab(a,this.j);this.$=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} -function Cb(a,b,c){var d=!1,e=this.controller,f=e.Sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} -function Db(a,b){var c=-1,d=this.controller;(a=d.Sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} -function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; -k.xd=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ia=function(a,b){b||this.reset();return!0}; -function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ba;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Pb+=l.A-f,l.A=f,!0;if(f>=l.A+l.Pb){n=l.size-(f-m);n>g&&(n=g);l.Pb=f-l.A+n;f=m+a.Ba;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ba,d,e);Ab(f,a.j,l);a.$[h++]=f;f=m+a.Ba;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} -k.kb=function(a){return this.$[(a&this.g)>>>this.ba].Xb(a&this.f,a)};k.Ga=function(a){return this.$[(a&this.g)>>>this.ba].Gc(a&this.f,a)};function Jb(a,b){return a.$[(b&a.g)>>>a.ba].kc(b&a.f,b)}k.Mb=function(a,b){this.$[(a&this.g)>>>this.ba].ac(a&this.f,b&255,a)};k.oc=function(a,b){this.$[(a&this.g)>>>this.ba].Oc(a&this.f,b&65535,a)}; -function Kb(a){for(var b=0,c=[],d=0;d>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Da-1;this.w=this.F/this.Da|0;this.Ua=[];this.D=null;this.Hb=this.Jd;a=new H;Cb(a,this.j);this.aa=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[5]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c));return c} +function Eb(a,b,c){var d=!1,e=this.controller,f=e.Ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[5]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b)))} +function Fb(a,b){var c=-1,d=this.controller;(a=d.Ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[5]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c));return c} +function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[5]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b)))}h=Bb.prototype;h.reset=function(){this.D&&this.D()}; +h.Jd=function(a,b,c){this.j&&F(this.j,64)&&D(this.j,"warning: unrecognized I/O access("+I(this.j,a)+","+I(this.j,b)+","+c+")");return 0};h.Ka=function(a,b){b||this.reset();return!0}; +function Hb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.ca;0g&&(p=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.A)return m.Rb+=m.A-f,m.A=f,!0;if(f>=m.A+m.Rb){p=m.size-(f-n);p>g&&(p=g);m.Rb=f-m.A+p;f=n+a.Da;g-=p;k++;continue}}return Jb(1,f,g)}f=new H(f,p,a.Da,d,e);Cb(f,a.j,m);a.aa[k++]=f;f=n+a.Da;g-=p}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Kb[d]+" at "+l(b,8,!0)),!0):Jb(2,b,c)} +h.mb=function(a){return this.aa[(a&this.g)>>>this.ca].Zb(a&this.f,a)};h.Ia=function(a){return this.aa[(a&this.g)>>>this.ca].Hc(a&this.f,a)};function Lb(a,b){return a.aa[(b&a.g)>>>a.ca].mc(b&a.f,b)}h.Ob=function(a,b){this.aa[(a&this.g)>>>this.ca].cc(a&this.f,b&255,a)};h.qc=function(a,b){this.aa[(a&this.g)>>>this.ca].Pc(a&this.f,b&65535,a)}; +function Mb(a){for(var b=0,c=[],d=0;d>5&3;c.Aa=a>>1&15;c.ic=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.$a&16?1:2);this.g.rb=this.g.rb&-8|b};k.gd=function(){return Tb(this.b)};k.Ad=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; -function Vb(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.md,drive:f,blocksize:256,mapped:0,maxblock:b.gb[f]*b.ca[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Kb=2496;b.na=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.gb[f]){b.na|=32832;b.P|=49152;break}if((b.va&15)>=b.ca[f]){b.na|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;ec(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.gb[f])b.na|= -32832,b.P|=49152;else if((b.va&15)>=b.ca[f])b.na|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;a.Yb(b.ra[f],c,d,e);return}}b.Kb=f<<13|b.Kb&8176|b.va%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.md=function(a,b,c,d,e){var f=this.D;f.Jb=d&65535;f.P=f.P&-49|d>>12&48;f.Lb=65536-e&65535;switch(a){case 1:f.na|=33024;f.P|=49152;break;case 2:f.na|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; -function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.nd,drive:f,blocksize:128,mapped:1,maxblock:b.gb[f]*b.ca[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Xa&8&&(b.M&=63);b.Xa=b.Pc[f]|b.eb&64;break;case 3:1==(b.ea&3)&&(b.eb=b.ea&4?b.eb+(b.ea&65408)&65408|b.ea<<2&64:b.eb-(b.ea&65408)&65408|b.ea<<2&64,b.ea=b.eb);break;case 4:b.Xa=b.eb;break;case 5:if(b.ea>>6>=b.gb[f]){b.M|=37888;break}if((b.ea&63)>=b.ca[f]){b.M|=37888;break}c=(b.ea>>6)* -b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;ec(a,b.ra[f],c,d,e);return;case 6:if(b.ea>>6>=b.gb[f])b.M|=37888;else if((b.ea&63)>=b.ca[f])b.M|=37888;else{c=(b.ea>>6)*b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;a.Yb(b.ra[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -k.nd=function(a,b,c,d,e){var f=this.w;f.Db=d&65535;f.M=f.M&-49|d>>12&48;f.Ta=d>>16&63;f.ea=~~(c/f.ca[b.La])<<6|c%f.ca[b.La];f.eb=f.ea;f.Xa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ca=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.bb=a.nc=0} -function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ca&=-2049;c.ta[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.od,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.fb[0]*c.ca[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.$b[b]=c.Pa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))* -c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;ec(a,c.ra[b],d,e,f);return;case 57:if(c.Pa[b]>=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))*c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;a.Yb(c.ra[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} -k.od=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.bb=d>>16&63;e=~~(c/f.ca[0]);d=~~(e/f.fb[0]);f.Da[b.La]=e%f.fb[0]<<8|c%f.ca[0];f.$b[b.La]=f.Pa[b.La]=d;f.mb|=1<=b.$c-1&&(f.ta[b.La]|=1024);switch(a){case 1:f.Ca|=512;f.T|=49152;break;case 2:f.Ca|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ta[b.La]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; -function ic(a,b,c,d,e,f){var g=~~((f+c.Ua-1)/c.Ua),h=new XMLHttpRequest;2048>g&&d+2048this.b.Ab(a.Zc?jc(this.b,c):c,a.cache[b][e])){a.Wb(2,a,b,c,d);return}c+=2;--d}b++}a.Wb(0,a,b,c,d)}; -function ec(a,b,c,d,e){for(var f,g;0g){b.Wb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Wb(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Wa=0;this.D.P=128;this.w.M=128;gc(this)}; -k.Rc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.ab&65280:(a&1&&(b<<=8),f.ab=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.C|=2}break;case 4194294:if(70!==f.jb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.jb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.jb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.jb)return f.K(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.jb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=L(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Oa[e]= -b),d=f.Oa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Oa[e]=b),d=f.Oa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=L(this,f.xa[3][e],a,b,c);0<=d&&(f.xa[3][e]=d,f.xa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=L(this,f.Zb,a,b,c);0<=d&&(f.Zb=d);break;case 4194172:d=f.Za;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.wd&65535:(d=L(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=L(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194050:d=L(this,e.na,a,b,c);0<=d&&(e.na=d);break;case 4194052:d=L(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=L(this,e.Lb,a,b,c);0<=d&&(e.Lb=d);break;case 4194056:d=L(this,e.Jb,a,b,c);0<=d&&(e.Jb=d); -break;case 4194058:d=L(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=L(this,e.Ic,a,b,c);0<=d&&(e.Ic=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ca&7;switch(a&-2){case 4193728:d=L(this,g.T,a,b,c);0<=b&&0<=d&&(g.bb=g.bb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=L(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=L(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= -L(this,g.Da[e],a,b,c);0<=d&&(g.Da[e]=d&7967);break;case 4193736:d=L(this,g.Ca,a,b,c);0<=d&&(g.Ca=d&63|g.Ca&65472,d&128&&gc(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=L(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.td[e];break;case 4193746:d=L(this,g.Jc,a,b,c);0<=d&&(g.Jc=d);break;case 4193748:d=L(this,g.Kc[e],a,b,c);0<=d&&(g.Kc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ud[e];break;case 4193754:d=L(this,g.Lc[e],a,b,c);0<=d&& -(g.Lc[e]=d);break;case 4193756:d=L(this,g.Pa[e],a,b,c);0<=d&&(g.Pa[e]=d&511);break;case 4193758:g.$b[e]=g.Pa[e];d=g.$b[e];break;case 4193760:d=g.rd[e];break;case 4193762:d=g.sd[e];break;case 4193764:d=g.pd[e];break;case 4193766:d=g.qd[e];break;case 4193768:d=L(this,g.bb,a,b,c);0<=d&&(g.bb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=L(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=L(this,e.M,a,b,c);0<=b&&0<=d&&(e.Ta= -e.Ta&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=L(this,e.Db,a,b,c);0<=d&&(e.Db=d&65534);break;case 4192516:d=L(this,e.ea,a,b,c);0<=d&&(e.ea=d);break;case 4192518:d=L(this,e.Xa,a,b,c);0<=d&&(e.Xa=d);break;case 4192520:d=L(this,e.Ta,a,b,c);0<=d&&(e.Ta=d&63,e.M=e.M&-49|(e.Ta&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.$a:(d=L(this,f.$a,a,b,c),0<=d&&(70!==f.jb&&(d&=-49),f.$a=d,f.Vb[0]=d&4?15:7,f.Vb[1]=d&2?15:7,f.Vb[3]= -d&1?15:7,f.ic&&(e=2,f.$a&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=L(this,f.xa[0][e],a,b,c);0<=d&&(f.xa[0][e]=d,f.xa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=L(this,f.xa[1][e],a,b,c);0<=d&&(f.xa[1][e]=d,f.xa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.jb)return f.K(4,234);e=a>>2&31;d=f.Nb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=L(this,d,a,b,c),0<=d&&(f.Nb[e]=a&2?d<<16|f.Nb[e]&65535:f.Nb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Ob[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,Nb.prototype.ed,Nb.prototype.yd,"LKS"],kc[65402]=[null,null,Nb.prototype.fd,Nb.prototype.zd,"MMR0"],kc[65534]=[null,null,Nb.prototype.gd,Nb.prototype.Ad,"PSW"],kc); -La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a){var 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},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Va=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.S)&&c.ha(!0)}return this.jc(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.S)&&c.ha(!0)}return this.kc(a,b)},ma:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.G)&&d.ha(!0)}this.f?this.L(a, -b,c):this.bc(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.G)&&d.ha(!0)}this.f?this.L(a,b,c):this.rc(a,b,c)},R:function(a){return this.w[a]},W:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},Z:function(a){return this.B.getUint16(a,!0)},ga:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.w[a]=b; -this.Va=!0},pa:function(a,b,c){this.w[a]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b){this.B.setUint16(a,b,!0);this.Va=!0},za:function(a,b,c){this.H[a>>1]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&xc(a,wc,!1),(a.F=c.F)&&vc(a,wc,!1))} -function zc(a,b){b?--a.F||(a.ac=a.f?a.L:a.bc,a.Oc=a.f?a.G:a.rc):--a.g||(a.Xb=a.jc,a.Gc=a.kc)}function vc(a,b,c){c&&a.F||(a.ac=!a.f&&b[1]||a.L,a.Oc=!a.f&&b[3]||a.G);if(c||void 0===c)a.bc=b[1]||a.L,a.rc=b[3]||a.G}function xc(a,b,c){c&&a.g||(a.Xb=b[0]||a.J,a.Gc=b[2]||a.N);if(c||void 0===c)a.jc=b[0]||a.J,a.kc=b[2]||a.N}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.Y,I.prototype.qa,I.prototype.ja,I.prototype.Aa],wc=[I.prototype.S,I.prototype.ma,I.prototype.da,I.prototype.wa]; -if(wb)var tc=[I.prototype.R,I.prototype.ka,I.prototype.Z,I.prototype.ua],sc=[I.prototype.W,I.prototype.pa,I.prototype.ga,I.prototype.za];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Ra=a.cycles||b;this.Ya=c;this.ob=Math.round(this.Ra/1E4)/100;this.lb=this.ob*this.Ya;this.v.fa=!1;this.v.pc=!1;this.v.Cb=a.autoStart;this.v.uc=!1;this.v.pb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Dc=this.vd.bind(this);G(this)}y(Bc); -var Cc=["power","reset"];k=Bc.prototype;k.Na=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ma&&(a.ma+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ha(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Gb))}} -function Jc(a,b,c,d){if(a.L[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ha());var e=a.j&&a.j.ma||8;c=!a.v.fa||a.v.uc?8==e?ba(c,d):p(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} -k.oa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.ga/a.lb?b=1:d=!0;a.Ya=b;b=a.ob*a.Ya;if(a.lb!=b){a.lb=b;b=a.lb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Ob()}dd(a,a.Z);a.Z=0;a.Y=ra();a.ja=0;ed(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ra*a.Ya/1E3,a.N[b][0]=c)}function fd(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 gd(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]()))}} -k.vd=function(){if(this.v.fa){this.qb>=this.Ra&&ed(this,!0);this.wa=0;this.Qa=ra();if(this.ja){var a=this.Qa-this.ja;a>this.Ac&&(this.Y+=a,this.Y>this.Qa&&(this.Y=this.Qa))}try{do{var b=fd(this,this.v.pb?1:this.cb);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;gd(this,c);this.wa+=c;this.Z+=c;dd(this,0,!0);Hc(this,c);this.pa-=c;if(0>=this.pa){this.pa+=this.cb;15<=++this.Cc&&(this.D&&this.D.Ea(),this.Cc=0);break}}while(this.v.fa)}catch(e){this.ha();M(this);this.D&&this.D.stop(ra(), -Ic(this));vb(this,e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.Dc;this.ja=ra();c=this.Ac;this.wa&&(c=Math.round(c*this.wa/this.cb));var c=c-(this.ja-this.Qa),d=this.ja-this.Y;d&&(this.ga=Math.round(this.Z/(10*d))/100,864E5<=d&&(this.ka=0,Kc(this)));if(0>c||this.gac&&(this.Y-=c),c=0;this.qb+=this.wa;this.ja+=c;a(b,c)}}}; -k.yb=function(a){if(ib(this))return!1;if(this.v.fa)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.fa=!0;this.v.pc=!0;this.ua&&this.ua.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Ob(!0),this.D.start(this.Y,Ic(this)));M(this,!0);setTimeout(this.Dc,0);return!0};k.zb=function(){return 0}; -k.ha=function(a){if(this.v.fa){this.S-=this.b;this.b=0;dd(this,this.Z);this.Z=0;this.v.fa=!1;this.ua&&this.ua.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Ic(this));M(this)}this.v.complete=a};function M(a,b){a.D&&a.D.Ea(b)} -function hd(a){this.ad=+a.model||1170;this.dd=a.resetAddr||0;Bc.call(this,a,6666667);this.Rb=0;this.decode=id.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.X=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Oa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.Aa=this.B=0;this.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Nb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.nb=this.H=this.J=this.C=0;this.jb=70;this.qa=-1;jd(this);this.v.complete=this.v.Tc=!1}y(hd,Bc);k=hd.prototype;k.reset=function(){this.v.fa&&this.ha();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.ab=255;a.I=0;a.mc=0;a.G=0;a.Za=0;a.Zb=0;a.$a=0;a.ic=0;a.za=0;a.Yc=[4,2,0,1];a.Vb=262143;a.Tb=253952;a.Ub=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.bd=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.w=[];a.C|=2;Sb(a)} -function Sb(a){a.ic?(a.da=65536,a.R=a.Wc,a.W=a.Hc,a.Ec=a.Dd):(a.da=0,a.R=a.Vc,a.W=a.ub,a.Ec=a.Ab)}k.xc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ka,this.Ya]);a.set(2,Kb(this.F));return a.data()}; -k.restore=function(a){var b=a[1];this.ka=b[1];Kc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ka-=b;break}b-=a.w[f].Ka}a.w.splice(f+1,0,{Ka:b,Fc:c<<5&224,Nc:d,gc:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Ma()|md(a)|ld(a)|kd(a)} -function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Oa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Oa[c];a.Oa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function O(a,b){a.C&128||(a.X=a.aa=b,a.V=0)}function pd(a,b,c){a.C&128||(a.X=a.aa=a.U=b,a.V=c||0)}function qd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^b)&(d^b))}function rd(a,b){a.C&128||(a.X=a.aa=a.U=b,a.V=a.X^a.U>>1)} -function sd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.K=function(a){var b=!1;0>this.qa?this.qa=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.Za=63222,this.Zb=a);this.B=0;var c=this.W(a|this.da),d=this.W(a+2&65535|this.da);Ub(this,d&-12289|this.qa>>2&12288);b&&(this.I|=4,this.u[6]=4);td(this,this.qa);td(this,this.u[7]);od(this,c);this.C&=-113;this.qa=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);od(a,b);Ub(a,c);a.C&=-17} -function jc(a,b){var c=b>>13&31;31>c?a.$a&32&&(b=a.Nb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.$a&a.Yc[a.B]||(d&=7);e=a.Ub[a.B][d];f=(a.bd[a.B][d]<<6)+(b&8191)&a.Vb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Tb&&4186112>f&&(a.I|=32,a.K(4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= -16384));a.Ub[a.B][d]=e;if(4194170!==f||a.B)a.za=a.B,a.Aa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.G&57344||(a.G=a.G|g|a.za<<5|a.Aa<<1),a.K(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.W(e|a.da)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Za=a.Za<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.ab||65534<=a.u[6])&&(a.u[6]<=a.ab-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}k.Vc=function(a,b,c){return xd(this,a,b,c)};k.Wc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};k.ub=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ga(a)}; -k.Hc=function(a){return this.ub(wd(this,a,2))};k.Ab=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.oc(a,b&65535)};k.Dd=function(a,b){this.Ab(wd(this,a|65536,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.W(d|c&a.da),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Za=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=wd(a,e|c&65536,4),a.B=a.O>>14&3,a.Ab(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d}function Ad(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Bd(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function Cd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xd(a,b,c,8)} -function Dd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.nb=a.R(b,e,7),c=d.call(a,c,a.F.kb(e)),e&1&&a.b--,a.F.Mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Ab(e,d.call(a,c,a.ub(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Fd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Ab(a.R(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.zb=function(a){this.v.complete=!0;var b=this.v.Tc=this.j&&Hd(this.j),c=a?this.v.pc?0:1:-1;this.v.pc=!1;this.S=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ha();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Fc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Nc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Za=0,this.Zb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.C&128||(this.X=this.aa=a,this.V=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.X=this.aa=c,this.V=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.C&128||(this.X=this.aa=a,this.V=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.C&128||(this.X=this.aa=c,this.V=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.U>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.U>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.U&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.C&128||(this.X=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} -function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.V=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.V=32768,this.U=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.g]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.g]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(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.C&128||(this.X=b>>16,this.aa=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ne(a){Q(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){Q(this,a,Bd(this,a),he);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function id(a){Pe[a>>12].call(this,a)} -var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.g? -4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= -[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ma()==!ld(this))},function(a){R(this,a,!this.Ma()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ma()==!ld(this))},function(a){R(this,a,md(this)||!this.Ma()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, -Gd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.g?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Hc(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.g]},function(a){O(this,Gd(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.K(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},Ne,Ne,Ne,Ne],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, -3)):this.ha();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(jd(this),this.F.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},S,function(){this.aa=1;this.b-=5},S,S,S,function(){this.X=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.U= -65536;this.b-=5},function(){this.V=32768;this.b-=5},U,function(){this.aa=0;this.b-=5},U,U,U,function(){this.X=32768;this.b-=5},U,U,U,U,U,U,U],Re=[re,re,ke,ke,ie,ie,je,je,Oe,Oe,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ma())},function(a){R(this,a,this.Ma())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.K(24,2); -this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= -this.g?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.g?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.g]},V];function ef(a){w.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Na=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ia=function(){if(this.Ja){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ja,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=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Hd:b,A:c,Xc:d,Ja:e,sc:f})}delete this.Ja}return!0};ef.prototype.Ha=function(){return!0}; -function ff(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ja=h.symbols;if(!a.f.length){t("Empty ROM: "+ -b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ba].bc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> -e.ba;0>>=e.ba;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Qb)return;b=oa(b[1]);if(this.J=cb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ia=function(a,b){if(!b)if(this.Bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ha=function(a){return a?this.save():!0};k.reset=function(){mf(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return mf(this)};function mf(a){a.W=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.Y||8,c=a-this.H%a,this.Y&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.jd,W.prototype.Cd,"RCSR"],nf[65394]=[null,null,W.prototype.hd,W.prototype.Bd,"RBUF"],nf[65396]=[null,null,W.prototype.ld,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.kd,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.yc=function(){return-1};of.prototype.zc=function(){}; -function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.Z?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];h=J.prototype;h.Pa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;var e=this;this.f.sc=Qb(this.b,function(){e.f.Ya|=128;e.f.Ya&64&&(K(e.b,0,6,64),Rb(e.b,e.f.sc,1E3/60))});Nb(b,this,L);Ob(b,this.reset.bind(this),this.Sc.bind(this));G(this)};h.jd=function(){var a=this.f.Ya;this.f.Ya&=-129;return a}; +h.Od=function(a){this.f.Ya=a;a&64&&Rb(this.b,this.f.sc,1E3/60);this.f.Ya=a&-129};h.kd=function(){var a=this.b;return a.G&62337|a.Ba<<5|a.Ca<<1};h.Pd=function(a){var b=4,c=this.b;c.G=a&=62337;c.Ba=a>>5&3;c.Ca=a>>1&15;c.kc=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.bb&16?1:2);this.g.tb=this.g.tb&-8|b};h.rd=function(a){return this.b.W[1][a>>1&7]};h.Wd=function(a,b){this.b.W[1][b>>1&7]=a&65295};h.pd=function(a){return this.b.W[1][(a>>1&7)+8]};h.Ud=function(a,b){this.b.W[1][(b>>1&7)+8]=a&65295}; +h.qd=function(a){return this.b.wa[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.od=function(a){return this.b.wa[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.hd=function(a){return this.b.W[0][a>>1&7]};h.Nd=function(a,b){this.b.W[0][b>>1&7]=a&65295};h.fd=function(a){return this.b.W[0][(a>>1&7)+8]};h.Ld=function(a,b){this.b.W[0][(b>>1&7)+8]=a&65295};h.gd=function(a){return this.b.wa[0][a>>1&7]}; +h.Md=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.ed=function(a){return this.b.wa[0][(a>>1&7)+8]};h.Kd=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.vd=function(a){return this.b.W[3][a>>1&7]};h.$d=function(a,b){this.b.W[3][b>>1&7]=a&65295};h.td=function(a){return this.b.W[3][(a>>1&7)+8]};h.Yd=function(a,b){this.b.W[3][(b>>1&7)+8]=a&65295};h.ud=function(a){return this.b.wa[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.W[3][b]&=65295}; +h.sd=function(a){return this.b.wa[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.W[3][b]&=65295};h.ld=function(){return Tb(this.b)};h.Qd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; +function Vb(a){var b=a.D,c,d,e,f=b.xa>>13&7;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.yd,drive:f,blocksize:256,mapped:0,maxblock:b.ib[f]*b.da[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Mb=2496;b.oa=0;b.P=128;b.xa=0;break;case 1:if((b.xa>>4&511)>=b.ib[f]){b.oa|=32832;b.P|=49152;break}if((b.xa&15)>=b.da[f]){b.oa|=32800;b.P|=49152;break}c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;Wb(a,b.sa[f],c,d,e);return;case 2:if((b.xa>>4&511)>=b.ib[f])b.oa|= +32832,b.P|=49152;else if((b.xa&15)>=b.da[f])b.oa|=32800,b.P|=49152;else{c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;a.$b(b.sa[f],c,d,e);return}}b.Mb=f<<13|b.Mb&8176|b.xa%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}h.yd=function(a,b,c,d,e){var f=this.D;f.Lb=d&65535;f.P=f.P&-49|d>>12&48;f.Nb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.P|=49152;break;case 2:f.oa|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; +function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.zd,drive:f,blocksize:128,mapped:1,maxblock:b.ib[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Za&8&&(b.M&=63);b.Za=b.Qc[f]|b.gb&64;break;case 3:1==(b.fa&3)&&(b.gb=b.fa&4?b.gb+(b.fa&65408)&65408|b.fa<<2&64:b.gb-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.gb);break;case 4:b.Za=b.gb;break;case 5:if(b.fa>>6>=b.ib[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* +b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;Wb(a,b.sa[f],c,d,e);return;case 6:if(b.fa>>6>=b.ib[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;a.$b(b.sa[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +h.zd=function(a,b,c,d,e){var f=this.w;f.Fb=d&65535;f.M=f.M&-49|d>>12&48;f.Va=d>>16&63;f.fa=~~(c/f.da[b.Na])<<6|c%f.da[b.Na];f.gb=f.fa;f.Za=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ea=0;a.ua=[4544,4544,4544,4544,4544,4544,4544,4544];a.yb=[0,0,0,0,0,0,0,0];a.ob=a.zb=a.xb=a.eb=a.pc=0} +function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ea&=-2049;c.ua[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.sa[b]&&(c.sa[b]={cache:[],postProcess:a.Ad,drive:b,blocksize:256,mapped:0,maxblock:c.ec[0]*c.hb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Ra[b];c.T|=32896;c.ua[b]|=32896;c.ob|=1<=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0]){c.yb[b]|=1024;c.T|=49152;break}d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))* +c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;Wb(a,c.sa[b],d,e,f);return;case 57:if(c.Ra[b]>=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0])c.yb[b]|=1024,c.T|=49152;else{d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))*c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;a.$b(c.sa[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ua[b]|=128;return!!(c.T&64)})} +h.Ad=function(a,b,c,d,e){var f=this.B;f.zb=65536-e&65535;f.xb=d&65535;f.T=f.T&-769|d>>8&768;f.eb=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.hb[0]);f.Fa[b.Na]=e%f.hb[0]<<8|c%f.da[0];f.bc[b.Na]=f.Ra[b.Na]=d;f.ob|=1<=b.bd-1&&(f.ua[b.Na]|=1024);switch(a){case 1:f.Ea|=512;f.T|=49152;break;case 2:f.Ea|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ua[b.Na]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; +function ic(a,b,c,d,e,f){var g=~~((f+c.Wa-1)/c.Wa),k=new XMLHttpRequest;2048>g&&d+2048this.b.Cb(a.ad?jc(this.b,c):c,a.cache[b][e])){a.Yb(2,a,b,c,d);return}c+=2;--d}b++}a.Yb(0,a,b,c,d)}; +function Wb(a,b,c,d,e){for(var f,g;0g){b.Yb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Yb(0,b,c,d,e)}h.reset=function(){this.g.tb=this.g.tb&-120|20;this.f.Ya=0;this.D.P=128;this.w.M=128;gc(this)}; +h.Sc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.cb&65280:(a&1&&(b<<=8),f.cb=b|255,d=0);break;case 4194298:if(0>b)d=f.oc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.oc=d;f.C|=2}break;case 4194294:if(70!==f.lb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.lb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.lb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.lb)return f.K(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.lb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.jc[e]:(d=M(this,f.jc[e],a,b,c),0<=d&&(f.jc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[3]=b),d=f.Aa[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[1]=b),d=f.Aa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Qa[e]= +b),d=f.Qa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[0]=b),d=f.Aa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Qa[e]=b),d=f.Qa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.za[3][e],a,b,c);0<=d&&(f.za[3][e]=d,f.za[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.ab;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.Id&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=M(this,e.Mb,a,b,c);0<=d&&(e.Mb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=M(this,e.Nb,a,b,c);0<=d&&(e.Nb=d);break;case 4194056:d=M(this,e.Lb,a,b,c);0<=d&&(e.Lb=d); +break;case 4194058:d=M(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4194060:break;case 4194062:d=M(this,e.Jc,a,b,c);0<=d&&(e.Jc=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ea&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.eb=g.eb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=M(this,g.zb,a,b,c);0<=d&&(g.zb=d);break;case 4193732:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d&65534);break;case 4193734:d= +M(this,g.Fa[e],a,b,c);0<=d&&(g.Fa[e]=d&7967);break;case 4193736:d=M(this,g.Ea,a,b,c);0<=d&&(g.Ea=d&63|g.Ea&65472,d&128&&gc(this));break;case 4193738:d=g.ua[e];break;case 4193740:d=g.yb[e];break;case 4193742:d=M(this,g.ob,a,b,c);0<=d&&(g.ob=d&255);break;case 4193744:d=g.Fd[e];break;case 4193746:d=M(this,g.Kc,a,b,c);0<=d&&(g.Kc=d);break;case 4193748:d=M(this,g.Lc[e],a,b,c);0<=d&&(g.Lc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Gd[e];break;case 4193754:d=M(this,g.Mc[e],a,b,c);0<=d&& +(g.Mc[e]=d);break;case 4193756:d=M(this,g.Ra[e],a,b,c);0<=d&&(g.Ra[e]=d&511);break;case 4193758:g.bc[e]=g.Ra[e];d=g.bc[e];break;case 4193760:d=g.Dd[e];break;case 4193762:d=g.Ed[e];break;case 4193764:d=g.Bd[e];break;case 4193766:d=g.Cd[e];break;case 4193768:d=M(this,g.eb,a,b,c);0<=d&&(g.eb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.pc,a,b,c);0<=d&&(g.pc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Va= +e.Va&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=M(this,e.Fb,a,b,c);0<=d&&(e.Fb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Za,a,b,c);0<=d&&(e.Za=d);break;case 4192520:d=M(this,e.Va,a,b,c);0<=d&&(e.Va=d&63,e.M=e.M&-49|(e.Va&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.bb:(d=M(this,f.bb,a,b,c),0<=d&&(70!==f.lb&&(d&=-49),f.bb=d,f.Xb[0]=d&4?15:7,f.Xb[1]=d&2?15:7,f.Xb[3]= +d&1?15:7,f.kc&&(e=2,f.bb&16&&(e=1),this.g.tb=this.g.tb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.za[0][e],a,b,c);0<=d&&(f.za[0][e]=d,f.za[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.za[1][e],a,b,c);0<=d&&(f.za[1][e]=d,f.za[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.lb)return f.K(4,234);e=a>>2&31;d=f.Pb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Pb[e]=a&2?d<<16|f.Pb[e]&65535:f.Pb[e]&4294901760|d&65534));break; +case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Pb[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; +var N={},L=(N[62592]=[null,null,J.prototype.rd,J.prototype.Wd,"SISDR"],N[62608]=[null,null,J.prototype.pd,J.prototype.Ud,"SDSDR"],N[62624]=[null,null,J.prototype.qd,J.prototype.Vd,"SISAR"],N[62640]=[null,null,J.prototype.od,J.prototype.Td,"SDSAR"],N[62656]=[null,null,J.prototype.hd,J.prototype.Nd,"KISDR"],N[62672]=[null,null,J.prototype.fd,J.prototype.Ld,"KDSDR"],N[62688]=[null,null,J.prototype.gd,J.prototype.Md,"KISAR"],N[62704]=[null,null,J.prototype.ed,J.prototype.Kd,"KDSAR"],N[65382]=[null,null, +J.prototype.jd,J.prototype.Od,"LKS"],N[65402]=[null,null,J.prototype.kd,J.prototype.Pd,"MMR0"],N[65408]=[null,null,J.prototype.vd,J.prototype.$d,"UISDR"],N[65424]=[null,null,J.prototype.td,J.prototype.Yd,"UDSDR"],N[65440]=[null,null,J.prototype.ud,J.prototype.Zd,"UISAR"],N[65456]=[null,null,J.prototype.sd,J.prototype.Xd,"UDSAR"],N[65534]=[null,null,J.prototype.ld,J.prototype.Qd,"PSW"],N);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592]; +L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656]; +L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408]; +L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; +Ma(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),qc(this,mc?rc:sc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Z:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ka:function(a){var 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},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< +a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,1,c.S)&&c.ia(!0)}return this.lc(a,b)},ea:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,2,c.S)&&c.ia(!0)}return this.mc(a,b)},na:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,1,d.G)&&d.ia(!0)}this.f?this.L(a, +b,c):this.dc(a,b,c)},ya:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,2,d.G)&&d.ia(!0)}this.f?this.L(a,b,c):this.tc(a,b,c)},R:function(a){return this.w[a]},X:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},$:function(a){return this.B.getUint16(a,!0)},ha:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&D(this.j,"Memory.readWord("+I(this.j,b)+"): "+I(this.j,a),!0);return a},la:function(a,b){this.w[a]=b; +this.Xa=!0},qa:function(a,b,c){this.w[a]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},va:function(a,b){this.B.setUint16(a,b,!0);this.Xa=!0},Ba:function(a,b,c){this.H[a>>1]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}};function Cb(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&wc(a,vc,!1),(a.F=c.F)&&uc(a,vc,!1))} +function yc(a,b){b?--a.F||(a.cc=a.f?a.L:a.dc,a.Pc=a.f?a.G:a.tc):--a.g||(a.Zb=a.lc,a.Hc=a.mc)}function uc(a,b,c){c&&a.F||(a.cc=!a.f&&b[1]||a.L,a.Pc=!a.f&&b[3]||a.G);if(c||void 0===c)a.dc=b[1]||a.L,a.tc=b[3]||a.G}function wc(a,b,c){c&&a.g||(a.Zb=b[0]||a.J,a.Hc=b[2]||a.N);if(c||void 0===c)a.lc=b[0]||a.J,a.mc=b[2]||a.N}function qc(a,b){b||(b=zc);wc(a,b,void 0);uc(a,b,void 0)}var zc=[],tc=[H.prototype.Z,H.prototype.ra,H.prototype.ka,H.prototype.Ca],vc=[H.prototype.S,H.prototype.na,H.prototype.ea,H.prototype.ya]; +if(xb)var sc=[H.prototype.R,H.prototype.la,H.prototype.$,H.prototype.va],rc=[H.prototype.X,H.prototype.qa,H.prototype.ha,H.prototype.Ba];function Ac(a,b){u.call(this,"CPU",a,Ac,1);var c=a.multiplier||1;this.Ta=a.cycles||b;this.$a=c;this.qb=Math.round(this.Ta/1E4)/100;this.nb=this.qb*this.$a;this.v.ga=!1;this.v.rc=!1;this.v.Eb=a.autoStart;this.v.wc=!1;this.v.rb=!1;this.Ib=this.na=0;this.Jb=a.csStart;this.ub=a.csInterval;this.vb=a.csStop;this.N=[];this.Ec=this.Hd.bind(this);G(this)}y(Ac); +var Bc=["power","reset"];h=Ac.prototype;h.Pa=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.na&&(a.na+=a.ub,c=!0);0<=a.vb&&a.vb<=Hc(a)&&(a.ub=a.vb=-1,Ec(a),a.ia(),c=!0);c&&a.i(Hc(a)+" cycles: checksum="+l(a.Ib))}} +function Ic(a,b,c,d){if(a.L[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ia());var e=a.j&&a.j.na||8;c=!a.v.ga||a.v.wc?8==e?ca(c,d):l(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} +h.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ja)a=!0;else{var b=null,c,k=cb(a.id);for(c=0;ca.ha/a.nb?b=1:d=!0;a.$a=b;b=a.qb*a.$a;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Qb()}Kc(a,a.$);a.$=0;a.Z=sa();a.ka=0;Lc(a);return d}function Qb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ta*a.$a/1E3,a.N[b][0]=c)}function ed(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 fd(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]()))}} +h.Hd=function(){if(this.v.ga){this.sb>=this.Ta&&Lc(this,!0);this.ya=0;this.Sa=sa();if(this.ka){var a=this.Sa-this.ka;a>this.Wb&&(this.Z+=a,this.Z>this.Sa&&(this.Z=this.Sa))}try{do{var b=ed(this,this.v.rb?1:this.fb);try{this.Bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;fd(this,c);this.ya+=c;this.$+=c;Kc(this,0,!0);Gc(this,c);this.qa-=c;if(0>=this.qa){this.qa+=this.fb;15<=++this.Cc&&(this.D&&this.D.Ga(),this.Cc=0);break}}while(this.v.ga)}catch(e){this.ia();O(this);this.D&&this.D.stop(sa(), +Hc(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Ec;this.ka=sa();c=this.Wb;this.ya&&(c=Math.round(c*this.ya/this.fb));var c=c-(this.ka-this.Sa),d=this.ka-this.Z;d&&(this.ha=Math.round(this.$/(10*d))/100,864E5<=d&&(this.la=0,Jc(this)));if(0>c||this.hac&&(this.Z-=c),c=0;this.sb+=this.ya;this.ka+=c;a(b,c)}}}; +h.Ab=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Jc(this);this.v.ga=!0;this.v.rc=!0;this.va&&this.va.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Qb(!0),this.D.start(this.Z,Hc(this)));O(this,!0);setTimeout(this.Ec,0);return!0};h.Bb=function(){return 0}; +h.ia=function(a){if(this.v.ga){this.S-=this.b;this.b=0;Kc(this,this.$);this.$=0;this.v.ga=!1;this.va&&this.va.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(sa(),Hc(this));O(this)}this.v.complete=a};function O(a,b){a.D&&a.D.Ga(b)} +function gd(a){this.cd=+a.model||1170;this.dd=a.resetAddr||0;Ac.call(this,a,6666667);this.Tb=0;this.decode=hd.bind(this);this.U=65536;this.V=32768;this.ba=65535;this.Y=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Qa=[0,0,0,0,0,0];this.Aa=[0,0,0,0];this.Ca=this.B=0;this.Yc=[4,2,0,1];this.W=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.za=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Pb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.jc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.pb=this.H=this.J=this.C=0;this.lb=70;this.ra=-1;id(this);this.v.complete=this.v.Uc=!1}y(gd,Ac);h=gd.prototype;h.reset=function(){this.v.ga&&this.ia();id(this);Dc(this);this.v.error=!1;this.parent.reset.call(this)};function id(a){a.cb=255;a.I=0;a.oc=0;a.G=0;a.ab=0;a.ac=0;a.bb=0;a.kc=0;a.Ba=0;a.Xb=262143;a.Vb=253952;a.w=[];a.C|=2;Sb(a)} +function Sb(a){a.kc?(a.ea=65536,a.R=a.Xc,a.X=a.Ic,a.Fc=a.ae):(a.ea=0,a.R=a.Wc,a.X=a.wb,a.Fc=a.Cb)}h.zc=function(){return 0};h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.la,this.$a]);a.set(2,Mb(this.F));return a.data()}; +h.restore=function(a){var b=a[1];this.la=b[1];Jc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ma-=b;break}b-=a.w[f].Ma}a.w.splice(f+1,0,{Ma:b,Gc:c<<5&224,Oc:d,ic:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Oa()|ld(a)|kd(a)|jd(a)} +function Ub(a,b){a.Y=b<<12;a.ba=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Qa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Qa[c];a.Qa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.Aa[c]=a.u[6],a.u[6]=a.Aa[a.B]);a.C|=2;a.O=b}function Q(a,b){a.C&128||(a.Y=a.ba=b,a.V=0)}function od(a,b,c){a.C&128||(a.Y=a.ba=a.U=b,a.V=c||0)}function pd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^b)&(d^b))}function qd(a,b){a.C&128||(a.Y=a.ba=a.U=b,a.V=a.Y^a.U>>1)} +function rd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^d)&(d^b))}h.K=function(a){var b=!1;0>this.ra?this.ra=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.ab=63222,this.ac=a);this.B=0;var c=this.X(a|this.ea),d=this.X(a+2&65535|this.ea);Ub(this,d&-12289|this.ra>>2&12288);b&&(this.I|=4,this.u[6]=4);sd(this,this.ra);sd(this,this.u[7]);nd(this,c);this.C&=-113;this.ra=-1;throw a;};function td(a){var b=ud(a),c=ud(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);nd(a,b);Ub(a,c);a.C&=-17} +function jc(a,b){var c=b>>13&31;31>c?a.bb&32&&(b=a.Pb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function vd(a,b,c){var d,e,f,g=0;d=b>>13;a.bb&a.Yc[a.B]||(d&=7);e=a.W[a.B][d];f=(a.wa[a.B][d]<<6)+(b&8191)&a.Xb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Vb&&4186112>f&&(a.I|=32,a.K(4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= +16384));a.W[a.B][d]=e;if(4194170!==f||a.B)a.Ba=a.B,a.Ca=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.Ba<<5|a.Ca<<1),a.K(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.X(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.X(e)|g;a.b-= +8;break;case 6:return e=md(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=md(a),e=e+a.u[c]&65535,e=a.X(e|a.ea)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.ab=a.ab<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.cb||65534<=a.u[6])&&(a.u[6]<=a.cb-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}h.Wc=function(a,b,c){return wd(this,a,b,c)};h.Xc=function(a,b,c){return vd(this,wd(this,a,b,c),c)};h.wb=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ia(a)}; +h.Ic=function(a){return this.wb(vd(this,a,2))};h.Cb=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.qc(a,b&65535)};h.ae=function(a,b){this.Cb(vd(this,a|65536,4),b)};function xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=wd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.X(d|c&a.ea),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.Aa[a.O>>12&3];return c} +function yd(a,b,c,d){a.G&57344||(a.ab=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=wd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=vd(a,e|c&65536,4),a.B=a.O>>14&3,a.Cb(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.Aa[a.O>>12&3]=d}function zd(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Ad(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function Bd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return wd(a,b,c,8)} +function Cd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.pb=a.R(b,e,7),c=d.call(a,c,a.F.mb(e)),e&1&&a.b--,a.F.Ob(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Cb(e,d.call(a,c,a.wb(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Ed(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Ob(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Fd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Cb(a.R(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(nd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.Bb=function(a){this.v.complete=!0;var b=this.v.Uc=this.j&&Gd(this.j),c=a?this.v.rc?0:1:-1;this.v.rc=!1;this.S=this.b=a;do{if(b){if(Hd(this.j,this.u[7],c)){this.ia();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.oc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Gc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Oc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.ab=0,this.ac=this.u[7]);this.C=this.C&7|this.O&16;this.decode(md(this))}while(0>1|b<<16;qd(this,a);return a&65535}function Nd(a,b){a=b&2048|b>>1|b<<8;qd(this,a<<8);return a&255}function Od(a,b){a=b&~a;Q(this,a);return a}function Pd(a,b){a=b&~a;Q(this,a<<8);return a}function Qd(a,b){a|=b;Q(this,a);return a} +function Rd(a,b){a|=b;Q(this,a<<8);return a}function Sd(a,b){a=~b|65536;od(this,a);return a&65535}function Td(a,b){a=~b|256;od(this,a<<8);return a&255}function Ud(a,b){a=b-a;this.C&128||(this.Y=this.ba=a,this.V=b&(b^a));return a&65535}function Vd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.Y=this.ba=c,this.V=b&(b^c));return a&255}function Wd(a,b){a=b+a;this.C&128||(this.Y=this.ba=a,this.V=a&(b^a));return a&65535} +function Xd(a,b){a=b+a;var c=a<<8;this.C&128||(this.Y=this.ba=c,this.V=c&(b<<8^c));return a&255}function Yd(a,b){a=-b;od(this,a,a&b&32768);return a&65535}function Zd(a,b){a=-b;od(this,a<<8,(a&b&128)<<8);return a&255}function $d(a,b){a=b<<1|this.U>>16&1;qd(this,a);return a&65535}function ae(a,b){a=b<<1|this.U>>16&1;qd(this,a<<8);return a&255}function be(a,b){a=(this.U&65536|b)>>1|b<<16;qd(this,a);return a&65535}function ce(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;qd(this,a<<8);return a&255} +function de(a,b){var c=b-a;rd(this,c,a,b);return c&65535}function ee(a,b){var c=b-a;rd(this,c<<8,a<<8,b<<8);return c&255}function fe(a,b){this.C&128||(this.Y=this.ba=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function ge(a,b){a^=b;Q(this,a);return a&65535} +function he(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.Y=this.ba=c;this.b-=(this.g?6:7)+b} +function ie(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.ba=1);a&8&&(this.Y=0);this.b-=5} +function je(a){var b=Dd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.Y=d>>16):(this.V=32768,this.ba=d>>15|d,this.Y=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.Y=0,this.V=32768,this.U=65536,this.b-=7}var ke=[0,7,7,10,7,11,9,13];function le(a){var b=this.b;nd(this,Bd(this,a));this.b=b-ke[this.g]} +var me=[0,14,14,17,14,18,16,20];function ne(a){var b=this.b,c=Bd(this,a);a=a>>6&7;sd(this,this.u[a]);this.u[a]=this.u[7];nd(this,c);this.b=b-me[this.g]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],pe=[7,13,13,17,14,18,17,21];function qe(a){var b=Dd(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.C&128||(this.Y=b>>16,this.ba=this.Y|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)nd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){S(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){S(this,a,Ad(this,a),ge);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function hd(a){Pe[a>>12].call(this,a)} +var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Ad(this,a),c=this.b;Q(this,Fd(this,a,b));this.b=c-oe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ad(this,a);a=Dd(this,a);rd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,Ad(this,a)&Dd(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Od);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){S(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Id);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=zd(this,a);Q(this,Ed(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=zd(this,a)<<8;a=Cd(this,a)<<8;rd(this,b-a,a,b);this.b-=this.g? +4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,(zd(this,a)&Cd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),de);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= +[function(a){Te[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(a){T(this,a,!this.Oa()==!kd(this))},function(a){T(this,a,!this.Oa()!=!kd(this))},function(a){T(this,a,!ld(this)&&!this.Oa()==!kd(this))},function(a){T(this,a,ld(this)||!this.Oa()!=!kd(this))},ne,ne,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){od(this, +Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ud);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){S(this,a,0,Yd);this.b-=this.g?11:6},function(a){S(this,a,jd(this)?1:0,Id);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,jd(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);od(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],We=[function(a){S(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Ic(a|65536);nd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xd(this,a,0);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a, +0,b);Q(this,b);this.b=c-pe[this.g]},function(a){Q(this,Fd(this,a,this.Oa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,le,le,le,le,function(a){if(a&8)this.K(8,6);else{var b=ud(this);a&=7;nd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, +3)):this.ia();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){td(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(id(this),this.F.reset());this.b-=667},function(){td(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[re,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},U,function(){this.ba=1;this.b-=5},U,U,U,function(){this.Y=0;this.b-=5},U,U,U,U,U,U,U],$e=[re,function(){this.U= +65536;this.b-=5},function(){this.V=32768;this.b-=5},se,function(){this.ba=0;this.b-=5},se,se,se,function(){this.Y=32768;this.b-=5},se,se,se,se,se,se,se],Re=[qe,qe,je,je,he,he,ie,ie,Oe,Oe,V,V,V,V,te,te],Se=[function(a){T(this,a,!this.Oa())},function(a){T(this,a,this.Oa())},function(a){T(this,a,!jd(this)&&!ld(this))},function(a){T(this,a,jd(this)||ld(this))},function(a){T(this,a,!kd(this))},function(a){T(this,a,kd(this))},function(a){T(this,a,!jd(this))},function(a){T(this,a,jd(this))},function(){this.K(24, +2);this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){od(this,Ed(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){R(this,a,0,Zd);this.b-= +this.g?11:6},function(a){R(this,a,jd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,jd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Cd(this,a);od(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){R(this,a,0,ce);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ld);this.b-=this.g?9:3+(7== +this.f?2:0)}],df=[V,function(a){a=xd(this,a,65536);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a,65536,b);Q(this,b);this.b=c-pe[this.g]},V];function ef(a){u.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=fa(this.H);"json"!=b&&"hex"!=b&&(a=ha()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Pa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ka=function(){if(this.La){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.La,f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var m=k.o,n=k.a;if(void 0!==m){var p=f,m=[m>>>0,g],t=ra(p,m,a.vc);0>t&&p.splice(-(t+1),0,m)}n&&(k.a=n.replace(/''/g,'"'))}a.H.push({ee:b,A:c,Zc:d,La:e,uc:f})}delete this.La}return!0};ef.prototype.Ja=function(){return!0}; +function ff(a,b,c,d){if(d)a.ta("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.fc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,k=eval("("+c+")");if(f=k.bytes)a.f=f;else if(f=k.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=k.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=k;a.La=k.symbols;if(!a.f.length){q("Empty ROM: "+ +b);return}if(1==a.f.length){q(a.f[0]);return}}catch(m){a.ta("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].dc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>>e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=pa(b[0]);if(c!=this.Sb)return;b=pa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.fc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ka=function(a,b){if(!b)if(this.Dc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.Ja=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.X=0;a.f=0;a.g=128;a.B=[];return!0}h.nc=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.Z||8,c=a-this.H%a,this.Z&&(b=oa("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,X.prototype.nd,X.prototype.Sd,"RCSR"],nf[65394]=[null,null,X.prototype.md,X.prototype.Rd,"RBUF"],nf[65396]=[null,null,X.prototype.xd,X.prototype.ce,"XCSR"],nf[65398]=[null,null,X.prototype.wd,X.prototype.be,"XBUF"],nf);Ma(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ac=function(){return-1};of.prototype.Bc=function(){}; +function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(pa(b.substring(c,f))),c=f+1}}return a} function rf(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ga[b]);var c=0;for(b in a.ga)vf(a,b,a.ga[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=l(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ha[b]);var c=0;for(b in a.ha)vf(a,b,a.ha[b]),c++;return 0>>d.F.ba;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=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ba].jc(d&c.f,d),this.g--,b&&Gf(a,b));return c};k.Ga=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Gf(a,b));return c}; -k.Mb=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].bc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};k.oc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].rc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,Fa:!1}}function Hf(a){return[a.A,a.Fa]}function If(a){return{A:a[0],Fa:a[1]}} -function Ff(a,b,c){var d;c=(c?a.R:a.cb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.zc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Oa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; -k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,X(this.b.u[7]).A)),this.la&1073741824?this.wa.push(a):this.ua&&a==this.ua||(this.ua=a,this.la&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.pa=0,M(a))))}; -function zf(a){var b;if(Hd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ba],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ba],!0);a.G=["bw"];a.nb=0} -k.hb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.$[e>>>f.ba].hb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Fa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ba],b==a.G));h.Fa||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Kf(z);break;case 8:v="@"+Kf(z);break;case 16:7>z?v="("+Kf(z)+ -")+":(A=u.Ga(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Kf(z)+")+":(A=u.Ga(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Kf(z)+")";break;case 40:v="@-("+Kf(z)+")";break;case 48:A=u.Ga(q,2);v=J(u,A,0,!0)+"("+Kf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ga(q,2),v="@"+J(u,A)+"("+Kf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Oa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Xc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=X(d.u[7]),Nf(a,J(a,a.R.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.Z&&(a.i("ended assemble at "+J(a,a.Y.A)),a.R=a.Y,a.Z=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Y=ja.length);ca-=Y;0>ca&&(null==ja[ja.length-1].A?(Y=ca+Y,ca=0):ca+=ja.length);var Oc=[];"call"==ze&&(jb=1E5,Oc=["CALL"]);for(void 0!==ye&&a.i(Y+" instructions earlier:");0=ja.length&&(ca=0);a.ob=Y;Be++;jb--}}Be||(a.i("no "+Ae+"history available"),a.ob=void 0)}else{var Wb=Ff(a,ia);if(Wb){var Xb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Xb=uf(a,za)>>>0,65536>4||1;wg--&&0$b?String.fromCharCode($b):".";Yb--}lb&&(lb+="\n");lb+=ia+" "+Qc+(0==nb?" "+Ee:"")}lb&&a.i(lb);a.cb=Wb}}}}break;case "e":if("else"==g[0])break;var Ra,Rc,Sc,Tc,Uc=g[0],Vc=g[1];"eb"==Uc?(Ra=1,Rc=255,Sc=a.kb,Tc=a.Mb):"e"==Uc||"ew"==Uc?(Ra=2,Rc=65535,Sc=a.Ga,Tc=a.oc):Vc=null;if(null==Vc)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 ac=Ff(a,Vc);if(ac)for(var bc=2;bcYc;){for(var Aa=null,Ag=256;65536>qb.A>>>0;){Zc.A=a.Ga(qb,2);if(null==qb.A||!Ag--)break;if(!(Zc.A&1)){for(var Bg=a,cc=Zc,Ge=null,rb=cc.A,He=rb,$c=1;6>=$c&& -rb;$c++){if(2<$c){cc.A=rb;var dc=Tf(Bg,cc);if(0<=dc.indexOf("JSR")){var Ie=dc.indexOf(" ");if(rb+(dc.indexOf(" ",Ie+1)-Ie-1)/2==He){Ge=dc;break}}}rb-=2}cc.A=He;if(Aa=Ge)break}}if(!Aa||null==Aa)break;var Je=null;if("ks"==zg){var Ke=Aa.match(/[0-9A-F]+$/);Ke&&(Je=$f(a,Ke[0]))}Aa=na(Aa,50)+" ;"+(Je||"stack="+J(a,qb.A));a.i(Aa);Yc++}Yc||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,C=g[1];"?"==C&&(C=void 0);if(void 0!==C){var ta= -0;if("all"==C)ta=1878917119,C=null;else if("on"==C)la=!0,C=null;else if("off"==C)la=!1,C=null;else{"keys"==C&&(C="key");"kbd"==C&&(C="keyboard");for(ka in H)if(C==ka){ta=H[ka];la=!!(a.la&ta);break}if(!ta){a.i("unknown message category: "+C);break a}}if(ta)if("on"==g[2])a.la|=ta,la=!0;else if("off"==g[2]&&(a.la&=~ta,la=!1,1073741824==ta)){for(var ad=0;ad\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new N(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",sa());og(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== -f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.v.ia=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Cb());this.W&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; -function mg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ha&&(c&&a.b.ha(),d=a.b.Ha(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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]*/, +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]}};h=xf.prototype; +h.Pa=function(a,b,c,d){this.F=b;this.b=c;this.D=a;(a=Cc(a,"messages"))&&Af(this,a);this.sb=Df;Ef(this,function(a){a:{var b=d.F.aa,c=a[0],e=a=0,m=b.length;if(c){a=Z(Ff(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.F.ca;m=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var p=b[e];p.type==c?n++||d.i("..."):(c=p.type,n=Kb[c],p&&d.i(l(p.id,8)+" %"+l(e<>>c.ca].lc(d&c.f,d),this.g--,b&&Gf(a,b));return c};h.Ia=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Lb(this.F,d),this.g--,b&&Gf(a,b));return c}; +h.Ob=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].dc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};h.qc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].tc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};function Y(a){return{A:a,Ha:!1}}function Hf(a){return[a.A,a.Ha]}function If(a){return{A:a[0],Ha:a[1]}} +function Ff(a,b,c){var d;c=(c?a.R:a.fb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Bc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Qa[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Tb(this.b)));return b}; +h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,Y(this.b.u[7]).A)),this.ma&1073741824?this.ya.push(a):this.va&&a==this.va||(this.va=a,this.ma&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.qa=0,O(a))))}; +function zf(a){var b;if(Gd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ca],!0);a.G=["bw"];a.pb=0} +h.jb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+I(this,b.A)),d=!1;else{var f=this.F;f.aa[e>>>f.ca].jb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Ha=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ca],b==a.G));k.Ha||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,x=I(w,r);else if(8192==C)r=r.A-((f&63)<<1)&65535,x=I(w,r);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Kf(B);break;case 8:x="@"+Kf(B);break;case 16:7>B?x="("+Kf(B)+ +")+":(C=w.Ia(r,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Kf(B)+")+":(C=w.Ia(r,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Kf(B)+")";break;case 40:x="@-("+Kf(B)+")";break;case 48:C=w.Ia(r,2);x=I(w,C,0,!0)+"("+Kf(B)+")";7==B&&(x=[x,I(w,C+r.A&65535)]);break;case 56:C=w.Ia(r,2),x="@"+I(w,C)+"("+Kf(B)+")",7==B&&(x=[x,I(w,C+r.A&65535)])}w=x;if(!w||!w.length){k="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Qa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.Aa[b-16]):20==b&&(c="PS="+I(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.vc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,k=f.Zc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}O(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=Y(d.u[7]),Nf(a,I(a,a.R.A)))}}function ag(a,b){b=pa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var n=k[0]+":";k[2]&&(n+=" "+k[2]);a.i(n)}k[3]&&(g=k[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-m;c++}}} +function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+I(a,a.Z.A)),a.R=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.va=null;if(ib(a)&&0p||"z"la.length&&(a.i("note: only "+la.length+" available"),ba=la.length);ea-=ba;0>ea&&(null==la[la.length-1].A?(ba=ea+ba,ea=0):ea+=la.length);var Pc=[];"call"==Ae&&(lb=1E5,Pc=["CALL"]);for(void 0!==ze&&a.i(ba+" instructions earlier:");0=la.length&&(ea=0);a.qb=ba;Ce++;lb--}}Ce||(a.i("no "+Be+"history available"),a.qb=void 0)}else{var Xb=Ff(a,ka);if(Xb){var Yb=0;Ba&&("l"==Ba.charAt(0)&&(Ba=Ba.substr(1)||ug),Yb=uf(a,Ba)>>>0,65536>4||1;wg--&&0ac?String.fromCharCode(ac):".";Zb--}nb&&(nb+="\n");nb+=ka+" "+Rc+(0==pb?" "+Fe:"")}nb&&a.i(nb);a.fb=Xb}}}}break;case "e":if("else"==g[0])break;var Ta,Sc,Tc,Uc,Vc=g[0],Wc=g[1];"eb"==Vc?(Ta=1,Sc=255,Tc=a.mb,Uc=a.Ob):"e"==Vc||"ew"==Vc?(Ta=2,Sc=65535,Tc=a.Ia,Uc=a.qc):Wc=null;if(null==Wc)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 bc=Ff(a,Wc);if(bc)for(var cc=2;ccZc;){for(var Ca=null,Ag=256;65536>sb.A>>>0;){$c.A=a.Ia(sb,2);if(null==sb.A||!Ag--)break;if(!($c.A&1)){for(var Bg=a,dc=$c,He=null,tb=dc.A, +Ie=tb,ad=1;6>=ad&&tb;ad++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new P(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",ta());og(this.B);var e=this.f&&!this.G;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +f&&"no machine state"!=g?(this.ta("Error: "+g),"unable to verify user"==g&&(Da("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ja=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Eb());this.X&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; +function mg(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new P(a,"1.30.1"),g=new P(a,"1.30.1","validate"),k=ta();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ia(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ja=!1,!1===d&&(e=null)));for(var k=cb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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 m=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} -function Ig(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ma(a))}function f(a){e("Error: "+a);l&&(--tg||Sa(!0));l=!1}var g,h,l=!0;tg++;$a[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/pdp11/1.30.1/components.xsl");m=function(d,h){h?Fg(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--tg||Sa(!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),--tg||Sa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,m):Gg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Ig(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); +function Ig(a,b,c,d){function e(a){if(void 0===k){var b=g&&A(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ja(a))}function f(a){e("Error: "+a);m&&(--tg||Oa(!0));m=!1}var g,k,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,k){k?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--tg||Oa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Oa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,n):Gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(r){f(r.message)}return m}window.embedPDP11=function(a,b,c,d){Oa(!1);return Ig(a,b,c,d)};window.enableEvents=Oa;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index a5013259a..6432a8d2d 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -681,162 +681,170 @@ for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ -var k; +var h; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; function ka(){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 p(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){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}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} -function va(a){if(ta)try{for(var b=0;bb?this.hb=this.id:(this.Cb=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Vc:!1,Wc:!1,P:!1,error:!1};this.pb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; +function p(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){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}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} +function va(a){if(ta)try{for(var b=0;bb?this.jb=this.id:(this.Eb=this.id.substr(0,b),this.jb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,td:!1,ud:!1,R:!1,error:!1};this.rb=null;this.i.error=!1;this.A={};this.L=null;w.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.sa=[];this.m=null;this.$a=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.$a(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.$a(c|4186112,b,1)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.$a(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.$a(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.na=function(a,b){b||this.reset();return!0}; -function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Wa)return l.vb+=l.Wa-f,l.Wa=f,!0;if(f>=l.Wa+l.vb){q=l.size-(f-m);q>g&&(q=g);l.vb=f-l.Wa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Gb(b&a.h,b)} -function Wa(a){for(var b=0,c=[],d=0;d>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.ua=[];this.m=null;this.bb=this.H;a=new E;Na(a,this.L);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.bb(b|4186112,-1,1)}function Pa(a,b,c){var d=!1,e=this.controller,f=e.ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.bb(c|4186112,b,1)} +function Qa(a,b){var c=-1,d=this.controller;(a=d.ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.bb(b|4186112,-1,0)}function Ra(a,b,c){var d=!1,e=this.controller;if(a=e.ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.bb(c|4186112,b,0)}Ma.prototype.reset=function(){this.m&&this.m()};Ma.prototype.H=function(){return 0};Ma.prototype.pa=function(a,b){b||this.reset();return!0}; +function Sa(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.c;0g&&(t=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.Ya)return m.xb+=m.Ya-f,m.Ya=f,!0;if(f>=m.Ya+m.xb){t=m.size-(f-n);t>g&&(t=g);m.xb=f-m.Ya+t;f=n+a.g;g-=t;l++;continue}}return Ua(1,f,g)}f=new E(f,t,a.g,d,e);Na(f,a.L,m);a.b[l++]=f;f=n+a.g;g-=t}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+k(b,8,!0)),!0):Ua(2,b,c)}function Wa(a,b){return a.b[(b&a.u)>>>a.c].Ib(b&a.h,b)} +function Xa(a){for(var b=0,c=[],d=0;d>5&3;c.jb=a>>1&15;c.Fb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ba&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.tc=function(){return db(this.a)};k.Nc=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; -function fb(a){var b=a.g,c,d,e,f=b.W>>13&7;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.zc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.cb=2496;b.R=0;b.D=128;b.W=0;break;case 1:if((b.W>>4&511)>=b.Ia[f]){b.R|=32832;b.D|=49152;break}if((b.W&15)>=b.J[f]){b.R|=32800;b.D|=49152;break}c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;gb(a,b.S[f],c,d,e);return;case 2:if((b.W>>4&511)>=b.Ia[f])b.R|=32832, -b.D|=49152;else if((b.W&15)>=b.J[f])b.R|=32800,b.D|=49152;else{c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;a.sb(b.S[f],c,d,e);return}}b.cb=f<<13|b.cb&8176|b.W%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.zc=function(a,b,c,d,e){var f=this.g;f.bb=d&65535;f.D=f.D&-49|d>>12&48;f.eb=65536-e&65535;switch(a){case 1:f.R|=33024;f.D|=49152;break;case 2:f.R|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.Ac,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.za&8&&(b.v&=63);b.za=b.gc[f]|b.Ea&64;break;case 3:1==(b.L&3)&&(b.Ea=b.L&4?b.Ea+(b.L&65408)&65408|b.L<<2&64:b.Ea-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ea);break;case 4:b.za=b.Ea;break;case 5:if(b.L>>6>=b.Ia[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); -d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;gb(a,b.S[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;a.sb(b.S[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} -k.Ac=function(a,b,c,d,e){var f=this.h;f.Za=d&65535;f.v=f.v&-49|d>>12&48;f.ta=d>>16&63;f.L=~~(c/f.J[b.la])<<6|c%f.J[b.la];f.Ea=f.L;f.za=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.U=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.La=a.Qa=a.Oa=a.Da=a.Jb=0} -function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.U[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.S[b]&&(c.S[b]={cache:[],postProcess:a.Bc,drive:b,blocksize:256,mapped:0,maxblock:c.xb[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.ub[b]=c.oa[b];c.F|=32896;c.U[b]|=32896;c.La|=1<=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ -(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;gb(a,c.S[b],d,e,f);return;case 57:if(c.oa[b]>=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;a.sb(c.S[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.U[b]|=128;return!!(c.F&64)})} -k.Bc=function(a,b,c,d,e){var f=this.l;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Da=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.la]=e%f.Ha[0]<<8|c%f.J[0];f.ub[b.la]=f.oa[b.la]=d;f.La|=1<=b.nc-1&&(f.U[b.la]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.U[b.la]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function kb(a,b,c,d,e,f){var g=~~((f+c.ua-1)/c.ua),h=new XMLHttpRequest;2048>g&&d+2048this.a.Sa(a.mc?lb(this.a,c):c,a.cache[b][e])){a.rb(2,a,b,c,d);return}c+=2;--d}b++}a.rb(0,a,b,c,d)}; -function gb(a,b,c,d,e){for(var f,g;0g){b.rb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.rb(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ya=0;this.g.D=128;this.h.v=128;ib(this)}; -k.hc=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ca&65280:(a&1&&(b<<=8),f.Ca=b|255,d=0);break;case 4194298:if(0>b)d=f.Ib;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Ib=d;f.j|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.Z[3][e],a,b,c);0<=d&&(f.Z[3][e]=d,f.Z[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.tb,a,b,c);0<=d&&(f.tb=d);break;case 4194172:d=f.Aa;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Kc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.cb,a,b,c);0<=d&&(e.cb=d);break;case 4194050:d=J(this,e.R,a,b,c);0<=d&&(e.R=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194056:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194058:d=J(this,e.W,a,b,c);0<=d&&(e.W= -d);break;case 4194060:break;case 4194062:d=J(this,e.Zb,a,b,c);0<=d&&(e.Zb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Da=g.Da&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= -J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.U[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.Gc[e];break;case 4193746:d=J(this,g.$b,a,b,c);0<=d&&(g.$b=d);break;case 4193748:d=J(this,g.ac[e],a,b,c);0<=d&&(g.ac[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Hc[e];break;case 4193754:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d);break;case 4193756:d=J(this,g.oa[e],a,b,c);0<=d&&(g.oa[e]= -d&511);break;case 4193758:g.ub[e]=g.oa[e];d=g.ub[e];break;case 4193760:d=g.Ec[e];break;case 4193762:d=g.Fc[e];break;case 4193764:d=g.Cc[e];break;case 4193766:d=g.Dc[e];break;case 4193768:d=J(this,g.Da,a,b,c);0<=d&&(g.Da=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Jb,a,b,c);0<=d&&(g.Jb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ta=e.ta&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= -J(this,e.Za,a,b,c);0<=d&&(e.Za=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.za,a,b,c);0<=d&&(e.za=d);break;case 4192520:d=J(this,e.ta,a,b,c);0<=d&&(e.ta=d&63,e.v=e.v&-49|(e.ta&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ba:(d=J(this,f.Ba,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ba=d,f.qb[0]=d&4?15:7,f.qb[1]=d&2?15:7,f.qb[3]=d&1?15:7,f.Fb&&(e=2,f.Ba&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= -16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.Z[0][e],a,b,c);0<=d&&(f.Z[0][e]=d,f.Z[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.Z[1][e],a,b,c);0<=d&&(f.Z[1][e]=d,f.Z[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.fb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.fb[e]=a&2?d<<16|f.fb[e]&65535:f.fb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var mb={},bb=(mb[65382]=[null,null,H.prototype.rc,H.prototype.Lc,"LKS"],mb[65402]=[null,null,H.prototype.sc,H.prototype.Mc,"MMR0"],mb[65534]=[null,null,H.prototype.tc,H.prototype.Nc,"PSW"],mb);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),tb(this,pb?ub:vb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},ja:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},H:function(a,b){return this.I(a,b)},Y:function(a,b){return this.ca(a, -b)},ha:function(a,b,c){this.A||this.fc(a,b,c)},qa:function(a,b,c){this.A||this.ra(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},V:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.va=!0},ia:function(a,b){this.c[a]=b;this.va=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.va=!0},Fa:function(a,b){this.l[a>>1]=b;this.va=!0}}; -function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&xb(a,yb,!1),(a.u=c.u)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.u||(a.wb=!a.A&&b[1]||a.B,a.Qc=!a.A&&b[3]||a.w);if(c||void 0===c)a.fc=b[1]||a.B,a.ra=b[3]||a.w}function xb(a,b,c){c&&a.h||(a.Gb=b[0]||a.m,a.wc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[G.prototype.N,G.prototype.ja,G.prototype.fa,G.prototype.Ga],yb=[G.prototype.H,G.prototype.ha,G.prototype.Y,G.prototype.qa]; -if(Ia)var vb=[G.prototype.G,G.prototype.ga,G.prototype.V,G.prototype.pa],ub=[G.prototype.M,G.prototype.ia,G.prototype.ea,G.prototype.Fa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.mb=a.cycles||b;this.ia=c;this.Db=Math.round(this.mb/1E4)/100;this.pa=this.Db*this.ia;this.i.$=!1;this.i.cc=!1;this.i.Ya=a.autoStart;this.i.Lb=!1;this.i.ob=!1;this.gb=this.qa=0;this.lb=a.csStart;this.Ga=a.csInterval;this.Ta=a.csStop;this.M=[];this.Vb=this.Ic.bind(this);F(this)}y(Bb); -var Cb=["power","reset"];k=Bb.prototype;k.xa=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} -k.X=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.fa/a.pa&&(b=1),a.ia=b,b=a.Db*a.ia,a.pa!=b)){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.T("target speed: "+b)}Kb(a,a.ca);a.ca=0;a.Y=ja();a.ga=0;Lb(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.mb*a.ia/1E3,a.M[b][0]=c)} -k.Ic=function(){if(this.i.$){this.Eb>=this.mb&&Lb(this,!0);this.Va=0;this.kb=ja();if(this.ga){var a=this.kb-this.ga;a>this.Tb&&(this.Y+=a,this.Y>this.kb&&(this.Y=this.kb))}try{do{for(var b,c=this.i.ob?1:this.nb,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.dc(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.ha-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Va+=f;this.ca+=f;Kb(this,0,!0);a=f;if(this.i.ob){var l= -!1;this.gb=this.gb+this.Nb()|0;this.qa-=a;0>=this.qa&&(this.qa+=this.Ga,l=!0);0<=this.Ta&&this.Ta<=Mb(this)&&(this.Ga=this.Ta=-1,Fb(this),L(this),l=!0);l&&this.T(Mb(this)+" cycles: checksum="+n(this.gb))}this.Ua-=f;if(0>=this.Ua){this.Ua+=this.nb;15<=++this.Ub&&(this.B&&this.B.Ra(),this.Ub=0);break}}while(this.i.$)}catch(m){L(this);Gb(this);this.B&&this.B.stop(ja(),Mb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Vb;this.ga=ja();d=this.Tb;this.Va&&(d= -Math.round(d*this.Va/this.nb));d-=this.ga-this.kb;if(e=this.ga-this.Y)this.fa=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ja=0,Jb(this));if(0>d||this.fad&&(this.Y-=d),d=0;this.Eb+=this.Va;this.ga+=d;b(c,d)}}};function Hb(a){var b;a.i.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.T(a.toString()+" busy");else{Jb(a);a.i.$=!0;a.i.cc=!0;a.Fa&&a.Fa.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Y,Mb(a));Gb(a,!0);setTimeout(a.Vb,0)}}k.dc=function(){return 0}; -function L(a){if(a.i.$){a.ha-=a.a;a.a=0;Kb(a,a.ca);a.ca=0;a.i.$=!1;a.Fa&&a.Fa.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Mb(a));Gb(a)}a.i.complete=void 0}function Gb(a,b){a.B&&a.B.Ra(b)} -function Nb(a){this.Jc=a.resetAddr||0;Bb.call(this,a,6666667);this.Ob=0;this.decode=Ob.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.Jc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.jb=this.w=0;this.Z=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Bb=this.H=this.I=this.j=0;this.Ja=70;this.ra=-1;Pb(this);this.i.complete=this.i.ic=!1}y(Nb,Bb);k=Nb.prototype;k.reset=function(){this.i.$&&L(this);Pb(this);Eb(this);this.i.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.Ca=255;a.s=0;a.Ib=0;a.G=0;a.Aa=0;a.tb=0;a.Ba=0;a.Fb=0;a.ib=0;a.oc=[4,2,0,1];a.qb=262143;a.Rb=253952;a.Sb=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pc=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.o=[];a.j|=2;cb(a)} -function cb(a){a.Fb?(a.ea=65536,a.N=a.lc,a.V=a.Yb,a.Wb=a.Rc):(a.ea=0,a.N=a.kc,a.V=a.Na,a.Wb=a.Sa)}k.Nb=function(){return 0};k.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ja,this.ia]);a.set(2,Wa(this.u));return a.data()}; -k.restore=function(a){var b=a[1];this.ja=b[1];Jb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ka-=b;break}b-=a.o[f].ka}a.o.splice(f+1,0,{ka:b,Xb:c<<5&224,ec:d,yb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.wa()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)} -function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Sb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} -function K(a,b){var c=!1;0>a.ra?a.ra=db(a):a.w||(b=4,c=!0);a.G&57344||(a.Aa=63222,a.tb=b);a.w=0;var d=a.V(b|a.ea),e=a.V(b+2&65535|a.ea);eb(a,e&-12289|a.ra>>2&12288);c&&(a.s|=4,a.f[6]=4);Tb(a,a.ra);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ra=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} -function lb(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.fb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Wb(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.oc[a.w]||(d&=7);e=a.Sb[a.w][d];f=(a.pc[a.w][d]<<6)+(b&8191)&a.qb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Rb&&4186112>f&&(a.s|=32,K(a,4))));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.Sb[a.w][d]=e;if(4194170!==f||a.w)a.ib=a.w,a.jb=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.ib<<5|a.jb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.V(e|a.ea)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ca||65534<=a.f[6])&&(a.f[6]<=a.Ca-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.kc=function(a,b,c){return Xb(this,a,b,c)};k.lc=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};k.Na=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].wc(a&b.h,a)}; -k.Yb=function(a){return this.Na(Wb(this,a,2))};k.Sa=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].Qc(a&c.h,b&65535,a)};k.Rc=function(a,b){this.Sa(Wb(this,a|65536,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.V(d|c&a.ea),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c} -function Zb(a,b,c,d){a.G&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Wb(a,e|c&65536,4),a.w=a.C>>14&3,a.Sa(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d}function $b(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} -function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Bb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].wb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),a.Sa(e,d.call(a,c,a.Na(e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].wb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Sa(a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -k.dc=function(a){this.i.complete=!0;this.i.ic=!1;this.i.cc=!1;this.ha=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Ib&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Xb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?K(this,a.ec):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.Aa=0,this.tb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Qb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function kc(a,b){a=b&~a;O(this,a);return a}function lc(a,b){a=b&~a;O(this,a<<8);return a}function mc(a,b){a|=b;O(this,a);return a}function nc(a,b){a|=b;O(this,a<<8);return a}function oc(a,b){a=~b|65536;P(this,a);return a&65535} -function pc(a,b){a=~b|256;P(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function vc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} -function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;O(this,a);return a&65535}function Ec(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Fc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Gc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} -var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=S(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.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,R(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Ob(a){Sc[a>>12].call(this,a)} -var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,dc(this,a,b));this.a=c-Lc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),kc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? -2:0)},function(a){U(this,a,R(this,a),mc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);O(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ -(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),lc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Ac);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.wa()==!(this.g&32768))},function(a){V(this,a,!this.wa()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.wa()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.wa()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> -6&3].call(this,a)},Y,Y],Xc=[function(a){P(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,N(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,N(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);O(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);O(this,b);this.a=c-Mc[this.c]},function(a){O(this,dc(this,a,this.wa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, -Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Pb(this),this.u.reset());this.a-=667},function(){Ub(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= -5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.wa())},function(a){V(this,a,this.wa())},function(a){V(this,a,!N(this)&&!!(this.h&65535))},function(a){V(this,a,N(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, -a,!N(this))},function(a){V(this,a,N(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){P(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? -9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b? -2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Yb(this,a,65536);Tb(this,a);O(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);O(this,b);this.a=c-Mc[this.c]},Y]; -function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}y(hd);hd.prototype.xa=function(a,b,c,d){this.u=b;this.a=c;this.K=d;jd(this)};hd.prototype.na=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; -hd.prototype.ma=function(){return!0}; -function id(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Cb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); -return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].fc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.hb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Cb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.na=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ma=function(a){return a?this.save():!0};k.reset=function(){od(this)};k.save=function(){var a=new M(this);a.set(0,[]);return a.data()};k.restore=function(){return od(this)};function od(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Hb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.T(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.vc,Z.prototype.Pc,"RCSR"],pd[65394]=[null,null,Z.prototype.uc,Z.prototype.Oc,"RBUF"],pd[65396]=[null,null,Z.prototype.yc,Z.prototype.Tc,"XCSR"],pd[65398]=[null,null,Z.prototype.xc,Z.prototype.Sc,"XBUF"],pd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new M(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.T(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Y=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.Ya());this.I&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];h=F.prototype;h.za=function(a,b,c,d){this.u=b;this.a=c;this.L=d;var e=this;this.b.Mb=ab(this.a,function(){e.b.Aa|=128;e.b.Aa&64&&(G(e.a,0,6,64),bb(e.a,e.b.Mb,1E3/60))});Ya(b,this,I);Za(b,this.reset.bind(this),this.ic.bind(this));D(this)};h.wc=function(){var a=this.b.Aa;this.b.Aa&=-129;return a}; +h.ad=function(a){this.b.Aa=a;a&64&&bb(this.a,this.b.Mb,1E3/60);this.b.Aa=a&-129};h.xc=function(){var a=this.a;return a.H&62337|a.kb<<5|a.lb<<1};h.bd=function(a){var b=4,c=this.a;c.H=a&=62337;c.kb=a>>5&3;c.lb=a>>1&15;c.Hb=a&257?a&1?6:4:0;cb(c);a=c.H;a&1|256&&(b=this.a.Da&16?1:2);this.c.Oa=this.c.Oa&-8|b};h.Ec=function(a){return this.a.G[1][a>>1&7]};h.jd=function(a,b){this.a.G[1][b>>1&7]=a&65295};h.Cc=function(a){return this.a.G[1][(a>>1&7)+8]};h.gd=function(a,b){this.a.G[1][(b>>1&7)+8]=a&65295}; +h.Dc=function(a){return this.a.X[1][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.Bc=function(a){return this.a.X[1][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.vc=function(a){return this.a.G[0][a>>1&7]};h.$c=function(a,b){this.a.G[0][b>>1&7]=a&65295};h.tc=function(a){return this.a.G[0][(a>>1&7)+8]};h.Yc=function(a,b){this.a.G[0][(b>>1&7)+8]=a&65295};h.uc=function(a){return this.a.X[0][a>>1&7]}; +h.Zc=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.sc=function(a){return this.a.X[0][(a>>1&7)+8]};h.Xc=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.Ic=function(a){return this.a.G[3][a>>1&7]};h.nd=function(a,b){this.a.G[3][b>>1&7]=a&65295};h.Gc=function(a){return this.a.G[3][(a>>1&7)+8]};h.ld=function(a,b){this.a.G[3][(b>>1&7)+8]=a&65295};h.Hc=function(a){return this.a.X[3][a>>1&7]};h.md=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.G[3][b]&=65295}; +h.Fc=function(a){return this.a.X[3][(a>>1&7)+8]};h.kd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.G[3][b]&=65295};h.yc=function(){return db(this.a)};h.cd=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; +function fb(a){var b=a.g,c,d,e,f=b.Y>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Mc,drive:f,blocksize:256,mapped:0,maxblock:b.Ka[f]*b.K[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.fb=2496;b.S=0;b.D=128;b.Y=0;break;case 1:if((b.Y>>4&511)>=b.Ka[f]){b.S|=32832;b.D|=49152;break}if((b.Y&15)>=b.K[f]){b.S|=32800;b.D|=49152;break}c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;gb(a,b.T[f],c,d,e);return;case 2:if((b.Y>>4&511)>=b.Ka[f])b.S|=32832, +b.D|=49152;else if((b.Y&15)>=b.K[f])b.S|=32800,b.D|=49152;else{c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;a.ub(b.T[f],c,d,e);return}}b.fb=f<<13|b.fb&8176|b.Y%9&15;G(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}h.Mc=function(a,b,c,d,e){var f=this.g;f.eb=d&65535;f.D=f.D&-49|d>>12&48;f.gb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}G(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Nc,drive:f,blocksize:128,mapped:1,maxblock:b.Ka[f]*b.K[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.Ba&8&&(b.v&=63);b.Ba=b.hc[f]|b.Ga&64;break;case 3:1==(b.M&3)&&(b.Ga=b.M&4?b.Ga+(b.M&65408)&65408|b.M<<2&64:b.Ga-(b.M&65408)&65408|b.M<<2&64,b.M=b.Ga);break;case 4:b.Ba=b.Ga;break;case 5:if(b.M>>6>=b.Ka[f]){b.v|=37888;break}if((b.M&63)>=b.K[f]){b.v|=37888;break}c=(b.M>>6)*b.K[f]+(b.M&63); +d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;gb(a,b.T[f],c,d,e);return;case 6:if(b.M>>6>=b.Ka[f])b.v|=37888;else if((b.M&63)>=b.K[f])b.v|=37888;else{c=(b.M>>6)*b.K[f]+(b.M&63);d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;a.ub(b.T[f],c,d,e);return}}G(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} +h.Nc=function(a,b,c,d,e){var f=this.h;f.ab=d&65535;f.v=f.v&-49|d>>12&48;f.va=d>>16&63;f.M=~~(c/f.K[b.na])<<6|c%f.K[b.na];f.Ga=f.M;f.Ba=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}G(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.ca=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Ra=[0,0,0,0,0,0,0,0];a.Na=a.Sa=a.Qa=a.Fa=a.Lb=0} +function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.ca&=-2049;c.V[b]&=-1153;G(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.Oc,drive:b,blocksize:256,mapped:0,maxblock:c.zb[0]*c.Ja[0]*c.K[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.wb[b]=c.qa[b];c.F|=32896;c.V[b]|=32896;c.Na|=1<=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0]){c.Ra[b]|=1024;c.F|=49152;break}d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+ +(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;gb(a,c.T[b],d,e,f);return;case 57:if(c.qa[b]>=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0])c.Ra[b]|=1024,c.F|=49152;else{d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;a.ub(c.T[b],d,e,f);return}}G(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} +h.Oc=function(a,b,c,d,e){var f=this.l;f.Sa=65536-e&65535;f.Qa=d&65535;f.F=f.F&-769|d>>8&768;f.Fa=d>>16&63;e=~~(c/f.K[0]);d=~~(e/f.Ja[0]);f.da[b.na]=e%f.Ja[0]<<8|c%f.K[0];f.wb[b.na]=f.qa[b.na]=d;f.Na|=1<=b.oc-1&&(f.V[b.na]|=1024);switch(a){case 1:f.ca|=512;f.F|=49152;break;case 2:f.ca|=2048,f.F|=49152}G(this.a,20,5,172,function(){f.V[b.na]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function kb(a,b,c,d,e,f){var g=~~((f+c.wa-1)/c.wa),l=new XMLHttpRequest;2048>g&&d+2048this.a.Ua(a.nc?lb(this.a,c):c,a.cache[b][e])){a.tb(2,a,b,c,d);return}c+=2;--d}b++}a.tb(0,a,b,c,d)}; +function gb(a,b,c,d,e){for(var f,g;0g){b.tb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.tb(0,b,c,d,e)}h.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.Aa=0;this.g.D=128;this.h.v=128;ib(this)}; +h.ic=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ea&65280:(a&1&&(b<<=8),f.Ea=b|255,d=0);break;case 4194298:if(0>b)d=f.Kb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Kb=d;f.j|=2}break;case 4194294:if(70!==f.La)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.La)return K(f,4);d=1;break;case 4194290:if(70!==f.La)return K(f,4);d=0;break;case 4194288:if(70!==f.La)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.La)return K(f,4);e=a-4194272>>1;0>b?d=f.Cb[e]:(d=J(this,f.Cb[e],a,b,c),0<=d&&(f.Cb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[3]=b),d=f.fa[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[1]=b),d=f.fa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ma[e]=b),d=f.Ma[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[0]=b),d=f.fa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ma[e]=b),d=f.Ma[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.aa[3][e],a,b,c);0<=d&&(f.aa[3][e]=d,f.aa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.vb,a,b,c);0<=d&&(f.vb=d);break;case 4194172:d=f.Ca;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Wc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.fb,a,b,c);0<=d&&(e.fb=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.gb,a,b,c);0<=d&&(e.gb=d);break;case 4194056:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194058:d=J(this,e.Y,a,b,c);0<=d&&(e.Y= +d);break;case 4194060:break;case 4194062:d=J(this,e.$b,a,b,c);0<=d&&(e.$b=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.ca&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Fa=g.Fa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&G(f,0,5,172));break;case 4193730:d=J(this,g.Sa,a,b,c);0<=d&&(g.Sa=d);break;case 4193732:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d&65534);break;case 4193734:d=J(this,g.da[e],a,b,c);0<=d&&(g.da[e]=d&7967);break;case 4193736:d= +J(this,g.ca,a,b,c);0<=d&&(g.ca=d&63|g.ca&65472,d&128&&ib(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Ra[e];break;case 4193742:d=J(this,g.Na,a,b,c);0<=d&&(g.Na=d&255);break;case 4193744:d=g.Tc[e];break;case 4193746:d=J(this,g.ac,a,b,c);0<=d&&(g.ac=d);break;case 4193748:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Uc[e];break;case 4193754:d=J(this,g.cc[e],a,b,c);0<=d&&(g.cc[e]=d);break;case 4193756:d=J(this,g.qa[e],a,b,c);0<=d&&(g.qa[e]= +d&511);break;case 4193758:g.wb[e]=g.qa[e];d=g.wb[e];break;case 4193760:d=g.Rc[e];break;case 4193762:d=g.Sc[e];break;case 4193764:d=g.Pc[e];break;case 4193766:d=g.Qc[e];break;case 4193768:d=J(this,g.Fa,a,b,c);0<=d&&(g.Fa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Lb,a,b,c);0<=d&&(g.Lb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.va=e.va&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= +J(this,e.ab,a,b,c);0<=d&&(e.ab=d&65534);break;case 4192516:d=J(this,e.M,a,b,c);0<=d&&(e.M=d);break;case 4192518:d=J(this,e.Ba,a,b,c);0<=d&&(e.Ba=d);break;case 4192520:d=J(this,e.va,a,b,c);0<=d&&(e.va=d&63,e.v=e.v&-49|(e.va&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Da:(d=J(this,f.Da,a,b,c),0<=d&&(70!==f.La&&(d&=-49),f.Da=d,f.sb[0]=d&4?15:7,f.sb[1]=d&2?15:7,f.sb[3]=d&1?15:7,f.Hb&&(e=2,f.Da&16&&(e=1),this.c.Oa=this.c.Oa&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.aa[0][e],a,b,c);0<=d&&(f.aa[0][e]=d,f.aa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.aa[1][e],a,b,c);0<=d&&(f.aa[1][e]=d,f.aa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.La)return K(f,4);e=a>>2&31;d=f.hb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.hb[e]=a&2?d<<16|f.hb[e]&65535:f.hb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; +var L={},I=(L[62592]=[null,null,F.prototype.Ec,F.prototype.jd,"SISDR"],L[62608]=[null,null,F.prototype.Cc,F.prototype.gd,"SDSDR"],L[62624]=[null,null,F.prototype.Dc,F.prototype.hd,"SISAR"],L[62640]=[null,null,F.prototype.Bc,F.prototype.fd,"SDSAR"],L[62656]=[null,null,F.prototype.vc,F.prototype.$c,"KISDR"],L[62672]=[null,null,F.prototype.tc,F.prototype.Yc,"KDSDR"],L[62688]=[null,null,F.prototype.uc,F.prototype.Zc,"KISAR"],L[62704]=[null,null,F.prototype.sc,F.prototype.Xc,"KDSAR"],L[65382]=[null,null, +F.prototype.wc,F.prototype.ad,"LKS"],L[65402]=[null,null,F.prototype.xc,F.prototype.bd,"MMR0"],L[65408]=[null,null,F.prototype.Ic,F.prototype.nd,"UISDR"],L[65424]=[null,null,F.prototype.Gc,F.prototype.ld,"UDSDR"],L[65440]=[null,null,F.prototype.Hc,F.prototype.md,"UISAR"],L[65456]=[null,null,F.prototype.Fc,F.prototype.kd,"UDSAR"],L[65534]=[null,null,F.prototype.yc,F.prototype.cd,"PSW"],L);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592]; +I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640];I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656]; +I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704];I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408]; +I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; +u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),sb(this,ob?tb:ub);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},O:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ha:function(a){var 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},la:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.xa=!0},I:function(a,b){return this.J(a,b)},$:function(a,b){return this.ea(a, +b)},ja:function(a,b,c){this.A||this.gc(a,b,c)},sa:function(a,b,c){this.A||this.ta(a,b,c)},H:function(a){return this.c[a]},N:function(a){return this.c[a]},W:function(a){return this.g.getUint16(a,!0)},ga:function(a){return this.l[a>>1]},ia:function(a,b){this.c[a]=b;this.xa=!0},ka:function(a,b){this.c[a]=b;this.xa=!0},ra:function(a,b){this.g.setUint16(a,b,!0);this.xa=!0},Ha:function(a,b){this.l[a>>1]=b;this.xa=!0}}; +function Na(a,b,c){a.L=b;a.h=a.u=0;c&&((a.h=c.h)&&wb(a,xb,!1),(a.u=c.u)&&yb(a,xb,!1))}function yb(a,b,c){c&&a.u||(a.yb=!a.A&&b[1]||a.B,a.od=!a.A&&b[3]||a.w);if(c||void 0===c)a.gc=b[1]||a.B,a.ta=b[3]||a.w}function wb(a,b,c){c&&a.h||(a.Ib=b[0]||a.m,a.Jc=b[2]||a.o);if(c||void 0===c)a.J=b[0]||a.m,a.ea=b[2]||a.o}function sb(a,b){b||(b=zb);wb(a,b,void 0);yb(a,b,void 0)}var zb=[],vb=[E.prototype.O,E.prototype.la,E.prototype.ha,E.prototype.Ia],xb=[E.prototype.I,E.prototype.ja,E.prototype.$,E.prototype.sa]; +if(Ja)var ub=[E.prototype.H,E.prototype.ia,E.prototype.W,E.prototype.ra],tb=[E.prototype.N,E.prototype.ka,E.prototype.ga,E.prototype.Ha];function Ab(a,b){v.call(this,"CPU",a,Ab);var c=a.multiplier||1;this.ob=a.cycles||b;this.ka=c;this.Fb=Math.round(this.ob/1E4)/100;this.ra=this.Fb*this.ka;this.i.ba=!1;this.i.dc=!1;this.i.$a=a.autoStart;this.i.Nb=!1;this.i.qb=!1;this.ib=this.sa=0;this.nb=a.csStart;this.Ia=a.csInterval;this.Va=a.csStop;this.N=[];this.Wb=this.Vc.bind(this);D(this)}x(Ab); +var Bb=["power","reset"];h=Ab.prototype;h.za=function(a,b,c,d){this.B=a;this.u=b;this.L=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} +h.Z=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.R)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.ha/a.ra&&(b=1),a.ka=b,b=a.Fb*a.ka,a.ra!=b)){a.ra=b;b=a.ra.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Jb(a,a.ea);a.ea=0;a.$=ja();a.ia=0;Kb(a)}function ab(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.ob*a.ka/1E3,a.N[b][0]=c)} +h.Vc=function(){if(this.i.ba){this.Gb>=this.ob&&Kb(this,!0);this.Xa=0;this.mb=ja();if(this.ia){var a=this.mb-this.ia;a>this.Ub&&(this.$+=a,this.$>this.mb&&(this.$=this.mb))}try{do{for(var b,c=this.i.qb?1:this.pb,d=this.N.length-1;0<=d;d--){var e=this.N[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ec(b)}catch(n){if("number"!=typeof n)throw n;}for(var f=this.ja-this.a,a=f,g=this.N.length-1;0<=g;g--){var l=this.N[g];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Xa+=f;this.ea+=f;Jb(this,0,!0);a=f;if(this.i.qb){var m= +!1;this.ib=this.ib+this.Pb()|0;this.sa-=a;0>=this.sa&&(this.sa+=this.Ia,m=!0);0<=this.Va&&this.Va<=Lb(this)&&(this.Ia=this.Va=-1,Eb(this),M(this),m=!0);m&&this.U(Lb(this)+" cycles: checksum="+k(this.ib))}this.Wa-=f;if(0>=this.Wa){this.Wa+=this.pb;15<=++this.Vb&&(this.B&&this.B.Ta(),this.Vb=0);break}}while(this.i.ba)}catch(n){M(this);Fb(this);this.B&&this.B.stop(ja(),Lb(this));b=n.stack||n.message;this.i.error=!0;this.P(b);return}if(this.i.ba){b=setTimeout;c=this.Wb;this.ia=ja();d=this.Ub;this.Xa&& +(d=Math.round(d*this.Xa/this.pb));d-=this.ia-this.mb;if(e=this.ia-this.$)this.ha=Math.round(this.ea/(10*e))/100,864E5<=e&&(this.la=0,Ib(this));if(0>d||this.had&&(this.$-=d),d=0;this.Gb+=this.Xa;this.ia+=d;b(c,d)}}};function Gb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.ba)a.U(a.toString()+" busy");else{Ib(a);a.i.ba=!0;a.i.dc=!0;a.Ha&&a.Ha.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.$,Lb(a));Fb(a,!0);setTimeout(a.Wb,0)}}h.ec=function(){return 0}; +function M(a){if(a.i.ba){a.ja-=a.a;a.a=0;Jb(a,a.ea);a.ea=0;a.i.ba=!1;a.Ha&&a.Ha.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Lb(a));Fb(a)}a.i.complete=void 0}function Fb(a,b){a.B&&a.B.Ta(b)} +function Mb(a){this.rc=a.resetAddr||0;Ab.call(this,a,6666667);this.Qb=0;this.decode=Nb.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.rc];this.Ma=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.lb=this.w=0;this.pc=[4,2,0,1];this.G=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.aa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.hb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0];this.Cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Db=this.I=this.J=this.j=0;this.La=70;this.ta=-1;Ob(this);this.i.complete=this.i.jc=!1}x(Mb,Ab);h=Mb.prototype;h.reset=function(){this.i.ba&&M(this);Ob(this);Db(this);this.i.error=!1;this.parent.reset.call(this)};function Ob(a){a.Ea=255;a.s=0;a.Kb=0;a.H=0;a.Ca=0;a.vb=0;a.Da=0;a.Hb=0;a.kb=0;a.sb=262143;a.Tb=253952;a.o=[];a.j|=2;cb(a)} +function cb(a){a.Hb?(a.ga=65536,a.O=a.mc,a.W=a.Zb,a.Xb=a.pd):(a.ga=0,a.O=a.lc,a.W=a.Pa,a.Xb=a.Ua)}h.Pb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.la,this.ka]);a.set(2,Xa(this.u));return a.data()}; +h.restore=function(a){var b=a[1];this.la=b[1];Ib(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ma-=b;break}b-=a.o[f].ma}a.o.splice(f+1,0,{ma:b,Yb:c<<5&224,fc:d,Ab:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.ya()|(a.h&65535?0:4)|(a.g&32768?2:0)|O(a)} +function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&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.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.fa[c]=a.f[6],a.f[6]=a.fa[a.w]);a.j|=2;a.C=b}function P(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function Q(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Qb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function R(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.ta?a.ta=db(a):a.w||(b=4,c=!0);a.H&57344||(a.Ca=63222,a.vb=b);a.w=0;var d=a.W(b|a.ga),e=a.W(b+2&65535|a.ga);eb(a,e&-12289|a.ta>>2&12288);c&&(a.s|=4,a.f[6]=4);Sb(a,a.ta);Sb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ta=-1;throw b;}function Tb(a){var b=Ub(a),c=Ub(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} +function lb(a,b){var c=b>>13&31;31>c?a.Da&32&&(b=a.hb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Vb(a,b,c){var d,e,f,g=0;d=b>>13;a.Da&a.pc[a.w]||(d&=7);e=a.G[a.w][d];f=(a.X[a.w][d]<<6)+(b&8191)&a.sb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Tb&&4186112>f&&(a.s|=32,K(a,4))));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.G[a.w][d]=e;if(4194170!==f||a.w)a.kb=a.w,a.lb=d;g&&(g&57344&&(0<=a.ta&&(g|=128),a.H&57344||(a.H=a.H|g|a.kb<<5|a.lb<<1),K(a,168)),a.H&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-=8;break; +case 6:return e=Pb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Pb(a),e=e+a.f[c]&65535,e=a.W(e|a.ga)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.H&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ea||65534<=a.f[6])&&(a.f[6]<=a.Ea-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}h.lc=function(a,b,c){return Wb(this,a,b,c)};h.mc=function(a,b,c){return Vb(this,Wb(this,a,b,c),c)};h.Pa=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].Jc(a&b.h,a)}; +h.Zb=function(a){return this.Pa(Vb(this,a,2))};h.Ua=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].od(a&c.h,b&65535,a)};h.pd=function(a,b){this.Ua(Vb(this,a|65536,4),b)};function Xb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Wb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.W(d|c&a.ga),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.fa[a.C>>12&3];return c} +function Yb(a,b,c,d){a.H&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Wb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Vb(a,e|c&65536,4),a.w=a.C>>14&3,a.Ua(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.fa[a.C>>12&3]=d}function Zb(a,b){b>>=6;var c=a.J=b&7;(b=a.I=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.I=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function $b(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Wb(a,b,c,8)} +function ac(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function bc(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Db=a.O(b,e,7),c=d.call(a,c,Wa(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].yb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.O(b,e,6),a.Ua(e,d.call(a,c,a.Pa(e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.O(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].yb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Ua(a.O(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +h.ec=function(a){this.i.complete=!0;this.i.jc=!1;this.i.dc=!1;this.ja=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Kb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Yb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?K(this,a.fc):K(this,160))}else this.j&1&&this.j++;this.H&57344||(this.Ca=0,this.vb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Pb(this))}while(0>1|b<<16;R(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;R(this,a<<8);return a&255}function kc(a,b){a=b&~a;P(this,a);return a}function lc(a,b){a=b&~a;P(this,a<<8);return a}function mc(a,b){a|=b;P(this,a);return a}function nc(a,b){a|=b;P(this,a<<8);return a}function oc(a,b){a=~b|65536;Q(this,a);return a&65535} +function pc(a,b){a=~b|256;Q(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;Q(this,a,a&b&32768);return a&65535} +function vc(a,b){a=-b;Q(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;R(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;R(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;R(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;R(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Rb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Rb(this,c<<8,a<<8,b<<8);return c&255} +function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;P(this,a);return a&65535}function Ec(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Fc(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Gc(a){var b=bc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=$b(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} +var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=$b(this,a);a=a>>6&7;Sb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=bc(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.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,S(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Nb(a){Sc[a>>12].call(this,a)} +var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=S(this,a),c=this.a;P(this,dc(this,a,b));this.a=c-Lc[(this.I?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=S(this,a);a=bc(this,a);Rb(this,b-a,a,b);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,S(this,a)&bc(this,a));this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),kc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b? +2:0)},function(a){U(this,a,S(this,a),mc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),ec);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Zb(this,a);P(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){var b=Zb(this,a)<<8;a=ac(this,a)<<8;Rb(this,b-a,a,b);this.a-=this.c?4+ +(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,(Zb(this,a)&ac(this,a))<<8);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),lc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),nc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),Ac);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ya()==!(this.g&32768))},function(a){V(this,a,!this.ya()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ya()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ya()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> +6&3].call(this,a)},Y,Y],Xc=[function(a){Q(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,O(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,O(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this, +a);Q(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Xb(this,a,0);Sb(this,a);P(this,a);this.a-= +11},function(a){var b=Ub(this),c=this.a;Yb(this,a,0,b);P(this,b);this.a=c-Mc[this.c]},function(a){P(this,dc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Ub(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, +Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):M(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Tb(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Ob(this),this.u.reset());this.a-=667},function(){Tb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= +5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.ya())},function(a){V(this,a,this.ya())},function(a){V(this,a,!O(this)&&!!(this.h&65535))},function(a){V(this,a,O(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +a,!O(this))},function(a){V(this,a,O(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){Q(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? +9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,O(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,O(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ac(this,a);Q(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Db&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Db&1):3+(7==this.b? +2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Xb(this,a,65536);Sb(this,a);P(this,a);this.a-=11},function(a){var b=Ub(this),c=this.a;Yb(this,a,65536,b);P(this,b);this.a=c-Mc[this.c]},Y]; +function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}x(hd);hd.prototype.za=function(a,b,c,d){this.u=b;this.a=c;this.L=d;jd(this)};hd.prototype.pa=function(){this.l&&(this.L&&this.L.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; +hd.prototype.oa=function(){return!0}; +function id(a,b,c,d){if(d)a.P("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Eb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=l;a.l=l.symbols;if(!a.b.length){q("Empty ROM: "+b); +return}if(1==a.b.length){q(a.b[0]);return}}catch(m){a.P("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].gc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.jb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Eb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.pa=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.oa=function(a){return a?this.save():!0};h.reset=function(){od(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return od(this)};function od(a){a.J=0;a.b=0;a.c=128;a.h=[];return!0}h.Jb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.N||8,c=a-this.m%a,this.N&&(b=" ".slice(0,c)));this.H&&!this.m&&c&&(b=String.fromCharCode(this.H)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.U(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;G(this.a,100,4,52,this.I)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Ac,Z.prototype.ed,"RCSR"],pd[65394]=[null,null,Z.prototype.zc,Z.prototype.dd,"RBUF"],pd[65396]=[null,null,Z.prototype.Lc,Z.prototype.rd,"XCSR"],pd[65398]=[null,null,Z.prototype.Kc,Z.prototype.qd,"XBUF"],pd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new N(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== +f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.$=!0;this.i.R=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.$a());this.J&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; function zd(a,b){if(la("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),g=new M(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ma&&(c&&L(a.a),d=a.a.ma(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.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 Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ka();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.oa&&(c&&M(a.a),d=a.a.oa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.R=!1,!1===d&&(e=null)));for(var l=y(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],n,t=/( [a-z]+=)(['"])(.*?)\2/g;n=t.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Kd(a,b,c)}})}else c(a,null)} -function Ld(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--Hd||wa(!0));l=!1}var g,h,l=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Id(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hd||wa(!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),--Hd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,m):Jd(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +function Ld(a,b,c,d){function e(a){if(void 0===l){var b=g&&C(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);m&&(--Hd||wa(!0));m=!1}var g,l,m=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=n:z.appendChild(document.createTextNode(n));t.appendChild(z)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,l){l?Id(c,null,null,!1,e,function(d,m){m?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Hd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Hd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,n):Jd(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return m}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})();